summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorJens Georg <mail@jensge.org>2022-01-09 15:24:34 +0100
committerJens Georg <mail@jensge.org>2022-01-09 16:14:19 +0100
commitaacf39ed865700d6be7c5320b5b08e11c3feec41 (patch)
treed0904d95341f74f405e8d0eaa15af9bcdbdbd201 /examples
parent3e463fc0dacfa0e478c8978f3872bcf98a00d99f (diff)
downloadgupnp-aacf39ed865700d6be7c5320b5b08e11c3feec41.tar.gz
ServiceProxy: Drop deprecated introspection
Remove deprecated introspection functions, completely rewrite the introspect_async() function
Diffstat (limited to 'examples')
-rw-r--r--examples/test-introspection.c24
1 files changed, 14 insertions, 10 deletions
diff --git a/examples/test-introspection.c b/examples/test-introspection.c
index 1512317..8259c60 100644
--- a/examples/test-introspection.c
+++ b/examples/test-introspection.c
@@ -185,22 +185,26 @@ print_state_variables (GUPnPServiceIntrospection *introspection)
}
static void
-got_introspection (GUPnPServiceInfo *info,
- GUPnPServiceIntrospection *introspection,
- const GError *error,
+got_introspection (GObject *source,
+ GAsyncResult *res,
G_GNUC_UNUSED gpointer user_data)
{
+ GError *error = NULL;
+ GUPnPServiceIntrospection *introspection =
+ gupnp_service_info_introspect_finish (GUPNP_SERVICE_INFO (GUPNP_SERVICE_INFO (source)),
+ res,
+ &error);
if (error) {
g_warning ("Failed to create introspection for '%s': %s",
- gupnp_service_info_get_udn (info),
+ gupnp_service_info_get_udn (GUPNP_SERVICE_INFO (source)),
error->message);
return;
}
g_print ("service: %s\nlocation: %s\n",
- gupnp_service_info_get_udn (info),
- gupnp_service_info_get_location (info));
+ gupnp_service_info_get_udn (GUPNP_SERVICE_INFO (source)),
+ gupnp_service_info_get_location (GUPNP_SERVICE_INFO (source)));
print_actions (introspection);
print_state_variables (introspection);
g_object_unref (introspection);
@@ -214,10 +218,10 @@ service_proxy_available_cb (G_GNUC_UNUSED GUPnPControlPoint *cp,
info = GUPNP_SERVICE_INFO (proxy);
- gupnp_service_info_get_introspection_async_full (info,
- got_introspection,
- cancellable,
- NULL);
+ gupnp_service_info_introspect_async (info,
+ cancellable,
+ got_introspection,
+ NULL);
}
static void