+
    WBi,!                        R t RtRt^ RIt^ RIt^ RIHtHt RtRtRt	Rt
RtR	 t]P                  P                  ]R
RR7      R 4       t]P                  P                  ]RRR7      R 4       t]P                  P                  ]RRR7      R 4       t]P                  P                  ]RRR7      R 4       t]P                  P                  ]RRR7      R 4       t]P                  P                  ]RRR7      R 4       tR# )aI  upowerd mock template

This creates the expected methods and properties of the main
org.freedesktop.UPower object, but no devices. You can specify any property
such as 'OnLowBattery' or the return value of 'SuspendAllowed',
'HibernateAllowed', and 'GetCriticalAction' in "parameters".

This provides the 1.0 D-Bus API of upower.
zMartin PittzN
(c) 2012, 2013 Canonical Ltd.
(c) 2017 - 2022 Martin Pitt <martin@piware.de>
N)
MOCK_IFACE
mockobjectzorg.freedesktop.UPowerz/org/freedesktop/UPowerTzorg.freedesktop.UPower.Devicec                     V P                  \        R .4       \        P                  ! RVP	                  RR4      RVP	                  RR4      RVP	                  RR4      RVP	                  RR4      R	VP	                  R	R4      R
VP	                  R
R4      /RR7      pV P                  \        RRRRVP	                  RR4       R23R!.4       RV n        V P                  V P
                  \        R\        P                  ! ^ 4      R\        P                  ! ^ 4      R\        P                  ! R4      R\        P                  ! R4      R\        P                  ! R4      R\        P                  ! R4      R\        P                  ! ^ 4      R\        P                  ! ^ 4      R\        P                  ! R4      R\        P                  ! R4      R\        P                  ! ^4      /R".4       V P                  \        V4       R# )#EnumerateDevices DaemonVersionz0.99	OnBatteryFLidIsPresentTLidIsClosedLidForceSleepIsDockedsv)	signatureGetCriticalActionszret = "HybridSleep"z-/org/freedesktop/UPower/devices/DisplayDeviceTypeState
Percentageg        Energy
EnergyFull
EnergyRateTimeToEmpty
TimeToFull	IsPresentIconNameWarningLevelN)r   r   aozYret = [k for k in objects.keys() if "/devices" in k and not k.endswith("/DisplayDevice")])GetDisplayDevicer   oz5ret = "/org/freedesktop/UPower/devices/DisplayDevice")Refreshr   r   r   )
AddMethods
MAIN_IFACEdbus
Dictionarygetp_display_dev	AddObjectDEVICE_IFACEUInt32DoubleInt64BooleanStringAddProperties)mock
parameterspropss   && >/usr/lib/python3.14/site-packages/dbusmock/templates/upower.pyloadr4   #   s   OO	

 OOZ^^OVDU;JNN>4@:>>-?Z^^OTB
z59	
 
