org.freedesktop.DeviceKit.Power

org.freedesktop.DeviceKit.Power — Power interface

Methods

EnumerateDevices (out 'ao' devices)
GetOnBattery     (out 'b'  on_battery)
GetLowBattery    (out 'b'  low_battery)
Suspend          ()
Hibernate        ()

Signals

DeviceAdded       ('o' device)
DeviceRemoved     ('o' device)
DeviceChanged     ('o' device)
OnBatteryChanged  ('b' on_battery)
LowBatteryChanged ('b' low_battery)

Implemented Interfaces

Objects implementing org.freedesktop.DeviceKit.Power also implements org.freedesktop.DBus.Introspectable, org.freedesktop.DBus.Properties

Description

Details

EnumerateDevices ()

EnumerateDevices (out 'ao' devices)

Enumerate all power objects on the system.

devices:

An array of object paths for devices.

GetOnBattery ()

GetOnBattery (out 'b' on_battery)

Finds out if we are using battery so we can make policy decisions, for instance not running the indexer when we are on battery power.

on_battery:

If we are on battery power.

GetLowBattery ()

GetLowBattery (out 'b' low_battery)

Finds out if we are critically low on battery so we can make policy decisions, for instance saving documents or turning off network connections.

low_battery:

If we are critically low on battery power.

Suspend ()

Suspend ()

Suspends the computer into a low power state. System state is not preserved if the power is lost.


Hibernate ()

Hibernate ()

Hibernates the computer into a low power state. System state is preserved if the power is lost.

Signal Details

The DeviceAdded signal

DeviceAdded ('o' device)

Emitted when a device is added.

device:

Object path of device that was added.

The DeviceRemoved signal

DeviceRemoved ('o' device)

Emitted when a device is removed.

device:

Object path of device that was removed.

The DeviceChanged signal

DeviceChanged ('o' device)

Emitted when a device changed.

device:

Object path of device that was changed.

The OnBatteryChanged signal

OnBatteryChanged ('b' on_battery)

Emitted when the main power source of the system has changed.

on_battery:

If we are on battery power.

The LowBatteryChanged signal

LowBatteryChanged ('b' low_battery)

Emitted when the main power source of the system is critically low in power.

low_battery:

If we are critically low on battery power.