Ë
    +Šc  ã                   ó@   — d dl mZ ddlmZmZ ddlmZ  G d„ d«      Zy)é    )Úwarné   )ÚMessageTypeÚHeaderFields)ÚDBusErrorResponsec                   ó^   — e Zd ZdZd	d„Zed„ «       Zej                  d„ «       Zd„ Zd„ Z	d„ Z
y)
ÚRoutera[  Routing for messages coming back to a client application.
    
    :param handle_factory: Constructor for an object like asyncio.Future,
        with methods *set_result* and *set_exception*. Outgoing method call
        messages will get a handle associated with them.
    :param on_unhandled: Callback for messages not otherwise dispatched.
    Nc                 óJ   — || _         || _        d| _        i | _        i | _        y )Nr   )Úhandle_factoryÚ_on_unhandledÚoutgoing_serialÚawaiting_replyÚsignal_callbacks)Úselfr   Úon_unhandleds      ú1/usr/lib/python3/dist-packages/jeepney/routing.pyÚ__init__zRouter.__init__   s*   € Ø,ˆÔØ)ˆÔØ ˆÔØ ˆÔØ "ˆÕó    c                 ó   — | j                   S ©N)r   )r   s    r   r   zRouter.on_unhandled   s   € à×!Ñ!Ð!r   c                 ó,   — t        dd¬«       || _        y )NzeSetting on_unhandled is deprecated. Please use the filter() method or simple receive() calls instead.é   ©Ú
stacklevel)r   r   )r   Úvalues     r   r   zRouter.on_unhandled   s   € äð 9ØEFõ	Hà"ˆÕr   c                 ó  — | xj                   dz  c_         | j                   |j                  _        |j                  j                  t        j
                  u r5| j                  «       x| j                  |j                  j                  <   }|S y)zNSet the serial number in the message & make a handle if a method call
        r   N)r   ÚheaderÚserialÚmessage_typer   Úmethod_callr   r   )r   ÚmsgÚhandles      r   ÚoutgoingzRouter.outgoing   sq   € ð 	×Ò Ñ!ÕØ ×0Ñ0ˆ
‰
Ôà:‰:×"Ñ"¤k×&=Ñ&=Ñ=Ø>B×>QÑ>QÓ>SÐSˆD×Ñ §
¡
× 1Ñ 1Ñ2°VØˆMð >r   c                 óB   — t        dd¬«       || j                  |||f<   y)z%Add a callback for a signal.
        zQThe subscribe_signal() method is deprecated. Please use the filter() API instead.r   r   N)r   r   )r   ÚcallbackÚpathÚ	interfaceÚmembers        r   Úsubscribe_signalzRouter.subscribe_signal)   s,   € ô 	ð 4Ø@Aõ	Cà;Cˆ×Ñ˜t Y°Ð7Ò8r   c                 óZ  — |j                   }|j                  t        j                  u r®|j                  j                  t        j                  d«      |j                  j                  t        j                  d«      |j                  j                  t        j                  d«      f}| j                  j                  |d«      }| ||j                  «       y|j                  j                  t        j                  d«      }| j                  j                  |d«      }|o|j                  t        j                  u r|j!                  |j                  «       y|j                  t        j"                  u r|j%                  t'        |«      «       y| j(                  r| j)                  |«       yy)z#Route an incoming message.
        Néÿÿÿÿ)r   r   r   ÚsignalÚfieldsÚgetr   r&   r'   r(   r   ÚbodyÚreply_serialr   ÚpopÚmethod_returnÚ
set_resultÚerrorÚset_exceptionr   r   )r   r!   ÚhdrÚkeyÚcbr0   Úreply_handles          r   ÚincomingzRouter.incoming0   sI  € ð j‰jˆð ×Ñœ{×1Ñ1Ñ1Ø—:‘:—>‘>¤,×"3Ñ"3°TÓ:Ø—:‘:—>‘>¤,×"8Ñ"8¸$Ó?Ø—:‘:—>‘>¤,×"5Ñ"5°tÓ<ðˆCð ×&Ñ&×*Ñ*¨3°Ó5ˆBØˆ~Ù3—8‘8”Øð —z‘z—~‘~¤l×&?Ñ&?ÀÓDˆØ×*Ñ*×.Ñ.¨|¸TÓBˆØÐ#Ø×Ñ¤;×#<Ñ#<Ñ<Ø×'Ñ'¨¯©Ô1ØØ×!Ñ!¤[×%6Ñ%6Ñ6Ø×*Ñ*Ô+<¸SÓ+AÔBØà×ÒØ×Ñ˜cÕ"ð r   r   )Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   Úpropertyr   Úsetterr#   r)   r:   © r   r   r	   r	      sJ   „ ñó#ð ñ"ó ð"ð ×Ññ#ó ð#ò
òDó#r   r	   N)Úwarningsr   Ú	low_levelr   r   Úwrappersr   r	   rA   r   r   ú<module>rE      s   ðÝ ç 0Ý '÷F#ò F#r   