Tizen 2.1 base
[platform/upstream/glib2.0.git] / docs / reference / gio / html / GIOModule.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>GIOModule</title>
6 <meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
7 <link rel="home" href="index.html" title="GIO Reference Manual">
8 <link rel="up" href="extending.html" title="Extending GIO">
9 <link rel="prev" href="GVfs.html" title="GVfs">
10 <link rel="next" href="gio-Extension-Points.html" title="Extension Points">
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="GVfs.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
18 <td><a accesskey="u" href="extending.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">GIO Reference Manual</th>
21 <td><a accesskey="n" href="gio-Extension-Points.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="#GIOModule.synopsis" class="shortcut">Top</a>
25                    | 
26                   <a href="#GIOModule.description" class="shortcut">Description</a>
27                    | 
28                   <a href="#GIOModule.object-hierarchy" class="shortcut">Object Hierarchy</a>
29                    | 
30                   <a href="#GIOModule.implemented-interfaces" class="shortcut">Implemented Interfaces</a>
31 </td></tr>
32 </table>
33 <div class="refentry">
34 <a name="GIOModule"></a><div class="titlepage"></div>
35 <div class="refnamediv"><table width="100%"><tr>
36 <td valign="top">
37 <h2><span class="refentrytitle"><a name="GIOModule.top_of_page"></a>GIOModule</span></h2>
38 <p>GIOModule — Loadable GIO Modules</p>
39 </td>
40 <td valign="top" align="right"></td>
41 </tr></table></div>
42 <div class="refsynopsisdiv">
43 <a name="GIOModule.synopsis"></a><h2>Synopsis</h2>
44 <pre class="synopsis">
45 #include &lt;gio/gio.h&gt;
46
47                     <a class="link" href="GIOModule.html#GIOModule-struct" title="GIOModule">GIOModule</a>;
48                     <a class="link" href="GIOModule.html#GIOModuleScope" title="GIOModuleScope">GIOModuleScope</a>;
49 enum                <a class="link" href="GIOModule.html#GIOModuleScopeFlags" title="enum GIOModuleScopeFlags">GIOModuleScopeFlags</a>;
50 <a class="link" href="GIOModule.html" title="GIOModule"><span class="returnvalue">GIOModule</span></a> *         <a class="link" href="GIOModule.html#g-io-module-new" title="g_io_module_new ()">g_io_module_new</a>                     (<em class="parameter"><code>const <a href="./../glib/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *filename</code></em>);
51 <span class="returnvalue">void</span>                <a class="link" href="GIOModule.html#g-io-module-scope-block" title="g_io_module_scope_block ()">g_io_module_scope_block</a>             (<em class="parameter"><code><a class="link" href="GIOModule.html#GIOModuleScope" title="GIOModuleScope"><span class="type">GIOModuleScope</span></a> *scope</code></em>,
52                                                          <em class="parameter"><code>const <a href="./../glib/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *basename</code></em>);
53 <span class="returnvalue">void</span>                <a class="link" href="GIOModule.html#g-io-module-scope-free" title="g_io_module_scope_free ()">g_io_module_scope_free</a>              (<em class="parameter"><code><a class="link" href="GIOModule.html#GIOModuleScope" title="GIOModuleScope"><span class="type">GIOModuleScope</span></a> *scope</code></em>);
54 <a class="link" href="GIOModule.html#GIOModuleScope" title="GIOModuleScope"><span class="returnvalue">GIOModuleScope</span></a> *    <a class="link" href="GIOModule.html#g-io-module-scope-new" title="g_io_module_scope_new ()">g_io_module_scope_new</a>               (<em class="parameter"><code><a class="link" href="GIOModule.html#GIOModuleScopeFlags" title="enum GIOModuleScopeFlags"><span class="type">GIOModuleScopeFlags</span></a> flags</code></em>);
55 <a href="./../glib/glib/glib-Doubly-Linked-Lists.html#GList"><span class="returnvalue">GList</span></a> *             <a class="link" href="GIOModule.html#g-io-modules-load-all-in-directory" title="g_io_modules_load_all_in_directory ()">g_io_modules_load_all_in_directory</a>  (<em class="parameter"><code>const <a href="./../glib/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *dirname</code></em>);
56 <a href="./../glib/glib/glib-Doubly-Linked-Lists.html#GList"><span class="returnvalue">GList</span></a> *             <a class="link" href="GIOModule.html#g-io-modules-load-all-in-directory-with-scope" title="g_io_modules_load_all_in_directory_with_scope ()">g_io_modules_load_all_in_directory_with_scope</a>
57                                                         (<em class="parameter"><code>const <a href="./../glib/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *dirname</code></em>,
58                                                          <em class="parameter"><code><a class="link" href="GIOModule.html#GIOModuleScope" title="GIOModuleScope"><span class="type">GIOModuleScope</span></a> *scope</code></em>);
59 <span class="returnvalue">void</span>                <a class="link" href="GIOModule.html#g-io-modules-scan-all-in-directory" title="g_io_modules_scan_all_in_directory ()">g_io_modules_scan_all_in_directory</a>  (<em class="parameter"><code>const <span class="type">char</span> *dirname</code></em>);
60 <span class="returnvalue">void</span>                <a class="link" href="GIOModule.html#g-io-modules-scan-all-in-directory-with-scope" title="g_io_modules_scan_all_in_directory_with_scope ()">g_io_modules_scan_all_in_directory_with_scope</a>
61                                                         (<em class="parameter"><code>const <a href="./../glib/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *dirname</code></em>,
62                                                          <em class="parameter"><code><a class="link" href="GIOModule.html#GIOModuleScope" title="GIOModuleScope"><span class="type">GIOModuleScope</span></a> *scope</code></em>);
63 <span class="returnvalue">void</span>                <a class="link" href="GIOModule.html#g-io-module-load" title="g_io_module_load ()">g_io_module_load</a>                    (<em class="parameter"><code><a class="link" href="GIOModule.html" title="GIOModule"><span class="type">GIOModule</span></a> *module</code></em>);
64 <span class="returnvalue">void</span>                <a class="link" href="GIOModule.html#g-io-module-unload" title="g_io_module_unload ()">g_io_module_unload</a>                  (<em class="parameter"><code><a class="link" href="GIOModule.html" title="GIOModule"><span class="type">GIOModule</span></a> *module</code></em>);
65 <span class="returnvalue">char</span> **             <a class="link" href="GIOModule.html#g-io-module-query" title="g_io_module_query ()">g_io_module_query</a>                   (<em class="parameter"><code><span class="type">void</span></code></em>);
66 </pre>
67 </div>
68 <div class="refsect1">
69 <a name="GIOModule.object-hierarchy"></a><h2>Object Hierarchy</h2>
70 <pre class="synopsis">
71   <a href="./../gobject/gobject/gobject-The-Base-Object-Type.html#GObject">GObject</a>
72    +----<a href="./../gobject/gobject/GTypeModule.html">GTypeModule</a>
73          +----GIOModule
74 </pre>
75 </div>
76 <div class="refsect1">
77 <a name="GIOModule.implemented-interfaces"></a><h2>Implemented Interfaces</h2>
78 <p>
79 GIOModule implements
80  <a href="./../gobject/gobject/GTypePlugin.html">GTypePlugin</a>.</p>
81 </div>
82 <div class="refsect1">
83 <a name="GIOModule.description"></a><h2>Description</h2>
84 <p>
85 Provides an interface and default functions for loading and unloading 
86 modules. This is used internally to make GIO extensible, but can also
87 be used by others to implement module loading.
88 </p>
89 </div>
90 <div class="refsect1">
91 <a name="GIOModule.details"></a><h2>Details</h2>
92 <div class="refsect2">
93 <a name="GIOModule-struct"></a><h3>GIOModule</h3>
94 <pre class="programlisting">typedef struct _GIOModule GIOModule;</pre>
95 <p>
96 Opaque module base class for extending GIO.
97 </p>
98 </div>
99 <hr>
100 <div class="refsect2">
101 <a name="GIOModuleScope"></a><h3>GIOModuleScope</h3>
102 <pre class="programlisting">typedef struct _GIOModuleScope GIOModuleScope;</pre>
103 <p>
104 Represents a scope for loading IO modules. A scope can be used for blocking
105 duplicate modules, or blocking a module you don't want to load.
106 </p>
107 <p>
108 The scope can be used with <a class="link" href="GIOModule.html#g-io-modules-load-all-in-directory-with-scope" title="g_io_modules_load_all_in_directory_with_scope ()"><code class="function">g_io_modules_load_all_in_directory_with_scope()</code></a>
109 or <a class="link" href="GIOModule.html#g-io-modules-scan-all-in-directory-with-scope" title="g_io_modules_scan_all_in_directory_with_scope ()"><code class="function">g_io_modules_scan_all_in_directory_with_scope()</code></a>.
110 </p>
111 <p class="since">Since 2.30</p>
112 </div>
113 <hr>
114 <div class="refsect2">
115 <a name="GIOModuleScopeFlags"></a><h3>enum GIOModuleScopeFlags</h3>
116 <pre class="programlisting">typedef enum {
117   G_IO_MODULE_SCOPE_NONE,
118   G_IO_MODULE_SCOPE_BLOCK_DUPLICATES
119 } GIOModuleScopeFlags;
120 </pre>
121 <p>
122 Flags for use with <a class="link" href="GIOModule.html#g-io-module-scope-new" title="g_io_module_scope_new ()"><code class="function">g_io_module_scope_new()</code></a>.
123 </p>
124 <div class="variablelist"><table border="0">
125 <col align="left" valign="top">
126 <tbody>
127 <tr>
128 <td><p><a name="G-IO-MODULE-SCOPE-NONE:CAPS"></a><span class="term"><code class="literal">G_IO_MODULE_SCOPE_NONE</code></span></p></td>
129 <td>No module scan flags
130 </td>
131 </tr>
132 <tr>
133 <td><p><a name="G-IO-MODULE-SCOPE-BLOCK-DUPLICATES:CAPS"></a><span class="term"><code class="literal">G_IO_MODULE_SCOPE_BLOCK_DUPLICATES</code></span></p></td>
134 <td>When using this scope to load or
135     scan modules, automatically block a modules which has the same base
136     basename as previously loaded module.
137 </td>
138 </tr>
139 </tbody>
140 </table></div>
141 <p class="since">Since 2.30</p>
142 </div>
143 <hr>
144 <div class="refsect2">
145 <a name="g-io-module-new"></a><h3>g_io_module_new ()</h3>
146 <pre class="programlisting"><a class="link" href="GIOModule.html" title="GIOModule"><span class="returnvalue">GIOModule</span></a> *         g_io_module_new                     (<em class="parameter"><code>const <a href="./../glib/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *filename</code></em>);</pre>
147 <p>
148 Creates a new GIOModule that will load the specific
149 shared library when in use.
150 </p>
151 <div class="variablelist"><table border="0">
152 <col align="left" valign="top">
153 <tbody>
154 <tr>
155 <td><p><span class="term"><em class="parameter"><code>filename</code></em> :</span></p></td>
156 <td>filename of the shared library module.</td>
157 </tr>
158 <tr>
159 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
160 <td>a <a class="link" href="GIOModule.html" title="GIOModule"><span class="type">GIOModule</span></a> from given <em class="parameter"><code>filename</code></em>,
161 or <a href="./../glib/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> on error.</td>
162 </tr>
163 </tbody>
164 </table></div>
165 </div>
166 <hr>
167 <div class="refsect2">
168 <a name="g-io-module-scope-block"></a><h3>g_io_module_scope_block ()</h3>
169 <pre class="programlisting"><span class="returnvalue">void</span>                g_io_module_scope_block             (<em class="parameter"><code><a class="link" href="GIOModule.html#GIOModuleScope" title="GIOModuleScope"><span class="type">GIOModuleScope</span></a> *scope</code></em>,
170                                                          <em class="parameter"><code>const <a href="./../glib/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *basename</code></em>);</pre>
171 <p>
172 Block modules with the given <em class="parameter"><code>basename</code></em> from being loaded when
173 this scope is used with <a class="link" href="GIOModule.html#g-io-modules-scan-all-in-directory-with-scope" title="g_io_modules_scan_all_in_directory_with_scope ()"><code class="function">g_io_modules_scan_all_in_directory_with_scope()</code></a>
174 or <a class="link" href="GIOModule.html#g-io-modules-load-all-in-directory-with-scope" title="g_io_modules_load_all_in_directory_with_scope ()"><code class="function">g_io_modules_load_all_in_directory_with_scope()</code></a>.
175 </p>
176 <div class="variablelist"><table border="0">
177 <col align="left" valign="top">
178 <tbody>
179 <tr>
180 <td><p><span class="term"><em class="parameter"><code>scope</code></em> :</span></p></td>
181 <td>a module loading scope</td>
182 </tr>
183 <tr>
184 <td><p><span class="term"><em class="parameter"><code>basename</code></em> :</span></p></td>
185 <td>the basename to block</td>
186 </tr>
187 </tbody>
188 </table></div>
189 <p class="since">Since 2.30</p>
190 </div>
191 <hr>
192 <div class="refsect2">
193 <a name="g-io-module-scope-free"></a><h3>g_io_module_scope_free ()</h3>
194 <pre class="programlisting"><span class="returnvalue">void</span>                g_io_module_scope_free              (<em class="parameter"><code><a class="link" href="GIOModule.html#GIOModuleScope" title="GIOModuleScope"><span class="type">GIOModuleScope</span></a> *scope</code></em>);</pre>
195 <p>
196 Free a module scope.
197 </p>
198 <div class="variablelist"><table border="0">
199 <col align="left" valign="top">
200 <tbody><tr>
201 <td><p><span class="term"><em class="parameter"><code>scope</code></em> :</span></p></td>
202 <td>a module loading scope</td>
203 </tr></tbody>
204 </table></div>
205 <p class="since">Since 2.30</p>
206 </div>
207 <hr>
208 <div class="refsect2">
209 <a name="g-io-module-scope-new"></a><h3>g_io_module_scope_new ()</h3>
210 <pre class="programlisting"><a class="link" href="GIOModule.html#GIOModuleScope" title="GIOModuleScope"><span class="returnvalue">GIOModuleScope</span></a> *    g_io_module_scope_new               (<em class="parameter"><code><a class="link" href="GIOModule.html#GIOModuleScopeFlags" title="enum GIOModuleScopeFlags"><span class="type">GIOModuleScopeFlags</span></a> flags</code></em>);</pre>
211 <p>
212 Create a new scope for loading of IO modules. A scope can be used for
213 blocking duplicate modules, or blocking a module you don't want to load.
214 </p>
215 <p>
216 Specify the <a class="link" href="GIOModule.html#G-IO-MODULE-SCOPE-BLOCK-DUPLICATES:CAPS"><code class="literal">G_IO_MODULE_SCOPE_BLOCK_DUPLICATES</code></a> flag to block modules
217 which have the same base name as a module that has already been seen
218 in this scope.
219 </p>
220 <div class="variablelist"><table border="0">
221 <col align="left" valign="top">
222 <tbody>
223 <tr>
224 <td><p><span class="term"><em class="parameter"><code>flags</code></em> :</span></p></td>
225 <td>flags for the new scope</td>
226 </tr>
227 <tr>
228 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
229 <td>the new module scope. <span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span>
230 </td>
231 </tr>
232 </tbody>
233 </table></div>
234 <p class="since">Since 2.30</p>
235 </div>
236 <hr>
237 <div class="refsect2">
238 <a name="g-io-modules-load-all-in-directory"></a><h3>g_io_modules_load_all_in_directory ()</h3>
239 <pre class="programlisting"><a href="./../glib/glib/glib-Doubly-Linked-Lists.html#GList"><span class="returnvalue">GList</span></a> *             g_io_modules_load_all_in_directory  (<em class="parameter"><code>const <a href="./../glib/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *dirname</code></em>);</pre>
240 <p>
241 Loads all the modules in the specified directory.
242 </p>
243 <p>
244 If don't require all modules to be initialized (and thus registering
245 all gtypes) then you can use <a class="link" href="GIOModule.html#g-io-modules-scan-all-in-directory" title="g_io_modules_scan_all_in_directory ()"><code class="function">g_io_modules_scan_all_in_directory()</code></a>
246 which allows delayed/lazy loading of modules.
247 </p>
248 <div class="variablelist"><table border="0">
249 <col align="left" valign="top">
250 <tbody>
251 <tr>
252 <td><p><span class="term"><em class="parameter"><code>dirname</code></em> :</span></p></td>
253 <td>pathname for a directory containing modules to load.</td>
254 </tr>
255 <tr>
256 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
257 <td>a list of <a href="GIOModule.html"><span class="type">GIOModules</span></a> loaded
258 from the directory,
259 All the modules are loaded into memory, if you want to
260 unload them (enabling on-demand loading) you must call
261 <a href="./../gobject/gobject/GTypeModule.html#g-type-module-unuse"><code class="function">g_type_module_unuse()</code></a> on all the modules. Free the list
262 with <a href="./../glib/glib/glib-Doubly-Linked-Lists.html#g-list-free"><code class="function">g_list_free()</code></a>. <span class="annotation">[<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> GIOModule][<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span>
263 </td>
264 </tr>
265 </tbody>
266 </table></div>
267 </div>
268 <hr>
269 <div class="refsect2">
270 <a name="g-io-modules-load-all-in-directory-with-scope"></a><h3>g_io_modules_load_all_in_directory_with_scope ()</h3>
271 <pre class="programlisting"><a href="./../glib/glib/glib-Doubly-Linked-Lists.html#GList"><span class="returnvalue">GList</span></a> *             g_io_modules_load_all_in_directory_with_scope
272                                                         (<em class="parameter"><code>const <a href="./../glib/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *dirname</code></em>,
273                                                          <em class="parameter"><code><a class="link" href="GIOModule.html#GIOModuleScope" title="GIOModuleScope"><span class="type">GIOModuleScope</span></a> *scope</code></em>);</pre>
274 <p>
275 Loads all the modules in the specified directory.
276 </p>
277 <p>
278 If don't require all modules to be initialized (and thus registering
279 all gtypes) then you can use <a class="link" href="GIOModule.html#g-io-modules-scan-all-in-directory" title="g_io_modules_scan_all_in_directory ()"><code class="function">g_io_modules_scan_all_in_directory()</code></a>
280 which allows delayed/lazy loading of modules.
281 </p>
282 <div class="variablelist"><table border="0">
283 <col align="left" valign="top">
284 <tbody>
285 <tr>
286 <td><p><span class="term"><em class="parameter"><code>dirname</code></em> :</span></p></td>
287 <td>pathname for a directory containing modules to load.</td>
288 </tr>
289 <tr>
290 <td><p><span class="term"><em class="parameter"><code>scope</code></em> :</span></p></td>
291 <td>a scope to use when scanning the modules.</td>
292 </tr>
293 <tr>
294 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
295 <td>a list of <a href="GIOModule.html"><span class="type">GIOModules</span></a> loaded
296 from the directory,
297 All the modules are loaded into memory, if you want to
298 unload them (enabling on-demand loading) you must call
299 <a href="./../gobject/gobject/GTypeModule.html#g-type-module-unuse"><code class="function">g_type_module_unuse()</code></a> on all the modules. Free the list
300 with <a href="./../glib/glib/glib-Doubly-Linked-Lists.html#g-list-free"><code class="function">g_list_free()</code></a>. <span class="annotation">[<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> GIOModule][<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span>
301 </td>
302 </tr>
303 </tbody>
304 </table></div>
305 <p class="since">Since 2.30</p>
306 </div>
307 <hr>
308 <div class="refsect2">
309 <a name="g-io-modules-scan-all-in-directory"></a><h3>g_io_modules_scan_all_in_directory ()</h3>
310 <pre class="programlisting"><span class="returnvalue">void</span>                g_io_modules_scan_all_in_directory  (<em class="parameter"><code>const <span class="type">char</span> *dirname</code></em>);</pre>
311 <p>
312 Scans all the modules in the specified directory, ensuring that
313 any extension point implemented by a module is registered.
314 </p>
315 <p>
316 This may not actually load and initialize all the types in each
317 module, some modules may be lazily loaded and initialized when
318 an extension point it implementes is used with e.g.
319 <a class="link" href="gio-Extension-Points.html#g-io-extension-point-get-extensions" title="g_io_extension_point_get_extensions ()"><code class="function">g_io_extension_point_get_extensions()</code></a> or
320 <a class="link" href="gio-Extension-Points.html#g-io-extension-point-get-extension-by-name" title="g_io_extension_point_get_extension_by_name ()"><code class="function">g_io_extension_point_get_extension_by_name()</code></a>.
321 </p>
322 <p>
323 If you need to guarantee that all types are loaded in all the modules,
324 use <a class="link" href="GIOModule.html#g-io-modules-load-all-in-directory" title="g_io_modules_load_all_in_directory ()"><code class="function">g_io_modules_load_all_in_directory()</code></a>.
325 </p>
326 <div class="variablelist"><table border="0">
327 <col align="left" valign="top">
328 <tbody><tr>
329 <td><p><span class="term"><em class="parameter"><code>dirname</code></em> :</span></p></td>
330 <td>pathname for a directory containing modules to scan.</td>
331 </tr></tbody>
332 </table></div>
333 <p class="since">Since 2.24</p>
334 </div>
335 <hr>
336 <div class="refsect2">
337 <a name="g-io-modules-scan-all-in-directory-with-scope"></a><h3>g_io_modules_scan_all_in_directory_with_scope ()</h3>
338 <pre class="programlisting"><span class="returnvalue">void</span>                g_io_modules_scan_all_in_directory_with_scope
339                                                         (<em class="parameter"><code>const <a href="./../glib/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *dirname</code></em>,
340                                                          <em class="parameter"><code><a class="link" href="GIOModule.html#GIOModuleScope" title="GIOModuleScope"><span class="type">GIOModuleScope</span></a> *scope</code></em>);</pre>
341 <p>
342 Scans all the modules in the specified directory, ensuring that
343 any extension point implemented by a module is registered.
344 </p>
345 <p>
346 This may not actually load and initialize all the types in each
347 module, some modules may be lazily loaded and initialized when
348 an extension point it implementes is used with e.g.
349 <a class="link" href="gio-Extension-Points.html#g-io-extension-point-get-extensions" title="g_io_extension_point_get_extensions ()"><code class="function">g_io_extension_point_get_extensions()</code></a> or
350 <a class="link" href="gio-Extension-Points.html#g-io-extension-point-get-extension-by-name" title="g_io_extension_point_get_extension_by_name ()"><code class="function">g_io_extension_point_get_extension_by_name()</code></a>.
351 </p>
352 <p>
353 If you need to guarantee that all types are loaded in all the modules,
354 use <a class="link" href="GIOModule.html#g-io-modules-load-all-in-directory" title="g_io_modules_load_all_in_directory ()"><code class="function">g_io_modules_load_all_in_directory()</code></a>.
355 </p>
356 <div class="variablelist"><table border="0">
357 <col align="left" valign="top">
358 <tbody>
359 <tr>
360 <td><p><span class="term"><em class="parameter"><code>dirname</code></em> :</span></p></td>
361 <td>pathname for a directory containing modules to scan.</td>
362 </tr>
363 <tr>
364 <td><p><span class="term"><em class="parameter"><code>scope</code></em> :</span></p></td>
365 <td>a scope to use when scanning the modules</td>
366 </tr>
367 </tbody>
368 </table></div>
369 <p class="since">Since 2.30</p>
370 </div>
371 <hr>
372 <div class="refsect2">
373 <a name="g-io-module-load"></a><h3>g_io_module_load ()</h3>
374 <pre class="programlisting"><span class="returnvalue">void</span>                g_io_module_load                    (<em class="parameter"><code><a class="link" href="GIOModule.html" title="GIOModule"><span class="type">GIOModule</span></a> *module</code></em>);</pre>
375 <p>
376 Required API for GIO modules to implement.
377 This function is ran after the module has been loaded into GIO,
378 to initialize the module.
379 </p>
380 <div class="variablelist"><table border="0">
381 <col align="left" valign="top">
382 <tbody><tr>
383 <td><p><span class="term"><em class="parameter"><code>module</code></em> :</span></p></td>
384 <td>a <a class="link" href="GIOModule.html" title="GIOModule"><span class="type">GIOModule</span></a>.</td>
385 </tr></tbody>
386 </table></div>
387 </div>
388 <hr>
389 <div class="refsect2">
390 <a name="g-io-module-unload"></a><h3>g_io_module_unload ()</h3>
391 <pre class="programlisting"><span class="returnvalue">void</span>                g_io_module_unload                  (<em class="parameter"><code><a class="link" href="GIOModule.html" title="GIOModule"><span class="type">GIOModule</span></a> *module</code></em>);</pre>
392 <p>
393 Required API for GIO modules to implement.
394 This function is ran when the module is being unloaded from GIO,
395 to finalize the module.
396 </p>
397 <div class="variablelist"><table border="0">
398 <col align="left" valign="top">
399 <tbody><tr>
400 <td><p><span class="term"><em class="parameter"><code>module</code></em> :</span></p></td>
401 <td>a <a class="link" href="GIOModule.html" title="GIOModule"><span class="type">GIOModule</span></a>.</td>
402 </tr></tbody>
403 </table></div>
404 </div>
405 <hr>
406 <div class="refsect2">
407 <a name="g-io-module-query"></a><h3>g_io_module_query ()</h3>
408 <pre class="programlisting"><span class="returnvalue">char</span> **             g_io_module_query                   (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
409 <p>
410 Optional API for GIO modules to implement.
411 </p>
412 <p>
413 Should return a list of all the extension points that may be
414 implemented in this module.
415 </p>
416 <p>
417 This method will not be called in normal use, however it may be
418 called when probing existing modules and recording which extension
419 points that this model is used for. This means we won't have to
420 load and initialze this module unless its needed.
421 </p>
422 <p>
423 If this function is not implemented by the module the module will
424 always be loaded, initialized and then unloaded on application startup
425 so that it can register its extension points during init.
426 </p>
427 <p>
428 Note that a module need not actually implement all the extension points
429 that g_io_module_query returns, since the exact list of extension may
430 depend on runtime issues. However all extension points actually implemented
431 must be returned by <a class="link" href="GIOModule.html#g-io-module-query" title="g_io_module_query ()"><code class="function">g_io_module_query()</code></a> (if defined).
432 </p>
433 <p>
434 When installing a module that implements g_io_module_query you must
435 run gio-querymodules in order to build the cache files required for
436 lazy loading.
437 </p>
438 <div class="variablelist"><table border="0">
439 <col align="left" valign="top">
440 <tbody><tr>
441 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
442 <td>A <a href="./../glib/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>-terminated array of strings, listing the supported
443 extension points of the module. The array must be suitable for
444 freeing with <a href="./../glib/glib/glib-String-Utility-Functions.html#g-strfreev"><code class="function">g_strfreev()</code></a>. <span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span>
445 </td>
446 </tr></tbody>
447 </table></div>
448 <p class="since">Since 2.24</p>
449 </div>
450 </div>
451 </div>
452 <div class="footer">
453 <hr>
454           Generated by GTK-Doc V1.18</div>
455 </body>
456 </html>