E 	OO "cWZ^^DWYf5g4hhi+jkb	
 ID 	NNDKKNT[[^$++c*dkk#&$++c*$++c*4::a=$**Q-e,BDKKN	
 $	
#, 	z5)    ssr   )in_signatureout_signaturec                    RV,           pV P                  V\        R\        P                  ! R4      R\        P                  ! V4      R\        P                  ! R4      /. 4       V P                  \        RRV.4       V# )a  Convenience method to add an AC object

You have to specify a device name which must be a valid part of an object
path, e. g. "mock_ac", and an arbitrary model name.

Please note that this does not set any global properties such as
"on-battery".

Returns the new object path.
 /org/freedesktop/UPower/devices/PowerSupplyTModelOnlineDeviceAddedr    )r(   r)   r$   r-   r.   
EmitSignalr#   )selfdevice_name
model_namepaths   &&& r3   AddACrD   a   so     .;DNN4<<-T[[,dll4(	

 		 	OOJsTF;Kr5   ssdxc                   RV,           pV P                  V\        R\        P                  ! R4      R\        P                  ! R4      R\        P                  ! V4      R\        P
                  ! V4      R\        P                  ! V4      R\        P
                  ! R	4      R
\        P
                  ! V4      R\        P                  ! ^4      R\        P                  ! ^4      /	. 4       V P                  \        RRV.4       V# )ac  Convenience method to add a discharging battery object

You have to specify a device name which must be a valid part of an object
path, e. g. "mock_ac", an arbitrary model name, the charge percentage, and
the seconds until the battery is empty.

Please note that this does not set any global properties such as
"on-battery".

Returns the new object path.
r:   r;   Tr   r<   r   r   r         Y@r   r   r   r>   r    
r(   r)   r$   r-   r.   r+   r,   r*   r?   r#   )r@   rA   rB   
percentageseconds_to_emptyrC   s   &&&&& r3   AddDischargingBatteryrK   |   s     .;DNN4<<-d+T[[,$++j14::&67$++e,dkk*-T[[^DKKN	
 	!$ 	OOJsTF;Kr5   c                   RV,           pV P                  V\        R\        P                  ! R4      R\        P                  ! R4      R\        P                  ! V4      R\        P
                  ! V4      R\        P                  ! V4      R\        P
                  ! R	4      R
\        P
                  ! V4      R\        P                  ! ^4      R\        P                  ! ^4      /	. 4       V P                  \        RRV.4       V# )a_  Convenience method to add a charging battery object

You have to specify a device name which must be a valid part of an object
path, e. g. "mock_ac", an arbitrary model name, the charge percentage, and
the seconds until the battery is full.

Please note that this does not set any global properties such as
"on-battery".

Returns the new object path.
r:   r;   Tr   r<   r   r   r   rG   r   r   r   r>   r    rH   )r@   rA   rB   rI   seconds_to_fullrC   s   &&&&& r3   AddChargingBatteryrN      s     .;DNN4<<-d+T[[,$++j1$**_5$++e,dkk*-T[[^DKKN	
 	!$ 	OOJsTF;Kr5   uuddddxxbsur   c                
   \         P                  V P                  ,          pVP                  \        R\
        P                  ! V4      4       VP                  \        R\
        P                  ! V4      4       VP                  \        RV4       VP                  \        RV4       VP                  \        RV4       VP                  \        RV4       VP                  \        R\
        P                  ! V4      4       VP                  \        R\
        P                  ! V4      4       VP                  \        R	V	4       VP                  \        R
V
4       VP                  \        R\
        P                  ! V4      4       R# )zConvenience method to configure DisplayDevice properties

This calls Set() for all properties that the DisplayDevice is defined to
have, and is shorter if you have to completely set it up instead of
changing just one or two properties.
r   r   r   r   r   r   r   r   r   r   r   N)r   objectsr'   Setr)   r$   r*   r,   )r@   _typestaterI   energyenergy_fullenergy_ratetime_to_emptytime_to_full
is_present	icon_namewarning_leveldisplay_propss   &&&&&&&&&&&& r3   SetupDisplayDevicer^      s   * &&t'9'9:MlFDKK,>?lGT[[-?@lL*=lHf5lL+>lL+>lM4::m3LMlL$**\2JKlK<lJ	:lNDKK4NOr5   zoa{sv}c                    \         P                  ! V4      pVP                  4        F  w  rEVP                  \        WE4       K  	  R# )zConvenience method to Set a device's properties.

object_path: the device to update
properties: dictionary of keys to dbus variants.

Changing this property will trigger the device's PropertiesChanged signal.
N)dbusmock
get_objectitemsrR   r)   )_selfobject_path
propertiesdevicekeyvalues   &&&   r3   SetDevicePropertiesri      s9       -F !&&(


<, )r5   r    c                 Z    V P                  V4       V P                  \        R RV.4       R# )DeviceRemovedr    N)RemoveObjectr?   r#   )r@   device_paths   &&r3   RemoveDevicern      s$    k"OOJ{mDr5   )__doc__
__author____copyright__r$   r`   r   r   BUS_NAMEMAIN_OBJr#   
SYSTEM_BUSr)   r4   servicemethodrD   rK   rN   r^   ri   rn    r5   r3   <module>rx      sK    

   +#$%

.;*| Zd#F G4 ZfCH  I F ZfCH  I F Zm2NP OPD ZhbI- J- ZcDE EEr5   