File: //usr/lib/python3.6/site-packages/pydbus/__pycache__/method_call_context.cpython-36.pyc
3
ָVX � @ s6 d dl mZ d dlmZ edd�ZG dd� de�ZdS )� )�GLib)�
namedtuple�AuthorizationResultz"is_authorized is_challenge detailsc @ sd e Zd Zdd� Zedd� �Zedd� �Zedd� �Zed d
� �Zedd� �Z ddd�Z
ddd�ZdS )�MethodCallContextc C s
|| _ d S )N)�_mi)�selfZgdbus_method_invocation� r �)/usr/lib/python3.6/method_call_context.py�__init__ s zMethodCallContext.__init__c C s | j j� jS )N)r Zget_connectionZpydbus)r r r r �bus
s zMethodCallContext.busc C s
| j j� S )N)r Z
get_sender)r r r r �sender s zMethodCallContext.senderc C s
| j j� S )N)r Zget_object_path)r r r r �object_path s zMethodCallContext.object_pathc C s
| j j� S )N)r Zget_interface_name)r r r r �interface_name s z MethodCallContext.interface_namec C s
| j j� S )N)r Zget_method_name)r r r r �method_name s zMethodCallContext.method_nameFc C s4 t | jjjddtjd| j�if|||r*dndd�� S )Nzsystem-bus-name�name�s� r � )r r Zpolkit_authorityZCheckAuthorizationr ZVariantr )r � action_id�details�interactiver r r �check_authorization s z%MethodCallContext.check_authorizationc C s | j |||�jS )N)r �
is_authorized)r r r r r r r r ! s zMethodCallContext.is_authorizedN)F)F)�__name__�
__module__�__qualname__r
�propertyr r r
r r r r r r r r r s
r N)Z
gi.repositoryr �collectionsr r �objectr r r r r �<module> s