Blame docs/reference/gio/html/GIOModule.html

Packit ae235b
Packit ae235b
<html>
Packit ae235b
<head>
Packit ae235b
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
Packit ae235b
<title>GIOModule: GIO Reference Manual</title>
Packit ae235b
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot">
Packit ae235b
<link rel="home" href="index.html" title="GIO Reference Manual">
Packit ae235b
<link rel="up" href="extending.html" title="Extending GIO">
Packit ae235b
<link rel="prev" href="GVfs.html" title="GVfs">
Packit ae235b
<link rel="next" href="gio-Extension-Points.html" title="Extension Points">
Packit ae235b
<meta name="generator" content="GTK-Doc V1.27 (XML mode)">
Packit ae235b
<link rel="stylesheet" href="style.css" type="text/css">
Packit ae235b
</head>
Packit ae235b
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
Packit ae235b
Packit ae235b
Packit ae235b
Top  | 
Packit ae235b
                  Description  | 
Packit ae235b
                  Object Hierarchy  | 
Packit ae235b
                  Implemented Interfaces
Packit ae235b
Packit ae235b
Home
Packit ae235b
Up
Packit ae235b
Prev
Packit ae235b
Next
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

GIOModule

Packit ae235b

GIOModule — Loadable GIO Modules

Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

Functions

Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
GIOModule *
Packit ae235b
Packit ae235b
Packit ae235b
g_io_module_new ()
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
void
Packit ae235b
Packit ae235b
Packit ae235b
g_io_module_scope_block ()
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
void
Packit ae235b
Packit ae235b
Packit ae235b
g_io_module_scope_free ()
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
GIOModuleScope *
Packit ae235b
Packit ae235b
Packit ae235b
g_io_module_scope_new ()
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
GList *
Packit ae235b
Packit ae235b
Packit ae235b
g_io_modules_load_all_in_directory ()
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
GList *
Packit ae235b
Packit ae235b
Packit ae235b
g_io_modules_load_all_in_directory_with_scope ()
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
void
Packit ae235b
Packit ae235b
Packit ae235b
g_io_modules_scan_all_in_directory ()
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
void
Packit ae235b
Packit ae235b
Packit ae235b
g_io_modules_scan_all_in_directory_with_scope ()
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
void
Packit ae235b
Packit ae235b
Packit ae235b
g_io_module_load ()
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
void
Packit ae235b
Packit ae235b
Packit ae235b
g_io_module_unload ()
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
char **
Packit ae235b
Packit ae235b
Packit ae235b
g_io_module_query ()
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

Types and Values

Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
 
Packit ae235b
GIOModule
Packit ae235b
Packit ae235b
Packit ae235b
 
Packit ae235b
GIOModuleScope
Packit ae235b
Packit ae235b
Packit ae235b
enum
Packit ae235b
GIOModuleScopeFlags
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

Object Hierarchy

Packit ae235b
    GObject
Packit ae235b
    ╰── GTypeModule
Packit ae235b
        ╰── GIOModule
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

Implemented Interfaces

Packit ae235b

Packit ae235b
GIOModule implements
Packit ae235b
 GTypePlugin.

Packit ae235b
Packit ae235b
Packit ae235b

Includes

Packit ae235b
#include <gio/gio.h>
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

Description

Packit ae235b

Provides an interface and default functions for loading and unloading

Packit ae235b
modules. This is used internally to make GIO extensible, but can also
Packit ae235b
be used by others to implement module loading.

Packit ae235b
Packit ae235b
Packit ae235b

Functions

Packit ae235b
Packit ae235b

g_io_module_new ()

Packit ae235b
GIOModule *
Packit ae235b
g_io_module_new (const gchar *filename);
Packit ae235b

Creates a new GIOModule that will load the specific

Packit ae235b
shared library when in use.

Packit ae235b
Packit ae235b

Parameters

Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

filename

Packit ae235b

filename of the shared library module.

