Class
GUPnPContext
Description [src]
class GUPnP.Context : GSSDP.Client {
parent_instance: GSSDPClient
}
Context object wrapping shared networking bits.
GUPnPContext
wraps the networking bits that are used by the various
GUPnP classes. It automatically starts a web server on demand.
For debugging, it is possible to see the messages being sent and received by
setting the environment variable GUPNP_DEBUG
.
Constructors
gupnp_context_new
Create a new GUPnPContext
with the specified iface
and
port
.
Deprecated since: 1.6.
gupnp_context_new_for_address
Creates a GUPnP context with address addr
. If none is specified, GUPnP
will chose the address it deems most suitable.
Available since: 1.6.
gupnp_context_new_full
Creates a GUPnP context with address addr
on network interface iface
. If
neither is specified, GUPnP will chose the address it deems most suitable.
Available since: 1.6.
Instance methods
gupnp_context_add_server_handler
Add a SoupServerCallback
to the GUPnPContext
‘s SoupServer
.
Available since: 0.20.11
gupnp_context_get_acl
Access the GUPnPAcl
associated with this client. If there isn’t any,
retturns NULL
. The returned ACL must not be freed.
Available since: 0.20.11
gupnp_context_get_default_language
Get the default Content-Language header for this context.
Available since: 0.18.0
gupnp_context_get_port
Get the port that the SOAP server is running on.
gupnp_context_get_server
Get the SoupServer
HTTP server that GUPnP is using.
gupnp_context_get_subscription_timeout
Get the event subscription timeout (in seconds), or 0 meaning there is no timeout.
gupnp_context_host_path
Start hosting local_path
at server_path
. Files with the path
local_path
.LOCALE (if they exist) will be served up when LOCALE is
specified in the request’s Accept-Language header.
gupnp_context_host_path_for_agent
Use this method to serve different local path to specific user-agent(s). The
path server_path
must already be hosted by context
.
Available since: 0.14.0
gupnp_context_remove_server_handler
Remove a SoupServerCallback
from the GUPnPContext
‘s SoupServer
.
Available since: 0.20.11
gupnp_context_rewrite_uri
Utility function to re-write an uri to the IPv6 link-local form which has the zone index appended to the IP address.
Available since: 1.2.0
gupnp_context_set_acl
Attach or remove the assoicated access control list to this context. If
acl
is NULL
, the current access control list will be removed.
Available since: 0.20.11
gupnp_context_set_default_language
Set the default language for the Content-Language header to language
.
Available since: 0.18.0
gupnp_context_set_subscription_timeout
Sets the event subscription timeout to timeout
. Use 0 if you don’t
want subscriptions to time out. Note that any client side subscriptions
will automatically be renewed.
gupnp_context_unhost_path
Stop hosting the file or folder at server_path
.
Properties
GUPnP.Context:default-language
The content of the Content-Language header id the client sends Accept-Language and no language-specific pages to serve exist. The property defaults to ‘en’.
Available since: 0.18.0
GUPnP.Context:server
The SoupServer
HTTP server used by GUPnP.
GUPnP.Context:session
The SoupSession
object used by GUPnP.
GUPnP.Context:subscription-timeout
The preferred subscription timeout: the number of seconds after which subscriptions are renewed. Set to ‘0’ if subscriptions are never to time out.
Class structure
struct GUPnPContextClass {
GSSDPClientClass parent_class;
void (* _gupnp_reserved1) (
void
);
void (* _gupnp_reserved2) (
void
);
void (* _gupnp_reserved3) (
void
);
void (* _gupnp_reserved4) (
void
);
}
Class members
parent_class |
|
No description available. | |
_gupnp_reserved1 |
|
No description available. | |
_gupnp_reserved2 |
|
No description available. | |
_gupnp_reserved3 |
|
No description available. | |
_gupnp_reserved4 |
|
No description available. |