a F `w@s\ddlmZmZgdZGdddeZGdddeZGdddeZGd d d eZd S) ) get_dbus_path get_dbus_name)DBusInterfaceIdentifierDBusObjectIdentifierDBusServiceIdentifierc@s.eZdZdZd ddZeddZddZdS) DBusBaseIdentifierzA base identifier.NcCs0|rg||R}||_t||_t||_dS)zCreate an identifier. :param namespace: a sequence of strings :param basename: a string with the base name or None N) _namespacer_namer_path)self namespacebasenamer5/usr/lib/python3.9/site-packages/dasbus/identifier.py__init__!s  zDBusBaseIdentifier.__init__cCs|jS)zDBus namespace of this object.)rr rrrr .szDBusBaseIdentifier.namespacecCs|jSz!Return the string representation.)r rrrr__str__3szDBusBaseIdentifier.__str__)N)__name__ __module__ __qualname____doc__rpropertyr rrrrrrs   rcs>eZdZdZd fdd ZddZeddZd d ZZ S) rzIdentifier of a DBus interface.Ncstj||d||_dS)zDescribe 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)r r r interface_version __class__rrr;sz DBusInterfaceIdentifier.__init__cCs|dur 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||jS)z Full name of the DBus interface.)r r!rrrrrinterface_namePsz&DBusInterfaceIdentifier.interface_namecCs|jSr)r"rrrrrUszDBusInterfaceIdentifier.__str__)NN) rrrrrr!rr"r __classcell__rrrrr8s    rcs6eZdZdZd fdd ZeddZddZZS) rzIdentifier of a DBus object.Ncstj|||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)r r r robject_versionrrrr]s zDBusObjectIdentifier.__init__cCs|j||jS)zFull path of the DBus object.)r r!r$rrrr object_pathjsz DBusObjectIdentifier.object_pathcCs|jSr)r&rrrrroszDBusObjectIdentifier.__str__)NNN) rrrrrrr&rr#rrrrrZs  rcs\eZdZdZdfdd ZeddZeddZd d Zd d Z d dZ dddZ Z S)rzIdentifier of a DBus service.Ncs$tj||||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)r message_busr r rr%Zservice_versionrrrrws zDBusServiceIdentifier.__init__cCs|jS)z}Message bus of the DBus service. :return: a message bus :rtype: an instance of the MessageBus class )r(rrrrr)sz!DBusServiceIdentifier.message_buscCs|j||jS)zFull name of a DBus service.)r r!r'rrrr service_namesz"DBusServiceIdentifier.service_namecCs|jSr)r*rrrrrszDBusServiceIdentifier.__str__cCs"|dur|jSt|tr|jS|S)zChoose an object path.N)r& isinstancer)r Z object_idrrr_choose_object_paths  z)DBusServiceIdentifier._choose_object_pathcCs |dur dSt|tr|jS|S)zChoose an interface name.N)r+rr")r Z interface_idrrr_choose_interface_names  z,DBusServiceIdentifier._choose_interface_namecKs.||}||}|jj|j||fi|S)a Returns a proxy of the DBus object. If no object path is specified, we will use the object path of this DBus service. If no interface name is specified, we will use none and create a proxy from all interfaces of the DBus object. :param object_path: an object identifier or a DBus path or None :param interface_name: an interface identifier or a DBus name or None :param bus_arguments: additional arguments for the message bus :return: a proxy object )r,r-r( get_proxyr*)r r&r"Z bus_argumentsrrrr.s  zDBusServiceIdentifier.get_proxy)NNNN)NN) rrrrrrr)r*rr,r-r.r#rrrrrts    rN) Zdasbus.namespacerr__all__objectrrrrrrrrs "