Method
GUPnPServiceProxyActionget_result_list
Declaration [src]
gboolean
gupnp_service_proxy_action_get_result_list (
GUPnPServiceProxyAction* action,
GList* out_names,
GList* out_types,
GList** out_values,
GError** error
)
Description [src]
A variant of gupnp_service_proxy_action_get_result() that takes lists of
out-parameter names, types and place-holders for values.
The returned list in out_values must be freed using g_list_free and each element
in it using g_value_unset and g_free.
void on_action_finished(GObject *object, GAsyncResult *res, gpointer user_data)
{
GUPnPServiceProxyAction *action;
GError *error;
action = gupnp_service_proxy_call_action_finish (GUPNP_SERVICE_PROXY (object),
res,
&error);
if (error != NULL) {
g_print ("Call failed: %s", error->message);
g_clear_error (&error);
return;
}
GList *out_args = NULL;
out_args = g_list_append (out_args, "PlayMode");
out_args = g_list_append (out_args, "RecQualityMode");
GList *out_types = NULL;
out_types = g_list_append (out_types, GSIZE_TO_POINTER (G_TYPE_STRING));
out_types = g_list_append (out_types, GSIZE_TO_POINTER (G_TYPE_STRING));
GList *out_values = NULL;
if (!gupnp_service_proxy_action_get_result_list (action,
out_args,
out_types,
&out_values,
&error)) {
g_print ("Getting results failed: %s", error->message);
g_clear_error (&error);
return;
}
GList *iter = out_values;
while (iter != NULL) {
GValue *value = iter->data;
g_print ("Result: %s\n", g_value_get_string (value));
g_value_unset (value);
g_free (value);
iter = g_list_remove_link (iter, iter);
}
g_list_free (out_values);
}
| Available since: | 1.2.0 |
Parameters
out_names-
Type: A list of
utf8GListof ‘out’ parameter names (as strings)The data is owned by the caller of the function. Each element is a NUL terminated UTF-8 string. out_types-
Type: A list of
GTypeGListof types (asGType) that line up without_names.The data is owned by the caller of the function. out_values-
Type: A list of
const GValue*GListof values (asGValue) that line up without_namesandout_types.The argument will be set by the function. The instance takes ownership of the data, and is responsible for freeing it. error-
Type:
GError **The return location for a
GError*, orNULL.