diff options
author | Bastien Nocera <hadess@hadess.net> | 2023-07-06 11:15:02 +0200 |
---|---|---|
committer | Bastien Nocera <hadess@hadess.net> | 2023-07-06 11:15:02 +0200 |
commit | 67666029543f12d423619df4e8d1ad32faa928e9 (patch) | |
tree | 2d75b4773848813ed765cb1a7362e3ff3cdea486 /libupower-glib | |
parent | 07565ef6a1aa4a115f8ce51e259e408edbaed4cc (diff) |
lib: Remove deprecated up_client_get_devices()
And rename up_client_get_devices2() to up_client_get_devices().
Diffstat (limited to 'libupower-glib')
-rw-r--r-- | libupower-glib/up-client.c | 26 | ||||
-rw-r--r-- | libupower-glib/up-client.h | 3 |
2 files changed, 3 insertions, 26 deletions
diff --git a/libupower-glib/up-client.c b/libupower-glib/up-client.c index b005a2f..1137849 100644 --- a/libupower-glib/up-client.c +++ b/libupower-glib/up-client.c @@ -73,28 +73,6 @@ G_DEFINE_TYPE_WITH_CODE (UpClient, up_client, G_TYPE_OBJECT, G_IMPLEMENT_INTERFACE(G_TYPE_INITABLE, up_client_initable_iface_init) G_IMPLEMENT_INTERFACE (G_TYPE_ASYNC_INITABLE, up_client_async_initable_iface_init)) -/** - * up_client_get_devices: - * @client: a #UpClient instance. - * - * Get a copy of the device objects. This function does not set the free - * function for the #GPtrArray so you need use g_object_unref on all - * elements when you are finished with the array. - * - * Return value: (element-type UpDevice) (transfer full): an array of #UpDevice objects or %NULL on error, free with g_ptr_array_unref() - * - * Since: 0.9.0 - * Deprecated: 0.99.8 - **/ -GPtrArray * -up_client_get_devices (UpClient *client) -{ - GPtrArray *array = up_client_get_devices2 (client); - if (array) - g_ptr_array_set_free_func (array, NULL); - return array; -} - static GPtrArray * up_client_get_devices_full (UpClient *client, GCancellable *cancellable, @@ -131,7 +109,7 @@ up_client_get_devices_full (UpClient *client, } /** - * up_client_get_devices2: + * up_client_get_devices: * @client: a #UpClient instance. * * Get a copy of the device objects. @@ -141,7 +119,7 @@ up_client_get_devices_full (UpClient *client, * Since: 0.99.8 **/ GPtrArray * -up_client_get_devices2 (UpClient *client) +up_client_get_devices (UpClient *client) { g_autoptr(GError) error = NULL; GPtrArray *ret = NULL; diff --git a/libupower-glib/up-client.h b/libupower-glib/up-client.h index dfc4853..360ee0e 100644 --- a/libupower-glib/up-client.h +++ b/libupower-glib/up-client.h @@ -84,8 +84,7 @@ UpDevice * up_client_get_display_device (UpClient *client); char * up_client_get_critical_action (UpClient *client); /* accessors */ -GPtrArray *up_client_get_devices (UpClient *client) G_DEPRECATED_FOR(up_client_get_devices2); -GPtrArray *up_client_get_devices2 (UpClient *client); +GPtrArray *up_client_get_devices (UpClient *client); void up_client_get_devices_async (UpClient *client, GCancellable *cancellable, GAsyncReadyCallback callback, |