14
14
<refname>GIOModule</refname>
15
15
<refpurpose>Loadable GIO Modules</refpurpose>
16
<!--[<xref linkend="desc" endterm="desc.title"/>]-->
19
<refsynopsisdiv role="synopsis">
18
<refsynopsisdiv id="GIOModule.synopsis" role="synopsis">
20
19
<title role="synopsis.title">Synopsis</title>
24
23
#include <gio/gio.h>
27
25
<link linkend="GIOModule-struct">GIOModule</link>;
28
<link linkend="GIOModule">GIOModule</link>* <link linkend="g-io-module-new">g_io_module_new</link> (const <link linkend="gchar">gchar</link> *filename);
29
<link linkend="GList">GList</link>* <link linkend="g-io-modules-load-all-in-directory">g_io_modules_load_all_in_directory</link> (const <link linkend="char">char</link> *dirname);
26
<link linkend="GIOModule">GIOModule</link> * <link linkend="g-io-module-new">g_io_module_new</link> (const <link linkend="gchar">gchar</link> *filename);
27
<link linkend="GList">GList</link> * <link linkend="g-io-modules-load-all-in-directory">g_io_modules_load_all_in_directory</link> (const <link linkend="gchar">gchar</link> *dirname);
30
28
<link linkend="void">void</link> <link linkend="g-io-module-load">g_io_module_load</link> (<link linkend="GIOModule">GIOModule</link> *module);
31
29
<link linkend="void">void</link> <link linkend="g-io-module-unload">g_io_module_unload</link> (<link linkend="GIOModule">GIOModule</link> *module);
37
<refsect1 role="object_hierarchy">
33
<refsect1 id="GIOModule.object-hierarchy" role="object_hierarchy">
38
34
<title role="object_hierarchy.title">Object Hierarchy</title>
41
36
<link linkend="GObject">GObject</link>
42
37
+----<link linkend="GTypeModule">GTypeModule</link>
50
<refsect1 role="impl_interfaces">
44
<refsect1 id="GIOModule.implemented-interfaces" role="impl_interfaces">
51
45
<title role="impl_interfaces.title">Implemented Interfaces</title>
53
47
GIOModule implements
54
48
<link linkend="GTypePlugin">GTypePlugin</link>.</para>
62
<refsect1 role="desc">
55
<refsect1 id="GIOModule.description" role="desc">
63
56
<title role="desc.title">Description</title>
65
58
Provides an interface and default functions for loading and unloading
66
59
modules. This is used internally to make GIO extensible, but can also
67
60
be used by others to implement module loading.</para>
73
<refsect1 role="details">
65
<refsect1 id="GIOModule.details" role="details">
74
66
<title role="details.title">Details</title>
76
<title><anchor id="GIOModule-struct" role="struct"/>GIOModule</title>
77
<indexterm><primary>GIOModule</primary></indexterm><programlisting>typedef struct _GIOModule GIOModule;</programlisting>
67
<refsect2 id="GIOModule-struct" role="struct">
68
<title>GIOModule</title>
69
<indexterm zone="GIOModule-struct"><primary sortas="GIOModule">GIOModule</primary></indexterm><programlisting>typedef struct _GIOModule GIOModule;</programlisting>
79
71
Opaque module base class for extending GIO.</para>
84
<title><anchor id="g-io-module-new" role="function"/>g_io_module_new ()</title>
85
<indexterm><primary>g_io_module_new</primary></indexterm><programlisting><link linkend="GIOModule">GIOModule</link>* g_io_module_new (const <link linkend="gchar">gchar</link> *filename);</programlisting>
74
<refsect2 id="g-io-module-new" role="function">
75
<title>g_io_module_new ()</title>
76
<indexterm zone="g-io-module-new"><primary sortas="g_io_module_new">g_io_module_new</primary></indexterm><programlisting><link linkend="GIOModule">GIOModule</link> * g_io_module_new (const <link linkend="gchar">gchar</link> *filename);</programlisting>
87
78
Creates a new GIOModule that will load the specific
88
79
shared library when in use.</para>
91
81
</para><variablelist role="params">
92
<varlistentry><term><parameter>filename</parameter> :</term>
82
<varlistentry><term><parameter>filename</parameter> :</term>
93
83
<listitem><simpara> filename of the shared library module.
94
84
</simpara></listitem></varlistentry>
95
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> a <link linkend="GIOModule"><type>GIOModule</type></link> from given <parameter>filename</parameter>,
96
or <link linkend="NULL:CAPS"><literal>NULL</literal></link> on error.
85
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> a <link linkend="GIOModule"><type>GIOModule</type></link> from given <parameter>filename</parameter>,
86
or <link linkend="NULL--CAPS"><literal>NULL</literal></link> on error.
97
87
</simpara></listitem></varlistentry>
98
88
</variablelist></refsect2>
100
<title><anchor id="g-io-modules-load-all-in-directory" role="function"/>g_io_modules_load_all_in_directory ()</title>
101
<indexterm><primary>g_io_modules_load_all_in_directory</primary></indexterm><programlisting><link linkend="GList">GList</link>* g_io_modules_load_all_in_directory (const <link linkend="char">char</link> *dirname);</programlisting>
89
<refsect2 id="g-io-modules-load-all-in-directory" role="function">
90
<title>g_io_modules_load_all_in_directory ()</title>
91
<indexterm zone="g-io-modules-load-all-in-directory"><primary sortas="g_io_modules_load_all_in_directory">g_io_modules_load_all_in_directory</primary></indexterm><programlisting><link linkend="GList">GList</link> * g_io_modules_load_all_in_directory (const <link linkend="gchar">gchar</link> *dirname);</programlisting>
103
93
Loads all the modules in the specified directory.</para>
106
95
</para><variablelist role="params">
107
<varlistentry><term><parameter>dirname</parameter> :</term>
96
<varlistentry><term><parameter>dirname</parameter> :</term>
108
97
<listitem><simpara> pathname for a directory containing modules to load.
109
98
</simpara></listitem></varlistentry>
110
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> a list of <link linkend="GIOModules"><type>GIOModules</type></link> loaded from the directory,
99
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> a list of <link linkend="GIOModules"><type>GIOModules</type></link> loaded from the directory,
111
100
All the modules are loaded into memory, if you want to
112
101
unload them (enabling on-demand loading) you must call
113
102
<link linkend="g-type-module-unuse"><function>g_type_module_unuse()</function></link> on all the modules. Free the list
114
103
with <link linkend="g-list-free"><function>g_list_free()</function></link>.
115
104
</simpara></listitem></varlistentry>
116
105
</variablelist></refsect2>
118
<title><anchor id="g-io-module-load" role="function"/>g_io_module_load ()</title>
119
<indexterm><primary>g_io_module_load</primary></indexterm><programlisting><link linkend="void">void</link> g_io_module_load (<link linkend="GIOModule">GIOModule</link> *module);</programlisting>
106
<refsect2 id="g-io-module-load" role="function">
107
<title>g_io_module_load ()</title>
108
<indexterm zone="g-io-module-load"><primary sortas="g_io_module_load">g_io_module_load</primary></indexterm><programlisting><link linkend="void">void</link> g_io_module_load (<link linkend="GIOModule">GIOModule</link> *module);</programlisting>
121
Required API for GIO modules to implement.
122
This function is ran after the module has been loaded into GIO,
110
Required API for GIO modules to implement.
111
This function is ran after the module has been loaded into GIO,
123
112
to initialize the module.</para>
126
114
</para><variablelist role="params">
127
<varlistentry><term><parameter>module</parameter> :</term>
115
<varlistentry><term><parameter>module</parameter> :</term>
128
116
<listitem><simpara> a <link linkend="GIOModule"><type>GIOModule</type></link>.
129
117
</simpara></listitem></varlistentry>
130
118
</variablelist></refsect2>
132
<title><anchor id="g-io-module-unload" role="function"/>g_io_module_unload ()</title>
133
<indexterm><primary>g_io_module_unload</primary></indexterm><programlisting><link linkend="void">void</link> g_io_module_unload (<link linkend="GIOModule">GIOModule</link> *module);</programlisting>
119
<refsect2 id="g-io-module-unload" role="function">
120
<title>g_io_module_unload ()</title>
121
<indexterm zone="g-io-module-unload"><primary sortas="g_io_module_unload">g_io_module_unload</primary></indexterm><programlisting><link linkend="void">void</link> g_io_module_unload (<link linkend="GIOModule">GIOModule</link> *module);</programlisting>
135
Required API for GIO modules to implement.
136
This function is ran when the module is being unloaded from GIO,
123
Required API for GIO modules to implement.
124
This function is ran when the module is being unloaded from GIO,
137
125
to finalize the module.</para>
140
127
</para><variablelist role="params">
141
<varlistentry><term><parameter>module</parameter> :</term>
128
<varlistentry><term><parameter>module</parameter> :</term>
142
129
<listitem><simpara> a <link linkend="GIOModule"><type>GIOModule</type></link>.
143
130
</simpara></listitem></varlistentry>
144
131
</variablelist></refsect2>