Top |
Functions
Properties
gpointer | main-context | Read / Write / Construct Only |
guint | port | Read / Write / Construct Only |
GUPnPWhiteList * | white-list | Read |
Description
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.
Functions
gupnp_context_manager_new ()
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.
Same as gupnp_context_manager_create()
.
Parameters
main_context |
Deprecated: 0.17.2: |
[allow-none] |
port |
Port to create contexts for, or 0 if you don't care what port is used. |
Since: 0.13.0
gupnp_context_manager_create ()
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.
Since: 0.17.2
gupnp_context_manager_rescan_control_points ()
void
gupnp_context_manager_rescan_control_points
(GUPnPContextManager *manager
);
This function starts a rescan on every control point managed by manager
.
Only the active control points send discovery messages.
This function should be called when servers are suspected to have
disappeared.
Since: 0.20.3
gupnp_context_manager_manage_control_point ()
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 its 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.
Since: 0.13.0
gupnp_context_manager_manage_root_device ()
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 its 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.
Since: 0.13.0
gupnp_context_manager_get_port ()
guint
gupnp_context_manager_get_port (GUPnPContextManager *manager
);
Get the network port associated with this context manager.
Since: 0.19.1
gupnp_context_manager_get_white_list ()
GUPnPWhiteList *
gupnp_context_manager_get_white_list (GUPnPContextManager *manager
);
Get the GUPnPWhiteList associated with manager
.
Property Details
The “main-context”
property
“main-context” gpointer
GMainContext to pass to created GUPnPContext objects.
Flags: Read / Write / Construct Only
The “port”
property
“port” guint
Port the contexts listen on, or 0 if you don't care what port is used by GUPnPContext objects created by this object.
Flags: Read / Write / Construct Only
Default value: 0
Signal Details
The “context-available”
signal
void user_function (GUPnPContextManager *context_manager, GUPnPContext *context, gpointer user_data)
Signals the availability of new GUPnPContext.
Parameters
context_manager |
The GUPnPContextManager that received the signal |
|
context |
The now available GUPnPContext |
|
user_data |
user data set when the signal handler was connected. |
Flags: Run First
The “context-unavailable”
signal
void user_function (GUPnPContextManager *context_manager, GUPnPContext *context, gpointer user_data)
Signals the unavailability of a GUPnPContext.
Parameters
context_manager |
The GUPnPContextManager that received the signal |
|
context |
The now unavailable GUPnPContext |
|
user_data |
user data set when the signal handler was connected. |
Flags: Run First