Function
GUPnPServiceProxyActionnew_from_list
Declaration [src]
GUPnPServiceProxyAction*
gupnp_service_proxy_action_new_from_list (
const char* action,
GList* in_names,
GList* in_values
)
Description [src]
Prepares action action
with parameters in_names
and in_values
to be
sent off to a remote service later with gupnp_service_proxy_call_action()
or
gupnp_service_proxy_call_action_async(). This is mainly useful for language bindings.
After the action call has finished, the results of the call may be
retrived from the GUPnPServiceProxyAction
by using
gupnp_service_proxy_action_get_result(),
gupnp_service_proxy_action_get_result_list()
or
gupnp_service_proxy_action_get_result_hash()
GList *in_args = NULL;
in_args = g_list_append (in_args, "InstanceID");
in_args = g_list_append (in_args, "Unit");
in_args = g_list_append (in_args, "Target");
GValue instance = G_VALUE_INIT;
g_value_set_int (&instance, 0);
GValue unit = G_VALUE_INIT;
g_value_set_static_string (&unit, "ABS_TIME");
GValue target = G_VALUE_INIT;
g_value_set_static_string (&target, "00:00:00.000");
GList *in_values = NULL;
in_values = g_list_append (in_values, &instance);
in_values = g_list_append (in_values, &unit);
in_values = g_list_append (in_values, &target);
GUPnPServiceProxyAction *action =
gunp_service_proxy_action_new_from_list ("Seek", in_args, in_values);
GError *error = NULL;
gupnp_service_proxy_call_action_async (proxy, action, NULL, on_action_finished, NULL);
gupnp_service_proxy_action_unref (action);
Parameters
action |
const char* |
An action. |
|
The data is owned by the caller of the function. | |
The value is a NUL terminated UTF-8 string. | |
in_names |
A list of utf8 |
|
|
The data is owned by the caller of the function. | |
Each element is a NUL terminated UTF-8 string. | |
in_values |
A list of const GValue* |
|
|
The data is owned by the caller of the function. |
Return value
Returns: | GUPnPServiceProxyAction |
A newly created |
|
The caller of the function takes ownership of the data, and is responsible for freeing it. |