Packit ae235b
[type filename]
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

Returns

Packit ae235b

a GIOModule from given filename

Packit ae235b
,
Packit ae235b
or NULL on error.

Packit ae235b
Packit ae235b
Packit ae235b

Packit ae235b
Packit ae235b

g_io_module_scope_block ()

Packit ae235b
void
Packit ae235b
g_io_module_scope_block (GIOModuleScope *scope,
Packit ae235b
                         const gchar *basename);
Packit ae235b

Block modules with the given basename

Packit ae235b
 from being loaded when
Packit ae235b
this scope is used with g_io_modules_scan_all_in_directory_with_scope()
Packit ae235b
or g_io_modules_load_all_in_directory_with_scope().

Packit ae235b
Packit ae235b

Parameters

Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

scope

Packit ae235b

a module loading scope

Packit ae235b
 
Packit ae235b
Packit ae235b
Packit ae235b

basename

Packit ae235b

the basename to block

Packit ae235b
 
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

Since: 2.30

Packit ae235b
Packit ae235b

Packit ae235b
Packit ae235b

g_io_module_scope_free ()

Packit ae235b
void
Packit ae235b
g_io_module_scope_free (GIOModuleScope *scope);
Packit ae235b

Free a module scope.

Packit ae235b
Packit ae235b

Parameters

Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

scope

Packit ae235b

a module loading scope

Packit ae235b
 
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

Since: 2.30

Packit ae235b
Packit ae235b

Packit ae235b
Packit ae235b

g_io_module_scope_new ()

Packit ae235b
GIOModuleScope *
Packit ae235b
g_io_module_scope_new (GIOModuleScopeFlags flags);
Packit ae235b

Create a new scope for loading of IO modules. A scope can be used for

Packit ae235b
blocking duplicate modules, or blocking a module you don't want to load.

Packit ae235b

Specify the G_IO_MODULE_SCOPE_BLOCK_DUPLICATES flag to block modules

Packit ae235b
which have the same base name as a module that has already been seen
Packit ae235b
in this scope.

Packit ae235b
Packit ae235b

Parameters

Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

flags

Packit ae235b

flags for the new scope

Packit ae235b
 
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

Returns

Packit ae235b

the new module scope.

Packit ae235b

[transfer full]

Packit ae235b
Packit ae235b

Since: 2.30

Packit ae235b
Packit ae235b

Packit ae235b
Packit ae235b

g_io_modules_load_all_in_directory ()

Packit ae235b
GList *
Packit ae235b
g_io_modules_load_all_in_directory (const gchar *dirname);
Packit ae235b

Loads all the modules in the specified directory.

Packit ae235b

If don't require all modules to be initialized (and thus registering

Packit ae235b
all gtypes) then you can use g_io_modules_scan_all_in_directory()
Packit ae235b
which allows delayed/lazy loading of modules.

Packit ae235b
Packit ae235b

Parameters

Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

dirname

Packit ae235b

pathname for a directory containing modules

Packit ae235b
to load. 

Packit ae235b
[type filename]
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

Returns

Packit ae235b

a list of GIOModules loaded

Packit ae235b
from the directory,
Packit ae235b
All the modules are loaded into memory, if you want to
Packit ae235b
unload them (enabling on-demand loading) you must call
Packit ae235b
g_type_module_unuse() on all the modules. Free the list
Packit ae235b
with g_list_free(). 

Packit ae235b

[element-type GIOModule][transfer full]

Packit ae235b
Packit ae235b
Packit ae235b

Packit ae235b
Packit ae235b

g_io_modules_load_all_in_directory_with_scope ()

Packit ae235b
GList *
Packit ae235b
g_io_modules_load_all_in_directory_with_scope
Packit ae235b
                               (const gchar *dirname,
Packit ae235b
                                GIOModuleScope *scope);
Packit ae235b

Loads all the modules in the specified directory.

Packit ae235b

