+
     Gi  c                   sD   ^RI Ht ^ RIt^ RIt^ RIt^ RIt^ RIt^ RIt	^ RI
Ht ^ RIt^ RIt^ RIHt ^ RIHt ^ RIHt ^ RIHt ^ RIHt ^ RIHt  ^ R	IHt R
 t]	P8                  P;                  4       tR t ! R R]P@                  4      t!R#   ] d
    ^ RIHt  LCi ; i)i   )
interfacesN)ismethod)polkit)GLib)FunctionType)DBusException)ErrorMessagegetfullargspecc                 s    \        V 4      # Nr   )func   &@/usr/lib/python3.14/site-packages/tuned/exports/dbus_exporter.py
getargspecr      s    		    )r   c                 s   \        VR R4      pVe   MX\        VRR4      R9   d   RVP                  P                  ,          pM(RVP                  : RVP                  P                  : 2p\	        V\
        4      '       d   VP                  4       pM0RP                  \        P                  ! VP                  V4      4      p\        WV4      pVP                  4       '       g   V P                  V4       R# R# )Z_dbus_error_nameN
__module__ zorg.freedesktop.DBus.Python.%szorg.freedesktop.DBus.Python..)r   Z__main__)getattrZ	__class____name__r   Z
isinstancer   Zget_dbus_messagejoin	tracebackZformat_exception_onlyr   Zget_no_replyZsend_message)Z
connectionZmessageZ	exceptionnameZcontentsZreply   &&&   r   _method_reply_errorr   $   s    90$7D	L"	-1A	A/)2E2E2N2NN 
B 7@6J6JIL_L_LhLhi)]++--/779::9;N;N 1E!!& "r   c                   s   a  ] tR t^8t o RtR t]R 4       t]R 4       t]R 4       t	R t
R tR tRR
 ltR tR tR tR tR tR tRtV tR	# )DBusExportera%  
Export method calls through DBus Interface.

We take a method to be exported and create a simple wrapper function
to call it. This is required as we need the original function to be
bound to the original object instance. While the wrapper will be bound
to an object we dynamically construct.
c                sR   \         P                  4       \        P                  8w  d   \        \
        P                  n        \
        P                  P                  P                  R R7       RV n
        RV n        / V n        \        4       V n        Wn        W n        W0n        W@n        RV n        RV n        \+        4       V n        \.        P0                  ! \.        P2                  4      p\4        P6                  ! 4       V n        \.        P.                  ! \.        P2                  V4       R# )T)Zset_as_defaultN)logZgetEffectiveLevelloggingZDEBUGr   dbusserviceZmainloopZglibZDBusGMainLoop_dbus_object_cls_dbus_object_dbus_methodsZset_signals	_bus_name_interface_name_object_name
_namespace_thread_bus_objectr   _polkitsignalZ	getsignalZSIGINTr   ZMainLoop
_main_loop)selfbus_nameinterface_nameobject_nameZ	namespaceZsignal_handlers   &&&&& r   __init__ZDBusExporter.__init__B   s     	-&94<<#--""$"7$$$%$-.'!/$,$$, ##FMM2.MMO$/--~.r   c                    V P                   # r	   )r"   r+   r   r   r,   ZDBusExporter.bus_name`   s    	r   c                r0   r	   )r#   r1   r   r   r-   ZDBusExporter.interface_named   s    			r   c                r0   r	   )r$   r1   r   r   r.   ZDBusExporter.object_nameh   s    			r   c                s    V P                   R J# r	   )r&   r1   r   r   runningZDBusExporter.runningl   s    	T	!!r   c                sF   R P                  VP                  RP                  \        VP                  4      P
                  4      R7      p\        VR\        V P                  4      ,          R4      p\        VP                  ^ ,          \        4       VP                  4      pV# )z2def {name}({args}):
					return wrapper({args})
		z, )r   argsz<decorator-gen-%d>Zexec)Zformatr   r   r   Z__func__r3   ZcompileZlenr    r   Z	co_constsZlocals)r+   methodwrapperZsourceZcoder
   r   r   _prepare_for_dbusZDBusExporter._prepare_for_dbuso   s{    f&//		*V__2M2R2R(SfT 	 
-D4F4F0GG	P$ 
dnnQ'6??	C$	+r   c                s   V P                   R ,           V,           pVR,          p\        P                  RV: RV: R24       V P                  P	                  WC4      pTpV^8X  d!   \        P                  RV: RV: R24       V# V^8X  d!   \        P                  RV: RV: R24       V# V^ 8X  d7   \        P                  RV: RV: R24       \        VR	R 4      R
.,           pV# VR8X  d7   \        P                  RV: RV: R24       \        VR	R 4      R
.,           pV# \        P                  RV: RV: R24       \        VR	R 4      R
.,           pV# )r   z#checking authorization for action 'z' requested by caller 'Z'zaction 'z'' was successfully authorized by polkitzpolkit error, but action 'z0' was successfully authorized by fallback methodz)' wasn't authorized, ignoring the requestNr   zpolkit error and action 'z<' wasn't authorized by fallback method, ignoring the requestzDpolkit error and unable to use fallback method to authorize action 'z', ignoring the requesti)	r%   r   Zdebugr(   Zcheck_authorizationZwarningZinfoZlistZerror)r+   action_namer3   Z	action_idcallerZretZ	args_copys   &&*    r   _polkit_authZDBusExporter._polkit_auth}   s_   oo#k1)8&))QZ\bcd((;#)AX99]fhnop 
 ax;;  {D  FL  M  N 
 ax88^giopqD"I"%9 
 by;;  FO  QW  X  YD"I"%9 
 99  JS  U[  \  ]D"I"%9	r   Nc                sb  a aa \        S4      '       g   \        R 4      hSP                  pVS P                  9   d   \        R4      hS;'       g    ToVVV 3R lpS P	                  SV4      p\
        P                  P                  S P                  W#RR7      ! V4      pVS P                  V&   R# )#Only bound methods can be exported.*Method with this name is already exported.c                 s8   < S! SP                   ! S.VO5!  / VB # r	   )r9   )ownerr3   kwargsr7   r4   r+   s   &*,r   auth_wrapperZ)DBusExporter.export.<locals>.auth_wrapper   s#    
$##K7$7
B6
BBr   r8   )Zsender_keywordN)	r   	Exceptionr   r    r6   r   r   r4   r#   )r+   r4   Zin_signatureout_signaturer7   method_namer>   r5   s   ff&&f   r   exportZDBusExporter.export   s    	&			8	99+D&&&	?	@@**{+C ""6<8'LL 4 4ldlmnuv'$+$[!r   c                sp  a \        S4      '       g   \        R 4      hSP                  pW0P                  9   d   \        R4      hV3R lpV P	                  SV4      p\
        P                  P                  V P                  V4      ! V4      pW@P                  V&   V P                  P                  V4       R# )r:   r;   c                 s   < S! V/ VB # r	    )r<   r3   r=   r4   s   &*,r   r5   Z$DBusExporter.signal.<locals>.wrapper   s    
