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: GUPnPAcl</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="api-utility.html" title="Utility Functions">
10 <link rel="next" href="GUPnPWhiteList.html" title="GUPnPWhiteList">
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="#GUPnPAcl.description" class="shortcut">Description</a></span><span id="nav_hierarchy"> <span class="dim">|</span>
19 <a href="#GUPnPAcl.object-hierarchy" class="shortcut">Object Hierarchy</a></span><span id="nav_prerequisites"> <span class="dim">|</span>
20 <a href="#GUPnPAcl.prerequisites" class="shortcut">Prerequisites</a></span>
22 <td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
23 <td><a accesskey="u" href="api-utility.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
24 <td><a accesskey="p" href="api-utility.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
25 <td><a accesskey="n" href="GUPnPWhiteList.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
27 <div class="refentry">
28 <a name="GUPnPAcl"></a><div class="titlepage"></div>
29 <div class="refnamediv"><table width="100%"><tr>
31 <h2><span class="refentrytitle"><a name="GUPnPAcl.top_of_page"></a>GUPnPAcl</span></h2>
32 <p>GUPnPAcl — Object providing a simple access control list for
35 <td class="gallery_image" valign="top" align="right"></td>
37 <div class="refsect1">
38 <a name="GUPnPAcl.functions"></a><h2>Functions</h2>
39 <div class="informaltable"><table width="100%" border="0">
41 <col width="150px" class="functions_return">
42 <col class="functions_name">
46 <td class="function_type">
47 <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
49 <td class="function_name">
50 <a class="link" href="GUPnPAcl.html#gupnp-acl-can-sync" title="gupnp_acl_can_sync ()">gupnp_acl_can_sync</a> <span class="c_punctuation">()</span>
54 <td class="function_type">
55 <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
57 <td class="function_name">
58 <a class="link" href="GUPnPAcl.html#gupnp-acl-is-allowed" title="gupnp_acl_is_allowed ()">gupnp_acl_is_allowed</a> <span class="c_punctuation">()</span>
62 <td class="function_type">
63 <span class="returnvalue">void</span>
65 <td class="function_name">
66 <a class="link" href="GUPnPAcl.html#gupnp-acl-is-allowed-async" title="gupnp_acl_is_allowed_async ()">gupnp_acl_is_allowed_async</a> <span class="c_punctuation">()</span>
70 <td class="function_type">
71 <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
73 <td class="function_name">
74 <a class="link" href="GUPnPAcl.html#gupnp-acl-is-allowed-finish" title="gupnp_acl_is_allowed_finish ()">gupnp_acl_is_allowed_finish</a> <span class="c_punctuation">()</span>
80 <div class="refsect1">
81 <a name="GUPnPAcl.other"></a><h2>Types and Values</h2>
82 <div class="informaltable"><table width="100%" border="0">
84 <col width="150px" class="name">
85 <col class="description">
89 <td class="datatype_keyword"> </td>
90 <td class="function_name"><a class="link" href="GUPnPAcl.html#GUPnPAcl-struct" title="GUPnPAcl">GUPnPAcl</a></td>
93 <td class="datatype_keyword">struct</td>
94 <td class="function_name"><a class="link" href="GUPnPAcl.html#GUPnPAclInterface" title="struct GUPnPAclInterface">GUPnPAclInterface</a></td>
99 <div class="refsect1">
100 <a name="GUPnPAcl.object-hierarchy"></a><h2>Object Hierarchy</h2>
101 <pre class="screen"> GInterface
102 <span class="lineart">╰──</span> GUPnPAcl
105 <div class="refsect1">
106 <a name="GUPnPAcl.prerequisites"></a><h2>Prerequisites</h2>
109 <a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GObject">GObject</a>.</p>
111 <div class="refsect1">
112 <a name="GUPnPAcl.description"></a><h2>Description</h2>
113 <p><a class="link" href="GUPnPAcl.html" title="GUPnPAcl"><span class="type">GUPnPAcl</span></a> provides either synchronous or asynchronous functions to check
114 whether a peer sould be able to access a resource or not.</p>
116 <div class="refsect1">
117 <a name="GUPnPAcl.functions_details"></a><h2>Functions</h2>
118 <div class="refsect2">
119 <a name="gupnp-acl-can-sync"></a><h3>gupnp_acl_can_sync ()</h3>
120 <pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
121 gupnp_acl_can_sync (<em class="parameter"><code><a class="link" href="GUPnPAcl.html" title="GUPnPAcl"><span class="type">GUPnPAcl</span></a> *self</code></em>);</pre>
122 <p>Check whether <a class="link" href="GUPnPAcl.html#gupnp-acl-is-allowed-async" title="gupnp_acl_is_allowed_async ()"><code class="function">gupnp_acl_is_allowed_async()</code></a> is supported.</p>
123 <div class="refsect3">
124 <a name="id-1.3.6.2.8.2.5"></a><h4>Parameters</h4>
125 <div class="informaltable"><table width="100%" border="0">
127 <col width="150px" class="parameters_name">
128 <col class="parameters_description">
129 <col width="200px" class="parameters_annotations">
132 <td class="parameter_name"><p>self</p></td>
133 <td class="parameter_description"><p>A <a class="link" href="GUPnPAcl.html" title="GUPnPAcl"><span class="type">GUPnPAcl</span></a>
134 <em class="parameter"><code>returns</code></em>
135 <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a>, if <a class="link" href="GUPnPAcl.html#gupnp-acl-is-allowed-async" title="gupnp_acl_is_allowed_async ()"><code class="function">gupnp_acl_is_allowed_async()</code></a> is supported, <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a>
137 <td class="parameter_annotations"> </td>
141 <p class="since">Since 0.20.11</p>
144 <div class="refsect2">
145 <a name="gupnp-acl-is-allowed"></a><h3>gupnp_acl_is_allowed ()</h3>
146 <pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
147 gupnp_acl_is_allowed (<em class="parameter"><code><a class="link" href="GUPnPAcl.html" title="GUPnPAcl"><span class="type">GUPnPAcl</span></a> *self</code></em>,
148 <em class="parameter"><code><a class="link" href="GUPnPDevice.html" title="GUPnPDevice"><span class="type">GUPnPDevice</span></a> *device</code></em>,
149 <em class="parameter"><code><a class="link" href="GUPnPService.html" title="GUPnPService"><span class="type">GUPnPService</span></a> *service</code></em>,
150 <em class="parameter"><code>const <span class="type">char</span> *path</code></em>,
151 <em class="parameter"><code>const <span class="type">char</span> *address</code></em>,
152 <em class="parameter"><code>const <span class="type">char</span> *agent</code></em>);</pre>
153 <p>Check whether an IP address is allowed to access this resource.</p>
154 <div class="refsect3">
155 <a name="id-1.3.6.2.8.3.5"></a><h4>Parameters</h4>
156 <div class="informaltable"><table width="100%" border="0">
158 <col width="150px" class="parameters_name">
159 <col class="parameters_description">
160 <col width="200px" class="parameters_annotations">
164 <td class="parameter_name"><p>self</p></td>
165 <td class="parameter_description"><p>an instance of <a class="link" href="GUPnPAcl.html" title="GUPnPAcl"><span class="type">GUPnPAcl</span></a></p></td>
166 <td class="parameter_annotations"> </td>
169 <td class="parameter_name"><p>device</p></td>
170 <td class="parameter_description"><p> The <a class="link" href="GUPnPDevice.html" title="GUPnPDevice"><span class="type">GUPnPDevice</span></a> associated with <em class="parameter"><code>path</code></em>
171 or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if
173 <td class="parameter_annotations"><span class="annotation">[<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
176 <td class="parameter_name"><p>service</p></td>
177 <td class="parameter_description"><p> The <a class="link" href="GUPnPService.html" title="GUPnPService"><span class="type">GUPnPService</span></a> associated with <em class="parameter"><code>path</code></em>
178 or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if
180 <td class="parameter_annotations"><span class="annotation">[<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
183 <td class="parameter_name"><p>path</p></td>
184 <td class="parameter_description"><p>The path being served.</p></td>
185 <td class="parameter_annotations"> </td>
188 <td class="parameter_name"><p>address</p></td>
189 <td class="parameter_description"><p>IP address of the peer.</p></td>
190 <td class="parameter_annotations"> </td>
193 <td class="parameter_name"><p>agent</p></td>
194 <td class="parameter_description"><p> The User-Agent header of the peer or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if not
196 <em class="parameter"><code>returns</code></em>
197 <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the peer is allowed, <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> otherwise. </p></td>
198 <td class="parameter_annotations"><span class="annotation">[<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
203 <p class="since">Since 0.20.11</p>
206 <div class="refsect2">
207 <a name="gupnp-acl-is-allowed-async"></a><h3>gupnp_acl_is_allowed_async ()</h3>
208 <pre class="programlisting"><span class="returnvalue">void</span>
209 gupnp_acl_is_allowed_async (<em class="parameter"><code><a class="link" href="GUPnPAcl.html" title="GUPnPAcl"><span class="type">GUPnPAcl</span></a> *self</code></em>,
210 <em class="parameter"><code><a class="link" href="GUPnPDevice.html" title="GUPnPDevice"><span class="type">GUPnPDevice</span></a> *device</code></em>,
211 <em class="parameter"><code><a class="link" href="GUPnPService.html" title="GUPnPService"><span class="type">GUPnPService</span></a> *service</code></em>,
212 <em class="parameter"><code>const <span class="type">char</span> *path</code></em>,
213 <em class="parameter"><code>const <span class="type">char</span> *address</code></em>,
214 <em class="parameter"><code>const <span class="type">char</span> *agent</code></em>,
215 <em class="parameter"><code><a href="http://library.gnome.org/devel/gio/unstable/GCancellable.html"><span class="type">GCancellable</span></a> *cancellable</code></em>,
216 <em class="parameter"><code><a href="http://library.gnome.org/devel/gio/unstable/GAsyncResult.html#GAsyncReadyCallback"><span class="type">GAsyncReadyCallback</span></a> callback</code></em>,
217 <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>);</pre>
218 <p>Optional. Check asynchronously whether an IP address is allowed to access
219 this resource. Use this function if the process of verifying the access right
220 is expected to take some time, for example when using D-Bus etc.</p>
221 <p>If this function is supported, <a class="link" href="GUPnPAcl.html#gupnp-acl-can-sync" title="gupnp_acl_can_sync ()"><code class="function">gupnp_acl_can_sync()</code></a> should return <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a>.</p>
222 <p>Use <a class="link" href="GUPnPAcl.html#gupnp-acl-is-allowed-finish" title="gupnp_acl_is_allowed_finish ()"><code class="function">gupnp_acl_is_allowed_finish()</code></a> to retrieve the result.</p>
223 <div class="refsect3">
224 <a name="id-1.3.6.2.8.4.7"></a><h4>Parameters</h4>
225 <div class="informaltable"><table width="100%" border="0">
227 <col width="150px" class="parameters_name">
228 <col class="parameters_description">
229 <col width="200px" class="parameters_annotations">
233 <td class="parameter_name"><p>self</p></td>
234 <td class="parameter_description"><p>a <a class="link" href="GUPnPAcl.html" title="GUPnPAcl"><span class="type">GUPnPAcl</span></a></p></td>
235 <td class="parameter_annotations"> </td>
238 <td class="parameter_name"><p>device</p></td>
239 <td class="parameter_description"><p> The <a class="link" href="GUPnPDevice.html" title="GUPnPDevice"><span class="type">GUPnPDevice</span></a> associated with <em class="parameter"><code>path</code></em>
240 or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if
242 <td class="parameter_annotations"><span class="annotation">[<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
245 <td class="parameter_name"><p>service</p></td>
246 <td class="parameter_description"><p> The <a class="link" href="GUPnPService.html" title="GUPnPService"><span class="type">GUPnPService</span></a> associated with <em class="parameter"><code>path</code></em>
247 or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if
249 <td class="parameter_annotations"><span class="annotation">[<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
252 <td class="parameter_name"><p>path</p></td>
253 <td class="parameter_description"><p>The path being served.</p></td>
254 <td class="parameter_annotations"> </td>
257 <td class="parameter_name"><p>address</p></td>
258 <td class="parameter_description"><p>IP address of the peer</p></td>
259 <td class="parameter_annotations"> </td>
262 <td class="parameter_name"><p>agent</p></td>
263 <td class="parameter_description"><p> The User-Agent header of the peer or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if not
265 <td class="parameter_annotations"><span class="annotation">[<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
268 <td class="parameter_name"><p>cancellable</p></td>
269 <td class="parameter_description"><p> A <a href="http://library.gnome.org/devel/gio/unstable/GCancellable.html"><span class="type">GCancellable</span></a> which can be used to cancel the
271 <td class="parameter_annotations"><span class="annotation">[<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
274 <td class="parameter_name"><p>callback</p></td>
275 <td class="parameter_description"><p>Callback to call after the function is done.</p></td>
276 <td class="parameter_annotations"> </td>
279 <td class="parameter_name"><p>user_data</p></td>
280 <td class="parameter_description"><p>Some user data.</p></td>
281 <td class="parameter_annotations"> </td>
286 <p class="since">Since 0.20.11</p>
289 <div class="refsect2">
290 <a name="gupnp-acl-is-allowed-finish"></a><h3>gupnp_acl_is_allowed_finish ()</h3>
291 <pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
292 gupnp_acl_is_allowed_finish (<em class="parameter"><code><a class="link" href="GUPnPAcl.html" title="GUPnPAcl"><span class="type">GUPnPAcl</span></a> *self</code></em>,
293 <em class="parameter"><code><a href="http://library.gnome.org/devel/gio/unstable/GAsyncResult.html"><span class="type">GAsyncResult</span></a> *res</code></em>,
294 <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>
295 <div class="refsect3">
296 <a name="id-1.3.6.2.8.5.4"></a><h4>Parameters</h4>
297 <div class="informaltable"><table width="100%" border="0">
299 <col width="150px" class="parameters_name">
300 <col class="parameters_description">
301 <col width="200px" class="parameters_annotations">
305 <td class="parameter_name"><p>self</p></td>
306 <td class="parameter_description"><p>An instance of <a class="link" href="GUPnPAcl.html" title="GUPnPAcl"><span class="type">GUPnPAcl</span></a></p></td>
307 <td class="parameter_annotations"> </td>
310 <td class="parameter_name"><p>res</p></td>
311 <td class="parameter_description"><p><a href="http://library.gnome.org/devel/gio/unstable/GAsyncResult.html"><code class="literal">GAsyncResult</code></a> obtained from the callback in <a class="link" href="GUPnPAcl.html#gupnp-acl-is-allowed-async" title="gupnp_acl_is_allowed_async ()"><code class="function">gupnp_acl_is_allowed_async()</code></a></p></td>
312 <td class="parameter_annotations"> </td>
315 <td class="parameter_name"><p>error</p></td>
316 <td class="parameter_description"><p> A return location for a <a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> describing the failure
317 <em class="parameter"><code>returns</code></em>
318 <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the authentication was successful, <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> otherwise and on
319 error. Check <em class="parameter"><code>error</code></em>
320 for details. </p></td>
321 <td class="parameter_annotations"><span class="annotation">[<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
326 <p class="since">Since 0.20.11</p>
329 <div class="refsect1">
330 <a name="GUPnPAcl.other_details"></a><h2>Types and Values</h2>
331 <div class="refsect2">
332 <a name="GUPnPAcl-struct"></a><h3>GUPnPAcl</h3>
333 <pre class="programlisting">typedef struct _GUPnPAcl GUPnPAcl;</pre>
334 <p>Handle to an object implementing the <a class="link" href="GUPnPAcl.html#GUPnPAclInterface" title="struct GUPnPAclInterface"><span class="type">GUPnPAclInterface</span></a> interface.</p>
337 <div class="refsect2">
338 <a name="GUPnPAclInterface"></a><h3>struct GUPnPAclInterface</h3>
339 <pre class="programlisting">struct GUPnPAclInterface {
340 GTypeInterface parent;
342 gboolean (*is_allowed) (GUPnPAcl *self,
344 GUPnPService *service,
349 void (*is_allowed_async) (GUPnPAcl *self,
351 GUPnPService *service,
355 GCancellable *cancellable,
356 GAsyncReadyCallback callback,
359 gboolean (*is_allowed_finish) (GUPnPAcl *self,
363 gboolean (*can_sync) (GUPnPAcl *self);
366 <p>Implement a simple access control list for GUPnP.</p>
367 <div class="refsect3">
368 <a name="id-1.3.6.2.9.3.5"></a><h4>Members</h4>
369 <div class="informaltable"><table width="100%" border="0">
371 <col width="300px" class="struct_members_name">
372 <col class="struct_members_description">
373 <col width="200px" class="struct_members_annotations">
377 <td class="struct_member_name"><p><a href="http://library.gnome.org/devel/gobject/unstable/gobject-Type-Information.html#GTypeInterface"><span class="type">GTypeInterface</span></a> <em class="structfield"><code><a name="GUPnPAclInterface.parent"></a>parent</code></em>;</p></td>
378 <td class="struct_member_description"><p>The parent interface.</p></td>
379 <td class="struct_member_annotations"> </td>
382 <td class="struct_member_name"><p><em class="structfield"><code><a name="GUPnPAclInterface.is-allowed"></a>is_allowed</code></em> ()</p></td>
383 <td class="struct_member_description"><p>Check whether access to the resource is granted.</p></td>
384 <td class="struct_member_annotations"> </td>
387 <td class="struct_member_name"><p><em class="structfield"><code><a name="GUPnPAclInterface.is-allowed-async"></a>is_allowed_async</code></em> ()</p></td>
388 <td class="struct_member_description"><p>Asynchronously check whether the access is granted.</p></td>
389 <td class="struct_member_annotations"> </td>
392 <td class="struct_member_name"><p><em class="structfield"><code><a name="GUPnPAclInterface.is-allowed-finish"></a>is_allowed_finish</code></em> ()</p></td>
393 <td class="struct_member_description"><p>Conclude the <em class="parameter"><code>is_allowed_async</code></em>
395 <td class="struct_member_annotations"> </td>
398 <td class="struct_member_name"><p><em class="structfield"><code><a name="GUPnPAclInterface.can-sync"></a>can_sync</code></em> ()</p></td>
399 <td class="struct_member_description"><p>Whether the ACL can do sync queries.</p></td>
400 <td class="struct_member_annotations"> </td>
405 <p class="since">Since 0.20.11</p>
411 Generated by GTK-Doc V1.20</div>