+
     h%  c                   s   ^ RI t ^ RIHt ^ RIHt ^RI5 . R Ot] P                  ! R
4      tR t	] P                  ! R4      t
R t] P                  ! R4      tR t ! R R4      t ! R R]4      tR tR!R ltR!R ltR!R ltR!R lt ! R R4      t ! R R4      t ! R R4      t ! R R]4      t ! R R	]4      tR R ltR# )"    N)Union)warn)Z*DBusAddressMessageGenerator
PropertiesIntrospectableDBusErrorResponsezZ([A-Za-z_-][A-Za-z0-9_-]*(\.[A-Za-z_-][A-Za-z0-9_-]*)+|:[A-Za-z0-9_-]+(\.[A-Za-z0-9_-]+))$c                     \        V 4      ^8  d!   V R,          R,           p\        RV: R24      h\        P                  V 4      '       g   \        RV : R24      hR# )   Ni   N...z
Bus name ( ) is too long (> 255 characters)) is not validN)len
ValueErrorbus_name_patmatchnameZabbr   & 5/usr/lib/python3.14/site-packages/jeepney/wrappers.pycheck_bus_namer      sZ    
4y3Bx%:dX-MNOOd##:dX^<== $    z2[A-Za-z_][A-Za-z0-9_]*(\.[A-Za-z_][A-Za-z0-9_]*)+$c                 r   )r	   r
   r   zInterface name (r   r   N)r   r   interface_patr   r   r   r   check_interfacer   !   s\    
4y3Bx%+D83STUUt$$+D8>BCC %r   z[A-Za-z_][A-Za-z0-9_]*$c                 r   )r	   r
   r   zMember name (r   z is not validN)r   r   member_name_patr   r   r   r   check_member_namer   *   sZ    
4y3Bx%=0PQRR  &&=>?? 'r   c                   s:   a  ] tR t^2t o RtRR ltR tR tRtV t	R# )r   a-  This identifies the object and interface a message is for.

e.g. messages to display desktop notifications would have this address::

    DBusAddress('/org/freedesktop/Notifications',
                bus_name='org.freedesktop.Notifications',
                interface='org.freedesktop.Notifications')
Nc                s    \        4       P                  V4       Wn        Ve   \        V4       W n        Ve   \        V4       W0n        R # N)ObjectPathType
check_dataobject_pathr   bus_namer   	interface)selfr   r    r!      &&&&r   __init__ZDBusAddress.__init__;   s?    ##K0&8$  I&"r   c                s    R P                  \        V 4      P                  V P                  V P                  V P
                  4      # )z'{}({!r}, bus_name={!r}, interface={!r}))formattype__name__r   r    r!   r"      &r   __repr__ZDBusAddress.__repr__G   s8    8??T
