![]() |
![]() |
![]() |
UPower Reference Manual | ![]() |
---|---|---|---|---|
Top | Description | Implemented Interfaces | Properties | Signals |
org.freedesktop.UPowerorg.freedesktop.UPower — UPower interface |
EnumerateDevices (out 'ao' devices) AboutToSleep () Suspend () SuspendAllowed (out 'b' allowed) Hibernate () HibernateAllowed (out 'b' allowed)
DeviceAdded ('o' device) DeviceRemoved ('o' device) DeviceChanged ('o' device) Changed () Sleeping () Resuming ()
Objects implementing org.freedesktop.UPower also implements org.freedesktop.DBus.Introspectable, org.freedesktop.DBus.Properties
'DaemonVersion' read 's' 'CanSuspend' read 'b' 'CanHibernate' read 'b' 'OnBattery' read 'b' 'OnLowBattery' read 'b' 'LidIsClosed' read 'b' 'LidIsPresent' read 'b'
The UPower service is available via the system message
bus. To access the service, use
the org.freedesktop.UPower
interface on
the /org/freedesktop/UPower
object on
the D-Bus system bus service with the well-known
name org.freedesktop.UPower
.
$ dbus-send --print-reply \ --system \ --dest=org.freedesktop.UPower \ /org/freedesktop/UPower \ org.freedesktop.UPower.EnumerateDevices method return sender=:1.386 -> dest=:1.451 reply_serial=2 array [ object path "/org/freedesktop/UPower/devices/line_power_AC" object path "/org/freedesktop/UPower/devices/battery_BAT0" ]
Enumerate all power objects on the system.
|
An array of object paths for devices. |
This method tells UPower that the Suspend() or Hibernate() method is about to be called. This allows UPower to emit the Suspending signal whilst session activities are happening that have to be done before the suspend process is started.
This method would typically be called by the session power management daemon, before it locks the screen and waits for the screen to fade to black. The session power management component would then call Suspend() or Hibernate() when these syncronous tasks have completed.
If this method is not called than nothing bad will happen and Suspend() or Hibernate() will block for the required second.
Suspends the computer into a low power state. System state is not preserved if the power is lost.
If AboutToRequestSleep() has not been called then UPower will send the Sleeping() signal and block for one second.
If AboutToRequestSleep() has been called less than one second before this method is called then UPower will block for the remaining time to complete one second of delay.
Check if the caller has (or can get) the PolicyKit privilege to call
Suspend
.
|
TRUE if allowed, otherwise FALSE |
Hibernates the computer into a low power state. System state is preserved if the power is lost.
If AboutToRequestSleep() has not been called then UPower will send the Sleeping() signal and block for one second.
If AboutToRequestSleep() has been called less than one second before this method is called then UPower will block for the remaining time to complete one second of delay.
Check if the caller has (or can get) the PolicyKit privilege to call
Hibernate
.
|
TRUE if allowed, otherwise FALSE |
Emitted when a device is added.
|
Object path of device that was added. |
Emitted when a device is removed.
|
Object path of device that was removed. |
Emitted when a device changed.
|
Object path of device that was changed. |
Emitted when one or more properties on the object changes.
This signal is sent when the session is about to be suspended or hibernated. Session and system programs have one second to do anything required before the sleep action is taken (such as sending out Avahi or Jabber messages).
This signal is sent when the session has just returned from Suspend() or Hibernate(). Session and system programs can then do anything required (such as sending out Avahi or Jabber messages).
Version of the running daemon, e.g. 002
.
Whether the system is able to suspend.
Whether the system is able to hibernate.
Indicates whether the system is running on battery power. This property is provided for convenience.
Indicates whether the system is running on battery power and if the battery is critically low. This property is provided for convenience.
Indicates if the laptop lid is closed where the display cannot be seen.
If the system has a lid device.