tizen 2.3.1 release
[external/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.75.2">
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.15.1 (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.properties" class="shortcut">Properties</a>
31 </td></tr>
32 </table>
33 <div class="refentry">
34 <a name="GUPnPContext"></a><div class="titlepage"></div>
35 <div class="refnamediv"><table width="100%"><tr>
36 <td valign="top">
37 <h2><span class="refentrytitle"><a name="GUPnPContext.top_of_page"></a>GUPnPContext</span></h2>
38 <p>GUPnPContext — Context object wrapping shared networking bits.</p>
39 </td>
40 <td valign="top" align="right"></td>
41 </tr></table></div>
42 <div class="refsynopsisdiv">
43 <a name="GUPnPContext.synopsis"></a><h2>Synopsis</h2>
44 <pre class="synopsis">                    <a class="link" href="GUPnPContext.html#GUPnPContext-struct" title="GUPnPContext">GUPnPContext</a>;
45 <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>,
46                                                          <em class="parameter"><code>const <span class="type">char</span> *interface</code></em>,
47                                                          <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>,
48                                                          <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>);
49 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>);
50 <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>);
51 <span class="returnvalue">SoupServer</span> *        <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>);
52 <span class="returnvalue">SoupSession</span> *       <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>);
53 <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>
54                                                         (<em class="parameter"><code><a class="link" href="GUPnPContext.html" title="GUPnPContext"><span class="type">GUPnPContext</span></a> *context</code></em>,
55                                                          <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>);
56 <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>
57                                                         (<em class="parameter"><code><a class="link" href="GUPnPContext.html" title="GUPnPContext"><span class="type">GUPnPContext</span></a> *context</code></em>);
58 <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>,
59                                                          <em class="parameter"><code>const <span class="type">char</span> *local_path</code></em>,
60                                                          <em class="parameter"><code>const <span class="type">char</span> *server_path</code></em>);
61 <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>,
62                                                          <em class="parameter"><code>const <span class="type">char</span> *local_path</code></em>,
63                                                          <em class="parameter"><code>const <span class="type">char</span> *server_path</code></em>,
64                                                          <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>);
65 <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>,
66                                                          <em class="parameter"><code>const <span class="type">char</span> *server_path</code></em>);
67 </pre>
68 </div>
69 <div class="refsect1">
70 <a name="GUPnPContext.object-hierarchy"></a><h2>Object Hierarchy</h2>
71 <pre class="synopsis">
72   <a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GObject">GObject</a>
73    +----<a href="/opt/gnome2/share/gtk-doc/html/gssdp/GSSDPClient.html">GSSDPClient</a>
74          +----GUPnPContext
75 </pre>
76 </div>
77 <div class="refsect1">
78 <a name="GUPnPContext.properties"></a><h2>Properties</h2>
79 <pre class="synopsis">
80   "<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
81   "<a class="link" href="GUPnPContext.html#GUPnPContext--server" title='The "server" property'>server</a>"                   <span class="type">SoupServer</span>*           : Read
82   "<a class="link" href="GUPnPContext.html#GUPnPContext--session" title='The "session" property'>session</a>"                  <span class="type">SoupSession</span>*          : Read
83   "<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
84 </pre>
85 </div>
86 <div class="refsect1">
87 <a name="GUPnPContext.description"></a><h2>Description</h2>
88 <p>
89 <a class="link" href="GUPnPContext.html" title="GUPnPContext"><span class="type">GUPnPContext</span></a> wraps the networking bits that are used by the various
90 GUPnP classes. It automatically starts a web server on demand.
91 </p>
92 <p>
93 For debugging, it is possible to see the messages being sent and received by
94 exporting <span class="type">GUPNP_DEBUG</span>.
95 </p>
96 <p>
97 </p>
98 </div>
99 <div class="refsect1">
100 <a name="GUPnPContext.details"></a><h2>Details</h2>
101 <div class="refsect2">
102 <a name="GUPnPContext-struct"></a><h3>GUPnPContext</h3>
103 <pre class="programlisting">typedef struct _GUPnPContext GUPnPContext;</pre>
104 <p>
105 This struct contains private data only, and should be accessed using the
106 functions below.
107 </p>
108 <p>
109 </p>
110 </div>
111 <hr>
112 <div class="refsect2">
113 <a name="gupnp-context-new"></a><h3>gupnp_context_new ()</h3>
114 <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>,
115                                                          <em class="parameter"><code>const <span class="type">char</span> *interface</code></em>,
116                                                          <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>,
117                                                          <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>
118 <p>
119 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>interface</code></em> and
120 <em class="parameter"><code>port</code></em>.
121 </p>
122 <p>
123 </p>
124 <div class="variablelist"><table border="0">
125 <col align="left" valign="top">
126 <tbody>
127 <tr>
128 <td><p><span class="term"><em class="parameter"><code>main_context</code></em> :</span></p></td>
129 <td>A <a href="http://library.gnome.org/devel/glib/unstable/glib-The-Main-Event-Loop.html#GMainContext"><span class="type">GMainContext</span></a>, or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> to use the default one
130 </td>
131 </tr>
132 <tr>
133 <td><p><span class="term"><em class="parameter"><code>interface</code></em> :</span></p></td>
134 <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 auto-detect.
135 </td>
136 </tr>
137 <tr>
138 <td><p><span class="term"><em class="parameter"><code>port</code></em> :</span></p></td>
139 <td>Port to run on, or 0 if you don't care what port is used.
140 </td>
141 </tr>
142 <tr>
143 <td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
144 <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>
145 </td>
146 </tr>
147 <tr>
148 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
149 <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
150 </td>
151 </tr>
152 </tbody>
153 </table></div>
154 </div>
155 <hr>
156 <div class="refsect2">
157 <a name="gupnp-context-get-host-ip"></a><h3>gupnp_context_get_host_ip ()</h3>
158 <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>
159 <div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
160 <h3 class="title">Warning</h3>
161 <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
162 <a href="/opt/gnome2/share/gtk-doc/html/gssdp/GSSDPClient.html"><span class="type">GSSDPClient</span></a> so newer applications should use
163 <a href="/opt/gnome2/share/gtk-doc/html/gssdp/GSSDPClient.html#gssdp-client-get-host-ip"><span class="type">gssdp_client_get_host_ip</span></a> instead.</p>
164 </div>
165 <p>
166 Get the IP address we advertise ourselves as using.
167 </p>
168 <p>
169 </p>
170 <div class="variablelist"><table border="0">
171 <col align="left" valign="top">
172 <tbody>
173 <tr>
174 <td><p><span class="term"><em class="parameter"><code>context</code></em> :</span></p></td>
175 <td>A <a class="link" href="GUPnPContext.html" title="GUPnPContext"><span class="type">GUPnPContext</span></a>
176 </td>
177 </tr>
178 <tr>
179 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
180 <td> The IP address. This string should not be freed.
181
182 </td>
183 </tr>
184 </tbody>
185 </table></div>
186 </div>
187 <hr>
188 <div class="refsect2">
189 <a name="gupnp-context-get-port"></a><h3>gupnp_context_get_port ()</h3>
190 <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>
191 <p>
192 Get the port that the SOAP server is running on.
193 </p>
194 <p>
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.
207 </td>
208 </tr>
209 </tbody>
210 </table></div>
211 </div>
212 <hr>
213 <div class="refsect2">
214 <a name="gupnp-context-get-server"></a><h3>gupnp_context_get_server ()</h3>
215 <pre class="programlisting"><span class="returnvalue">SoupServer</span> *        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>
216 <p>
217 Get the <span class="type">SoupServer</span> HTTP server that GUPnP is using.
218 </p>
219 <p>
220 </p>
221 <div class="variablelist"><table border="0">
222 <col align="left" valign="top">
223 <tbody>
224 <tr>
225 <td><p><span class="term"><em class="parameter"><code>context</code></em> :</span></p></td>
226 <td>A <a class="link" href="GUPnPContext.html" title="GUPnPContext"><span class="type">GUPnPContext</span></a>
227 </td>
228 </tr>
229 <tr>
230 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
231 <td> The <span class="type">SoupServer</span> used by GUPnP. Do not unref this when finished.
232 </td>
233 </tr>
234 </tbody>
235 </table></div>
236 </div>
237 <hr>
238 <div class="refsect2">
239 <a name="gupnp-context-get-session"></a><h3>gupnp_context_get_session ()</h3>
240 <pre class="programlisting"><span class="returnvalue">SoupSession</span> *       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>
241 <p>
242 Get the <span class="type">SoupSession</span> object that GUPnP is using.
243 </p>
244 <p>
245 </p>
246 <div class="variablelist"><table border="0">
247 <col align="left" valign="top">
248 <tbody>
249 <tr>
250 <td><p><span class="term"><em class="parameter"><code>context</code></em> :</span></p></td>
251 <td>A <a class="link" href="GUPnPContext.html" title="GUPnPContext"><span class="type">GUPnPContext</span></a>
252 </td>
253 </tr>
254 <tr>
255 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
256 <td> The <span class="type">SoupSession</span> used by GUPnP. Do not unref
257 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>
258 </td>
259 </tr>
260 </tbody>
261 </table></div>
262 </div>
263 <hr>
264 <div class="refsect2">
265 <a name="gupnp-context-set-subscription-timeout"></a><h3>gupnp_context_set_subscription_timeout ()</h3>
266 <pre class="programlisting"><span class="returnvalue">void</span>                gupnp_context_set_subscription_timeout
267                                                         (<em class="parameter"><code><a class="link" href="GUPnPContext.html" title="GUPnPContext"><span class="type">GUPnPContext</span></a> *context</code></em>,
268                                                          <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>
269 <p>
270 Sets the event subscription timeout to <em class="parameter"><code>timeout</code></em>. Use 0 if you don't
271 want subscriptions to time out. Note that any client side subscriptions
272 will automatically be renewed.
273 </p>
274 <p>
275 </p>
276 <div class="variablelist"><table border="0">
277 <col align="left" valign="top">
278 <tbody>
279 <tr>
280 <td><p><span class="term"><em class="parameter"><code>context</code></em> :</span></p></td>
281 <td>A <a class="link" href="GUPnPContext.html" title="GUPnPContext"><span class="type">GUPnPContext</span></a>
282 </td>
283 </tr>
284 <tr>
285 <td><p><span class="term"><em class="parameter"><code>timeout</code></em> :</span></p></td>
286 <td>Event subscription timeout in seconds
287 </td>
288 </tr>
289 </tbody>
290 </table></div>
291 </div>
292 <hr>
293 <div class="refsect2">
294 <a name="gupnp-context-get-subscription-timeout"></a><h3>gupnp_context_get_subscription_timeout ()</h3>
295 <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
296                                                         (<em class="parameter"><code><a class="link" href="GUPnPContext.html" title="GUPnPContext"><span class="type">GUPnPContext</span></a> *context</code></em>);</pre>
297 <p>
298 Get the event subscription timeout (in seconds), or 0 meaning there is no
299 timeout.
300 </p>
301 <p>
302 </p>
303 <div class="variablelist"><table border="0">
304 <col align="left" valign="top">
305 <tbody>
306 <tr>
307 <td><p><span class="term"><em class="parameter"><code>context</code></em> :</span></p></td>
308 <td>A <a class="link" href="GUPnPContext.html" title="GUPnPContext"><span class="type">GUPnPContext</span></a>
309 </td>
310 </tr>
311 <tr>
312 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
313 <td> The event subscription timeout in seconds.
314 </td>
315 </tr>
316 </tbody>
317 </table></div>
318 </div>
319 <hr>
320 <div class="refsect2">
321 <a name="gupnp-context-host-path"></a><h3>gupnp_context_host_path ()</h3>
322 <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>,
323                                                          <em class="parameter"><code>const <span class="type">char</span> *local_path</code></em>,
324                                                          <em class="parameter"><code>const <span class="type">char</span> *server_path</code></em>);</pre>
325 <p>
326 Start hosting <em class="parameter"><code>local_path</code></em> at <em class="parameter"><code>server_path</code></em>. Files with the path
327 <em class="parameter"><code>local_path.LOCALE</code></em> (if they exist) will be served up when LOCALE is
328 specified in the request's Accept-Language header.
329 </p>
330 <p>
331 </p>
332 <div class="variablelist"><table border="0">
333 <col align="left" valign="top">
334 <tbody>
335 <tr>
336 <td><p><span class="term"><em class="parameter"><code>context</code></em> :</span></p></td>
337 <td>A <a class="link" href="GUPnPContext.html" title="GUPnPContext"><span class="type">GUPnPContext</span></a>
338 </td>
339 </tr>
340 <tr>
341 <td><p><span class="term"><em class="parameter"><code>local_path</code></em> :</span></p></td>
342 <td>Path to the local file or folder to be hosted
343 </td>
344 </tr>
345 <tr>
346 <td><p><span class="term"><em class="parameter"><code>server_path</code></em> :</span></p></td>
347 <td>Web server path where <em class="parameter"><code>local_path</code></em> should be hosted
348 </td>
349 </tr>
350 </tbody>
351 </table></div>
352 </div>
353 <hr>
354 <div class="refsect2">
355 <a name="gupnp-context-host-path-for-agent"></a><h3>gupnp_context_host_path_for_agent ()</h3>
356 <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>,
357                                                          <em class="parameter"><code>const <span class="type">char</span> *local_path</code></em>,
358                                                          <em class="parameter"><code>const <span class="type">char</span> *server_path</code></em>,
359                                                          <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>
360 <p>
361 Use this method to serve different local path to specific user-agent(s). The
362 path <em class="parameter"><code>server_path</code></em> must already be hosted by <em class="parameter"><code>context</code></em>.
363 </p>
364 <p>
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
377 </td>
378 </tr>
379 <tr>
380 <td><p><span class="term"><em class="parameter"><code>server_path</code></em> :</span></p></td>
381 <td>Web server path already being hosted
382 </td>
383 </tr>
384 <tr>
385 <td><p><span class="term"><em class="parameter"><code>user_agent</code></em> :</span></p></td>
386 <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>.
387 </td>
388 </tr>
389 <tr>
390 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
391 <td> <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.
392 </td>
393 </tr>
394 </tbody>
395 </table></div>
396 </div>
397 <hr>
398 <div class="refsect2">
399 <a name="gupnp-context-unhost-path"></a><h3>gupnp_context_unhost_path ()</h3>
400 <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>,
401                                                          <em class="parameter"><code>const <span class="type">char</span> *server_path</code></em>);</pre>
402 <p>
403 Stop hosting the file or folder at <em class="parameter"><code>server_path</code></em>.
404 </p>
405 <p>
406 </p>
407 <div class="variablelist"><table border="0">
408 <col align="left" valign="top">
409 <tbody>
410 <tr>
411 <td><p><span class="term"><em class="parameter"><code>context</code></em> :</span></p></td>
412 <td>A <a class="link" href="GUPnPContext.html" title="GUPnPContext"><span class="type">GUPnPContext</span></a>
413 </td>
414 </tr>
415 <tr>
416 <td><p><span class="term"><em class="parameter"><code>server_path</code></em> :</span></p></td>
417 <td>Web server path where the file or folder is hosted
418 </td>
419 </tr>
420 </tbody>
421 </table></div>
422 </div>
423 </div>
424 <div class="refsect1">
425 <a name="GUPnPContext.property-details"></a><h2>Property Details</h2>
426 <div class="refsect2">
427 <a name="GUPnPContext--port"></a><h3>The <code class="literal">"port"</code> property</h3>
428 <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>
429 <p>
430 The port to run on. Set to 0 if you don't care what port to run on.
431 </p>
432 <p>
433 </p>
434 <p>Default value: 0</p>
435 </div>
436 <hr>
437 <div class="refsect2">
438 <a name="GUPnPContext--server"></a><h3>The <code class="literal">"server"</code> property</h3>
439 <pre class="programlisting">  "server"                   <span class="type">SoupServer</span>*           : Read</pre>
440 <p>
441 The <span class="type">SoupServer</span> HTTP server used by GUPnP.
442 </p>
443 <p>
444 </p>
445 </div>
446 <hr>
447 <div class="refsect2">
448 <a name="GUPnPContext--session"></a><h3>The <code class="literal">"session"</code> property</h3>
449 <pre class="programlisting">  "session"                  <span class="type">SoupSession</span>*          : Read</pre>
450 <p>
451 The <span class="type">SoupSession</span> object used by GUPnP.
452 </p>
453 <p>
454 </p>
455 </div>
456 <hr>
457 <div class="refsect2">
458 <a name="GUPnPContext--subscription-timeout"></a><h3>The <code class="literal">"subscription-timeout"</code> property</h3>
459 <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>
460 <p>
461 The preferred subscription timeout: the number of seconds after
462 which subscriptions are renewed. Set to '0' if subscriptions
463 are never to time out.
464 </p>
465 <p>
466 </p>
467 <p>Allowed values: &lt;= 604800</p>
468 <p>Default value: 1800</p>
469 </div>
470 </div>
471 </div>
472 <div class="footer">
473 <hr>
474           Generated by GTK-Doc V1.15.1</div>
475 </body>
476 </html>