Update gupnp to 0.20.5 (fdeb6f9f)
[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>GUPnPResourceFactory</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="GUPnPWhiteList.html" title="GUPnPWhiteList">
10 <link rel="next" href="GUPnPXMLDoc.html" title="GUPnPXMLDoc">
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="GUPnPWhiteList.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="GUPnPXMLDoc.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="#GUPnPResourceFactory.synopsis" class="shortcut">Top</a>
25                    | 
26                   <a href="#GUPnPResourceFactory.description" class="shortcut">Description</a>
27                    | 
28                   <a href="#GUPnPResourceFactory.object-hierarchy" class="shortcut">Object Hierarchy</a>
29 </td></tr>
30 </table>
31 <div class="refentry">
32 <a name="GUPnPResourceFactory"></a><div class="titlepage"></div>
33 <div class="refnamediv"><table width="100%"><tr>
34 <td valign="top">
35 <h2><span class="refentrytitle"><a name="GUPnPResourceFactory.top_of_page"></a>GUPnPResourceFactory</span></h2>
36 <p>GUPnPResourceFactory — Class for resource and resource proxy object creation.</p>
37 </td>
38 <td valign="top" align="right"></td>
39 </tr></table></div>
40 <div class="refsynopsisdiv">
41 <a name="GUPnPResourceFactory.synopsis"></a><h2>Synopsis</h2>
42 <pre class="synopsis">struct              <a class="link" href="GUPnPResourceFactory.html#GUPnPResourceFactory-struct" title="struct GUPnPResourceFactory">GUPnPResourceFactory</a>;
43 <a class="link" href="GUPnPResourceFactory.html" title="GUPnPResourceFactory"><span class="returnvalue">GUPnPResourceFactory</span></a> * <a class="link" href="GUPnPResourceFactory.html#gupnp-resource-factory-new" title="gupnp_resource_factory_new ()">gupnp_resource_factory_new</a>       (<em class="parameter"><code><span class="type">void</span></code></em>);
44 <a class="link" href="GUPnPResourceFactory.html" title="GUPnPResourceFactory"><span class="returnvalue">GUPnPResourceFactory</span></a> * <a class="link" href="GUPnPResourceFactory.html#gupnp-resource-factory-get-default" title="gupnp_resource_factory_get_default ()">gupnp_resource_factory_get_default</a>
45                                                         (<em class="parameter"><code><span class="type">void</span></code></em>);
46 <span class="returnvalue">void</span>                <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>
47                                                         (<em class="parameter"><code><a class="link" href="GUPnPResourceFactory.html" title="GUPnPResourceFactory"><span class="type">GUPnPResourceFactory</span></a> *factory</code></em>,
48                                                          <em class="parameter"><code>const <span class="type">char</span> *upnp_type</code></em>,
49                                                          <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>);
50 <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            <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>
51                                                         (<em class="parameter"><code><a class="link" href="GUPnPResourceFactory.html" title="GUPnPResourceFactory"><span class="type">GUPnPResourceFactory</span></a> *factory</code></em>,
52                                                          <em class="parameter"><code>const <span class="type">char</span> *upnp_type</code></em>);
53 <span class="returnvalue">void</span>                <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>
54                                                         (<em class="parameter"><code><a class="link" href="GUPnPResourceFactory.html" title="GUPnPResourceFactory"><span class="type">GUPnPResourceFactory</span></a> *factory</code></em>,
55                                                          <em class="parameter"><code>const <span class="type">char</span> *upnp_type</code></em>,
56                                                          <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>);
57 <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            <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>
58                                                         (<em class="parameter"><code><a class="link" href="GUPnPResourceFactory.html" title="GUPnPResourceFactory"><span class="type">GUPnPResourceFactory</span></a> *factory</code></em>,
59                                                          <em class="parameter"><code>const <span class="type">char</span> *upnp_type</code></em>);
60 </pre>
61 </div>
62 <div class="refsect1">
63 <a name="GUPnPResourceFactory.object-hierarchy"></a><h2>Object Hierarchy</h2>
64 <pre class="synopsis">
65   <a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GObject">GObject</a>
66    +----GUPnPResourceFactory
67 </pre>
68 </div>
69 <div class="refsect1">
70 <a name="GUPnPResourceFactory.description"></a><h2>Description</h2>
71 <p>
72 <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>,
73 <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
74 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
75 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
76 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
77 to be derived from the relevant resource or resource proxy type (e.g.
78 a device proxy type needs to be derived from <a class="link" href="GUPnPDeviceProxy.html" title="GUPnPDeviceProxy"><span class="type">GUPnPDeviceProxy</span></a>).
79 </p>
80 </div>
81 <div class="refsect1">
82 <a name="GUPnPResourceFactory.details"></a><h2>Details</h2>
83 <div class="refsect2">
84 <a name="GUPnPResourceFactory-struct"></a><h3>struct GUPnPResourceFactory</h3>
85 <pre class="programlisting">struct GUPnPResourceFactory;</pre>
86 <p>
87 This struct contains private data only, and should be accessed using the
88 functions below.
89 </p>
90 </div>
91 <hr>
92 <div class="refsect2">
93 <a name="gupnp-resource-factory-new"></a><h3>gupnp_resource_factory_new ()</h3>
94 <pre class="programlisting"><a class="link" href="GUPnPResourceFactory.html" title="GUPnPResourceFactory"><span class="returnvalue">GUPnPResourceFactory</span></a> * gupnp_resource_factory_new       (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
95 <p>
96 Create a new <a class="link" href="GUPnPResourceFactory.html" title="GUPnPResourceFactory"><span class="type">GUPnPResourceFactory</span></a> object.
97 </p>
98 <div class="variablelist"><table border="0">
99 <col align="left" valign="top">
100 <tbody><tr>
101 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
102 <td>A <a class="link" href="GUPnPResourceFactory.html" title="GUPnPResourceFactory"><span class="type">GUPnPResourceFactory</span></a> object.</td>
103 </tr></tbody>
104 </table></div>
105 </div>
106 <hr>
107 <div class="refsect2">
108 <a name="gupnp-resource-factory-get-default"></a><h3>gupnp_resource_factory_get_default ()</h3>
109 <pre class="programlisting"><a class="link" href="GUPnPResourceFactory.html" title="GUPnPResourceFactory"><span class="returnvalue">GUPnPResourceFactory</span></a> * gupnp_resource_factory_get_default
110                                                         (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
111 <p>
112 Get the default singleton <a class="link" href="GUPnPResourceFactory.html" title="GUPnPResourceFactory"><span class="type">GUPnPResourceFactory</span></a> object.
113 </p>
114 <div class="variablelist"><table border="0">
115 <col align="left" valign="top">
116 <tbody><tr>
117 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
118 <td>A <em class="parameter"><code>GUPnPResourceFactory</code></em> object. <span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span>
119 </td>
120 </tr></tbody>
121 </table></div>
122 </div>
123 <hr>
124 <div class="refsect2">
125 <a name="gupnp-resource-factory-register-resource-type"></a><h3>gupnp_resource_factory_register_resource_type ()</h3>
126 <pre class="programlisting"><span class="returnvalue">void</span>                gupnp_resource_factory_register_resource_type
127                                                         (<em class="parameter"><code><a class="link" href="GUPnPResourceFactory.html" title="GUPnPResourceFactory"><span class="type">GUPnPResourceFactory</span></a> *factory</code></em>,
128                                                          <em class="parameter"><code>const <span class="type">char</span> *upnp_type</code></em>,
129                                                          <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>
130 <p>
131 Registers the GType <em class="parameter"><code>type</code></em> for the resource of UPnP type <em class="parameter"><code>upnp_type</code></em>. After
132 this call, the factory <em class="parameter"><code>factory</code></em> will create object of GType <em class="parameter"><code>type</code></em> each time
133 it is asked to create a resource object for UPnP type <em class="parameter"><code>upnp_type</code></em>.
134 </p>
135 <p>
136 Note: GType <em class="parameter"><code>type</code></em> must be a derived type of <span class="type">GUPNP_TYPE_DEVICE</span> if resource is
137 a device or <span class="type">GUPNP_TYPE_SERVICE</span> if its a service.
138 </p>
139 <div class="variablelist"><table border="0">
140 <col align="left" valign="top">
141 <tbody>
142 <tr>
143 <td><p><span class="term"><em class="parameter"><code>factory</code></em> :</span></p></td>
144 <td>A <a class="link" href="GUPnPResourceFactory.html" title="GUPnPResourceFactory"><span class="type">GUPnPResourceFactory</span></a>.</td>
145 </tr>
146 <tr>
147 <td><p><span class="term"><em class="parameter"><code>upnp_type</code></em> :</span></p></td>
148 <td>The UPnP type name of the resource.</td>
149 </tr>
150 <tr>
151 <td><p><span class="term"><em class="parameter"><code>type</code></em> :</span></p></td>
152 <td>The requested GType assignment for the resource.</td>
153 </tr>
154 </tbody>
155 </table></div>
156 </div>
157 <hr>
158 <div class="refsect2">
159 <a name="gupnp-resource-factory-unregister-resource-type"></a><h3>gupnp_resource_factory_unregister_resource_type ()</h3>
160 <pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            gupnp_resource_factory_unregister_resource_type
161                                                         (<em class="parameter"><code><a class="link" href="GUPnPResourceFactory.html" title="GUPnPResourceFactory"><span class="type">GUPnPResourceFactory</span></a> *factory</code></em>,
162                                                          <em class="parameter"><code>const <span class="type">char</span> *upnp_type</code></em>);</pre>
163 <p>
164 Unregisters the GType assignment for the resource of UPnP type <em class="parameter"><code>upnp_type</code></em>.
165 </p>
166 <div class="variablelist"><table border="0">
167 <col align="left" valign="top">
168 <tbody>
169 <tr>
170 <td><p><span class="term"><em class="parameter"><code>factory</code></em> :</span></p></td>
171 <td>A <a class="link" href="GUPnPResourceFactory.html" title="GUPnPResourceFactory"><span class="type">GUPnPResourceFactory</span></a>.</td>
172 </tr>
173 <tr>
174 <td><p><span class="term"><em class="parameter"><code>upnp_type</code></em> :</span></p></td>
175 <td>The UPnP type name of the resource.</td>
176 </tr>
177 <tr>
178 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
179 <td>
180 <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>
181 otherwise.</td>
182 </tr>
183 </tbody>
184 </table></div>
185 </div>
186 <hr>
187 <div class="refsect2">
188 <a name="gupnp-resource-factory-register-resource-proxy-type"></a><h3>gupnp_resource_factory_register_resource_proxy_type ()</h3>
189 <pre class="programlisting"><span class="returnvalue">void</span>                gupnp_resource_factory_register_resource_proxy_type
190                                                         (<em class="parameter"><code><a class="link" href="GUPnPResourceFactory.html" title="GUPnPResourceFactory"><span class="type">GUPnPResourceFactory</span></a> *factory</code></em>,
191                                                          <em class="parameter"><code>const <span class="type">char</span> *upnp_type</code></em>,
192                                                          <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>
193 <p>
194 Registers the GType <em class="parameter"><code>type</code></em> for the proxy of resource of UPnP type <em class="parameter"><code>upnp_type</code></em>.
195 After this call, the factory <em class="parameter"><code>factory</code></em> will create object of GType <em class="parameter"><code>type</code></em> each
196 time it is asked to create a resource proxy object for UPnP type <em class="parameter"><code>upnp_type</code></em>.
197 </p>
198 <p>
199 Note: GType <em class="parameter"><code>type</code></em> must be a derived type of <span class="type">GUPNP_TYPE_DEVICE_PROXY</span> if
200 resource is a device or <span class="type">GUPNP_TYPE_SERVICE_PROXY</span> if its a service.
201 </p>
202 <div class="variablelist"><table border="0">
203 <col align="left" valign="top">
204 <tbody>
205 <tr>
206 <td><p><span class="term"><em class="parameter"><code>factory</code></em> :</span></p></td>
207 <td>A <a class="link" href="GUPnPResourceFactory.html" title="GUPnPResourceFactory"><span class="type">GUPnPResourceFactory</span></a>.</td>
208 </tr>
209 <tr>
210 <td><p><span class="term"><em class="parameter"><code>upnp_type</code></em> :</span></p></td>
211 <td>The UPnP type name of the resource.</td>
212 </tr>
213 <tr>
214 <td><p><span class="term"><em class="parameter"><code>type</code></em> :</span></p></td>
215 <td>The requested GType assignment for the resource proxy.</td>
216 </tr>
217 </tbody>
218 </table></div>
219 </div>
220 <hr>
221 <div class="refsect2">
222 <a name="gupnp-resource-factory-unregister-resource-proxy-type"></a><h3>gupnp_resource_factory_unregister_resource_proxy_type ()</h3>
223 <pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            gupnp_resource_factory_unregister_resource_proxy_type
224                                                         (<em class="parameter"><code><a class="link" href="GUPnPResourceFactory.html" title="GUPnPResourceFactory"><span class="type">GUPnPResourceFactory</span></a> *factory</code></em>,
225                                                          <em class="parameter"><code>const <span class="type">char</span> *upnp_type</code></em>);</pre>
226 <p>
227 Unregisters the GType assignment for the proxy of resource of UPnP type
228 <em class="parameter"><code>upnp_type</code></em>.
229 </p>
230 <div class="variablelist"><table border="0">
231 <col align="left" valign="top">
232 <tbody>
233 <tr>
234 <td><p><span class="term"><em class="parameter"><code>factory</code></em> :</span></p></td>
235 <td>A <a class="link" href="GUPnPResourceFactory.html" title="GUPnPResourceFactory"><span class="type">GUPnPResourceFactory</span></a>.</td>
236 </tr>
237 <tr>
238 <td><p><span class="term"><em class="parameter"><code>upnp_type</code></em> :</span></p></td>
239 <td>The UPnP type name of the resource.</td>
240 </tr>
241 <tr>
242 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
243 <td>
244 <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>
245 otherwise.</td>
246 </tr>
247 </tbody>
248 </table></div>
249 </div>
250 </div>
251 </div>
252 <div class="footer">
253 <hr>
254           Generated by GTK-Doc V1.18</div>
255 </body>
256 </html>