summaryrefslogtreecommitdiff
path: root/libupower-glib/up-device.c
diff options
context:
space:
mode:
authorRichard Hughes <richard@hughsie.com>2010-02-05 09:41:06 +0000
committerRichard Hughes <richard@hughsie.com>2010-02-05 09:41:06 +0000
commit29d4de79e1400200ec83d2de256926849296a0b7 (patch)
treeaf7c36fe88630839ef0d04658d25a73354a88cec /libupower-glib/up-device.c
parent4c02c6310dc7ebabfb0d772394ef6745cdd8f838 (diff)
downloadupower-29d4de79e1400200ec83d2de256926849296a0b7.tar.gz
Use GCancellable in libupower-glib so we can eventually get to GIO async methods without breaking future API
Diffstat (limited to 'libupower-glib/up-device.c')
-rw-r--r--libupower-glib/up-device.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/libupower-glib/up-device.c b/libupower-glib/up-device.c
index cfbe9ba..3aecfd3 100644
--- a/libupower-glib/up-device.c
+++ b/libupower-glib/up-device.c
@@ -262,6 +262,7 @@ up_device_changed_cb (DBusGProxy *proxy, UpDevice *device)
* up_device_set_object_path_sync:
* @device: a #UpDevice instance.
* @object_path: The UPower object path.
+ * @cancellable: a #GCancellable or %NULL
* @error: a #GError, or %NULL.
*
* Sets the object path of the object and fills up initial properties.
@@ -271,7 +272,7 @@ up_device_changed_cb (DBusGProxy *proxy, UpDevice *device)
* Since: 0.9.0
**/
gboolean
-up_device_set_object_path_sync (UpDevice *device, const gchar *object_path, GError **error)
+up_device_set_object_path_sync (UpDevice *device, const gchar *object_path, GCancellable *cancellable, GError **error)
{
GError *error_local = NULL;
gboolean ret = FALSE;
@@ -357,7 +358,7 @@ up_device_to_text_history (UpDevice *device, GString *string, const gchar *type)
UpHistoryItem *item;
/* get a fair chunk of data */
- array = up_device_get_history_sync (device, type, 120, 10, NULL);
+ array = up_device_get_history_sync (device, type, 120, 10, NULL, NULL);
if (array == NULL)
return;
@@ -520,6 +521,7 @@ up_device_to_text (UpDevice *device)
/**
* up_device_refresh_sync:
* @device: a #UpDevice instance.
+ * @cancellable: a #GCancellable or %NULL
* @error: a #GError, or %NULL.
*
* Refreshes properties on the device.
@@ -530,7 +532,7 @@ up_device_to_text (UpDevice *device)
* Since: 0.9.0
**/
gboolean
-up_device_refresh_sync (UpDevice *device, GError **error)
+up_device_refresh_sync (UpDevice *device, GCancellable *cancellable, GError **error)
{
GError *error_local = NULL;
gboolean ret;
@@ -556,6 +558,7 @@ out:
* @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 %NULL
* @error: a #GError, or %NULL.
*
* Gets the device history.
@@ -565,7 +568,7 @@ out:
* Since: 0.9.0
**/
GPtrArray *
-up_device_get_history_sync (UpDevice *device, const gchar *type, guint timespec, guint resolution, GError **error)
+up_device_get_history_sync (UpDevice *device, const gchar *type, guint timespec, guint resolution, GCancellable *cancellable, GError **error)
{
GError *error_local = NULL;
GType g_type_gvalue_array;
@@ -640,6 +643,7 @@ out:
* up_device_get_statistics_sync:
* @device: a #UpDevice instance.
* @type: the type of statistics.
+ * @cancellable: a #GCancellable or %NULL
* @error: a #GError, or %NULL.
*
* Gets the device current statistics.
@@ -649,7 +653,7 @@ out:
* Since: 0.9.0
**/
GPtrArray *
-up_device_get_statistics_sync (UpDevice *device, const gchar *type, GError **error)
+up_device_get_statistics_sync (UpDevice *device, const gchar *type, GCancellable *cancellable, GError **error)
{
GError *error_local = NULL;
GType g_type_gvalue_array;