dbfdg 3 Ö¸VXã@s6ddlmZddlmZeddƒZGdd„deƒZdS)é)ÚGLib)Ú namedtupleÚAuthorizationResultz"is_authorized is_challenge detailsc@sdeZdZdd„Zedd„ƒZedd„ƒZedd„ƒZed d „ƒZed d „ƒZ ddd„Z ddd„Z dS)ÚMethodCallContextcCs ||_dS)N)Ú_mi)ÚselfZgdbus_method_invocation©rú)/usr/lib/python3.6/method_call_context.pyÚ__init__szMethodCallContext.__init__cCs |jjƒjS)N)rZget_connectionZpydbus)rrrr Úbus szMethodCallContext.buscCs |jjƒS)N)rZ get_sender)rrrr ÚsenderszMethodCallContext.sendercCs |jjƒS)N)rZget_object_path)rrrr Ú object_pathszMethodCallContext.object_pathcCs |jjƒS)N)rZget_interface_name)rrrr Úinterface_namesz MethodCallContext.interface_namecCs |jjƒS)N)rZget_method_name)rrrr Ú method_nameszMethodCallContext.method_nameFcCs4t|jjjddtjd|jƒif|||r*dnddƒŽS)Nzsystem-bus-nameÚnameÚsérÚ)rr Zpolkit_authorityZCheckAuthorizationrZVariantr )rÚ action_idÚdetailsÚ interactiverrr Úcheck_authorizationsz%MethodCallContext.check_authorizationcCs|j|||ƒjS)N)rÚ is_authorized)rrrrrrr r!szMethodCallContext.is_authorizedN)F)F) Ú__name__Ú __module__Ú __qualname__r Úpropertyr r r rrrrrrrr rs      rN)Z gi.repositoryrÚ collectionsrrÚobjectrrrrr Ús