| Evolution-Data-Server Manual: Backend Utilities (libebackend) | ||||
|---|---|---|---|---|
| Top | Description | Object Hierarchy | Implemented Interfaces | Properties | ||||
#include <libebackend/e-module.h> struct EModule; EModule * e_module_new (const gchar *filename); const gchar * e_module_get_filename (EModule *module); GList * e_module_load_all_in_directory (const gchar *dirname); void (*ETypeFunc) (GType type,gpointer user_data); void e_type_traverse (GType parent_type,ETypeFunc func,gpointer user_data);
struct EModule;
Contains only private data that should be read and manipulated using the functions below.
Since 3.4
EModule * e_module_new (const gchar *filename);
Creates a new EModule that will load the specific shared library when in use.
|
filename of the shared library module |
Returns : |
a new EModule for filename
|
Since 3.4
const gchar * e_module_get_filename (EModule *module);
Returns the filename of the shared library for module. The
string is owned by module and should not be modified or freed.
|
an EModule |
Returns : |
the filename for module
|
Since 3.4
GList * e_module_load_all_in_directory (const gchar *dirname);
Loads all the modules in the specified directory into memory. If
you want to unload them (enabling on-demand loading) you must call
g_type_module_unuse() on all the modules. Free the returned list
with g_list_free().
|
pathname for a directory containing modules to load |
Returns : |
a list of EModules loaded from dirname
|
Since 3.4
void (*ETypeFunc) (GType type,gpointer user_data);
Specifies the type of functions passed to e_type_traverse().
|
a GType |
|
user data passed to e_type_traverse()
|
Since 3.4
void e_type_traverse (GType parent_type,ETypeFunc func,gpointer user_data);
Calls func for all instantiable subtypes of parent_type.
This is often useful for extending functionality by way of EModule.
A module may register a subtype of parent_type in its e_module_load()
function. Then later on the application will call e_type_traverse()
to instantiate all registered subtypes of parent_type.
|
the root GType to traverse from |
|
the function to call for each visited GType |
|
user data to pass to the function |
Since 3.4