Hacked By AnonymousFox
3
iR�V�` � @ s� d dl Z yd dlmZ W n ek
r8 d dlmZ Y nX d dlZd dlmZ d dlm Z m
Z
mZmZ dZ
e jd�Zd dlmZmZmZmZmZ d dlmZ G d d
� d
�ZG dd� d�ZG d
d� de�ZG dd� de�ZdS )� N)�RLock)�process_introspection_data)�
DBusException�IntrospectionParserException�MissingErrorHandlerException�MissingReplyHandlerExceptionZrestructuredtextzdbus.proxies)�BUS_DAEMON_IFACE�BUS_DAEMON_NAME�BUS_DAEMON_PATH�INTROSPECTABLE_IFACE�
LOCAL_PATH)�is_py2c @ s( e Zd ZdZdd� Zdd� Zdd� ZdS ) �_DeferredMethodzXA proxy method which will only get called once we have its
introspection reply.
c C s || _ |j| _|| _|| _d S )N)�
_proxy_method�_method_name�_append�_block)�self�proxy_method�append�block� r �/usr/lib64/python3.6/proxies.py�__init__6 s z_DeferredMethod.__init__c O s@ d|ks|j dd�r(| j| j||� d S | j� | j||�S d S )N�
reply_handler�ignore_replyF)�getr r r )r �args�keywordsr r r �__call__= s z_DeferredMethod.__call__c O s | j | j||� d S )N)r r )r r r r r r �
call_asyncH s z_DeferredMethod.call_asyncN)�__name__�
__module__�__qualname__�__doc__r r r r r r r r 2 s r c @ s( e Zd ZdZdd� Zdd� Zdd� ZdS ) �_ProxyMethodz�A proxy method.
Typically a member of a ProxyObject. Calls to the
method produce messages that travel over the Bus and are routed
to a specific named Service.
c C sX |t krtdt ��|| _|| _|| _|| _tj|� || _|d k rNtj |� || _
d S )Nz1Methods may not be called on the reserved path %s)r r �_proxy�_connection�_named_service�_object_path�_dbus_bindingsZvalidate_member_namer Zvalidate_interface_name�_dbus_interface)r �proxyZ
connection�bus_name�object_pathZmethod_nameZifacer r r r S s
z_ProxyMethod.__init__c O s |j dd �}|j dd �}|j dd�}|j dd �}|d k s@|d k rl|d krPt� �n|d kr`t� �n|rltd��|j d| j�}|d kr�|d kr�| j}n|d | j }| jjj|d �}|s�|d k r�| j j
| j| j|| j||||f|� n | j j
| j| j|| j||f|�S d S ) Nr �
error_handlerr F� signaturez6ignore_reply and reply_handler cannot be used together�dbus_interface�.)�popr r � TypeErrorr+ r r&