Imported Upstream version 0.20.12
[profile/ivi/GUPnP.git] / doc / html / GUPnPResourceFactory.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>GUPnP Reference Manual: GUPnPResourceFactory</title>
6 <meta name="generator" content="DocBook XSL Stylesheets V1.78.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="GUPnPWhiteList.html" title="GUPnPWhiteList">
10 <link rel="next" href="GUPnPXMLDoc.html" title="GUPnPXMLDoc">
11 <meta name="generator" content="GTK-Doc V1.20 (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="10"><tr valign="middle">
16 <td width="100%" align="left" class="shortcuts">
17 <a href="#" class="shortcut">Top</a><span id="nav_description"> <span class="dim">|</span> 
18                   <a href="#GUPnPResourceFactory.description" class="shortcut">Description</a></span><span id="nav_hierarchy"> <span class="dim">|</span> 
19                   <a href="#GUPnPResourceFactory.object-hierarchy" class="shortcut">Object Hierarchy</a></span>
20 </td>
21 <td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
22 <td><a accesskey="u" href="api-utility.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
23 <td><a accesskey="p" href="GUPnPWhiteList.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
24 <td><a accesskey="n" href="GUPnPXMLDoc.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
25 </tr></table>
26 <div class="refentry">
27 <a name="GUPnPResourceFactory"></a><div class="titlepage"></div>
28 <div class="refnamediv"><table width="100%"><tr>
29 <td valign="top">
30 <h2><span class="refentrytitle"><a name="GUPnPResourceFactory.top_of_page"></a>GUPnPResourceFactory</span></h2>
31 <p>GUPnPResourceFactory — Class for resource and resource proxy object creation.</p>
32 </td>
33 <td class="gallery_image" valign="top" align="right"></td>
34 </tr></table></div>
35 <div class="refsect1">
36 <a name="GUPnPResourceFactory.functions"></a><h2>Functions</h2>
37 <div class="informaltable"><table width="100%" border="0">
38 <colgroup>
39 <col width="150px" class="functions_return">
40 <col class="functions_name">
41 </colgroup>
42 <tbody>
43 <tr>
44 <td class="function_type">
45 <a class="link" href="GUPnPResourceFactory.html" title="GUPnPResourceFactory"><span class="returnvalue">GUPnPResourceFactory</span></a> *
46 </td>
47 <td class="function_name">
48 <a class="link" href="GUPnPResourceFactory.html#gupnp-resource-factory-new" title="gupnp_resource_factory_new ()">gupnp_resource_factory_new</a> <span class="c_punctuation">()</span>
49 </td>
50 </tr>
51 <tr>
52 <td class="function_type">
53 <a class="link" href="GUPnPResourceFactory.html" title="GUPnPResourceFactory"><span class="returnvalue">GUPnPResourceFactory</span></a> *
54 </td>
55 <td class="function_name">
56 <a class="link" href="GUPnPResourceFactory.html#gupnp-resource-factory-get-default" title="gupnp_resource_factory_get_default ()">gupnp_resource_factory_get_default</a> <span class="c_punctuation">()</span>
57 </td>
58 </tr>
59 <tr>
60 <td class="function_type">
61 <span class="returnvalue">void</span>
62 </td>
63 <td class="function_name">
64 <a class="link" href="GUPnPResourceFactory.html#gupnp-resource-factory-register-resource-type" title="gupnp_resource_factory_register_resource_type ()">gupnp_resource_factory_register_resource_type</a> <span class="c_punctuation">()</span>
65 </td>
66 </tr>
67 <tr>
68 <td class="function_type">
69 <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
70 </td>
71 <td class="function_name">
72 <a class="link" href="GUPnPResourceFactory.html#gupnp-resource-factory-unregister-resource-type" title="gupnp_resource_factory_unregister_resource_type ()">gupnp_resource_factory_unregister_resource_type</a> <span class="c_punctuation">()</span>
73 </td>
74 </tr>
75 <tr>
76 <td class="function_type">
77 <span class="returnvalue">void</span>
78 </td>
79 <td class="function_name">
80 <a class="link" href="GUPnPResourceFactory.html#gupnp-resource-factory-register-resource-proxy-type" title="gupnp_resource_factory_register_resource_proxy_type ()">gupnp_resource_factory_register_resource_proxy_type</a> <span class="c_punctuation">()</span>
81 </td>
82 </tr>
83 <tr>
84 <td class="function_type">
85 <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
86 </td>
87 <td class="function_name">
88 <a class="link" href="GUPnPResourceFactory.html#gupnp-resource-factory-unregister-resource-proxy-type" title="gupnp_resource_factory_unregister_resource_proxy_type ()">gupnp_resource_factory_unregister_resource_proxy_type</a> <span class="c_punctuation">()</span>
89 </td>
90 </tr>
91 </tbody>
92 </table></div>
93 </div>
94 <div class="refsect1">
95 <a name="GUPnPResourceFactory.other"></a><h2>Types and Values</h2>
96 <div class="informaltable"><table width="100%" border="0">
97 <colgroup>
98 <col width="150px" class="name">
99 <col class="description">
100 </colgroup>
101 <tbody><tr>
102 <td class="datatype_keyword">struct</td>
103 <td class="function_name"><a class="link" href="GUPnPResourceFactory.html#GUPnPResourceFactory-struct" title="struct GUPnPResourceFactory">GUPnPResourceFactory</a></td>
104 </tr></tbody>
105 </table></div>
106 </div>
107 <div class="refsect1">
108 <a name="GUPnPResourceFactory.object-hierarchy"></a><h2>Object Hierarchy</h2>
109 <pre class="screen">    <a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GObject">GObject</a>
110     <span class="lineart">╰──</span> GUPnPResourceFactory
111 </pre>
112 </div>
113 <div class="refsect1">
114 <a name="GUPnPResourceFactory.description"></a><h2>Description</h2>
115 <p><a class="link" href="GUPnPResourceFactory.html" title="GUPnPResourceFactory"><span class="type">GUPnPResourceFactory</span></a> objects are used by <a class="link" href="GUPnPControlPoint.html" title="GUPnPControlPoint"><span class="type">GUPnPControlPoint</span></a>,
116 <a class="link" href="GUPnPDeviceProxy.html" title="GUPnPDeviceProxy"><span class="type">GUPnPDeviceProxy</span></a> and <a class="link" href="GUPnPDevice.html" title="GUPnPDevice"><span class="type">GUPnPDevice</span></a> to create resource proxy and resource
117 objects. Register UPnP type - <a href="http://library.gnome.org/devel/gobject/unstable/gobject-Type-Information.html#GType"><span class="type">GType</span></a> pairs to have resource or resource proxy
118 objects created with the specified <a href="http://library.gnome.org/devel/gobject/unstable/gobject-Type-Information.html#GType"><span class="type">GType</span></a> whenever an object for a resource
119 of the specified UPnP type is requested. The <a href="http://library.gnome.org/devel/gobject/unstable/gobject-Type-Information.html#GType"><span class="type">GType</span></a>s need
120 to be derived from the relevant resource or resource proxy type (e.g.
121 a device proxy type needs to be derived from <a class="link" href="GUPnPDeviceProxy.html" title="GUPnPDeviceProxy"><span class="type">GUPnPDeviceProxy</span></a>).</p>
122 </div>
123 <div class="refsect1">
124 <a name="GUPnPResourceFactory.functions_details"></a><h2>Functions</h2>
125 <div class="refsect2">
126 <a name="gupnp-resource-factory-new"></a><h3>gupnp_resource_factory_new ()</h3>
127 <pre class="programlisting"><a class="link" href="GUPnPResourceFactory.html" title="GUPnPResourceFactory"><span class="returnvalue">GUPnPResourceFactory</span></a> *
128 gupnp_resource_factory_new (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
129 <p>Create a new <a class="link" href="GUPnPResourceFactory.html" title="GUPnPResourceFactory"><span class="type">GUPnPResourceFactory</span></a> object.</p>
130 <div class="refsect3">
131 <a name="id-1.3.6.4.7.2.5"></a><h4>Returns</h4>
132 <p> A <a class="link" href="GUPnPResourceFactory.html" title="GUPnPResourceFactory"><span class="type">GUPnPResourceFactory</span></a> object.</p>
133 <p></p>
134 </div>
135 </div>
136 <hr>
137 <div class="refsect2">
138 <a name="gupnp-resource-factory-get-default"></a><h3>gupnp_resource_factory_get_default ()</h3>
139 <pre class="programlisting"><a class="link" href="GUPnPResourceFactory.html" title="GUPnPResourceFactory"><span class="returnvalue">GUPnPResourceFactory</span></a> *
140 gupnp_resource_factory_get_default (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
141 <p>Get the default singleton <a class="link" href="GUPnPResourceFactory.html" title="GUPnPResourceFactory"><span class="type">GUPnPResourceFactory</span></a> object.</p>
142 <div class="refsect3">
143 <a name="id-1.3.6.4.7.3.5"></a><h4>Returns</h4>
144 <p> A <em class="parameter"><code>GUPnPResourceFactory</code></em>
145 object. </p>
146 <p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p>
147 </div>
148 </div>
149 <hr>
150 <div class="refsect2">
151 <a name="gupnp-resource-factory-register-resource-type"></a><h3>gupnp_resource_factory_register_resource_type ()</h3>
152 <pre class="programlisting"><span class="returnvalue">void</span>
153 gupnp_resource_factory_register_resource_type
154                                (<em class="parameter"><code><a class="link" href="GUPnPResourceFactory.html" title="GUPnPResourceFactory"><span class="type">GUPnPResourceFactory</span></a> *factory</code></em>,
155                                 <em class="parameter"><code>const <span class="type">char</span> *upnp_type</code></em>,
156                                 <em class="parameter"><code><a href="http://library.gnome.org/devel/gobject/unstable/gobject-Type-Information.html#GType"><span class="type">GType</span></a> type</code></em>);</pre>
157 <p>Registers the GType <em class="parameter"><code>type</code></em>
158  for the resource of UPnP type <em class="parameter"><code>upnp_type</code></em>
159 . After
160 this call, the factory <em class="parameter"><code>factory</code></em>
161  will create object of GType <em class="parameter"><code>type</code></em>
162  each time
163 it is asked to create a resource object for UPnP type <em class="parameter"><code>upnp_type</code></em>
164 .</p>
165 <p>Note: GType <em class="parameter"><code>type</code></em>
166  must be a derived type of <span class="type">GUPNP_TYPE_DEVICE</span> if resource is
167 a device or <span class="type">GUPNP_TYPE_SERVICE</span> if its a service.</p>
168 <div class="refsect3">
169 <a name="id-1.3.6.4.7.4.6"></a><h4>Parameters</h4>
170 <div class="informaltable"><table width="100%" border="0">
171 <colgroup>
172 <col width="150px" class="parameters_name">
173 <col class="parameters_description">
174 <col width="200px" class="parameters_annotations">
175 </colgroup>
176 <tbody>
177 <tr>
178 <td class="parameter_name"><p>factory</p></td>
179 <td class="parameter_description"><p>A <a class="link" href="GUPnPResourceFactory.html" title="GUPnPResourceFactory"><span class="type">GUPnPResourceFactory</span></a>.</p></td>
180 <td class="parameter_annotations"> </td>
181 </tr>
182 <tr>
183 <td class="parameter_name"><p>upnp_type</p></td>
184 <td class="parameter_description"><p>The UPnP type name of the resource.</p></td>
185 <td class="parameter_annotations"> </td>
186 </tr>
187 <tr>
188 <td class="parameter_name"><p>type</p></td>
189 <td class="parameter_description"><p>The requested GType assignment for the resource.</p></td>
190 <td class="parameter_annotations"> </td>
191 </tr>
192 </tbody>
193 </table></div>
194 </div>
195 </div>
196 <hr>
197 <div class="refsect2">
198 <a name="gupnp-resource-factory-unregister-resource-type"></a><h3>gupnp_resource_factory_unregister_resource_type ()</h3>
199 <pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
200 gupnp_resource_factory_unregister_resource_type
201                                (<em class="parameter"><code><a class="link" href="GUPnPResourceFactory.html" title="GUPnPResourceFactory"><span class="type">GUPnPResourceFactory</span></a> *factory</code></em>,
202                                 <em class="parameter"><code>const <span class="type">char</span> *upnp_type</code></em>);</pre>
203 <p>Unregisters the GType assignment for the resource of UPnP type <em class="parameter"><code>upnp_type</code></em>
204 .</p>
205 <div class="refsect3">
206 <a name="id-1.3.6.4.7.5.5"></a><h4>Parameters</h4>
207 <div class="informaltable"><table width="100%" border="0">
208 <colgroup>
209 <col width="150px" class="parameters_name">
210 <col class="parameters_description">
211 <col width="200px" class="parameters_annotations">
212 </colgroup>
213 <tbody>
214 <tr>
215 <td class="parameter_name"><p>factory</p></td>
216 <td class="parameter_description"><p>A <a class="link" href="GUPnPResourceFactory.html" title="GUPnPResourceFactory"><span class="type">GUPnPResourceFactory</span></a>.</p></td>
217 <td class="parameter_annotations"> </td>
218 </tr>
219 <tr>
220 <td class="parameter_name"><p>upnp_type</p></td>
221 <td class="parameter_description"><p>The UPnP type name of the resource.</p></td>
222 <td class="parameter_annotations"> </td>
223 </tr>
224 </tbody>
225 </table></div>
226 </div>
227 <div class="refsect3">
228 <a name="id-1.3.6.4.7.5.6"></a><h4>Returns</h4>
229 <p> <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if GType assignment was removed successfully, <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a>
230 otherwise.</p>
231 <p></p>
232 </div>
233 </div>
234 <hr>
235 <div class="refsect2">
236 <a name="gupnp-resource-factory-register-resource-proxy-type"></a><h3>gupnp_resource_factory_register_resource_proxy_type ()</h3>
237 <pre class="programlisting"><span class="returnvalue">void</span>
238 gupnp_resource_factory_register_resource_proxy_type
239                                (<em class="parameter"><code><a class="link" href="GUPnPResourceFactory.html" title="GUPnPResourceFactory"><span class="type">GUPnPResourceFactory</span></a> *factory</code></em>,
240                                 <em class="parameter"><code>const <span class="type">char</span> *upnp_type</code></em>,
241                                 <em class="parameter"><code><a href="http://library.gnome.org/devel/gobject/unstable/gobject-Type-Information.html#GType"><span class="type">GType</span></a> type</code></em>);</pre>
242 <p>Registers the GType <em class="parameter"><code>type</code></em>
243  for the proxy of resource of UPnP type <em class="parameter"><code>upnp_type</code></em>
244 .
245 After this call, the factory <em class="parameter"><code>factory</code></em>
246  will create object of GType <em class="parameter"><code>type</code></em>
247  each
248 time it is asked to create a resource proxy object for UPnP type <em class="parameter"><code>upnp_type</code></em>
249 .</p>
250 <p>Note: GType <em class="parameter"><code>type</code></em>
251  must be a derived type of <span class="type">GUPNP_TYPE_DEVICE_PROXY</span> if
252 resource is a device or <span class="type">GUPNP_TYPE_SERVICE_PROXY</span> if its a service.</p>
253 <div class="refsect3">
254 <a name="id-1.3.6.4.7.6.6"></a><h4>Parameters</h4>
255 <div class="informaltable"><table width="100%" border="0">
256 <colgroup>
257 <col width="150px" class="parameters_name">
258 <col class="parameters_description">
259 <col width="200px" class="parameters_annotations">
260 </colgroup>
261 <tbody>
262 <tr>
263 <td class="parameter_name"><p>factory</p></td>
264 <td class="parameter_description"><p>A <a class="link" href="GUPnPResourceFactory.html" title="GUPnPResourceFactory"><span class="type">GUPnPResourceFactory</span></a>.</p></td>
265 <td class="parameter_annotations"> </td>
266 </tr>
267 <tr>
268 <td class="parameter_name"><p>upnp_type</p></td>
269 <td class="parameter_description"><p>The UPnP type name of the resource.</p></td>
270 <td class="parameter_annotations"> </td>
271 </tr>
272 <tr>
273 <td class="parameter_name"><p>type</p></td>
274 <td class="parameter_description"><p>The requested GType assignment for the resource proxy.</p></td>
275 <td class="parameter_annotations"> </td>
276 </tr>
277 </tbody>
278 </table></div>
279 </div>
280 </div>
281 <hr>
282 <div class="refsect2">
283 <a name="gupnp-resource-factory-unregister-resource-proxy-type"></a><h3>gupnp_resource_factory_unregister_resource_proxy_type ()</h3>
284 <pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
285 gupnp_resource_factory_unregister_resource_proxy_type
286                                (<em class="parameter"><code><a class="link" href="GUPnPResourceFactory.html" title="GUPnPResourceFactory"><span class="type">GUPnPResourceFactory</span></a> *factory</code></em>,
287                                 <em class="parameter"><code>const <span class="type">char</span> *upnp_type</code></em>);</pre>
288 <p>Unregisters the GType assignment for the proxy of resource of UPnP type
289 <em class="parameter"><code>upnp_type</code></em>
290 .</p>
291 <div class="refsect3">
292 <a name="id-1.3.6.4.7.7.5"></a><h4>Parameters</h4>
293 <div class="informaltable"><table width="100%" border="0">
294 <colgroup>
295 <col width="150px" class="parameters_name">
296 <col class="parameters_description">
297 <col width="200px" class="parameters_annotations">
298 </colgroup>
299 <tbody>
300 <tr>
301 <td class="parameter_name"><p>factory</p></td>
302 <td class="parameter_description"><p>A <a class="link" href="GUPnPResourceFactory.html" title="GUPnPResourceFactory"><span class="type">GUPnPResourceFactory</span></a>.</p></td>
303 <td class="parameter_annotations"> </td>
304 </tr>
305 <tr>
306 <td class="parameter_name"><p>upnp_type</p></td>
307 <td class="parameter_description"><p>The UPnP type name of the resource.</p></td>
308 <td class="parameter_annotations"> </td>
309 </tr>
310 </tbody>
311 </table></div>
312 </div>
313 <div class="refsect3">
314 <a name="id-1.3.6.4.7.7.6"></a><h4>Returns</h4>
315 <p> <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if GType assignment was removed successfully, <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a>
316 otherwise.</p>
317 <p></p>
318 </div>
319 </div>
320 </div>
321 <div class="refsect1">
322 <a name="GUPnPResourceFactory.other_details"></a><h2>Types and Values</h2>
323 <div class="refsect2">
324 <a name="GUPnPResourceFactory-struct"></a><h3>struct GUPnPResourceFactory</h3>
325 <pre class="programlisting">struct GUPnPResourceFactory;</pre>
326 <p>This struct contains private data only, and should be accessed using the
327 functions below.</p>
328 </div>
329 </div>
330 </div>
331 <div class="footer">
332 <hr>
333           Generated by GTK-Doc V1.20</div>
334 </body>
335 </html>