$
!&
!!r   N)r   r?   r   r    r6   r   r   r)   r#   r!   Zadd)r+   r4   r@   rA   r5   s   &f&  r   r)   ZDBusExporter.signal   s    	&			8	99+&&&	?	@@" ""673'LL 4 4mDWM'$+[!--K r   c                s    R pWP                   9   d   V P                  f   Rp \        V P                  V4      pV'       d   \	        RV,          4      hX! V/ VB  R#   \         d    Rp L3i ; i)FNTzSignal '%s' doesn't exist.)r!   r'   r   ZAttributeErrorr?   )r+   r)   r3   r=   Zerrr4   s   &&*,  r   send_signalZDBusExporter.send_signal   sq    #	==	 D$4$4$<	3D$$f-6 		/&8	99	46 
 	3s   A A.-A.c                s    V P                   e   \        R4      hR\        V 4      ,          p\        V\        P
                  P                  3V P                  4      pW n         R # )Nz%The exporter class was already build.zDBusExporter_%d)r   r?   ZidZtyper   r   ZObjectr    )r+   Zunique_nameZcls   &  r   _construct_dbus_object_classZ)DBusExporter._construct_dbus_object_class   sO    	&	:	;;!BtH,+[4<<..0$2D2DE#r   c                s   V P                  4       '       d   R # V P                  f   V P                  4        V P                  4        \        P
                  ! 4       p\        P                  P                  V P                  V4      pV P                  WP                  V4      V n
        \        P                  ! V P                  R7      V n        V P                  P                  4        R # )N)Ztarget)r2   r   rF   stopr   Z	SystemBusr   ZBusNamer"   r$   r'   	threadingZThread_thread_coder&   start)r+   Zbusr,   rE   r   rJ   ZDBusExporter.start   s    	\\^^		"$$&))+#\\!!$..#6(**30A0A8L$!!):):;$,,,r   c                s    V P                   e`   V P                   P                  4       '       d>   V P                  P                  4        V P                   P	                  4        R V n         R # R # R # r	   )r&   Zis_aliver*   Zquitr   r1   r   r   rG   ZDBusExporter.stop   sM    	\\$,,"7"7"9"9??<<4< #:r   c                sL    V P                   P                  4        V =R V n        R # r	   )r*   Zrunr'   r1   r   r   rI   ZDBusExporter._thread_code   s     //
$r   )r"   r'   r    r   r   r#   r*   r%   r$   r(   r!   r&   r	   )r   r   Z__qualname__Z__firstlineno__Z__doc__r/   Zpropertyr,   r-   r.   r2   r6   r9   rB   r)   rD   rF   rJ   rG   rI   Z__static_attributes__Z__classdictcell__)Z__classdict__s   @r   r   r   8   s     /<      "*,"!" r   r   )"r   r    Zdbus.servicer   Zdbus.mainloop.glibZdbus.exceptionsrH   r)   Z
tuned.logsZtunedZtuned.constsZconstsr   r   Zinspectr   Ztuned.utils.polkitr   Zgi.repositoryr   Ztypesr   r   Zdbus.lowlevelr   r   r   ZImportErrorZlogsZgetr   r   ZExporterInterfacer   rC   r   r   <module>rK      s               %   ) &
  $ jjnn
'(h:// h=    s   	B BB