BtChildProxy

BtChildProxy — Helpers for multi child elements.

Functions

Includes

#include <libbtcore/core.h>

Description

These helpers provide an extension to the GstChildProxy interface. In the same way as that GstChildProxy lets you access properties of named children objects, these methods let you do that for all GObject projects that return GObjects.

Property names are written as "child-name::property-name". The whole naming scheme is recursive. Thus "child1::child2::property" is valid too, if "child1" and "child2" are objects that implement the interface or are properties that return a GObject. The later is a convenient way to set or get properties a few hops down the hierarchy in one go (without being able to forget the unrefs of the intermediate objects).

Functions

bt_child_proxy_get ()

void
bt_child_proxy_get (gpointer object,
                    const gchar *first_property_name,
                    ...);

Gets properties of the parent object and its children.

Parameters

object

the parent object

 

first_property_name

name of the first property to get

 

...

return location for the first property, followed optionally by more name/return location pairs, followed by NULL

 

bt_child_proxy_get_property ()

void
bt_child_proxy_get_property (GObject *object,
                             const gchar *name,
                             GValue *value);

Gets a single property using the BtChildProxy mechanism. You are responsible for for freeing it by calling g_value_unset()

Parameters

object

object to query

 

name

name of the property

 

value

a GValue that should take the result.

[out caller-allocates]

bt_child_proxy_get_valist ()

void
bt_child_proxy_get_valist (GObject *object,
                           const gchar *first_property_name,
                           va_list var_args);

Gets properties of the parent object and its children.

Parameters

object

the object to query

 

first_property_name

name of the first property to get

 

var_args

return location for the first property, followed optionally by more name/return location pairs, followed by NULL

 

bt_child_proxy_set ()

void
bt_child_proxy_set (gpointer object,
                    const gchar *first_property_name,
                    ...);

Sets properties of the parent object and its children.

Parameters

object

the parent object

 

first_property_name

name of the first property to set

 

...

value for the first property, followed optionally by more name/value pairs, followed by NULL

 

bt_child_proxy_set_property ()

void
bt_child_proxy_set_property (GObject *object,
                             const gchar *name,
                             const GValue *value);

Sets a single property using the BtChildProxy mechanism.

Parameters

object

the parent object

 

name

name of the property to set

 

value

new GValue for the property

 

bt_child_proxy_set_valist ()

void
bt_child_proxy_set_valist (GObject *object,
                           const gchar *first_property_name,
                           va_list var_args);

Sets properties of the parent object and its children.

Parameters

object

the parent object

 

first_property_name

name of the first property to set

 

var_args

value for the first property, followed optionally by more name/value pairs, followed by NULL