## Extending GIO

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 GIOModule API which supports writing such modules, GIO has a mechanism to define extension points, and register implementations thereof, see GIOExtensionPoint.

The following extension points are currently defined by GIO:

G_VFS_EXTENSION_POINT_NAME. Allows to override the functionality of the GVfs class. Implementations of this extension point must be derived from GVfs. GIO uses the implementation with the highest priority that is active, see `g_vfs_is_active()`. GIO implements this extension point for local files, gvfs contains an implementation that supports all the backends in gvfs.

G_VOLUME_MONITOR_EXTENSION_POINT_NAME. Allows to add more volume monitors. Implementations of this extension point must be derived from GVolumeMonitor. GIO uses all registered extensions. gvfs contains an implementation that works together with the GVfs implementation in gvfs.

G_NATIVE_VOLUME_MONITOR_EXTENSION_POINT_NAME. Allows to override the 'native' volume monitor. Implementations of this extension point must be derived from GNativeVolumeMonitor. GIO uses the implementation with the highest priority that is supported, as determined by the `is_supported()` vfunc in GVolumeMonitorClass. GIO implements this extension point for local mounts, gvfs contains a hal-based implementation.

G_LOCAL_FILE_MONITOR_EXTENSION_POINT_NAME. Allows to override the file monitor implementation for local files. Implementations of this extension point must be derived from GLocalFileMonitor. GIO uses the implementation with the highest priority that is supported, as determined by the `is_supported()` vfunc in GLocalFileMonitorClass. GIO uses this extension point internally, to switch between its fam-based and inotify-based file monitoring implementations.

G_LOCAL_DIRECTORY_MONITOR_EXTENSION_POINT_NAME. Allows to override the directory monitor implementation for local files. Implementations of this extension point must be derived from GLocalDirectoryMonitor. GIO uses the implementation with the highest priority that is supported, as determined by the `is_supported()` vfunc in GLocalDirectoryMonitorClass. GIO uses this extension point internally, to switch between its fam-based and inotify-based directory monitoring implementations.

G_DESKTOP_APP_INFO_LOOKUP_EXTENSION_POINT_NAME. Unix-only. Allows to provide a way to associate default handlers with URI schemes. Implementations of this extension point must implement the GDesktopAppInfoLookup interface. GIO uses the implementation with the highest priority. gvfs contains a GConf-based implementation that uses the same GConf keys as gnome-vfs.