Top | ![]() |
![]() |
![]() |
![]() |
void | (*_up_device_reserved1) () |
void | (*_up_device_reserved2) () |
void | (*_up_device_reserved3) () |
void | (*_up_device_reserved4) () |
void | (*_up_device_reserved5) () |
void | (*_up_device_reserved6) () |
void | (*_up_device_reserved7) () |
void | (*_up_device_reserved8) () |
UpDevice * | up_device_new () |
gchar * | up_device_to_text () |
gboolean | up_device_refresh_sync () |
gboolean | up_device_set_object_path_sync () |
GPtrArray * | up_device_get_history_sync () |
GPtrArray * | up_device_get_statistics_sync () |
const gchar * | up_device_get_object_path () |
A helper GObject to use for accessing UPower devices, and to be notified when it is changed.
See also: UpClient
gchar *
up_device_to_text (UpDevice *device
);
Converts the device to a string description.
Since: 0.9.0
gboolean up_device_refresh_sync (UpDevice *device
,GCancellable *cancellable
,GError **error
);
Refreshes properties on the device. This function is normally not required.
Since: 0.9.0
gboolean up_device_set_object_path_sync (UpDevice *device
,const gchar *object_path
,GCancellable *cancellable
,GError **error
);
Sets the object path of the object and fills up initial properties.
device |
a UpDevice instance. |
|
object_path |
The UPower object path. |
|
cancellable |
a GCancellable or |
|
error |
a GError, or |
Since: 0.9.0
GPtrArray * up_device_get_history_sync (UpDevice *device
,const gchar *type
,guint timespec
,guint resolution
,GCancellable *cancellable
,GError **error
);
Gets the device history.
device |
a UpDevice instance. |
|
type |
The type of history, known values are "rate" and "charge". |
|
timespec |
the amount of time to look back into time. |
|
resolution |
the resolution of data. |
|
cancellable |
a GCancellable or |
|
error |
a GError, or |
an array of UpHistoryItem's, with the most
recent one being first; NULL
if error
is set or device
is
invalid.
[element-type UpHistoryItem][transfer full]
Since: 0.9.0
GPtrArray * up_device_get_statistics_sync (UpDevice *device
,const gchar *type
,GCancellable *cancellable
,GError **error
);
Gets the device current statistics.
device |
a UpDevice instance. |
|
type |
the type of statistics. |
|
cancellable |
a GCancellable or |
|
error |
a GError, or |
an array of UpStatsItem's, else NULL and error
is used.
[element-type UpStatsItem][transfer full]
Since: 0.9.0