Context
Object Hierarchy:
Description:
[ CCode ( type_id = "gupnp_context_get_type ()" ) ]
public class Context : Client, Initable
This struct contains private data only, and should be accessed using the functions below.
Content:
Properties:
- public Acl acl { get; set construct; }
An access control list.
- public string default_language { get; set construct; }
The content of the Content-Language header id the client sends
Accept-Language and no language-specific pages to serve exist.
- public uint port { get; construct; }
The port to run on.
- public Server server { get; }
The Server HTTP server used by GUPnP.
- public Session session { get; }
The Session object used by GUPnP.
- public uint subscription_timeout { get; construct; }
The preferred subscription timeout: the number of seconds after which
subscriptions are renewed.
Creation methods:
Methods:
- public void add_server_handler (bool use_acl, string path, owned ServerCallback callback)
Add a ServerCallback to the
Context's Server.
- public unowned Acl get_acl ()
- public unowned string get_default_language ()
Get the default Content-Language header for this context.
- public unowned string get_host_ip ()
Get the IP address we advertise ourselves as using.
- public uint get_port ()
Get the port that the SOAP server is running on.
- public unowned Server get_server ()
Get the Server HTTP server that GUPnP is
using.
- public unowned Session get_session ()
Get the Session object that GUPnP is using.
- public uint get_subscription_timeout ()
Get the event subscription timeout (in seconds), or 0 meaning there is
no timeout.
- public void host_path (string local_path, string server_path)
Start hosting local_path
at server_path
.
- public bool host_path_for_agent (string local_path, string server_path, Regex user_agent)
Use this method to serve different local path to specific
user-agent(s).
- public void remove_server_handler (string path)
Remove a ServerCallback from the
Context's Server.
- public void set_acl (Acl? acl)
- public void set_default_language (string language)
Set the default language for the Content-Length header to
language
.
- public void set_subscription_timeout (uint timeout)
Sets the event subscription timeout to timeout
.
- public void unhost_path (string server_path)
Stop hosting the file or folder at server_path
.
Inherited Members:
All known members inherited from class GSSDP.Client
- @interface
- active
- add_cache_entry
- append_header
- clear_headers
- get_active
- get_host_ip
- get_interface
- get_main_context
- get_network
- get_server_id
- guess_user_agent
- host_ip
- msearch_port
- network
- remove_header
- server_id
- set_network
- set_server_id
- socket_ttl
All known members inherited from class GLib.Object
- @get
- @new
- @ref
- @set
- add_toggle_ref
- add_weak_pointer
- bind_property
- connect
- constructed
- disconnect
- dispose
- dup_data
- dup_qdata
- force_floating
- freeze_notify
- get_class
- get_data
- get_property
- get_qdata
- get_type
- getv
- interface_find_property
- interface_install_property
- interface_list_properties
- is_floating
- new_valist
- new_with_properties
- newv
- notify
- notify_property
- ref_count
- ref_sink
- remove_toggle_ref
- remove_weak_pointer
- replace_data
- replace_qdata
- set_data
- set_data_full
- set_property
- set_qdata
- set_qdata_full
- set_valist
- setv
- steal_data
- steal_qdata
- thaw_notify
- unref
- watch_closure
- weak_ref
- weak_unref
All known members inherited from interface GLib.Initable