Mini Shell

Direktori : /usr/lib/python3.6/site-packages/dasbus/__pycache__/
Upload File :
Current File : //usr/lib/python3.6/site-packages/dasbus/__pycache__/identifier.cpython-36.opt-1.pyc

3

��^�@s^ddlmZmZdddgZGdd�de�ZGdd�de�ZGdd�de�ZGd	d�de�Zd
S)�)�
get_dbus_path�
get_dbus_name�DBusInterfaceIdentifier�DBusObjectIdentifier�DBusServiceIdentifierc@s.eZdZdZd	dd�Zedd��Zdd�ZdS)
�DBusBaseIdentifierzA base identifier.NcCs,|r||f�}||_t|�|_t|�|_dS)z�Create an identifier.

        :param namespace: a sequence of strings
        :param basename: a string with the base name or None
        N)�
_namespacer�_namer�_path)�self�	namespace�basename�r� /usr/lib/python3.6/identifier.py�__init__!s


zDBusBaseIdentifier.__init__cCs|jS)zDBus namespace of this object.)r)rrrrr.szDBusBaseIdentifier.namespacecCs|jS)z!Return the string representation.)r	)rrrr�__str__3szDBusBaseIdentifier.__str__)N)�__name__�
__module__�__qualname__�__doc__r�propertyrrrrrrrs

rcs>eZdZdZd�fdd�	Zdd�Zedd��Zd	d
�Z�Z	S)rzIdentifier of a DBus interface.Ncst�j||d�||_dS)z�Describe a DBus interface.

        :param namespace: a sequence of strings
        :param basename: a string with the base name or None
        :param interface_version: a version of the interface
        )r
N)�superr�_interface_version)rrr
�interface_version)�	__class__rrr;sz DBusInterfaceIdentifier.__init__cCs|dkrdSt|�S)ziConvert version to a string.

        :param version: a number or None
        :return: a string
        N�)�str)r�versionrrr�_version_to_stringEsz*DBusInterfaceIdentifier._version_to_stringcCs|j|j|j�S)z Full name of the DBus interface.)r	rr)rrrr�interface_namePsz&DBusInterfaceIdentifier.interface_namecCs|jS)z!Return the string representation.)r)rrrrrUszDBusInterfaceIdentifier.__str__)NN)
rrrrrrrrr�
__classcell__rr)rrr8s

cs6eZdZdZd	�fdd�	Zedd��Zdd�Z�ZS)
rzIdentifier of a DBus object.Ncst�j|||d�||_dS)aDescribe a DBus object.

        :param namespace: a sequence of strings
        :param basename: a string with the base name or None
        :param interface_version: a version of the DBus interface
        :param object_version: a version of the DBus object
        )r
rN)rr�_object_version)rrr
r�object_version)rrrr]s	
zDBusObjectIdentifier.__init__cCs|j|j|j�S)zFull path of the DBus object.)r
rr!)rrrr�object_pathjsz DBusObjectIdentifier.object_pathcCs|jS)z!Return the string representation.)r#)rrrrroszDBusObjectIdentifier.__str__)NNN)	rrrrrrr#rr rr)rrrZs
csPeZdZdZd�fdd�	Zedd��Zdd�Zd	d
�Zdd�Z	dd
d�Z
�ZS)rzIdentifier of a DBus service.Ncs$t�j||||d�||_||_dS)auDescribe a DBus service.

        :param message_bus: a message bus
        :param namespace: a sequence of strings
        :param basename: a string with the base name or None
        :param interface_version: a version of the DBus interface
        :param object_version: a version of the DBus object
        :param service_version: a version of the DBus service
        )r
rr"N)rr�_service_version�_message_bus)rZmessage_busrr
rr"Zservice_version)rrrrws

zDBusServiceIdentifier.__init__cCs|j|j|j�S)zFull name of a DBus service.)r	rr$)rrrr�service_name�sz"DBusServiceIdentifier.service_namecCs|jS)z!Return the string representation.)r&)rrrrr�szDBusServiceIdentifier.__str__cCs"|dkr|jSt|t�r|jS|S)zChoose an object path.N)r#�
isinstancer)rr#rrr�_choose_object_path�s

z)DBusServiceIdentifier._choose_object_pathcCs|dkr|dkr|jgS|S)zChoose interface names.N)r)rr#Zinterface_namesrrr�_choose_interface_names�sz-DBusServiceIdentifier._choose_interface_namescCs|j|�}|jj|j|�S)z�Returns a proxy of the DBus object.

        :param object_path: a DBus path an object or None
        :return: a proxy object
        )r(r%�	get_proxyr&)rr#rrrr*�s
zDBusServiceIdentifier.get_proxy)NNNN)N)rrrrrrr&rr(r)r*r rr)rrrts
N)	Zdasbus.namespacerr�__all__�objectrrrrrrrr�<module>s"