
    >a	                         S r SSKrSSKJr  SSKJrJr  SSK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9   " S S\R(                  5      r " S S\5      rSS jrg)z*Deprecated: use jeepney.io.asyncio instead    N)warn)ParserMessageType)AuthenticationErrorBEGINmake_auth_external
SASLParser)get_bus)message_bus)Router)	ProxyBasezOjeepney.integrate.asyncio is deprecated: please use jeepney.io.asyncio instead.   )
stacklevelc                   >    \ rS rSrS rS rS rS rS rS r	S r
S	rg
)DBusProtocol   c                     [        5       U l        [        5       U l        [	        [
        R                  5      U l        [
        R                  " 5       U l        S U l	        g N)
r	   auth_parserr   parserr   asyncioFuturerouterauthenticationunique_nameselfs    9lib/python3.13/site-packages/jeepney/integrate/asyncio.py__init__DBusProtocol.__init__   s<    %<hW^^,%nn.    c                 \    Xl         U R                   R                  S[        5       -   5        g )N    )	transportwriter   )r   r$   s     r   connection_madeDBusProtocol.connection_made   s"    "U%7%99:r!   c                     U R                   R                  [        5        U R                  R	                  S5        U R
                  U l        U R                  U R                  R                  5        g )NT)	r$   r%   r   r   
set_resultdata_received_post_authdata_receivedr   bufferr   s    r   _authenticatedDBusProtocol._authenticated   sP    U#&&t,!994++223r!   c                 :   U R                   R                  U5        U R                   R                  (       a  U R                  5         g U R                   R                  (       a9  U R
                  R                  [        U R                   R                  5      5        g g r   )r   feedauthenticatedr-   errorr   set_exceptionr   )r   datas     r   r+   DBusProtocol.data_received!   sk    d#))!##--.A$BRBRBXBX.YZ $r!   c                 ~    U R                   R                  U5       H  nU R                  R                  U5        M      g r   )r   r0   r   incoming)r   r4   msgs      r   r*   $DBusProtocol.data_received_post_auth(   s-    ;;##D)CKK  % *r!   c                     U R                   R                  5       (       d  [        S5      eU R                  R	                  U5      nUR                  5       nU R                  R                  U5        U$ )Nz/Wait for authentication before sending messages)r   doneRuntimeErrorr   outgoing	serialiser$   r%   )r   messagefuturer4   s       r   send_messageDBusProtocol.send_message,   s\    ""''))PQQ%%g.  "T"r!   c                    #    UR                   R                  [        R                  :w  a  [	        S5      eU R                  U5      I S h  vN $  N7f)Nz&Only method call messages have replies)headermessage_typer   method_call	TypeErrorrA   )r   r?   s     r   send_and_get_replyDBusProtocol.send_and_get_reply5   s@     >>&&+*A*AADEE&&w////s   AA
AA)r   r   r+   r   r   r$   r   N)__name__
__module____qualname____firstlineno__r   r&   r-   r+   r*   rA   rH   __static_attributes__ r!   r   r   r      s&     ;4[&0r!   r   c                   8   ^  \ rS rSrSrU 4S jrS rS rSrU =r	$ )Proxy;   zAn asyncio proxy for calling D-Bus methods

:param msggen: A message generator object.
:param DBusProtocol proto: Protocol object to send and receive messages.
c                 0   > [         TU ]  U5        X l        g r   )superr   	_protocol)r   msggenprotocol	__class__s      r   r   Proxy.__init__A   s     !r!   c                 N    SR                  U R                  U R                  5      $ )NzProxy({}, {}))format_msggenrU   r   s    r   __repr__Proxy.__repr__E   s    %%dllDNNCCr!   c                    ^ ^ UU 4S jnU$ )Nc                     >#    T" U 0 UD6nUR                   R                  [        R                  L d   eTR                  R                  U5      I S h  vN $  N7fr   )rD   rE   r   rF   rU   rH   )argskwargsr8   make_msgr   s      r   inner!Proxy._method_call.<locals>.innerI   sN     D+F+C::**k.E.EEEE::3????s   AAAArO   )r   rc   rd   s   `` r   _method_callProxy._method_callH   s    	@
 r!   )rU   )
rJ   rK   rL   rM   __doc__r   r]   rf   rN   __classcell__)rX   s   @r   rQ   rQ   ;   s    
"D r!   rQ   c                 &  #    Uc  [         R                  " 5       nUR                  [        [	        U 5      S9I S h  vN u  p#UR
                  I S h  vN   [        [        U5      n U R                  5       I S h  vN nUS   Ul	        X#4$  NO N; N7f)N)pathr   )
r   get_event_loopcreate_unix_connectionr   r
   r   rQ   r   Hellor   )buslooptphello_replys        r   connect_and_authenticatert   Q   s}     |%%'..|'#,.OOFQ



Q
C		#KNAM6M P#s3   9BBBB'B9B:BBB)SESSIONN)rh   r   warningsr   jeepneyr   r   jeepney.authr   r   r   r	   jeepney.busr
   jeepney.bus_messagesr   jeepney.routingr   jeepney.wrappersr   Protocolr   rQ   rt   rO   r!   r   <module>r~      sW    0   ' S S  , " &  *07## *0XI ,r!   