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>GUPnPWhiteList</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="GUPnPContextManager.html" title="GUPnPContextManager">
10 <link rel="next" href="GUPnPResourceFactory.html" title="GUPnPResourceFactory">
11 <meta name="generator" content="GTK-Doc V1.18 (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="2">
17 <td><a accesskey="p" href="GUPnPContextManager.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="GUPnPResourceFactory.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
23 <tr><td colspan="5" class="shortcuts">
24 <a href="#GUPnPWhiteList.synopsis" class="shortcut">Top</a>
26 <a href="#GUPnPWhiteList.description" class="shortcut">Description</a>
28 <a href="#GUPnPWhiteList.object-hierarchy" class="shortcut">Object Hierarchy</a>
31 <div class="refentry">
32 <a name="GUPnPWhiteList"></a><div class="titlepage"></div>
33 <div class="refnamediv"><table width="100%"><tr>
35 <h2><span class="refentrytitle"><a name="GUPnPWhiteList.top_of_page"></a>GUPnPWhiteList</span></h2>
36 <p>GUPnPWhiteList — Class for network filtering.</p>
38 <td valign="top" align="right"></td>
40 <div class="refsynopsisdiv">
41 <a name="GUPnPWhiteList.synopsis"></a><h2>Synopsis</h2>
42 <pre class="synopsis">struct <a class="link" href="GUPnPWhiteList.html#GUPnPWhiteList-struct" title="struct GUPnPWhiteList">GUPnPWhiteList</a>;
43 <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="GUPnPWhiteList.html#gupnp-white-list-add-entry" title="gupnp_white_list_add_entry ()">gupnp_white_list_add_entry</a> (<em class="parameter"><code><a class="link" href="GUPnPWhiteList.html" title="GUPnPWhiteList"><span class="type">GUPnPWhiteList</span></a> *white_list</code></em>,
44 <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *entry</code></em>);
45 <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="GUPnPWhiteList.html#gupnp-white-list-check-context" title="gupnp_white_list_check_context ()">gupnp_white_list_check_context</a> (<em class="parameter"><code><a class="link" href="GUPnPWhiteList.html" title="GUPnPWhiteList"><span class="type">GUPnPWhiteList</span></a> *white_list</code></em>,
46 <em class="parameter"><code><a class="link" href="GUPnPContext.html" title="GUPnPContext"><span class="type">GUPnPContext</span></a> *context</code></em>);
47 <span class="returnvalue">void</span> <a class="link" href="GUPnPWhiteList.html#gupnp-white-list-clear" title="gupnp_white_list_clear ()">gupnp_white_list_clear</a> (<em class="parameter"><code><a class="link" href="GUPnPWhiteList.html" title="GUPnPWhiteList"><span class="type">GUPnPWhiteList</span></a> *white_list</code></em>);
48 <span class="returnvalue">void</span> <a class="link" href="GUPnPWhiteList.html#gupnp-white-list-set-enabled" title="gupnp_white_list_set_enabled ()">gupnp_white_list_set_enabled</a> (<em class="parameter"><code><a class="link" href="GUPnPWhiteList.html" title="GUPnPWhiteList"><span class="type">GUPnPWhiteList</span></a> *white_list</code></em>,
49 <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> enable</code></em>);
50 <a href="http://library.gnome.org/devel/glib/unstable/glib-Doubly-Linked-Lists.html#GList"><span class="returnvalue">GList</span></a> * <a class="link" href="GUPnPWhiteList.html#gupnp-white-list-get-entries" title="gupnp_white_list_get_entries ()">gupnp_white_list_get_entries</a> (<em class="parameter"><code><a class="link" href="GUPnPWhiteList.html" title="GUPnPWhiteList"><span class="type">GUPnPWhiteList</span></a> *white_list</code></em>);
51 <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="GUPnPWhiteList.html#gupnp-white-list-is-empty" title="gupnp_white_list_is_empty ()">gupnp_white_list_is_empty</a> (<em class="parameter"><code><a class="link" href="GUPnPWhiteList.html" title="GUPnPWhiteList"><span class="type">GUPnPWhiteList</span></a> *white_list</code></em>);
52 <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="GUPnPWhiteList.html#gupnp-white-list-get-enabled" title="gupnp_white_list_get_enabled ()">gupnp_white_list_get_enabled</a> (<em class="parameter"><code><a class="link" href="GUPnPWhiteList.html" title="GUPnPWhiteList"><span class="type">GUPnPWhiteList</span></a> *white_list</code></em>);
53 <a class="link" href="GUPnPWhiteList.html" title="GUPnPWhiteList"><span class="returnvalue">GUPnPWhiteList</span></a> * <a class="link" href="GUPnPWhiteList.html#gupnp-white-list-new" title="gupnp_white_list_new ()">gupnp_white_list_new</a> (<em class="parameter"><code><span class="type">void</span></code></em>);
54 <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="GUPnPWhiteList.html#gupnp-white-list-remove-entry" title="gupnp_white_list_remove_entry ()">gupnp_white_list_remove_entry</a> (<em class="parameter"><code><a class="link" href="GUPnPWhiteList.html" title="GUPnPWhiteList"><span class="type">GUPnPWhiteList</span></a> *white_list</code></em>,
55 <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *entry</code></em>);
58 <div class="refsect1">
59 <a name="GUPnPWhiteList.object-hierarchy"></a><h2>Object Hierarchy</h2>
60 <pre class="synopsis">
61 <a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GObject">GObject</a>
65 <div class="refsect1">
66 <a name="GUPnPWhiteList.description"></a><h2>Description</h2>
68 <a class="link" href="GUPnPWhiteList.html" title="GUPnPWhiteList"><span class="type">GUPnPWhiteList</span></a> handles network filtering. It provides API to manage a list
69 of entries that will be used to filter networks.
70 The <a class="link" href="GUPnPWhiteList.html" title="GUPnPWhiteList"><span class="type">GUPnPWhiteList</span></a> could be enabled or not. If it's enabled but the entries
71 list is empty, it behaves as disabled.
74 <div class="refsect1">
75 <a name="GUPnPWhiteList.details"></a><h2>Details</h2>
76 <div class="refsect2">
77 <a name="GUPnPWhiteList-struct"></a><h3>struct GUPnPWhiteList</h3>
78 <pre class="programlisting">struct GUPnPWhiteList;</pre>
80 This struct contains private data only, and should be accessed using the
85 <div class="refsect2">
86 <a name="gupnp-white-list-add-entry"></a><h3>gupnp_white_list_add_entry ()</h3>
87 <pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> gupnp_white_list_add_entry (<em class="parameter"><code><a class="link" href="GUPnPWhiteList.html" title="GUPnPWhiteList"><span class="type">GUPnPWhiteList</span></a> *white_list</code></em>,
88 <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *entry</code></em>);</pre>
90 Add <em class="parameter"><code>entry</code></em> in the list of valid criteria used by <em class="parameter"><code>white_list</code></em> to
92 if <em class="parameter"><code>entry</code></em> already exists, it won't be added a second time.
94 <div class="variablelist"><table border="0">
95 <col align="left" valign="top">
98 <td><p><span class="term"><em class="parameter"><code>white_list</code></em> :</span></p></td>
99 <td>A <a class="link" href="GUPnPWhiteList.html" title="GUPnPWhiteList"><span class="type">GUPnPWhiteList</span></a>
103 <td><p><span class="term"><em class="parameter"><code>entry</code></em> :</span></p></td>
104 <td>A value used to filter network</td>
107 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
109 <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if <em class="parameter"><code>entry</code></em> is added, <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> otherwise.</td>
115 <div class="refsect2">
116 <a name="gupnp-white-list-check-context"></a><h3>gupnp_white_list_check_context ()</h3>
117 <pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> gupnp_white_list_check_context (<em class="parameter"><code><a class="link" href="GUPnPWhiteList.html" title="GUPnPWhiteList"><span class="type">GUPnPWhiteList</span></a> *white_list</code></em>,
118 <em class="parameter"><code><a class="link" href="GUPnPContext.html" title="GUPnPContext"><span class="type">GUPnPContext</span></a> *context</code></em>);</pre>
120 It will check if the <em class="parameter"><code>context</code></em> is allowed or not. The <em class="parameter"><code>white_list</code></em> will check
121 all its entries againt <a class="link" href="GUPnPContext.html" title="GUPnPContext"><span class="type">GUPnPContext</span></a> interface, host ip and network fields
122 information. This function doesn't take into account the <em class="parameter"><code>white_list</code></em> status
125 <div class="variablelist"><table border="0">
126 <col align="left" valign="top">
129 <td><p><span class="term"><em class="parameter"><code>white_list</code></em> :</span></p></td>
130 <td>A <a class="link" href="GUPnPWhiteList.html" title="GUPnPWhiteList"><span class="type">GUPnPWhiteList</span></a>
134 <td><p><span class="term"><em class="parameter"><code>context</code></em> :</span></p></td>
135 <td>A <a class="link" href="GUPnPContext.html" title="GUPnPContext"><span class="type">GUPnPContext</span></a> to test.</td>
138 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
140 <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if <em class="parameter"><code>context</code></em> is matching the <em class="parameter"><code>white_list</code></em> criterias,
141 <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> otherwise.</td>
147 <div class="refsect2">
148 <a name="gupnp-white-list-clear"></a><h3>gupnp_white_list_clear ()</h3>
149 <pre class="programlisting"><span class="returnvalue">void</span> gupnp_white_list_clear (<em class="parameter"><code><a class="link" href="GUPnPWhiteList.html" title="GUPnPWhiteList"><span class="type">GUPnPWhiteList</span></a> *white_list</code></em>);</pre>
151 Remove all entries from <a href="http://library.gnome.org/devel/glib/unstable/glib-Doubly-Linked-Lists.html#GList"><span class="type">GList</span></a> that compose the white list.
152 The list is now empty. Even if <a class="link" href="GUPnPWhiteList.html" title="GUPnPWhiteList"><span class="type">GUPnPWhiteList</span></a> is enabled, it will have the
153 same behavior as if it was disabled.
155 <div class="variablelist"><table border="0">
156 <col align="left" valign="top">
158 <td><p><span class="term"><em class="parameter"><code>white_list</code></em> :</span></p></td>
159 <td>A <a class="link" href="GUPnPWhiteList.html" title="GUPnPWhiteList"><span class="type">GUPnPWhiteList</span></a>
165 <div class="refsect2">
166 <a name="gupnp-white-list-set-enabled"></a><h3>gupnp_white_list_set_enabled ()</h3>
167 <pre class="programlisting"><span class="returnvalue">void</span> gupnp_white_list_set_enabled (<em class="parameter"><code><a class="link" href="GUPnPWhiteList.html" title="GUPnPWhiteList"><span class="type">GUPnPWhiteList</span></a> *white_list</code></em>,
168 <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> enable</code></em>);</pre>
170 Enable or disable the <a class="link" href="GUPnPWhiteList.html" title="GUPnPWhiteList"><span class="type">GUPnPWhiteList</span></a> to perform the network filtering.
172 <div class="variablelist"><table border="0">
173 <col align="left" valign="top">
176 <td><p><span class="term"><em class="parameter"><code>white_list</code></em> :</span></p></td>
177 <td>A <a class="link" href="GUPnPWhiteList.html" title="GUPnPWhiteList"><span class="type">GUPnPWhiteList</span></a>
181 <td><p><span class="term"><em class="parameter"><code>enable</code></em> :</span></p></td>
183 <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> to enable <em class="parameter"><code>white_list</code></em>, <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> otherwise</td>
189 <div class="refsect2">
190 <a name="gupnp-white-list-get-entries"></a><h3>gupnp_white_list_get_entries ()</h3>
191 <pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Doubly-Linked-Lists.html#GList"><span class="returnvalue">GList</span></a> * gupnp_white_list_get_entries (<em class="parameter"><code><a class="link" href="GUPnPWhiteList.html" title="GUPnPWhiteList"><span class="type">GUPnPWhiteList</span></a> *white_list</code></em>);</pre>
193 Get the <a href="http://library.gnome.org/devel/glib/unstable/glib-Doubly-Linked-Lists.html#GList"><span class="type">GList</span></a> of entries that compose the white list. Do not free
195 <div class="variablelist"><table border="0">
196 <col align="left" valign="top">
199 <td><p><span class="term"><em class="parameter"><code>white_list</code></em> :</span></p></td>
200 <td>A <a class="link" href="GUPnPWhiteList.html" title="GUPnPWhiteList"><span class="type">GUPnPWhiteList</span></a>
204 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
205 <td>a <a href="http://library.gnome.org/devel/glib/unstable/glib-Doubly-Linked-Lists.html#GList"><span class="type">GList</span></a> of entries
206 used to filter networks, interfaces,... or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>.
207 Do not modify or free the list nor its elements. <span class="annotation">[<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> utf8][<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span>
214 <div class="refsect2">
215 <a name="gupnp-white-list-is-empty"></a><h3>gupnp_white_list_is_empty ()</h3>
216 <pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> gupnp_white_list_is_empty (<em class="parameter"><code><a class="link" href="GUPnPWhiteList.html" title="GUPnPWhiteList"><span class="type">GUPnPWhiteList</span></a> *white_list</code></em>);</pre>
218 Return the state of the entries list of <a class="link" href="GUPnPWhiteList.html" title="GUPnPWhiteList"><span class="type">GUPnPWhiteList</span></a>
220 <div class="variablelist"><table border="0">
221 <col align="left" valign="top">
224 <td><p><span class="term"><em class="parameter"><code>white_list</code></em> :</span></p></td>
225 <td>A <a class="link" href="GUPnPWhiteList.html" title="GUPnPWhiteList"><span class="type">GUPnPWhiteList</span></a>
229 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
231 <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if <em class="parameter"><code>white_list</code></em> is empty, <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> otherwise.</td>
237 <div class="refsect2">
238 <a name="gupnp-white-list-get-enabled"></a><h3>gupnp_white_list_get_enabled ()</h3>
239 <pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> gupnp_white_list_get_enabled (<em class="parameter"><code><a class="link" href="GUPnPWhiteList.html" title="GUPnPWhiteList"><span class="type">GUPnPWhiteList</span></a> *white_list</code></em>);</pre>
241 Return the status of the <a class="link" href="GUPnPWhiteList.html" title="GUPnPWhiteList"><span class="type">GUPnPWhiteList</span></a>
243 <div class="variablelist"><table border="0">
244 <col align="left" valign="top">
247 <td><p><span class="term"><em class="parameter"><code>white_list</code></em> :</span></p></td>
248 <td>A <a class="link" href="GUPnPWhiteList.html" title="GUPnPWhiteList"><span class="type">GUPnPWhiteList</span></a>
252 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
254 <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if <em class="parameter"><code>white_list</code></em> is enabled, <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> otherwise.</td>
260 <div class="refsect2">
261 <a name="gupnp-white-list-new"></a><h3>gupnp_white_list_new ()</h3>
262 <pre class="programlisting"><a class="link" href="GUPnPWhiteList.html" title="GUPnPWhiteList"><span class="returnvalue">GUPnPWhiteList</span></a> * gupnp_white_list_new (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
264 Create a new <a class="link" href="GUPnPWhiteList.html" title="GUPnPWhiteList"><span class="type">GUPnPWhiteList</span></a>.
265 The white list is disabled by default.
267 <div class="variablelist"><table border="0">
268 <col align="left" valign="top">
270 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
271 <td>A new <a class="link" href="GUPnPWhiteList.html" title="GUPnPWhiteList"><span class="type">GUPnPWhiteList</span></a> object. <span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span>
277 <div class="refsect2">
278 <a name="gupnp-white-list-remove-entry"></a><h3>gupnp_white_list_remove_entry ()</h3>
279 <pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> gupnp_white_list_remove_entry (<em class="parameter"><code><a class="link" href="GUPnPWhiteList.html" title="GUPnPWhiteList"><span class="type">GUPnPWhiteList</span></a> *white_list</code></em>,
280 <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *entry</code></em>);</pre>
282 Remove <em class="parameter"><code>entry</code></em> in the list of valid criteria used by <em class="parameter"><code>white_list</code></em> to
285 <div class="variablelist"><table border="0">
286 <col align="left" valign="top">
289 <td><p><span class="term"><em class="parameter"><code>white_list</code></em> :</span></p></td>
290 <td>A <a class="link" href="GUPnPWhiteList.html" title="GUPnPWhiteList"><span class="type">GUPnPWhiteList</span></a>
294 <td><p><span class="term"><em class="parameter"><code>entry</code></em> :</span></p></td>
295 <td>A value to remove from the filter list.</td>
298 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
300 <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if <em class="parameter"><code>entry</code></em> is removed, <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> otherwise.</td>
309 Generated by GTK-Doc V1.18</div>