If don't require all modules to be initialized (and thus registering

Packit ae235b
all gtypes) then you can use g_io_modules_scan_all_in_directory()
Packit ae235b
which allows delayed/lazy loading of modules.

Packit ae235b
Packit ae235b

Parameters

Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

dirname

Packit ae235b

pathname for a directory containing modules

Packit ae235b
to load. 

Packit ae235b
[type filename]
Packit ae235b
Packit ae235b
Packit ae235b

scope

Packit ae235b

a scope to use when scanning the modules.

Packit ae235b
 
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

Returns

Packit ae235b

a list of GIOModules loaded

Packit ae235b
from the directory,
Packit ae235b
All the modules are loaded into memory, if you want to
Packit ae235b
unload them (enabling on-demand loading) you must call
Packit ae235b
g_type_module_unuse() on all the modules. Free the list
Packit ae235b
with g_list_free(). 

Packit ae235b

[element-type GIOModule][transfer full]

Packit ae235b
Packit ae235b

Since: 2.30

Packit ae235b
Packit ae235b

Packit ae235b
Packit ae235b

g_io_modules_scan_all_in_directory ()

Packit ae235b
void
Packit ae235b
g_io_modules_scan_all_in_directory (const char *dirname);
Packit ae235b

Scans all the modules in the specified directory, ensuring that

Packit ae235b
any extension point implemented by a module is registered.

Packit ae235b

This may not actually load and initialize all the types in each

Packit ae235b
module, some modules may be lazily loaded and initialized when
Packit ae235b
an extension point it implementes is used with e.g.
Packit ae235b
g_io_extension_point_get_extensions() or
Packit ae235b
g_io_extension_point_get_extension_by_name().

Packit ae235b

If you need to guarantee that all types are loaded in all the modules,

Packit ae235b
use g_io_modules_load_all_in_directory().

Packit ae235b
Packit ae235b

Parameters

Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

dirname

Packit ae235b

pathname for a directory containing modules

Packit ae235b
to scan. 

Packit ae235b
[type filename]
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

Since: 2.24

Packit ae235b
Packit ae235b

Packit ae235b
Packit ae235b

g_io_modules_scan_all_in_directory_with_scope ()

Packit ae235b
void
Packit ae235b
g_io_modules_scan_all_in_directory_with_scope
Packit ae235b
                               (const gchar *dirname,
Packit ae235b
                                GIOModuleScope *scope);
Packit ae235b

Scans all the modules in the specified directory, ensuring that

Packit ae235b
any extension point implemented by a module is registered.

Packit ae235b

This may not actually load and initialize all the types in each

Packit ae235b
module, some modules may be lazily loaded and initialized when
Packit ae235b
an extension point it implementes is used with e.g.
Packit ae235b
g_io_extension_point_get_extensions() or
Packit ae235b
g_io_extension_point_get_extension_by_name().

Packit ae235b

If you need to guarantee that all types are loaded in all the modules,

Packit ae235b
use g_io_modules_load_all_in_directory().

Packit ae235b
Packit ae235b

Parameters

Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

dirname

Packit ae235b

pathname for a directory containing modules

Packit ae235b
to scan. 

Packit ae235b
[type filename]
Packit ae235b
Packit ae235b
Packit ae235b

scope

Packit ae235b

a scope to use when scanning the modules

Packit ae235b
 
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

Since: 2.30

Packit ae235b
Packit ae235b

Packit ae235b
Packit ae235b

g_io_module_load ()

Packit ae235b
void
Packit ae235b
g_io_module_load (GIOModule *module);
Packit ae235b

Required API for GIO modules to implement.

Packit ae235b

This function is run after the module has been loaded into GIO,

Packit ae235b
to initialize the module. Typically, this function will call
Packit ae235b
g_io_extension_point_implement().

Packit ae235b

Since 2.56, this function should be named g_io_&lt;modulename>_load, where

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

Packit ae235b
Packit ae235b

