Module manager headers.
More...
#include <stdint.h>
#include <ltdl.h>
#include "module.h"
Go to the source code of this file.
Module manager headers.
- Date
- 25/11/2017
- Author
- François Cerbelle (Fanfan), franc.nosp@m.ois@.nosp@m.cerbe.nosp@m.lle..nosp@m.net
- Copyright
- Copyright (c) 2017, François Cerbelle
Manage module loading with parametrized initialization, module unloading, fetching modules ABI...
Definition in file modmgr.h.
◆ MODMGR_GETFUNCTION
◆ MODMGR_LOAD
#define MODMGR_LOAD |
( |
|
module, |
|
|
|
api, |
|
|
|
filename |
|
) |
| |
Value:
void * modmgr_getsymbol(const modmgr_module_t module, const char *szSymbol)
Resolve a module symbol, can be a function or a variable.
modmgr_module_t modmgr_load(const char *modfile)
Load a module and call the initialization with a parameter if first usage.
Definition at line 33 of file modmgr.h.
◆ modmgr_module_t
Pointer type on private structure.
Definition at line 42 of file modmgr.h.
◆ modmgr_addpath()
int modmgr_addpath |
( |
const char * |
path | ) |
|
Add a path to the end of the module search path.
Add a path to the end of the module search path.
Definition at line 141 of file modmgr.c.
◆ modmgr_getpath()
const char * modmgr_getpath |
( |
| ) |
|
Get the current search path list.
Get the current search path list.
Definition at line 181 of file modmgr.c.
◆ modmgr_getsymbol()
void * modmgr_getsymbol |
( |
const modmgr_module_t |
module, |
|
|
const char * |
szSymbol |
|
) |
| |
Resolve a module symbol, can be a function or a variable.
Resolve a module symbol, can be a function or a variable.
Definition at line 419 of file modmgr.c.
◆ modmgr_insertpath()
int modmgr_insertpath |
( |
const char * |
before, |
|
|
const char * |
path |
|
) |
| |
Insert an higher priority search path before another one.
Insert an higher priority search path before another one.
Definition at line 161 of file modmgr.c.
◆ modmgr_list()
Print the currently loaded modules list for debug and tracing.
Print the currently loaded modules list for debug and tracing.
Definition at line 379 of file modmgr.c.
◆ modmgr_load()
Load a module and call the initialization with a parameter if first usage.
Load a module and call the initialization with a parameter if first usage.
- Todo:
- critical section
Definition at line 191 of file modmgr.c.
◆ modmgr_setpath()
int modmgr_setpath |
( |
const char * |
path | ) |
|
Initialize or reset module search path.
Initialize or reset module search path.
Definition at line 125 of file modmgr.c.
◆ modmgr_unload()
Call the unload function if last usage and tries to unload the module.
Call the unload function if last usage and tries to unload the module.
Definition at line 306 of file modmgr.c.