![]() |
![]() |
![]() |
GUPnP Reference Manual | ![]() |
---|---|---|---|---|
Top | Description |
GUPnPContextManagerGUPnPContextManager — Manages GUPnPContext objects. |
struct GUPnPContextManager; GUPnPContextManager * gupnp_context_manager_new (GMainContext *main_context
,guint port
); GUPnPContextManager * gupnp_context_manager_create (guint port
); void gupnp_context_manager_manage_control_point (GUPnPContextManager *manager
,GUPnPControlPoint *control_point
); void gupnp_context_manager_manage_root_device (GUPnPContextManager *manager
,GUPnPRootDevice *root_device
);
A Utility class that takes care of creation and destruction of GUPnPContext objects for all available network interfaces as they go up (connect) and down (disconnect), respectively.
struct GUPnPContextManager { GObject parent; GUPnPContextManagerPrivate *priv; };
This struct contains private data only, and should be accessed using the functions below.
GUPnPContextManager * gupnp_context_manager_new (GMainContext *main_context
,guint port
);
gupnp_context_manager_new
has been deprecated since version 0.17.2 and should not be used in newly-written code. Use gupnp_context_manager_create()
.
Same as gupnp_context_manager_create()
.
|
Deprecated: 0.17.2: NULL . If you want to use
a different main context use
g_main_context_push_thread_default() instead. [allow-none]
|
|
Port to create contexts for, or 0 if you don't care what port is used. |
Returns : |
A new GUPnPContextManager object. [transfer full] |
GUPnPContextManager * gupnp_context_manager_create (guint port
);
Factory-method to create a new GUPnPContextManager. The final type of the GUPnPContextManager depends on the compile-time selection or - in case of NetworkManager - on its availability during runtime. If it is not available, the implementation falls back to the basic Unix context manager instead.
|
Port to create contexts for, or 0 if you don't care what port is used. |
Returns : |
A new GUPnPContextManager object. [transfer full] |
void gupnp_context_manager_manage_control_point (GUPnPContextManager *manager
,GUPnPControlPoint *control_point
);
By calling this function, you are asking manager
to keep a reference to
control_point
until it's associated GUPnPContext is no longer available.
You usually want to call this function from
"context-available" handler after you create a
GUPnPControlPoint object for the newly available context.
|
A GUPnPContextManager |
|
The GUPnPControlPoint to be taken care of |
void gupnp_context_manager_manage_root_device (GUPnPContextManager *manager
,GUPnPRootDevice *root_device
);
By calling this function, you are asking manager
to keep a reference to
root_device
when it's associated GUPnPContext is no longer available. You
usually want to call this function from
"context-available" handler after you create a
GUPnPRootDevice object for the newly available context.
|
A GUPnPContextManager |
|
The GUPnPRootDevice to be taken care of |