+
     h  c                   s    R t ^ RIt^ RIt^ RIt^ RIHu Ht ^ RI	H
t
 ^ RIHt ^ RIHtHt ^ RIHt  ! R R4      tRt ! R	 R
4      tRt0 RmtR tRR ltR tR t]R8X  d
   ]! 4        R# R# )z5Generate a wrapper class from DBus introspection dataN)indent)Introspectable)open_dbus_connectionProxy)__version__c                   s2   a  ] tR t^t o R tR tR tRtV tR# )Methodc                s   VP                   R ,          V n        . V n        . V n        VP	                  R4       F^  p VP                   R ,          pV P                  P                  V4       V P                  P                  VP                   R,          4       K`  	  R#   \
         d(    RP                  \        T P                  4      4      p L~i ; i)namezarg[@direction='in']zarg{}ZtypeN)	attribr   in_args	signaturefindallZKeyErrorformatlenappend)selfxml_nodeZargr   s   &&  4/usr/lib/python3.14/site-packages/jeepney/bindgen.py__init__ZMethod.__init__   s    OOF+	##$:;C9zz&) LL%NN!!#**V"45 <  9~~c$,,&789s   B/CCc                s:    R P                  V P                  R7      # )z=def {name}(self):
    return new_method_call(self, '{name}')
)r   )r   r   )r   s   &r   _make_code_noargsZMethod._make_code_noargs   s%    ?@F AG A	    c                sH   V P                   '       g   V P                  4       # R P                  V P                   4      pRP                  V P                  4      p\	        V P                   4      ^8X  d   RMRP                  V4      pRP                  V P                  WVR7      # )z,  z({},)z({})zxdef {name}(self, {args}):
    return new_method_call(self, '{name}', '{signature}',
                           {tuple})
)r   argsr	   tuple)r   r   joinr	   r   r   r   )r   r   r	   r      &   r   	make_codeZMethod.make_code   s    |||))++yy&GGDNN+	-2FFtL89?% :@ :
	
r   )r   r   r	   N)	__name__
__module____qualname____firstlineno__r   r   r   __static_attributes____classdictcell__Z__classdict__   @r   r   r      s     
6

 
r   r   z
class {cls_name}(MessageGenerator):
    interface = {interface!r}

    def __init__(self, object_path{path_default},
                 bus_name{name_default}):
        super().__init__(object_path=object_path, bus_name=bus_name)