Parameters

Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

module

Packit ae235b

a GIOModule.

Packit ae235b
 
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

Packit ae235b
Packit ae235b

g_io_module_unload ()

Packit ae235b
void
Packit ae235b
g_io_module_unload (GIOModule *module);
Packit ae235b

Required API for GIO modules to implement.

Packit ae235b

This function is run when the module is being unloaded from GIO,

Packit ae235b
to finalize the module.

Packit ae235b

Since 2.56, this function should be named g_io_&lt;modulename>_unload, where

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

Packit ae235b
Packit ae235b

Parameters

Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

module

Packit ae235b

a GIOModule.

Packit ae235b
 
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

Packit ae235b
Packit ae235b

g_io_module_query ()

Packit ae235b
char **
Packit ae235b
g_io_module_query (void);
Packit ae235b

Optional API for GIO modules to implement.

Packit ae235b

Should return a list of all the extension points that may be

Packit ae235b
implemented in this module.

Packit ae235b

This method will not be called in normal use, however it may be

Packit ae235b
called when probing existing modules and recording which extension
Packit ae235b
points that this model is used for. This means we won't have to
Packit ae235b
load and initialize this module unless its needed.

Packit ae235b

If this function is not implemented by the module the module will

Packit ae235b
always be loaded, initialized and then unloaded on application
Packit ae235b
startup so that it can register its extension points during init.

Packit ae235b

Note that a module need not actually implement all the extension

Packit ae235b
points that g_io_module_query() returns, since the exact list of
Packit ae235b
extension may depend on runtime issues. However all extension
Packit ae235b
points actually implemented must be returned by g_io_module_query()
Packit ae235b
(if defined).

Packit ae235b

When installing a module that implements g_io_module_query() you must

Packit ae235b
run gio-querymodules in order to build the cache files required for
Packit ae235b
lazy loading.

Packit ae235b

Since 2.56, this function should be named g_io_&lt;modulename>_query, where

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

Packit ae235b
Packit ae235b

Returns

Packit ae235b

A NULL-terminated array of strings,

Packit ae235b
listing the supported extension points of the module. The array
Packit ae235b
must be suitable for freeing with g_strfreev(). 

Packit ae235b

[transfer full]

Packit ae235b
Packit ae235b

Since: 2.24

Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

Types and Values

Packit ae235b
Packit ae235b

GIOModule

Packit ae235b
typedef struct _GIOModule GIOModule;
Packit ae235b

Opaque module base class for extending GIO.

Packit ae235b
Packit ae235b

Packit ae235b
Packit ae235b

GIOModuleScope

Packit ae235b
typedef struct _GIOModuleScope GIOModuleScope;
Packit ae235b

Represents a scope for loading IO modules. A scope can be used for blocking

Packit ae235b
duplicate modules, or blocking a module you don't want to load.

Packit ae235b

The scope can be used with g_io_modules_load_all_in_directory_with_scope()

Packit ae235b
or g_io_modules_scan_all_in_directory_with_scope().

Packit ae235b

Since: 2.30

Packit ae235b
Packit ae235b

Packit ae235b
Packit ae235b

enum GIOModuleScopeFlags

Packit ae235b

Flags for use with g_io_module_scope_new().

Packit ae235b
Packit ae235b

Members

Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

G_IO_MODULE_SCOPE_NONE

Packit ae235b
Packit ae235b

No module scan flags

Packit ae235b
Packit ae235b
 
Packit ae235b
Packit ae235b
Packit ae235b

G_IO_MODULE_SCOPE_BLOCK_DUPLICATES

Packit ae235b
Packit ae235b

When using this scope to load or

Packit ae235b
    scan modules, automatically block a modules which has the same base
Packit ae235b
    basename as previously loaded module.

Packit ae235b
Packit ae235b
 
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

Since: 2.30

Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

Generated by GTK-Doc V1.27
Packit ae235b
</body>
Packit ae235b
</html>