manpagez: man pages & more
html files: gio
Home | html | info | man

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. This extension point has been discontinued in GLib 2.28. It is still available to keep API and ABI stability, but GIO is no longer using it for default handlers. Instead, the mime handler mechanism is used, together with x-scheme-handler pseudo-mimetypes.

G_SETTINGS_BACKEND_EXTENSION_POINT_NAME.  Allows to provide an alternative storage for GSettings. Implementations of this extension point must derive from the GSettingsBackend type. GIO contains a keyfile-based implementation of this extension point, another one is provided by dconf.

G_PROXY_EXTENSION_POINT_NAME.  Allows to provide implementations for network proxying. Implementations of this extension point must provide the GProxy interface, and must be named after the network protocol they are proxying. glib-networking contains an implementation of this extension point based on libproxy.

G_TLS_BACKEND_EXTENSION_POINT_NAME.  Allows to provide implementations for TLS support. Implementations of this extension point must implement the GTlsBackend interface. glib-networking contains an implementation of this extension point.

G_NETWORK_MONITOR_EXTENSION_POINT_NAME.  Allows to provide implementations for network connectivity monitoring. Implementations of this extension point must implement the GNetworkMonitorInterface interface. GIO contains an implementation of this extension point that is using the netlink interface of the Linux kernel.

© manpagez.com 2000-2024
Individual documents may contain additional copyright information.