1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
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">
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>
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>
26 <div class="refentry">
27 <a name="GUPnPResourceFactory"></a><div class="titlepage"></div>
28 <div class="refnamediv"><table width="100%"><tr>
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>
33 <td class="gallery_image" valign="top" align="right"></td>
35 <div class="refsect1">
36 <a name="GUPnPResourceFactory.functions"></a><h2>Functions</h2>
37 <div class="informaltable"><table width="100%" border="0">
39 <col width="150px" class="functions_return">
40 <col class="functions_name">
44 <td class="function_type">
45 <a class="link" href="GUPnPResourceFactory.html" title="GUPnPResourceFactory"><span class="returnvalue">GUPnPResourceFactory</span></a> *
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>
52 <td class="function_type">
53 <a class="link" href="GUPnPResourceFactory.html" title="GUPnPResourceFactory"><span class="returnvalue">GUPnPResourceFactory</span></a> *
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>
60 <td class="function_type">
61 <span class="returnvalue">void</span>
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>
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>
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>
76 <td class="function_type">
77 <span class="returnvalue">void</span>
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>
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>
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>
94 <div class="refsect1">
95 <a name="GUPnPResourceFactory.other"></a><h2>Types and Values</h2>
96 <div class="informaltable"><table width="100%" border="0">
98 <col width="150px" class="name">
99 <col class="description">
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>
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
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>
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>
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>
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>
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>
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>
163 it is asked to create a resource object for UPnP type <em class="parameter"><code>upnp_type</code></em>
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">
172 <col width="150px" class="parameters_name">
173 <col class="parameters_description">
174 <col width="200px" class="parameters_annotations">
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>
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>
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>
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>
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">
209 <col width="150px" class="parameters_name">
210 <col class="parameters_description">
211 <col width="200px" class="parameters_annotations">
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>
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>
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>
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>
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>
248 time it is asked to create a resource proxy object for UPnP type <em class="parameter"><code>upnp_type</code></em>
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">
257 <col width="150px" class="parameters_name">
258 <col class="parameters_description">
259 <col width="200px" class="parameters_annotations">
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>
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>
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>
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>
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">
295 <col width="150px" class="parameters_name">
296 <col class="parameters_description">
297 <col width="200px" class="parameters_annotations">
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>
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>
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>
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
333 Generated by GTK-Doc V1.20</div>