blob: cb5a8f91ff8fe1f6417c9420980ef4025dac72f4 [file] [log] [blame]
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Extending GIO</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
<link rel="home" href="index.html" title="GIO Reference Manual">
<link rel="up" href="pt01.html" title="Part I. GIO Overview">
<link rel="prev" href="ch03.html" title="Running GIO applications">
<link rel="next" href="pt02.html" title="Part II. API Reference">
<meta name="generator" content="GTK-Doc V1.14 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2"><tr valign="middle">
<td><a accesskey="p" href="ch03.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
<td><a accesskey="u" href="pt01.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
<th width="100%" align="center">GIO Reference Manual</th>
<td><a accesskey="n" href="pt02.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
</tr></table>
<div class="chapter" title="Extending GIO">
<div class="titlepage"><div><div><h2 class="title">
<a name="extending-gio"></a>Extending GIO</h2></div></div></div>
<p>
A lot of the functionality that is accessible through GIO
is implemented in loadable modules, and modules provide a convenient
way to extend GIO. In addition to the <a class="link" href="GIOModule.html" title="GIOModule"><span class="type">GIOModule</span></a> API which supports
writing such modules, GIO has a mechanism to define extension points,
and register implementations thereof, see <a class="link" href="gio-Extension-Points.html#GIOExtensionPoint" title="GIOExtensionPoint"><span class="type">GIOExtensionPoint</span></a>.
</p>
<p>
The following extension points are currently defined by GIO:
</p>
<p title="G_VFS_EXTENSION_POINT_NAME"><b>G_VFS_EXTENSION_POINT_NAME. </b>
Allows to override the functionality of the <a class="link" href="GVfs.html" title="GVfs"><span class="type">GVfs</span></a> class.
Implementations of this extension point must be derived from <a class="link" href="GVfs.html" title="GVfs"><span class="type">GVfs</span></a>.
GIO uses the implementation with the highest priority that is active,
see <a class="link" href="GVfs.html#g-vfs-is-active" title="g_vfs_is_active ()"><code class="function">g_vfs_is_active()</code></a>.
GIO implements this extension point for local files, gvfs contains
an implementation that supports all the backends in gvfs.
</p>
<p title="G_VOLUME_MONITOR_EXTENSION_POINT_NAME"><b>G_VOLUME_MONITOR_EXTENSION_POINT_NAME. </b>
Allows to add more volume monitors.
Implementations of this extension point must be derived from
<a class="link" href="GVolumeMonitor.html" title="GVolumeMonitor"><span class="type">GVolumeMonitor</span></a>. GIO uses all registered extensions.
gvfs contains an implementation that works together with the <a class="link" href="GVfs.html" title="GVfs"><span class="type">GVfs</span></a>
implementation in gvfs.
</p>
<p title="G_NATIVE_VOLUME_MONITOR_EXTENSION_POINT_NAME"><b>G_NATIVE_VOLUME_MONITOR_EXTENSION_POINT_NAME. </b>
Allows to override the 'native' volume monitor.
Implementations of this extension point must be derived from
<span class="type">GNativeVolumeMonitor</span>. GIO uses the implementation with
the highest priority that is supported, as determined by the
<code class="function">is_supported()</code> vfunc in <span class="type">GVolumeMonitorClass</span>.
GIO implements this extension point for local mounts,
gvfs contains a hal-based implementation.
</p>
<p title="G_LOCAL_FILE_MONITOR_EXTENSION_POINT_NAME"><b>G_LOCAL_FILE_MONITOR_EXTENSION_POINT_NAME. </b>
Allows to override the file monitor implementation for
local files. Implementations of this extension point must
be derived from <span class="type">GLocalFileMonitor</span>. GIO uses the implementation
with the highest priority that is supported, as determined by the
<code class="function">is_supported()</code> vfunc in <span class="type">GLocalFileMonitorClass</span>.
GIO uses this extension point internally, to switch between
its fam-based and inotify-based file monitoring implementations.
</p>
<p title="G_LOCAL_DIRECTORY_MONITOR_EXTENSION_POINT_NAME"><b>G_LOCAL_DIRECTORY_MONITOR_EXTENSION_POINT_NAME. </b>
Allows to override the directory monitor implementation for
local files. Implementations of this extension point must be
derived from <span class="type">GLocalDirectoryMonitor</span>. GIO uses the implementation
with the highest priority that is supported, as determined by the
<code class="function">is_supported()</code> vfunc in <span class="type">GLocalDirectoryMonitorClass</span>.
GIO uses this extension point internally, to switch between
its fam-based and inotify-based directory monitoring implementations.
</p>
<p title="G_DESKTOP_APP_INFO_LOOKUP_EXTENSION_POINT_NAME"><b>G_DESKTOP_APP_INFO_LOOKUP_EXTENSION_POINT_NAME. </b>
Unix-only. Allows to provide a way to associate default handlers
with URI schemes. Implementations of this extension point must
implement the <a class="link" href="gio-Desktop-file-based-GAppInfo.html#GDesktopAppInfoLookup"><span class="type">GDesktopAppInfoLookup</span></a> interface. GIO uses the
implementation with the highest priority.
gvfs contains a GConf-based implementation that uses the
same GConf keys as gnome-vfs.
</p>
</div>
<div class="footer">
<hr>
Generated by GTK-Doc V1.14</div>
</body>
</html>