c                   s,   a  ] tR t^4t o R tR tRtV tR# )	Interfacec                s    VP                   R ,          V n        W n        W0n        VP	                  R4       Uu. uF  p\        V4      NK  	  upV n        R# u upi )r   methodN)r   r   pathbus_namer
   r   methods)r   r   r$   r%   Znodes   &&&& r   r   ZInterface.__init__5   sF    OOF+		 191A1A(1KL1Kt1KLLs   Ac                s   V P                   P                  R 4      R,          p\        P                  TV P                   V P                  f   RMRV P                  : 2V P
                  f   RMRV P
                  : 2R7      .pV P                   F,  pVP                  \        VP                  4       R4      4       K.  	  RP                  V4      # ).r   Z=)cls_name	interfaceZpath_defaultZname_defaultZ
iz    )r   ZsplitINTERFACE_CLASS_TEMPLATEr   r$   r%   r&   r   r    r   r   )r   r(   Zchunksr#   r   r   r   ZInterface.make_code;   s    99??3'+*11ii#yy0$))6G#}}4Admm=N:O	 2 
  llFMM&!1!1!3W=> #yy  r   )r%   r&   r   r$   N)r   r   r   r   r   r   r   r   r    r!   r   r"   r"   4   s     M
! 
!r   r"   z"""Auto-generated DBus bindings

Generated by jeepney version {version}

Object path: {path}
Bus name   : {bus_name}
"""

from jeepney.wrappers import MessageGenerator, new_method_call

c                 s   \        V\        \        34      '       d,   \        VR 4      ;_uu_ 4       p\	        WW$4      uuRRR4       # \
        P                  ! V 4      pVP                  \        P                  \        VVR7      4       ^ pVP                  R4       FS  pVP                  R,          \        9   d   K!  VP                  \        WqV4      P                  4       4       V^,          pKU  	  V#   + '       g   i     L; i)ZwN)Zversionr$   r%   r)   r   )Z
isinstanceZbytesZstropencode_from_xmlETZ
fromstringZwriteMODULE_TEMPLATEr   r   r
   r   IGNORE_INTERFACESr"   r   )xmlr$   r%   ZfhfZrootZiZinterface_node   &&&&    r   r,   r,   [   s    "ucl##"c]]a H8 ] ==DHH_##Kd-5 $ 7 8 	
A,,{3  (,==
>:DDFG	Q	 4 H ]s   C55D	c                 s    V '       g   R VP                  RR 4      ,           p \        V4      p\        \        W4      V4      pVP	                  4       w  p\        W`W4      p\        RP                  Wr4      4       R# )/r'   #Written {} interface wrappers to {}N)replacer   r   r   Z
Introspectr,   printr   )r$   r   output_filebusZconnZintrospectabler0   n_interfacesr2   r   generate_from_introspectionr:   m   si     T\\#s++$D>$5t<N$$&DC !D>L	
/
6
6|
QRr   c                 s    \        V R R7      ;_uu_ 4       pVP                  4       pRRR4       \        XWV4      p\        RP	                  Wc4      4       R#   + '       g   i     L9; i)zutf-8)ZencodingNr4   )r+   Zreadr,   r6   r   )Z
input_filer$   r   r7   r1   r0   r9   s   &&&&   r   generate_from_filer;   {   sN    	j7	+	+qffh 
, !d+>L	
/
6
6|
QR	 
,	+s   AA(	c                  sh   \         P                  ! R RR7      p V P                  RRRR7       V P                  RRR	R7       V P                  R
RRR7       V P                  RRRR7       V P                  RRRR7       V P                  4       pVP                  '       g)   VP
                  '       g   \        P                  ! R4       VP                  '       d   VP                  pMVP                  '       dV   \        P                  P                  \        P                  P                  VP                  4      4      ^ ,          R,           pMzVP                  '       dF   \        VP                  4      ^8  d,   VP                  R,          P                  RR4      R,           pM#VP
                  P                  RR4      R,           pVP                  '       d/   \        VP                  VP                  VP
                  V4       R# \!        VP                  VP
                  W!P"                  4       R# )z7Generate a simple wrapper module to call D-Bus methods.zIf you don't use --file, this will connect to D-Bus and introspect the given name and path. --name and --path can also be used with --file, to give defaults for the generated class.)ZdescriptionZepilogz-nz--namez2Bus name to introspect, required unless using file)helpz-pz--pathzObject path to introspect. If not specified, a path matching the name will be used, e.g. /org/freedesktop/Notifications for org.freedesktop.Notificationsz--busSESSIONzEBus to connect to for introspection (SESSION/SYSTEM), default SESSION)Zdefaultr<   z-fz--filez.XML file to use instead of D-Bus introspectionz-oz--outputzOutput filenamez#Either --name or --file is requiredz.py:i   NNr3   Z_r'   N)argparseZArgumentParserZadd_argumentZ
parse_argsZfiler   sysZexitoutputosr$   ZsplitextZbasenamer   r5   r;   r:   r8   )Zapr   r@   s      r   mainrB      s   		 	 M;
B OOD(M  OOOD(x  y OOGY`  bOOD(I  KOOD**  ,==?DIII67 {{{	!!"''"2"2499"=>qAEI	s499~)2&&sC058""3,u4yyy499diiFC#DIItyy&((Kr   Z__main__>   zorg.freedesktop.DBus.Peerzorg.freedesktop.DBus.Propertiesz#org.freedesktop.DBus.Introspectable)r=   )Z__doc__r>   Zos.pathrA   r?   Zxml.etree.ElementTreeZetreeZElementTreer-   Ztextwrapr    Zjeepney.wrappersr   Zjeepney.io.blockingr   r   Zjeepneyr   r   r*   r"   r.   r/   r,   r:   r;   rB   r   ) r   r   <module>rC      sz    ;   
 " "  + ; 
 
> ! !& $SS$LN zF r   