Method
GUPnPContextManagermanage_root_device
Declaration [src]
void
gupnp_context_manager_manage_root_device (
GUPnPContextManager* manager,
GUPnPRootDevice* root_device
)
Description [src]
By calling this function, you are asking manager
to keep a reference to
root_device
when its associated GUPnPContext
is no longer available. You
usually want to call this function from
GUPnPContextManager::context-available
handler after you create a
GUPnPRootDevice
object for the newly available context.
You usually then give up your own reference to the root device so it will be automatically destroyed if its context is no longer available.
This function is mainly useful when implementing an UPnP client.
void on_context_available (GUPnPContextManager *manager, GUPnPContext *context, gpointer user_data)
{
GError *error = NULL;
GUPnPRootDevice *rd = gupnp_root_device_new (context, "BasicLight1.xml", ".", &error);
gupnp_context_manager_manage_root_device (manager, rd);
// Subscribe to control point's signals etc.
g_object_unref (rd);
}
Available since: | 0.14.0 |
Parameters
root_device |
GUPnPRootDevice |
The |
|
The data is owned by the caller of the function. |