<?xml version="1.0"?>
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN" 
               "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd" [
<!ENTITY version SYSTEM "version.xml">
]>
<refentry id="GIOModule">
<refmeta>
<refentrytitle role="top_of_page" id="GIOModule.top_of_page">GIOModule</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>GIO Library</refmiscinfo>
</refmeta>

<refnamediv>
<refname>GIOModule</refname>
<refpurpose>Loadable GIO Modules</refpurpose>
</refnamediv>

<refsynopsisdiv id="GIOModule.synopsis" role="synopsis">
<title role="synopsis.title">Synopsis</title>

<synopsis>

#include &lt;gio/gio.h&gt;

                    <link linkend="GIOModule-struct">GIOModule</link>;
<link linkend="GIOModule">GIOModule</link> *         <link linkend="g-io-module-new">g_io_module_new</link>                     (const <link linkend="gchar">gchar</link> *filename);
<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);
<link linkend="void">void</link>                <link linkend="g-io-module-load">g_io_module_load</link>                    (<link linkend="GIOModule">GIOModule</link> *module);
<link linkend="void">void</link>                <link linkend="g-io-module-unload">g_io_module_unload</link>                  (<link linkend="GIOModule">GIOModule</link> *module);
</synopsis>
</refsynopsisdiv>

<refsect1 id="GIOModule.object-hierarchy" role="object_hierarchy">
<title role="object_hierarchy.title">Object Hierarchy</title>
<synopsis>
  <link linkend="GObject">GObject</link>
   +----<link linkend="GTypeModule">GTypeModule</link>
         +----GIOModule
</synopsis>
</refsect1>



<refsect1 id="GIOModule.implemented-interfaces" role="impl_interfaces">
<title role="impl_interfaces.title">Implemented Interfaces</title>
<para>
GIOModule implements
 <link linkend="GTypePlugin">GTypePlugin</link>.</para>
</refsect1>





<refsect1 id="GIOModule.description" role="desc">
<title role="desc.title">Description</title>
<para>
Provides an interface and default functions for loading and unloading 
modules. This is used internally to make GIO extensible, but can also
be used by others to implement module loading.</para>
<para>
</para>
</refsect1>

<refsect1 id="GIOModule.details" role="details">
<title role="details.title">Details</title>
<refsect2 id="GIOModule-struct" role="struct">
<title>GIOModule</title>
<indexterm zone="GIOModule-struct"><primary sortas="IOModule">GIOModule</primary></indexterm><programlisting>typedef struct _GIOModule GIOModule;</programlisting>
<para>
Opaque module base class for extending GIO.</para>
<para>
</para></refsect2>
<refsect2 id="g-io-module-new" role="function">
<title>g_io_module_new ()</title>
<indexterm zone="g-io-module-new"><primary sortas="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>
<para>
Creates a new GIOModule that will load the specific
shared library when in use.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>filename</parameter>&#160;:</term>
<listitem><simpara> filename of the shared library module.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> a <link linkend="GIOModule"><type>GIOModule</type></link> from given <parameter>filename</parameter>, 
or <link linkend="NULL--CAPS"><literal>NULL</literal></link> on error.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="g-io-modules-load-all-in-directory" role="function">
<title>g_io_modules_load_all_in_directory ()</title>
<indexterm zone="g-io-modules-load-all-in-directory"><primary sortas="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>
<para>
Loads all the modules in the specified directory.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>dirname</parameter>&#160;:</term>
<listitem><simpara> pathname for a directory containing modules to load.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> a list of <link linkend="GIOModules"><type>GIOModules</type></link> loaded from the directory,
     All the modules are loaded into memory, if you want to
     unload them (enabling on-demand loading) you must call
     <link linkend="g-type-module-unuse"><function>g_type_module_unuse()</function></link> on all the modules. Free the list
     with <link linkend="g-list-free"><function>g_list_free()</function></link>.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="g-io-module-load" role="function">
<title>g_io_module_load ()</title>
<indexterm zone="g-io-module-load"><primary sortas="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>
<para>
Required API for GIO modules to implement.
This function is ran after the module has been loaded into GIO,
to initialize the module.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>module</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GIOModule"><type>GIOModule</type></link>.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="g-io-module-unload" role="function">
<title>g_io_module_unload ()</title>
<indexterm zone="g-io-module-unload"><primary sortas="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>
<para>
Required API for GIO modules to implement.
This function is ran when the module is being unloaded from GIO,
to finalize the module.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>module</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GIOModule"><type>GIOModule</type></link>.
</simpara></listitem></varlistentry>
</variablelist></refsect2>

</refsect1>




</refentry>
