ó
    V#ÓgsD  ã                   ó$  • S r SrSSKrSSKrSSKJrJrJrJrJ	r	J
r
JrJrJrJrJrJrJrJrJrJrJrJrJrJrJrJrJr  SSKJr  SSKJr  SSK J!r!  SSK"J#r#  S	\< S
\< S\< S3r$ Sr%\RL                  " S5      r' " S S\(5      r) " S S\5      r*g))ÚBusConnectionÚreStructuredTexté    N)ÚBUS_DAEMON_IFACEÚBUS_DAEMON_NAMEÚBUS_DAEMON_PATHÚBUS_SESSIONÚBUS_STARTERÚ
BUS_SYSTEMÚ DBUS_START_REPLY_ALREADY_RUNNINGÚDBUS_START_REPLY_SUCCESSÚNAME_FLAG_ALLOW_REPLACEMENTÚNAME_FLAG_DO_NOT_QUEUEÚNAME_FLAG_REPLACE_EXISTINGÚRELEASE_NAME_REPLY_NON_EXISTENTÚRELEASE_NAME_REPLY_NOT_OWNERÚRELEASE_NAME_REPLY_RELEASEDÚ REQUEST_NAME_REPLY_ALREADY_OWNERÚREQUEST_NAME_REPLY_EXISTSÚREQUEST_NAME_REPLY_IN_QUEUEÚ REQUEST_NAME_REPLY_PRIMARY_OWNERÚvalidate_bus_nameÚvalidate_error_nameÚvalidate_interface_nameÚvalidate_member_nameÚvalidate_object_path)Ú
Connection)ÚDBusException)ÚHANDLER_RESULT_NOT_YET_HANDLED)Úis_py2ztype='signal',sender='z',interface='z"',member='NameOwnerChanged',path='z',arg0='%s'z)org.freedesktop.DBus.Error.NameHasNoOwnerzdbus.busc                   ó$   • \ rS rSrSrS rS rSrg)ÚNameOwnerWatché<   )Ú_matchÚ_pending_callc           
      óÖ   ^^• [        T5        U4S jnUU4S jnUR                  US[        [        [        TS9U l        UR                  [        [        [        SST4TU5      U l        g )Nc                 ó   >• T" U5        g ©N© )ÚownedÚ	old_ownerÚ	new_ownerÚcallbacks      €Ú*/usr/lib/python3/dist-packages/dbus/bus.pyÚ	signal_cbÚ*NameOwnerWatch.__init__.<locals>.signal_cbB   s   ø€ Ù�YÕó    c                 ó¶   >• U R                  5       [        :X  a	  T" S5        g [        R                  " 5         [        R                  STU R                  U S 4S9  g )NÚ zGetNameOwner(%s) failed:)Úexc_info)Úget_dbus_nameÚ_NAME_HAS_NO_OWNERÚloggingÚbasicConfigÚ_loggerÚdebugÚ	__class__)ÚeÚbus_namer,   s    €€r-   Úerror_cbÚ)NameOwnerWatch.__init__.<locals>.error_cbE   sJ   ø€ Ø�‰Ó Ô$6Ó6Ù˜•ä×#Ò#Ô%Ü—‘Ð8¸(Ø()¯©°Q¸Ð'=ð ò ?r0   ÚNameOwnerChanged)Úarg0ÚGetNameOwnerÚs)r   Úadd_signal_receiverr   r   r   r#   Ú
call_asyncr$   )ÚselfÚbus_connr<   r,   r.   r=   s     ``  r-   Ú__init__ÚNameOwnerWatch.__init__?   sm   ù€ Ü˜(Ô#õ	 ö	?ð ×2Ñ2°9Ø3EÜ3CÜ3BÜ3BØ8@ð 3ð BˆŒð &×0Ñ0´Ü1@Ü1AØ1?Ø14°x°kØ19¸8óEˆÕr0   c                 ó¼   • U R                   b  U R                   R                  5         U R                  b  U R                  R                  5         S U l         S U l        g r'   )r#   Úremover$   Úcancel©rE   s    r-   rK   ÚNameOwnerWatch.cancelZ   sI   € Ø�;‰;Ñ"Ø�K‰K×ÑÔ Ø×ÑÑ)Ø×Ñ×%Ñ%Ô'ØˆŒØ!ˆÕr0   N)Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú	__slots__rG   rK   Ú__static_attributes__r(   r0   r-   r!   r!   <   s   † Ø+€IòEõ6"r0   r!   c                   óÎ   ^ • \ rS rSrSr\r \r \	r
 \r\r\S4S jr   SU 4S jjrS rS r  SS jrS	 rSS
 jrSS jrS rS rS rS rS rS rS rS rS rS r Sr!U =r"$ )r   éc   zlA connection to a D-Bus daemon that implements the
``org.freedesktop.DBus`` pseudo-service.

:Since: 0.81.0
Nc                 óh   • U R                  XS9n[        R                  " 5       Ul        0 Ul         U$ )N)Úmainloop)Ú_new_for_busÚweakrefÚWeakValueDictionaryÚ
_bus_namesÚ_signal_sender_matches)ÚclsÚaddress_or_typerW   Úbuss       r-   Ú__new__ÚBusConnection.__new__w   s7   € Ø×Ñ˜ÐÐBˆô !×4Ò4Ó6ˆŒà%'ˆÔ"Ø5àˆ
r0   c                 ój  >^• UR                  SS 5      nUb"  Ub  [        S5      eUnSSKJn  U" S[        SS9  [
        [        U ]  " XX4U40 UD6mUbE  U[        :w  a;  US S S	:X  a  U4S
 jn	OTR                  n	U R                  XI5      n
X R                  T'   U R                  [        T5      5        T$ )NÚnamed_serviceú3bus_name and named_service cannot both be specifiedr   ©ÚwarnzrPassing the named_service parameter to add_signal_receiver by name is deprecated: please use positional parametersé   ©Ú
stacklevelé   Ú:c                 ó4   >• U S:X  a  TR                  5         g g )Nr2   )rJ   )r+   Úmatchs    €r-   r,   Ú3BusConnection.add_signal_receiver.<locals>.callback–   s   ø€ Ø  B“ØŸ™�ð 'r0   )ÚpopÚ	TypeErrorÚwarningsrf   ÚDeprecationWarningÚsuperr   rC   r   Úset_sender_name_ownerÚwatch_name_ownerr\   Úadd_match_stringÚstr)rE   Úhandler_functionÚsignal_nameÚdbus_interfacer<   ÚpathÚkeywordsrc   rf   r,   Úwatchrm   r:   s              @€r-   rC   Ú!BusConnection.add_signal_receiver‚   sÕ   ù€ ð !Ÿ™ _°dÓ;ˆØÑ$ØÑ#Üð !,ó -ð -à$ˆHÝ%Ùð Kä#°ò3ô ”m TÒ>Ø ¨~Øñ"à ñ"ˆð Ñ  X´Ó%@Ø˜˜ˆ|˜sÓ"ö'ð !×6Ñ6�Ø×)Ñ)¨(Ó=ˆEØ16×'Ñ'¨Ñ.à×Ñœc %›jÔ)àˆr0   c                 ó˜   • U R                  [        U5      5        U R                  R                  US 5      nUb  UR	                  5         g g r'   )Ú remove_match_string_non_blockingrw   r\   ro   rK   )rE   rm   r}   s      r-   Ú_clean_up_signal_matchÚ$BusConnection._clean_up_signal_match¢   s@   € à×-Ñ-¬c°%«jÔ9Ø×+Ñ+×/Ñ/°°tÓ<ˆØÑØ�L‰L�Nð r0   c                 óú   • Ub%  US S S:w  a  U[         :w  a   U R                  U5      $ U$ ! [         aE  nUR                  5       [        :w  a  e U R                  U5        U R                  U5      s S nA$ S nAff = f)Nrj   rk   )r   Úget_name_ownerr   r4   r5   Ústart_service_by_name)rE   r<   r;   s      r-   Úactivate_name_ownerÚ!BusConnection.activate_name_owner©   s~   € ØÑ  X¨b¨q \°SÓ%8ØœOÓ+ð5Ø×*Ñ*¨8Ó4Ð4ð ˆOøô !ó 5Ø—?‘?Ó$Ô(:Ó:Øà×*Ñ*¨8Ô4Ø×*Ñ*¨8Ó4Õ4ûð5ús   ˜+ «
A:µ:A5Á/A:Á5A:c                 ó&  • U(       a  U R                  5         UR                  SS5      nUb"  Ub  [        S5      eSSKJn  U" S[
        SS9  UnU(       a+  [        S	S
R                  UR                  5       5      -  5      eU R                  XUUUS9$ )aj  Return a local proxy for the given remote object.

Method calls on the proxy are translated into method calls on the
remote object.

:Parameters:
    `bus_name` : str
        A bus name (either the unique name or a well-known name)
        of the application owning the object. The keyword argument
        named_service is a deprecated alias for this.
    `object_path` : str
        The object path of the desired object
    `introspect` : bool
        If true (default), attempt to introspect the remote
        object to find out supported methods and their signatures
    `follow_name_owner_changes` : bool
        If the object path is a well-known name and this parameter
        is false (default), resolve the well-known name to the unique
        name of its current owner and bind to that instead; if the
        ownership of the well-known name changes in future,
        keep communicating with the original owner.
        This is necessary if the D-Bus API used is stateful.

        If the object path is a well-known name and this parameter
        is true, whenever the well-known name changes ownership in
        future, bind to the new owner, if any.

        If the given object path is a unique name, this parameter
        has no effect.

:Returns: a `dbus.proxies.ProxyObject`
:Raises `DBusException`: if resolving the well-known name to a
    unique name fails
rc   Nrd   r   re   ziPassing the named_service parameter to get_object by name is deprecated: please use positional parametersrg   rh   z4get_object does not take these keyword arguments: %sz, )Ú
introspectÚfollow_name_owner_changes)	Ú_require_main_loopro   rp   rq   rf   rr   ÚjoinÚkeysÚProxyObjectClass)rE   r<   Úobject_pathr‰   rŠ   Úkwargsrc   rf   s           r-   Ú
get_objectÚBusConnection.get_object¸   s´   € öH %Ø×#Ñ#Ô%àŸ
™
 ?°DÓ9ˆØÑ$ØÑ#Üð !/ó 0ð 0å%Ùð Cä#°ò3ð %ˆHÞÜð ,Ø.2¯i©i¸¿¹»Ó.FñGó Hð Hð ×$Ñ$ T°[Ø0:Ø?Xð %ð Zð 	Zr0   c                 ó^   • [        U5        U R                  [        [        [        SSU45      $ )zºGet the numeric uid of the process owning the given bus name.

:Parameters:
    `bus_name` : str
        A bus name, either unique or well-known
:Returns: a `dbus.UInt32`
:Since: 0.80.0
ÚGetConnectionUnixUserrB   ©r   Úcall_blockingr   r   r   ©rE   r<   s     r-   Úget_unix_userÚBusConnection.get_unix_userñ   s0   € ô 	˜(Ô#Ø×!Ñ!¤/´?Ü"2Ð4KØ"%¨ {ó4ð 	4r0   c           
      ób   • [        U5        SU R                  [        [        [        SSX45      4$ )aß  Start a service which will implement the given bus name on this Bus.

:Parameters:
    `bus_name` : str
        The well-known bus name to be activated.
    `flags` : dbus.UInt32
        Flags to pass to StartServiceByName (currently none are
        defined)

:Returns: A tuple of 2 elements. The first is always True, the
    second is either START_REPLY_SUCCESS or
    START_REPLY_ALREADY_RUNNING.

:Raises `DBusException`: if the service could not be started.
:Since: 0.80.0
TÚStartServiceByNameÚsur•   )rE   r<   Úflagss      r-   r…   Ú#BusConnection.start_service_by_nameÿ   s;   € ô" 	˜(Ô#Ø�d×(Ñ(¬¼/Ü)9Ø)=Ø)-°Ð/@óBð Cð 	Cr0   c           	      ó\   • [        USS9  U R                  [        [        [        SSX45      $ )a  Request a bus name.

:Parameters:
    `name` : str
        The well-known name to be requested
    `flags` : dbus.UInt32
        A bitwise-OR of 0 or more of the flags
        `NAME_FLAG_ALLOW_REPLACEMENT`,
        `NAME_FLAG_REPLACE_EXISTING`
        and `NAME_FLAG_DO_NOT_QUEUE`
:Returns: `REQUEST_NAME_REPLY_PRIMARY_OWNER`,
    `REQUEST_NAME_REPLY_IN_QUEUE`,
    `REQUEST_NAME_REPLY_EXISTS` or
    `REQUEST_NAME_REPLY_ALREADY_OWNER`
:Raises `DBusException`: if the bus daemon cannot be contacted or
    returns an error.
F©Úallow_uniqueÚRequestNamerœ   r•   )rE   Únamer�   s      r-   Úrequest_nameÚBusConnection.request_name  s1   € ô$ 	˜$¨UÒ3Ø×!Ñ!¤/´?Ü"2°MØ"&¨¨ó7ð 	7r0   c                 ó\   • [        USS9  U R                  [        [        [        SSU45      $ )a+  Release a bus name.

:Parameters:
    `name` : str
        The well-known name to be released
:Returns: `RELEASE_NAME_REPLY_RELEASED`,
    `RELEASE_NAME_REPLY_NON_EXISTENT`
    or `RELEASE_NAME_REPLY_NOT_OWNER`
:Raises `DBusException`: if the bus daemon cannot be contacted or
    returns an error.
Fr    ÚReleaseNamerB   r•   )rE   r£   s     r-   Úrelease_nameÚBusConnection.release_name/  s1   € ô 	˜$¨UÒ3Ø×!Ñ!¤/´?Ü"2°MØ"%¨ wó0ð 	0r0   c                 óF   • U R                  [        [        [        SSS5      $ )zqReturn a list of all currently-owned names on the bus.

:Returns: a dbus.Array of dbus.UTF8String
:Since: 0.81.0
Ú	ListNamesr2   r(   ©r–   r   r   r   rL   s    r-   Ú
list_namesÚBusConnection.list_names@  s%   € ð ×!Ñ!¤/´?Ü"2°KØ"$ bó*ð 	*r0   c                 óF   • U R                  [        [        [        SSS5      $ )zwReturn a list of all names that can be activated on the bus.

:Returns: a dbus.Array of dbus.UTF8String
:Since: 0.81.0
ÚListActivatableNamesr2   r(   r¬   rL   s    r-   Úlist_activatable_namesÚ$BusConnection.list_activatable_namesJ  s&   € ð ×!Ñ!¤/´?Ü"2Ð4JØ"$ bó*ð 	*r0   c                 ó\   • [        USS9  U R                  [        [        [        SSU45      $ )z’Return the unique connection name of the primary owner of the
given name.

:Raises `DBusException`: if the `bus_name` has no owner
:Since: 0.81.0
Fr    rA   rB   r•   r—   s     r-   r„   ÚBusConnection.get_name_ownerT  s1   € ô 	˜(°Ò7Ø×!Ñ!¤/´?Ü"2°NØ"%¨ {ó4ð 	4r0   c                 ó   • [        XU5      $ )zèWatch the unique connection name of the primary owner of the
given name.

`callback` will be called with one argument, which is either the
unique connection name, or the empty string (meaning the name is
not owned).

:Since: 0.81.0
)r!   )rE   r<   r,   s      r-   ru   ÚBusConnection.watch_name_owner`  s   € ô ˜d¨hÓ7Ð7r0   c           
      óZ   • [        U R                  [        [        [        SSU45      5      $ )z“Return True iff the given bus name has an owner on this bus.

:Parameters:
    `bus_name` : str
        The bus name to look up
:Returns: a `bool`
ÚNameHasOwnerrB   )Úboolr–   r   r   r   r—   s     r-   Úname_has_ownerÚBusConnection.name_has_ownerl  s.   € ô �D×&Ñ&¤¼Ü'7¸Ø'*¨X¨Kó9ó :ð 	:r0   c                 óJ   • U R                  [        [        [        SSU45        g)úØArrange for this application to receive messages on the bus that
match the given rule. This version will block.

:Parameters:
    `rule` : str
        The match rule
:Raises `DBusException`: on error.
:Since: 0.80.0
ÚAddMatchrB   Nr¬   ©rE   Úrules     r-   rv   ÚBusConnection.add_match_stringx  s"   € ð 	×Ñœ?¬OÜ+¨Z¸¸t¸gõ	Gr0   c           
      óN   • U R                  [        [        [        SSU4SS5        g)úýArrange for this application to receive messages on the bus that
match the given rule. This version will not block, but any errors
will be ignored.


:Parameters:
    `rule` : str
        The match rule
:Raises `DBusException`: on error.
:Since: 0.80.0
r¾   rB   N©rD   r   r   r   r¿   s     r-   Úadd_match_string_non_blockingÚ+BusConnection.add_match_string_non_blocking‡  s$   € ð 	�‰œ¬Ü(¨*°c¸D¸7Ø˜dõ	$r0   c                 óJ   • U R                  [        [        [        SSU45        g)r½   ÚRemoveMatchrB   Nr¬   r¿   s     r-   Úremove_match_stringÚ!BusConnection.remove_match_string—  s"   € ð 	×Ñœ?¬OÜ+¨]¸CÀ$Àõ	Jr0   c           
      óN   • U R                  [        [        [        SSU4SS5        g)rÃ   rÈ   rB   NrÄ   r¿   s     r-   r€   Ú.BusConnection.remove_match_string_non_blocking¤  s$   € ð 	�‰œ¬Ü(¨-¸¸t¸gØ˜dõ	$r0   r(   )NNNN)TF)r   )#rN   rO   rP   rQ   Ú__doc__r   ÚTYPE_SESSIONr
   ÚTYPE_SYSTEMr	   ÚTYPE_STARTERr   ÚSTART_REPLY_SUCCESSr   ÚSTART_REPLY_ALREADY_RUNNINGr`   rC   r�   r†   r‘   r˜   r…   r¤   r¨   r­   r±   r„   ru   rº   rv   rÅ   rÉ   r€   rS   Ú__classcell__)r:   s   @r-   r   r   c   s²   ø† ñð "€LØHà €KØHà€Lð$ð 3ÐØ"BÐà%1¸Dô 	ð AEØ:>Ø!%÷ò@òð <@Ø-2ô7Zòr4ôCô27ò.0ò"*ò*ò
4ò
8ò
:òGò$ò J÷$ð $r0   r   )+Ú__all__Ú__docformat__r6   rY   Ú_dbus_bindingsr   r   r   r   r	   r
   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   Údbus.connectionr   Údbus.exceptionsr   Údbus.lowlevelr   Údbus._compatr   Ú_NAME_OWNER_CHANGE_MATCHr5   Ú	getLoggerr8   Úobjectr!   r   r(   r0   r-   Ú<module>rÞ      s›   ðð2 €Ø"€ã Û ÷	I÷ 	I÷ 	I÷ 	I÷ 	I÷ 	Iñ 	Iõ 'Ý )Ý 8Þ ó  /Ó0@Û.ð	0Ð ð
ð AÐ à
×
Ò
˜JÓ
'€ô$"�Vô $"ôNO$�Jõ O$r0   