Base class for modules.
More...
#include <Module.h>
| trippingcyril::Module::Module |
( |
ModHandle |
so, |
|
|
const String & |
modName, |
|
|
const String & |
path, |
|
|
const libconfig::Config * |
config |
|
) |
| |
| virtual trippingcyril::Module::~Module |
( |
| ) |
|
|
virtual |
Deconstructor, clean up your own resources here. Don't clean up any timers or sockets that you allocated with this module, those will get cleaned up for you. This includes any callbacks (if ShouldDelete::shouldDelete() returns true that is)
| virtual void trippingcyril::Module::CleanUpInterData |
( |
int |
method, |
|
|
void * |
arg |
|
) |
| |
|
inlinevirtual |
Used to clean up the data returned by InternalApiCall
| struct evdns_base* trippingcyril::Module::GetDNSBase |
( |
| ) |
const |
|
inline |
- Returns
- The libevent dns base for this module
| struct event_base* trippingcyril::Module::GetEventBase |
( |
| ) |
const |
|
inline |
- Returns
- The libevent base for this module
| const String trippingcyril::Module::GetModName |
( |
| ) |
const |
|
inline |
- Returns
- The name of the module
| const String trippingcyril::Module::GetPath |
( |
| ) |
const |
|
inline |
- Returns
- The path of the module
| virtual String trippingcyril::Module::GetVersion |
( |
| ) |
const |
|
pure virtual |
Should return the version of the module, required to override
| virtual void* trippingcyril::Module::InternalApiCall |
( |
int |
method, |
|
|
void * |
arg |
|
) |
| |
|
inlinevirtual |
Used to actually load modules from shared libraries.
- Parameters
-
| path | The path of the shared library to actually load |
| modName | The name the module should get, see Module::GetModName |
| retMsg | A human readable string about the status of the loading |
| config | Path to the configuration file of this module |
- Returns
- NULL on error, the loaded module otherwise
| virtual void trippingcyril::Module::OnLoaded |
( |
| ) |
|
|
inlinevirtual |
Will get called once after the module is loaded, initialize any timers or sockets in this method, don't do that in your constructor!
| const libconfig::Config* trippingcyril::Module::config |
|
protected |
| bool trippingcyril::Module::reloadOnCrash |
|
protected |
Reload the module again after unloading it because of a crash, only works if unloadOnCrash is true
| bool trippingcyril::Module::unloadOnCrash |
|
protected |
Attempt to unload the module if it causes a crash, only works if wantsThread is true
| bool trippingcyril::Module::wantsThread |
|
protected |
Set this to true in your constructor if you want to run in your own seperate thread
The documentation for this class was generated from the following file: