Gio.IOModule

g GObject.GInterface GObject.GInterface GObject.TypePlugin GObject.TypePlugin GObject.GInterface->GObject.TypePlugin GObject.Object GObject.Object GObject.TypeModule GObject.TypeModule GObject.Object->GObject.TypeModule Gio.IOModule Gio.IOModule GObject.TypeModule->Gio.IOModule GObject.TypePlugin->GObject.TypeModule

Subclasses:

None

Methods

Inherited:

GObject.TypeModule (7), GObject.Object (37), GObject.TypePlugin (4)

Structs:

GObject.ObjectClass (5)

class

new (filename)

class

query ()

Virtual Methods

Inherited:

GObject.TypeModule (2), GObject.Object (7)

Properties

None

Signals

Inherited:

GObject.Object (1)

Fields

Inherited:

GObject.Object (1)

Class Details

class Gio.IOModule(**kwargs)
Bases:

GObject.TypeModule

Abstract:

No

Structure:

Gio.IOModuleClass

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.

classmethod new(filename)[source]
Parameters:

filename (str) – filename of the shared library module.

Returns:

a Gio.IOModule from given filename, or None on error.

Return type:

Gio.IOModule

Creates a new Gio.IOModule that will load the specific shared library when in use.

classmethod query()
Returns:

A None-terminated array of strings, listing the supported extension points of the module. The array must be suitable for freeing with GLib.strfreev().

Return type:

[str]

Optional API for GIO modules to implement.

Should return a list of all the extension points that may be implemented in this module.

This method will not be called in normal use, however it may be called when probing existing modules and recording which extension points that this model is used for. This means we won’t have to load and initialize this module unless its needed.

If this function is not implemented by the module the module will always be loaded, initialized and then unloaded on application startup so that it can register its extension points during init.

Note that a module need not actually implement all the extension points that Gio.IOModule.query() returns, since the exact list of extension may depend on runtime issues. However all extension points actually implemented must be returned by Gio.IOModule.query() (if defined).

When installing a module that implements Gio.IOModule.query() you must run gio-querymodules in order to build the cache files required for lazy loading.

Since 2.56, this function should be named g_io_<modulename>_query, where modulename is the plugin’s filename with the lib or libgio prefix and everything after the first dot removed, and with - replaced with _ throughout. For example, libgiognutls-helper.so becomes gnutls_helper. Using the new symbol names avoids name clashes when building modules statically. The old symbol names continue to be supported, but cannot be used for static builds.

New in version 2.24.