@S@S$$dmmT^^E 	Er   c                sf    \        V4       \        V 4      ! V P                  V P                  V4      # r   )r   r&   r   r    )r"   r!      &&r   with_interfaceZDBusAddress.with_interfaceK   s'    	"Dz$**DMM9EEr   )r    r!   r   NN)
r'   
__module____qualname____firstlineno____doc__r$   r*   r,   __static_attributes____classdictcell____classdict__   @r   r   r   2   s!     
#EF Fr   c                   s6   a a ] tR t^Ot oRV 3R lltRtVtV ;t# )
DBusObjectc                sB   < \         SV `  WV4       \        R ^R7       R# )z)Deprecated alias, use DBusAddress instead)Z
stacklevelN)Zsuperr$   r   )r"   r   r    r!   	__class__s   &&&&r   r$   ZDBusObject.__init__P   s    	:8QGr    r-   )r'   r.   r/   r0   r$   r2   r3   Z__classcell__)r8   r5   s   @@r   r7   r7   O   s     H Hr   r7   c           
      sB    \        \        P                  V ^ ^RR/ R7      # )r    )ZflagsZprotocol_versionZbody_lengthserialfieldsi)ZHeaderZ
EndiannessZlittle)Zmsg_typer)   r   
new_headerr<   T   s$    *##XQ B8 8r   c                s   \        V4       \        \        P                  4      pV P                  VP
                  \        P                  &   V P                  f   \        R4      hV P                  VP
                  \        P                  &   V P                  e(   V P                  VP
                  \        P                  &   WP
                  \        P                  &   Ve   W$P
                  \        P                  &   \        WC4      # )a  Construct a new method call message

This is a relatively low-level method. In many cases, this will be called
from a :class:`MessageGenerator` subclass which provides a more convenient
API.

:param DBusAddress remote_obj: The object to call a method on
:param str method: The name of the method to call
:param str signature: The DBus signature of the body data
:param tuple body: Body data (i.e. method parameters)
z3remote_obj.bus_name cannot be None for method calls)r   r<   MessageTypeZmethod_callr   r;   HeaderFieldspathr    r   destinationr!   member	signatureMessage)Z
remote_objZmethodrB   bodyheader   &&&& r   new_method_callrG   X   s     f//0F'1'='=FMM,##$"NOO.8.A.AFMM,**+'0:0D0Dl,,-)/MM,%%&09l,,-6  r   c                s   \        \        P                  4      pV P                  P                  VP
                  \        P                  &   V P                  P
                  P                  \        P                  R4      pVe   WCP
                  \        P                  &   Ve   WP
                  \        P                  &   \        W24      # )zConstruct a new response message

:param Message parent_msg: The method call this is a reply to
:param str signature: The DBus signature of the body data
:param tuple body: Body data
N)r<   r=   Zmethod_returnrE   r:   r;   r>   reply_serialgetsenderr@   rB   rC   )
parent_msgrB   rD   rE   rJ   s   &&&  r   new_method_returnrL   r   s     112F/9/@/@/G/GFMM,++,%%)),*=*=tDF28l../09l,,-6  r   c                s   \        \        P                  4      pV P                  P                  VP
                  \        P                  &   WP
                  \        P                  &   V P                  P
                  P                  \        P                  R4      pVe   WTP
                  \        P                  &   Ve   W$P
                  \        P                  &   \        WC4      # )zConstruct a new error response message

:param Message parent_msg: The method call this is a reply to
:param str error_name: The name of the error
:param str signature: The DBus signature of the body data
:param tuple body: Body data
N)r<   r=   errorrE   r:   r;   r>   rH   
error_namerI   rJ   r@   rB   rC   )rK   rN   rB   rD   rE   rJ   s   &&&&  r   	new_errorrO      s     ))*F/9/@/@/G/GFMM,++,-7MM,))*%%)),*=*=tDF28l../09l,,-6  r   c                s   \        V4       \        \        P                  4      pV P                  VP
                  \        P                  &   V P                  f   \        R4      hV P                  VP
                  \        P                  &   WP
                  \        P                  &   Ve   W$P
                  \        P                  &   \        WC4      # )zConstruct a new signal message

:param DBusAddress emitter: The object sending the signal
:param str signal: The name of the signal
:param str signature: The DBus signature of the body data
:param tuple body: Body data
z,emitter.interface cannot be None for signals)r   r<   r=   signalr   r;   r>   r?   r!   r   rA   rB   rC   )ZemitterrP   rB   rD   rE   rF   r   
new_signalrQ      s     f**+F'.':':FMM,##$ GHH,3,=,=FMM,(())/MM,%%&09l,,-6  r   c                   s@   a  ] tR t^t o RtRtR tR tV 3R ltRt	V t
R# )r   zSubclass this to define the methods available on a DBus interface.

jeepney.bindgen can automatically create subclasses using introspection.
Nc                s    \        4       P                  V4       \        V4       V P                  e   \	        V P                  4       Wn        W n        R # r   )r   r   r   r!   r   r   r    )r"   r   r    s   &&&r   r$   ZMessageGenerator.__init__   s<    ##K0x >>%DNN+& r   c                sv    R P                  \        V 4      P                  V P                  V P                  4      # )z{}({!r}, bus_name={!r}))r%   r&   r'   r   r    r(   r)   r   r*   ZMessageGenerator.__repr__   s2    (//T
0C0C040@0@$--Q 	Qr   c                s6   < V ^8  d   Qh/ S[ S[,          ;R&   # )   r!   )ZOptionalZstrr%   r5      "r   __annotate__ZMessageGenerator.__annotate__   s     
 }# r   )r    r   )r'   r.   r/   r0   r1   r!   r$   r*   Z__annotate_func__r2   r3   r4   r6   r   r   r      s#       $I!Q!  r   c                   s6   a  ] tR t^t o RtR tR tR tRtV t	R# )	ProxyBasezA proxy is an IO-aware wrapper around a MessageGenerator

Calling methods on a proxy object will send a message and wait for the
reply. This is a base class for proxy implementations in jeepney.io.
c                s    Wn         R # r   _msggen)r"   Zmsggenr+   r   r$   ZProxyBase.__init__   s    r   c                s    VP                  R 4      '       d   \        V4      h\        V P                  VR4      p\	        V4      '       d   V P                  V4      # \        V4      h)Z__N)Z
startswithZAttributeErrorZgetattrrX   Zcallable_method_call)r"   Zitemmake_msgs   && r   __getattr__ZProxyBase.__getattr__   sU    ??4   &&4<<t4H$$X..T""r   c                s    \        R 4      h)z#Needs to be implemented in subclass)ZNotImplementedError)r"   rZ   r+   r   rY   ZProxyBase._method_call   s    !"GHHr   rW   N)
r'   r.   r/   r0   r1   r$   r[   rY   r2   r3   r4   r6   r   rV   rV      s      
#I Ir   rV   c                   sH   a  ] tR t^t o RtV 3R lR ltR tR tR tRt	V t
R# )	r   zBuild messages for accessing object properties

If a D-Bus object has multiple interfaces, each interface has its own
set of properties.

This uses the standard DBus interface ``org.freedesktop.DBus.Properties``
c                s6   < V ^8  d   QhRS[ S[S[3,          /# )rR   obj)r   r   r   rS   rT   r   rU   ZProperties.__annotate__   s"     Q QE+/?"?@ Qr   c                s`    Wn         \        VP                  VP                  R R7      V n        R# )zorg.freedesktop.DBus.Properties)r    r!   N)r\   r   r   r    props_if)r"   r\   r+   r   r$   ZProperties.__init__   s#    #COOcll.OQr   c                s^    \        V P                  RRV P                  P                  V34      # )z$Get the value of the property *name*ZGetZssrG   r]   r\   r!   )r"   r   r+   r   rI   ZProperties.get   s+    t}}eTHH&&-/ 	/r   c                s\    \        V P                  RRV P                  P                  34      # )z*Get all property values for this interfaceZGetAllZsr^   r(   r)   r   get_allZProperties.get_all   s)    t}}h $ 2 246 	6r   c           	     sb    \        V P                  RRV P                  P                  WV334      # )z?Set the property *name* to *value* (with appropriate signature)ZSetZssvr^   )r"   r   rB   Zvaluer#   r   setZProperties.set   s2    t}}eUHH&&%.@AC 	Cr   )r\   r]   N)r'   r.   r/   r0   r1   r$   rI   r_   r`   r2   r3   r4   r6   r   r   r      s,     Q Q
/
6
C Cr   c                   s*   a  ] tR t^t o RtR tRtV tR# )r   z#org.freedesktop.DBus.Introspectablec                s    \        V R4      # )z3Request D-Bus introspection XML for a remote object
Introspect)rG   r(   r)   r   ra   ZIntrospectable.Introspect   s    t\22r   r9   N)r'   r.   r/   r0   r!   ra   r2   r3   r4   r6   r   r   r      s     5I3 3r   c                   s0   a  ] tR t^t o RtR tR tRtV tR# )r   z?Raised by proxy method calls when the reply is an error messagec                s    VP                   P                  P                  \        P                  4      V n        VP                  V n        R # r   )rE   r;   rI   r>   rN   r   rD   data)r"   msgr+   r   r$   ZDBusErrorResponse.__init__   s/    JJ%%)),*A*AB	HH	r   c                sN    R P                  V P                  V P                  4      # )z[{}] {})r%   r   rb   r(   r)   r   __str__ZDBusErrorResponse.__str__   s    		49955r   )rb   r   N)	r'   r.   r/   r0   r1   r$   rd   r2   r3   r4   r6   r   r   r      s     I6 6r   c                s$    V ^8  d   QhR\         /# )rR   rc   )rC   )r%   s   "r   rU   rU      s     	 	G 	r   c                s    V P                   P                  \        P                  8X  d   \	        V 4      hV P
                  # )zGet the body of a message, raising DBusErrorResponse for error messages

This is to be used with replies to method_call messages, which may be
method_return or error.
)rE   Zmessage_typer=   rM   r   rD   )rc   r)   r   
unwrap_msgre      s0     zz+"3"33$$88Or   )	r   rG   rL   rO   rQ   r   r   r   r   )Nr9   )ZreZtypingr   Zwarningsr   Z	low_levelZ__all__Zcompiler   r   r   r   r   r   r   r7   r<   rG   rL   rO   rQ   r   rV   r   r   Z	Exceptionr   re   r9   r   r   <module>rf      s    	   
 zz,
> 

PQD **78@F F:H H
8!4! !$!(Q Q*I I,C C83% 36	 6	r   