manage_root_device


Description:

public void manage_root_device (RootDevice root_device)

By calling this function, you are asking this to keep a reference to root_device when its associated Context is no longer available.

You usually want to call this function from [signal@GUPnP.ContextManager:GUPnPContextManager:context-available] handler after you create a RootDevice 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.

```c 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); } ```

Parameters:

this

A ContextManager

root_device

The RootDevice to be taken care of