ZNC
trunk
|
#include <znc/zncconfig.h>
#include <znc/WebModules.h>
#include <znc/Utils.h>
#include <znc/Threads.h>
#include <znc/Message.h>
#include <znc/main.h>
#include <znc/Translation.h>
#include <functional>
#include <memory>
#include <set>
#include <queue>
#include <sys/time.h>
Go to the source code of this file.
Classes | |
struct | CModuleEntry |
C-style entry point to the module. More... | |
class | CCapability |
class | CTimer |
class | CFPTimer |
class | CModuleJob |
A CJob version which can be safely used in modules. More... | |
class | CModInfo |
class | CModCommand |
A helper class for handling commands in modules. More... | |
class | CModule |
The base class for your own ZNC modules. More... | |
class | CModules |
Macros | |
#define | ZNC_EXPORT_LIB_EXPORT |
#define | MODCOMMONDEFS(CLASS, DESCRIPTION, TYPE) |
#define | MODCONSTRUCTOR(CLASS) |
Instead of writing a constructor, you should call this macro. More... | |
#define | USERMODULEDEFS(CLASS, DESCRIPTION) MODCOMMONDEFS(CLASS, DESCRIPTION, CModInfo::UserModule) |
This works exactly like MODULEDEFS, but for user modules. More... | |
#define | GLOBALMODULEDEFS(CLASS, DESCRIPTION) MODCOMMONDEFS(CLASS, DESCRIPTION, CModInfo::GlobalModule) |
This works exactly like MODULEDEFS, but for global modules. More... | |
#define | NETWORKMODULEDEFS(CLASS, DESCRIPTION) MODCOMMONDEFS(CLASS, DESCRIPTION, CModInfo::NetworkModule) |
This works exactly like MODULEDEFS, but for network modules. More... | |
#define | MODULEDEFS(CLASS, DESCRIPTION) NETWORKMODULEDEFS(CLASS, DESCRIPTION) |
At the end of your source file, you must call this macro in global context. More... | |
Typedefs | |
typedef void(* | FPTimer_t) (CModule *, CFPTimer *) |
typedef void * | ModHandle |
Functions | |
template<class M > | |
void | TModInfo (CModInfo &Info) |
template<class M > | |
CModule * | TModLoad (ModHandle p, CUser *pUser, CIRCNetwork *pNetwork, const CString &sModName, const CString &sModPath, CModInfo::EModuleType eType) |
#define GLOBALMODULEDEFS | ( | CLASS, | |
DESCRIPTION | |||
) | MODCOMMONDEFS(CLASS, DESCRIPTION, CModInfo::GlobalModule) |
This works exactly like MODULEDEFS, but for global modules.
#define MODCOMMONDEFS | ( | CLASS, | |
DESCRIPTION, | |||
TYPE | |||
) |
#define MODCONSTRUCTOR | ( | CLASS | ) |
Instead of writing a constructor, you should call this macro.
It accepts all the necessary arguments and passes them on to CModule's constructor. You should assume that there are no arguments to the constructor.
Usage:
CLASS | The name of your module's class. |
#define MODULEDEFS | ( | CLASS, | |
DESCRIPTION | |||
) | NETWORKMODULEDEFS(CLASS, DESCRIPTION) |
At the end of your source file, you must call this macro in global context.
It defines some static functions which ZNC needs to load this module. By default the module will be a network module.
CLASS | The name of your module's class. |
DESCRIPTION | A short description of your module. |
#define NETWORKMODULEDEFS | ( | CLASS, | |
DESCRIPTION | |||
) | MODCOMMONDEFS(CLASS, DESCRIPTION, CModInfo::NetworkModule) |
This works exactly like MODULEDEFS, but for network modules.
#define USERMODULEDEFS | ( | CLASS, | |
DESCRIPTION | |||
) | MODCOMMONDEFS(CLASS, DESCRIPTION, CModInfo::UserModule) |
This works exactly like MODULEDEFS, but for user modules.
#define ZNC_EXPORT_LIB_EXPORT |
typedef void* ModHandle |
void TModInfo | ( | CModInfo & | Info | ) |
CModule* TModLoad | ( | ModHandle | p, |
CUser * | pUser, | ||
CIRCNetwork * | pNetwork, | ||
const CString & | sModName, | ||
const CString & | sModPath, | ||
CModInfo::EModuleType | eType | ||
) |