Submit version 0.20.1 of GUPnP (4186015)
[profile/ivi/GUPnP.git] / doc / html / GUPnPContext.html
1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2 <html>
3 <head>
4 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
5 <title>GUPnPContext</title>
6 <meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
7 <link rel="home" href="index.html" title="GUPnP Reference Manual">
8 <link rel="up" href="api-utility.html" title="Utility Functions">
9 <link rel="prev" href="api-utility.html" title="Utility Functions">
10 <link rel="next" href="GUPnPContextManager.html" title="GUPnPContextManager">
11 <meta name="generator" content="GTK-Doc V1.18 (XML mode)">
12 <link rel="stylesheet" href="style.css" type="text/css">
13 </head>
14 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
15 <table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
16 <tr valign="middle">
17 <td><a accesskey="p" href="api-utility.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
18 <td><a accesskey="u" href="api-utility.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
19 <td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
20 <th width="100%" align="center">GUPnP Reference Manual</th>
21 <td><a accesskey="n" href="GUPnPContextManager.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
22 </tr>
23 <tr><td colspan="5" class="shortcuts">
24 <a href="#GUPnPContext.synopsis" class="shortcut">Top</a>
25                    | 
26                   <a href="#GUPnPContext.description" class="shortcut">Description</a>
27                    | 
28                   <a href="#GUPnPContext.object-hierarchy" class="shortcut">Object Hierarchy</a>
29                    | 
30                   <a href="#GUPnPContext.implemented-interfaces" class="shortcut">Implemented Interfaces</a>
31                    | 
32                   <a href="#GUPnPContext.properties" class="shortcut">Properties</a>
33 </td></tr>
34 </table>
35 <div class="refentry">
36 <a name="GUPnPContext"></a><div class="titlepage"></div>
37 <div class="refnamediv"><table width="100%"><tr>
38 <td valign="top">
39 <h2><span class="refentrytitle"><a name="GUPnPContext.top_of_page"></a>GUPnPContext</span></h2>
40 <p>GUPnPContext — Context object wrapping shared networking bits.</p>
41 </td>
42 <td valign="top" align="right"></td>
43 </tr></table></div>
44 <div class="refsynopsisdiv">
45 <a name="GUPnPContext.synopsis"></a><h2>Synopsis</h2>
46 <pre class="synopsis">struct              <a class="link" href="GUPnPContext.html#GUPnPContext-struct" title="struct GUPnPContext">GUPnPContext</a>;
47 <a class="link" href="GUPnPContext.html" title="GUPnPContext"><span class="returnvalue">GUPnPContext</span></a> *      <a class="link" href="GUPnPContext.html#gupnp-context-new" title="gupnp_context_new ()">gupnp_context_new</a>                   (<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-The-Main-Event-Loop.html#GMainContext"><span class="type">GMainContext</span></a> *main_context</code></em>,
48                                                          <em class="parameter"><code>const <span class="type">char</span> *iface</code></em>,
49                                                          <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> port</code></em>,
50                                                          <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);
51 const <span class="returnvalue">char</span> *        <a class="link" href="GUPnPContext.html#gupnp-context-get-host-ip" title="gupnp_context_get_host_ip ()">gupnp_context_get_host_ip</a>           (<em class="parameter"><code><a class="link" href="GUPnPContext.html" title="GUPnPContext"><span class="type">GUPnPContext</span></a> *context</code></em>);
52 <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a>               <a class="link" href="GUPnPContext.html#gupnp-context-get-port" title="gupnp_context_get_port ()">gupnp_context_get_port</a>              (<em class="parameter"><code><a class="link" href="GUPnPContext.html" title="GUPnPContext"><span class="type">GUPnPContext</span></a> *context</code></em>);
53 <a href="/usr/share/gtk-doc/html/libsoup-2.4/SoupServer.html"><span class="returnvalue">SoupServer</span></a> *        <a class="link" href="GUPnPContext.html#gupnp-context-get-server" title="gupnp_context_get_server ()">gupnp_context_get_server</a>            (<em class="parameter"><code><a class="link" href="GUPnPContext.html" title="GUPnPContext"><span class="type">GUPnPContext</span></a> *context</code></em>);
54 <a href="/usr/share/gtk-doc/html/libsoup-2.4/SoupSession.html"><span class="returnvalue">SoupSession</span></a> *       <a class="link" href="GUPnPContext.html#gupnp-context-get-session" title="gupnp_context_get_session ()">gupnp_context_get_session</a>           (<em class="parameter"><code><a class="link" href="GUPnPContext.html" title="GUPnPContext"><span class="type">GUPnPContext</span></a> *context</code></em>);
55 <span class="returnvalue">void</span>                <a class="link" href="GUPnPContext.html#gupnp-context-set-subscription-timeout" title="gupnp_context_set_subscription_timeout ()">gupnp_context_set_subscription_timeout</a>
56                                                         (<em class="parameter"><code><a class="link" href="GUPnPContext.html" title="GUPnPContext"><span class="type">GUPnPContext</span></a> *context</code></em>,
57                                                          <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> timeout</code></em>);
58 <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a>               <a class="link" href="GUPnPContext.html#gupnp-context-get-subscription-timeout" title="gupnp_context_get_subscription_timeout ()">gupnp_context_get_subscription_timeout</a>
59                                                         (<em class="parameter"><code><a class="link" href="GUPnPContext.html" title="GUPnPContext"><span class="type">GUPnPContext</span></a> *context</code></em>);
60 const <span class="returnvalue">char</span> *        <a class="link" href="GUPnPContext.html#gupnp-context-get-default-language" title="gupnp_context_get_default_language ()">gupnp_context_get_default_language</a>  (<em class="parameter"><code><a class="link" href="GUPnPContext.html" title="GUPnPContext"><span class="type">GUPnPContext</span></a> *context</code></em>);
61 <span class="returnvalue">void</span>                <a class="link" href="GUPnPContext.html#gupnp-context-set-default-language" title="gupnp_context_set_default_language ()">gupnp_context_set_default_language</a>  (<em class="parameter"><code><a class="link" href="GUPnPContext.html" title="GUPnPContext"><span class="type">GUPnPContext</span></a> *context</code></em>,
62                                                          <em class="parameter"><code>const <span class="type">char</span> *language</code></em>);
63 <span class="returnvalue">void</span>                <a class="link" href="GUPnPContext.html#gupnp-context-host-path" title="gupnp_context_host_path ()">gupnp_context_host_path</a>             (<em class="parameter"><code><a class="link" href="GUPnPContext.html" title="GUPnPContext"><span class="type">GUPnPContext</span></a> *context</code></em>,
64                                                          <em class="parameter"><code>const <span class="type">char</span> *local_path</code></em>,
65                                                          <em class="parameter"><code>const <span class="type">char</span> *server_path</code></em>);
66 <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            <a class="link" href="GUPnPContext.html#gupnp-context-host-path-for-agent" title="gupnp_context_host_path_for_agent ()">gupnp_context_host_path_for_agent</a>   (<em class="parameter"><code><a class="link" href="GUPnPContext.html" title="GUPnPContext"><span class="type">GUPnPContext</span></a> *context</code></em>,
67                                                          <em class="parameter"><code>const <span class="type">char</span> *local_path</code></em>,
68                                                          <em class="parameter"><code>const <span class="type">char</span> *server_path</code></em>,
69                                                          <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Perl-compatible-regular-expressions.html#GRegex"><span class="type">GRegex</span></a> *user_agent</code></em>);
70 <span class="returnvalue">void</span>                <a class="link" href="GUPnPContext.html#gupnp-context-unhost-path" title="gupnp_context_unhost_path ()">gupnp_context_unhost_path</a>           (<em class="parameter"><code><a class="link" href="GUPnPContext.html" title="GUPnPContext"><span class="type">GUPnPContext</span></a> *context</code></em>,
71                                                          <em class="parameter"><code>const <span class="type">char</span> *server_path</code></em>);
72 </pre>
73 </div>
74 <div class="refsect1">
75 <a name="GUPnPContext.object-hierarchy"></a><h2>Object Hierarchy</h2>
76 <pre class="synopsis">
77   <a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GObject">GObject</a>
78    +----GSSDPClient
79          +----GUPnPContext
80 </pre>
81 </div>
82 <div class="refsect1">
83 <a name="GUPnPContext.implemented-interfaces"></a><h2>Implemented Interfaces</h2>
84 <p>
85 GUPnPContext implements
86  <a href="http://library.gnome.org/devel/gio/unstable/GInitable.html">GInitable</a>.</p>
87 </div>
88 <div class="refsect1">
89 <a name="GUPnPContext.properties"></a><h2>Properties</h2>
90 <pre class="synopsis">
91   "<a class="link" href="GUPnPContext.html#GUPnPContext--default-language" title='The "default-language" property'>default-language</a>"         <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a>*                : Read / Write / Construct
92   "<a class="link" href="GUPnPContext.html#GUPnPContext--port" title='The "port" property'>port</a>"                     <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a>                 : Read / Write / Construct Only
93   "<a class="link" href="GUPnPContext.html#GUPnPContext--server" title='The "server" property'>server</a>"                   <a href="/usr/share/gtk-doc/html/libsoup-2.4/SoupServer.html"><span class="type">SoupServer</span></a>*           : Read
94   "<a class="link" href="GUPnPContext.html#GUPnPContext--session" title='The "session" property'>session</a>"                  <a href="/usr/share/gtk-doc/html/libsoup-2.4/SoupSession.html"><span class="type">SoupSession</span></a>*          : Read
95   "<a class="link" href="GUPnPContext.html#GUPnPContext--subscription-timeout" title='The "subscription-timeout" property'>subscription-timeout</a>"     <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a>                 : Read / Write / Construct Only
96 </pre>
97 </div>
98 <div class="refsect1">
99 <a name="GUPnPContext.description"></a><h2>Description</h2>
100 <p>
101 <a class="link" href="GUPnPContext.html" title="GUPnPContext"><span class="type">GUPnPContext</span></a> wraps the networking bits that are used by the various
102 GUPnP classes. It automatically starts a web server on demand.
103 </p>
104 <p>
105 For debugging, it is possible to see the messages being sent and received by
106 exporting <code class="literal">GUPNP_DEBUG</code>.
107 </p>
108 </div>
109 <div class="refsect1">
110 <a name="GUPnPContext.details"></a><h2>Details</h2>
111 <div class="refsect2">
112 <a name="GUPnPContext-struct"></a><h3>struct GUPnPContext</h3>
113 <pre class="programlisting">struct GUPnPContext;</pre>
114 <p>
115 This struct contains private data only, and should be accessed using the
116 functions below.
117 </p>
118 </div>
119 <hr>
120 <div class="refsect2">
121 <a name="gupnp-context-new"></a><h3>gupnp_context_new ()</h3>
122 <pre class="programlisting"><a class="link" href="GUPnPContext.html" title="GUPnPContext"><span class="returnvalue">GUPnPContext</span></a> *      gupnp_context_new                   (<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-The-Main-Event-Loop.html#GMainContext"><span class="type">GMainContext</span></a> *main_context</code></em>,
123                                                          <em class="parameter"><code>const <span class="type">char</span> *iface</code></em>,
124                                                          <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> port</code></em>,
125                                                          <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
126 <p>
127 Create a new <a class="link" href="GUPnPContext.html" title="GUPnPContext"><span class="type">GUPnPContext</span></a> with the specified <em class="parameter"><code>main_context</code></em>, <em class="parameter"><code>iface</code></em> and
128 <em class="parameter"><code>port</code></em>.
129 </p>
130 <div class="variablelist"><table border="0">
131 <col align="left" valign="top">
132 <tbody>
133 <tr>
134 <td><p><span class="term"><em class="parameter"><code>main_context</code></em> :</span></p></td>
135 <td>Deprecated: 0.17.2: Always set to <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. If you
136 want to use a different context, use <a href="http://library.gnome.org/devel/glib/unstable/glib-The-Main-Event-Loop.html#g-main-context-push-thread-default"><code class="function">g_main_context_push_thread_default()</code></a>. <span class="annotation">[<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span>
137 </td>
138 </tr>
139 <tr>
140 <td><p><span class="term"><em class="parameter"><code>iface</code></em> :</span></p></td>
141 <td>The network interface to use, or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> to
142 auto-detect. <span class="annotation">[<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span>
143 </td>
144 </tr>
145 <tr>
146 <td><p><span class="term"><em class="parameter"><code>port</code></em> :</span></p></td>
147 <td>Port to run on, or 0 if you don't care what port is used.</td>
148 </tr>
149 <tr>
150 <td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
151 <td>A location to store a <a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a>, or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>
152 </td>
153 </tr>
154 <tr>
155 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
156 <td>A new <a class="link" href="GUPnPContext.html" title="GUPnPContext"><span class="type">GUPnPContext</span></a> object, or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> on an error</td>
157 </tr>
158 </tbody>
159 </table></div>
160 </div>
161 <hr>
162 <div class="refsect2">
163 <a name="gupnp-context-get-host-ip"></a><h3>gupnp_context_get_host_ip ()</h3>
164 <pre class="programlisting">const <span class="returnvalue">char</span> *        gupnp_context_get_host_ip           (<em class="parameter"><code><a class="link" href="GUPnPContext.html" title="GUPnPContext"><span class="type">GUPnPContext</span></a> *context</code></em>);</pre>
165 <div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
166 <h3 class="title">Warning</h3>
167 <p><code class="literal">gupnp_context_get_host_ip</code> has been deprecated since version 0.12.7 and should not be used in newly-written code. The "host-ip" property has moved to the base class
168 <span class="type">GSSDPClient</span> so newer applications should use
169 <span class="type">gssdp_client_get_host_ip</span> instead.</p>
170 </div>
171 <p>
172 Get the IP address we advertise ourselves as using.
173 </p>
174 <div class="variablelist"><table border="0">
175 <col align="left" valign="top">
176 <tbody>
177 <tr>
178 <td><p><span class="term"><em class="parameter"><code>context</code></em> :</span></p></td>
179 <td>A <a class="link" href="GUPnPContext.html" title="GUPnPContext"><span class="type">GUPnPContext</span></a>
180 </td>
181 </tr>
182 <tr>
183 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
184 <td>The IP address. This string should not be freed.</td>
185 </tr>
186 </tbody>
187 </table></div>
188 </div>
189 <hr>
190 <div class="refsect2">
191 <a name="gupnp-context-get-port"></a><h3>gupnp_context_get_port ()</h3>
192 <pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a>               gupnp_context_get_port              (<em class="parameter"><code><a class="link" href="GUPnPContext.html" title="GUPnPContext"><span class="type">GUPnPContext</span></a> *context</code></em>);</pre>
193 <p>
194 Get the port that the SOAP server is running on.
195 </p>
196 <div class="variablelist"><table border="0">
197 <col align="left" valign="top">
198 <tbody>
199 <tr>
200 <td><p><span class="term"><em class="parameter"><code>context</code></em> :</span></p></td>
201 <td>A <a class="link" href="GUPnPContext.html" title="GUPnPContext"><span class="type">GUPnPContext</span></a>
202 </td>
203 </tr>
204 <tr>
205 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
206 <td>The port the SOAP server is running on.</td>
207 </tr>
208 </tbody>
209 </table></div>
210 </div>
211 <hr>
212 <div class="refsect2">
213 <a name="gupnp-context-get-server"></a><h3>gupnp_context_get_server ()</h3>
214 <pre class="programlisting"><a href="/usr/share/gtk-doc/html/libsoup-2.4/SoupServer.html"><span class="returnvalue">SoupServer</span></a> *        gupnp_context_get_server            (<em class="parameter"><code><a class="link" href="GUPnPContext.html" title="GUPnPContext"><span class="type">GUPnPContext</span></a> *context</code></em>);</pre>
215 <p>
216 Get the <a href="/usr/share/gtk-doc/html/libsoup-2.4/SoupServer.html"><span class="type">SoupServer</span></a> HTTP server that GUPnP is using.
217 </p>
218 <div class="variablelist"><table border="0">
219 <col align="left" valign="top">
220 <tbody>
221 <tr>
222 <td><p><span class="term"><em class="parameter"><code>context</code></em> :</span></p></td>
223 <td>A <a class="link" href="GUPnPContext.html" title="GUPnPContext"><span class="type">GUPnPContext</span></a>
224 </td>
225 </tr>
226 <tr>
227 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
228 <td>The <a href="/usr/share/gtk-doc/html/libsoup-2.4/SoupServer.html"><span class="type">SoupServer</span></a> used by GUPnP. Do not unref this when finished. <span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span>
229 </td>
230 </tr>
231 </tbody>
232 </table></div>
233 </div>
234 <hr>
235 <div class="refsect2">
236 <a name="gupnp-context-get-session"></a><h3>gupnp_context_get_session ()</h3>
237 <pre class="programlisting"><a href="/usr/share/gtk-doc/html/libsoup-2.4/SoupSession.html"><span class="returnvalue">SoupSession</span></a> *       gupnp_context_get_session           (<em class="parameter"><code><a class="link" href="GUPnPContext.html" title="GUPnPContext"><span class="type">GUPnPContext</span></a> *context</code></em>);</pre>
238 <p>
239 Get the <a href="/usr/share/gtk-doc/html/libsoup-2.4/SoupSession.html"><span class="type">SoupSession</span></a> object that GUPnP is using.
240 </p>
241 <div class="variablelist"><table border="0">
242 <col align="left" valign="top">
243 <tbody>
244 <tr>
245 <td><p><span class="term"><em class="parameter"><code>context</code></em> :</span></p></td>
246 <td>A <a class="link" href="GUPnPContext.html" title="GUPnPContext"><span class="type">GUPnPContext</span></a>
247 </td>
248 </tr>
249 <tr>
250 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
251 <td>The <a href="/usr/share/gtk-doc/html/libsoup-2.4/SoupSession.html"><span class="type">SoupSession</span></a> used by GUPnP. Do not unref
252 this when finished. <span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span>
253 </td>
254 </tr>
255 </tbody>
256 </table></div>
257 </div>
258 <hr>
259 <div class="refsect2">
260 <a name="gupnp-context-set-subscription-timeout"></a><h3>gupnp_context_set_subscription_timeout ()</h3>
261 <pre class="programlisting"><span class="returnvalue">void</span>                gupnp_context_set_subscription_timeout
262                                                         (<em class="parameter"><code><a class="link" href="GUPnPContext.html" title="GUPnPContext"><span class="type">GUPnPContext</span></a> *context</code></em>,
263                                                          <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> timeout</code></em>);</pre>
264 <p>
265 Sets the event subscription timeout to <em class="parameter"><code>timeout</code></em>. Use 0 if you don't
266 want subscriptions to time out. Note that any client side subscriptions
267 will automatically be renewed.
268 </p>
269 <div class="variablelist"><table border="0">
270 <col align="left" valign="top">
271 <tbody>
272 <tr>
273 <td><p><span class="term"><em class="parameter"><code>context</code></em> :</span></p></td>
274 <td>A <a class="link" href="GUPnPContext.html" title="GUPnPContext"><span class="type">GUPnPContext</span></a>
275 </td>
276 </tr>
277 <tr>
278 <td><p><span class="term"><em class="parameter"><code>timeout</code></em> :</span></p></td>
279 <td>Event subscription timeout in seconds</td>
280 </tr>
281 </tbody>
282 </table></div>
283 </div>
284 <hr>
285 <div class="refsect2">
286 <a name="gupnp-context-get-subscription-timeout"></a><h3>gupnp_context_get_subscription_timeout ()</h3>
287 <pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a>               gupnp_context_get_subscription_timeout
288                                                         (<em class="parameter"><code><a class="link" href="GUPnPContext.html" title="GUPnPContext"><span class="type">GUPnPContext</span></a> *context</code></em>);</pre>
289 <p>
290 Get the event subscription timeout (in seconds), or 0 meaning there is no
291 timeout.
292 </p>
293 <div class="variablelist"><table border="0">
294 <col align="left" valign="top">
295 <tbody>
296 <tr>
297 <td><p><span class="term"><em class="parameter"><code>context</code></em> :</span></p></td>
298 <td>A <a class="link" href="GUPnPContext.html" title="GUPnPContext"><span class="type">GUPnPContext</span></a>
299 </td>
300 </tr>
301 <tr>
302 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
303 <td>The event subscription timeout in seconds.</td>
304 </tr>
305 </tbody>
306 </table></div>
307 </div>
308 <hr>
309 <div class="refsect2">
310 <a name="gupnp-context-get-default-language"></a><h3>gupnp_context_get_default_language ()</h3>
311 <pre class="programlisting">const <span class="returnvalue">char</span> *        gupnp_context_get_default_language  (<em class="parameter"><code><a class="link" href="GUPnPContext.html" title="GUPnPContext"><span class="type">GUPnPContext</span></a> *context</code></em>);</pre>
312 <p>
313 Get the default Content-Language header for this context.
314 </p>
315 <div class="variablelist"><table border="0">
316 <col align="left" valign="top">
317 <tbody>
318 <tr>
319 <td><p><span class="term"><em class="parameter"><code>context</code></em> :</span></p></td>
320 <td>A <a class="link" href="GUPnPContext.html" title="GUPnPContext"><span class="type">GUPnPContext</span></a>
321 </td>
322 </tr>
323 <tr>
324 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
325 <td>The default content of the Content-Language
326 header. <span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span>
327 </td>
328 </tr>
329 </tbody>
330 </table></div>
331 </div>
332 <hr>
333 <div class="refsect2">
334 <a name="gupnp-context-set-default-language"></a><h3>gupnp_context_set_default_language ()</h3>
335 <pre class="programlisting"><span class="returnvalue">void</span>                gupnp_context_set_default_language  (<em class="parameter"><code><a class="link" href="GUPnPContext.html" title="GUPnPContext"><span class="type">GUPnPContext</span></a> *context</code></em>,
336                                                          <em class="parameter"><code>const <span class="type">char</span> *language</code></em>);</pre>
337 <p>
338 Set the default language for the Content-Length header to <em class="parameter"><code>language</code></em>.
339 </p>
340 <p>
341 If the client sends an Accept-Language header the UPnP HTTP server
342 is required to send a Content-Language header in return. If there are
343 no files hosted in languages which match the requested ones the
344 Content-Language header is set to this value. The default value is "en".
345 </p>
346 <div class="variablelist"><table border="0">
347 <col align="left" valign="top">
348 <tbody><tr>
349 <td><p><span class="term"><em class="parameter"><code>context</code></em> :</span></p></td>
350 <td>A <a class="link" href="GUPnPContext.html" title="GUPnPContext"><span class="type">GUPnPContext</span></a>
351 <em class="parameter"><code>language</code></em> A language tag as defined in RFC 2616 3.10</td>
352 </tr></tbody>
353 </table></div>
354 </div>
355 <hr>
356 <div class="refsect2">
357 <a name="gupnp-context-host-path"></a><h3>gupnp_context_host_path ()</h3>
358 <pre class="programlisting"><span class="returnvalue">void</span>                gupnp_context_host_path             (<em class="parameter"><code><a class="link" href="GUPnPContext.html" title="GUPnPContext"><span class="type">GUPnPContext</span></a> *context</code></em>,
359                                                          <em class="parameter"><code>const <span class="type">char</span> *local_path</code></em>,
360                                                          <em class="parameter"><code>const <span class="type">char</span> *server_path</code></em>);</pre>
361 <p>
362 Start hosting <em class="parameter"><code>local_path</code></em> at <em class="parameter"><code>server_path</code></em>. Files with the path
363 <em class="parameter"><code>local_path.LOCALE</code></em> (if they exist) will be served up when LOCALE is
364 specified in the request's Accept-Language header.
365 </p>
366 <div class="variablelist"><table border="0">
367 <col align="left" valign="top">
368 <tbody>
369 <tr>
370 <td><p><span class="term"><em class="parameter"><code>context</code></em> :</span></p></td>
371 <td>A <a class="link" href="GUPnPContext.html" title="GUPnPContext"><span class="type">GUPnPContext</span></a>
372 </td>
373 </tr>
374 <tr>
375 <td><p><span class="term"><em class="parameter"><code>local_path</code></em> :</span></p></td>
376 <td>Path to the local file or folder to be hosted</td>
377 </tr>
378 <tr>
379 <td><p><span class="term"><em class="parameter"><code>server_path</code></em> :</span></p></td>
380 <td>Web server path where <em class="parameter"><code>local_path</code></em> should be hosted</td>
381 </tr>
382 </tbody>
383 </table></div>
384 </div>
385 <hr>
386 <div class="refsect2">
387 <a name="gupnp-context-host-path-for-agent"></a><h3>gupnp_context_host_path_for_agent ()</h3>
388 <pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            gupnp_context_host_path_for_agent   (<em class="parameter"><code><a class="link" href="GUPnPContext.html" title="GUPnPContext"><span class="type">GUPnPContext</span></a> *context</code></em>,
389                                                          <em class="parameter"><code>const <span class="type">char</span> *local_path</code></em>,
390                                                          <em class="parameter"><code>const <span class="type">char</span> *server_path</code></em>,
391                                                          <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Perl-compatible-regular-expressions.html#GRegex"><span class="type">GRegex</span></a> *user_agent</code></em>);</pre>
392 <p>
393 Use this method to serve different local path to specific user-agent(s). The
394 path <em class="parameter"><code>server_path</code></em> must already be hosted by <em class="parameter"><code>context</code></em>.
395 </p>
396 <div class="variablelist"><table border="0">
397 <col align="left" valign="top">
398 <tbody>
399 <tr>
400 <td><p><span class="term"><em class="parameter"><code>context</code></em> :</span></p></td>
401 <td>A <a class="link" href="GUPnPContext.html" title="GUPnPContext"><span class="type">GUPnPContext</span></a>
402 </td>
403 </tr>
404 <tr>
405 <td><p><span class="term"><em class="parameter"><code>local_path</code></em> :</span></p></td>
406 <td>Path to the local file or folder to be hosted</td>
407 </tr>
408 <tr>
409 <td><p><span class="term"><em class="parameter"><code>server_path</code></em> :</span></p></td>
410 <td>Web server path already being hosted</td>
411 </tr>
412 <tr>
413 <td><p><span class="term"><em class="parameter"><code>user_agent</code></em> :</span></p></td>
414 <td>The user-agent as a <a href="http://library.gnome.org/devel/glib/unstable/glib-Perl-compatible-regular-expressions.html#GRegex"><span class="type">GRegex</span></a>.</td>
415 </tr>
416 <tr>
417 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
418 <td>
419 <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> on success, <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> otherwise.</td>
420 </tr>
421 </tbody>
422 </table></div>
423 </div>
424 <hr>
425 <div class="refsect2">
426 <a name="gupnp-context-unhost-path"></a><h3>gupnp_context_unhost_path ()</h3>
427 <pre class="programlisting"><span class="returnvalue">void</span>                gupnp_context_unhost_path           (<em class="parameter"><code><a class="link" href="GUPnPContext.html" title="GUPnPContext"><span class="type">GUPnPContext</span></a> *context</code></em>,
428                                                          <em class="parameter"><code>const <span class="type">char</span> *server_path</code></em>);</pre>
429 <p>
430 Stop hosting the file or folder at <em class="parameter"><code>server_path</code></em>.
431 </p>
432 <div class="variablelist"><table border="0">
433 <col align="left" valign="top">
434 <tbody>
435 <tr>
436 <td><p><span class="term"><em class="parameter"><code>context</code></em> :</span></p></td>
437 <td>A <a class="link" href="GUPnPContext.html" title="GUPnPContext"><span class="type">GUPnPContext</span></a>
438 </td>
439 </tr>
440 <tr>
441 <td><p><span class="term"><em class="parameter"><code>server_path</code></em> :</span></p></td>
442 <td>Web server path where the file or folder is hosted</td>
443 </tr>
444 </tbody>
445 </table></div>
446 </div>
447 </div>
448 <div class="refsect1">
449 <a name="GUPnPContext.property-details"></a><h2>Property Details</h2>
450 <div class="refsect2">
451 <a name="GUPnPContext--default-language"></a><h3>The <code class="literal">"default-language"</code> property</h3>
452 <pre class="programlisting">  "default-language"         <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a>*                : Read / Write / Construct</pre>
453 <p>
454 The content of the Content-Language header id the client
455 sends Accept-Language and no language-specific pages to serve
456 exist. The property defaults to 'en'.
457 </p>
458 <p>Default value: "en"</p>
459 </div>
460 <hr>
461 <div class="refsect2">
462 <a name="GUPnPContext--port"></a><h3>The <code class="literal">"port"</code> property</h3>
463 <pre class="programlisting">  "port"                     <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a>                 : Read / Write / Construct Only</pre>
464 <p>
465 The port to run on. Set to 0 if you don't care what port to run on.
466 </p>
467 <p>Default value: 0</p>
468 </div>
469 <hr>
470 <div class="refsect2">
471 <a name="GUPnPContext--server"></a><h3>The <code class="literal">"server"</code> property</h3>
472 <pre class="programlisting">  "server"                   <a href="/usr/share/gtk-doc/html/libsoup-2.4/SoupServer.html"><span class="type">SoupServer</span></a>*           : Read</pre>
473 <p>
474 The <a href="/usr/share/gtk-doc/html/libsoup-2.4/SoupServer.html"><span class="type">SoupServer</span></a> HTTP server used by GUPnP.
475 </p>
476 </div>
477 <hr>
478 <div class="refsect2">
479 <a name="GUPnPContext--session"></a><h3>The <code class="literal">"session"</code> property</h3>
480 <pre class="programlisting">  "session"                  <a href="/usr/share/gtk-doc/html/libsoup-2.4/SoupSession.html"><span class="type">SoupSession</span></a>*          : Read</pre>
481 <p>
482 The <a href="/usr/share/gtk-doc/html/libsoup-2.4/SoupSession.html"><span class="type">SoupSession</span></a> object used by GUPnP.
483 </p>
484 </div>
485 <hr>
486 <div class="refsect2">
487 <a name="GUPnPContext--subscription-timeout"></a><h3>The <code class="literal">"subscription-timeout"</code> property</h3>
488 <pre class="programlisting">  "subscription-timeout"     <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a>                 : Read / Write / Construct Only</pre>
489 <p>
490 The preferred subscription timeout: the number of seconds after
491 which subscriptions are renewed. Set to '0' if subscriptions
492 are never to time out.
493 </p>
494 <p>Allowed values: &lt;= 604800</p>
495 <p>Default value: 1800</p>
496 </div>
497 </div>
498 </div>
499 <div class="footer">
500 <hr>
501           Generated by GTK-Doc V1.18</div>
502 </body>
503 </html>