1 #ifndef _KVI_KVS_MODULEINTERFACE_H_
2 #define _KVI_KVS_MODULEINTERFACE_H_
85 bool hasSwitch(
unsigned short u,
const QString & szSwitch) {
return (m_pSwitchList->find(u, szSwitch) != 0); };
101 :
KviKvsModuleCommandCall(pModule, pContext, pParams, pSwitches), m_pCallback(pCallback), m_pParameterDataList(pDataList){};
107 virtual bool getParameterCode(
unsigned int uParamIdx, QString & szParamBuffer);
136 friend class KviKvsModuleManager;
156 m_pModuleSimpleCommandExecRoutineDict->remove(szCommand);
160 m_pModuleCallbackCommandExecRoutineDict->remove(szCommand);
164 m_pModuleFunctionExecRoutineDict->remove(szFunction);
166 void kvsUnregisterAppEventHandler(
unsigned int iEventIdx);
167 void kvsUnregisterRawEventHandler(
unsigned int iRawIdx);
171 m_pModuleSimpleCommandExecRoutineDict->clear();
175 m_pModuleCallbackCommandExecRoutineDict->clear();
179 m_pModuleFunctionExecRoutineDict->clear();
181 void kvsUnregisterAllAppEventHandlers();
182 void kvsUnregisterAllRawEventHandlers();
183 void kvsUnregisterAllEventHandlers();
187 return m_pModuleSimpleCommandExecRoutineDict->find(szCommand);
191 return m_pModuleCallbackCommandExecRoutineDict->find(szCommand);
195 return m_pModuleFunctionExecRoutineDict->find(szFunction);
200 void getAllFunctionsCommandsModule(QStringList * list, QString & szModuleName);
203 void registerDefaultCommands();
206 #define KVSM_REGISTER_SIMPLE_COMMAND(_pModule, _szCmd, _procname) \
207 _pModule->kvsRegisterSimpleCommand(_szCmd, _procname);
209 #define KVSM_UNREGISTER_SIMPLE_COMMAND(_pModule, _szCmd) \
210 _pModule->kvsUnregisterSimpleCommand(_szCmd);
212 #define KVSM_REGISTER_CALLBACK_COMMAND(_pModule, _szCmd, _procname) \
213 _pModule->kvsRegisterCallbackCommand(_szCmd, _procname);
215 #define KVSM_UNREGISTER_CALLBACK_COMMAND(_pModule, _szCmd) \
216 _pModule->kvsUnregisterCallbackCommand(_szCmd);
218 #define KVSM_REGISTER_FUNCTION(_pModule, _szFnc, _procname) \
219 _pModule->kvsRegisterFunction(_szFnc, _procname);
221 #define KVSM_UNREGISTER_FUNCTION(_pModule, _szFnc) \
222 _pModule->kvsUnregisterFunction(_szFnc);
224 #define KVSM_UNREGISTER_ALL_SIMPLE_COMMANDS(_pModule) \
225 _pModule->kvsUnregisterAllSimpleCommands();
227 #define KVSM_UNREGISTER_ALL_CALLBACK_COMMANDS(_pModule) \
228 _pModule->kvsUnregisterAllCallbackCommands();
230 #define KVSM_UNREGISTER_ALL_FUNCTIONS(_pModule) \
231 _pModule->kvsUnregisterAllFunctions();
233 #define KVSM_PARAMETER(a, b, c, d) KVS_PARAMETER(a, b, c, d)
234 #define KVSM_PARAMETER_IGNORED(a) KVS_PARAMETER_IGNORED(a)
236 #define KVSM_PARAMETERS_BEGIN(pCall) \
237 KVS_PARAMETERS_BEGIN(parameter_format_list)
239 #define KVSM_PARAMETERS_END(pCall) \
241 if(!KviKvsParameterProcessor::process(pCall->params(), pCall->context(), parameter_format_list)) \
244 #define KVSM_REQUIRE_CONNECTION(pCall) \
245 if(!pCall->window()->context()) \
246 return c->context()->errorNoIrcContext(); \
247 if(!pCall->window()->connection()) \
248 return c->context()->warningNoIrcConnection();
KviKvsModuleEventCall(KviModule *pModule, KviKvsRunTimeContext *pContext, KviKvsVariantList *pParams)
Definition: KviKvsModuleInterface.h:60
KviKvsVariant * getSwitch(unsigned short u, const QString &szSwitch)
Definition: KviKvsModuleInterface.h:86
~KviKvsModuleRunTimeCall()
Definition: KviKvsModuleInterface.h:51
KviKvsModuleCallbackCommandCall(KviModule *pModule, KviKvsRunTimeContext *pContext, KviKvsVariantList *pParams, KviKvsSwitchList *pSwitches, const KviKvsScript *pCallback, KviKvsTreeNodeDataList *pDataList)
Definition: KviKvsModuleInterface.h:95
This class defines a new data type which contains variant data.
Definition: KviKvsVariant.h:351
bool(* KviKvsModuleEventHandlerRoutine)(KviKvsModuleEventCall *c)
Definition: KviKvsModuleInterface.h:132
KviModule * module()
Definition: KviKvsModuleInterface.h:54
#define KVIRC_API
Definition: kvi_settings.h:128
char s char s char s s s s s char char c s *s c s s s d c s *s d c d d d d c
Definition: KviIrcNumericCodes.h:391
KviModule * m_pModule
Definition: KviKvsModuleInterface.h:44
bool(* KviKvsModuleSimpleCommandExecRoutine)(KviKvsModuleCommandCall *c)
Definition: KviKvsModuleInterface.h:129
Definition: KviKvsModuleInterface.h:41
Class to handle variant variables lists.
Definition: KviKvsVariantList.h:41
The KVIrc Script class.
Definition: KviKvsScript.h:59
KviKvsModuleFunctionCall(KviModule *pModule, KviKvsRunTimeContext *pContext, KviKvsVariantList *pParams, KviKvsVariant *pResult)
Definition: KviKvsModuleInterface.h:118
void kvsUnregisterAllSimpleCommands()
Definition: KviKvsModuleInterface.h:169
~KviKvsModuleEventCall()
Definition: KviKvsModuleInterface.h:64
void kvsUnregisterFunction(const QString &szFunction)
Definition: KviKvsModuleInterface.h:162
KviKvsVariant * m_pResult
Definition: KviKvsModuleInterface.h:115
const KviKvsScript * callback()
Definition: KviKvsModuleInterface.h:106
void kvsUnregisterAllFunctions()
Definition: KviKvsModuleInterface.h:177
Definition: KviKvsSwitchList.h:33
~KviKvsModuleCommandCall()
Definition: KviKvsModuleInterface.h:78
void kvsUnregisterSimpleCommand(const QString &szCommand)
Definition: KviKvsModuleInterface.h:154
KviPointerHashTable< QString, KviKvsModuleSimpleCommandExecRoutine > * m_pModuleSimpleCommandExecRoutineDict
Definition: KviKvsModuleInterface.h:143
KviKvsSwitchList * m_pSwitchList
Definition: KviKvsModuleInterface.h:70
void kvsUnregisterAllCallbackCommands()
Definition: KviKvsModuleInterface.h:173
Definition: KviKvsModuleInterface.h:89
Definition: KviKvsModuleInterface.h:67
bool(* KviKvsModuleCallbackCommandExecRoutine)(KviKvsModuleCallbackCommandCall *c)
Definition: KviKvsModuleInterface.h:131
Definition: KviKvsModuleInterface.h:110
KviKvsModuleSimpleCommandExecRoutine * kvsFindSimpleCommand(const QString &szCommand)
Definition: KviKvsModuleInterface.h:185
bool(* KviKvsModuleFunctionExecRoutine)(KviKvsModuleFunctionCall *c)
Definition: KviKvsModuleInterface.h:130
KviKvsModuleFunctionExecRoutine * kvsFindFunction(const QString &szFunction)
Definition: KviKvsModuleInterface.h:193
Definition: KviKvsTreeNodeDataList.h:35
KviPointerHashTable< QString, KviKvsModuleFunctionExecRoutine > * m_pModuleFunctionExecRoutineDict
Definition: KviKvsModuleInterface.h:144
Definition: KviKvsModuleInterface.h:57
~KviKvsModuleCallbackCommandCall()
Definition: KviKvsModuleInterface.h:102
#define r
Definition: detector.cpp:82
C++ Template based double linked pointer list class.
Definition: KviKvsTreeNodeModuleFunctionCall.h:35
Definition: KviKvsRunTimeContext.h:103
Definition: KviModule.h:131
KviPointerHashTable< QString, KviKvsModuleCallbackCommandExecRoutine > * m_pModuleCallbackCommandExecRoutineDict
Definition: KviKvsModuleInterface.h:145
KviKvsModuleRunTimeCall(KviModule *pModule, KviKvsRunTimeContext *pContext, KviKvsVariantList *pParams)
Definition: KviKvsModuleInterface.h:47
#define u
Definition: detector.cpp:85
~KviKvsModuleFunctionCall()
Definition: KviKvsModuleInterface.h:123
KviKvsModuleCallbackCommandExecRoutine * kvsFindCallbackCommand(const QString &szCommand)
Definition: KviKvsModuleInterface.h:189
KviKvsModuleCommandCall(KviModule *pModule, KviKvsRunTimeContext *pContext, KviKvsVariantList *pParams, KviKvsSwitchList *pSwitches)
Definition: KviKvsModuleInterface.h:73
This file contains compile time settings.
Definition: KviKvsModuleInterface.h:134
KviKvsSwitchList * switches()
Definition: KviKvsModuleInterface.h:81
KviKvsTreeNodeDataList * m_pParameterDataList
Definition: KviKvsModuleInterface.h:93
Definition: KviKvsRunTimeCall.h:33
KviKvsSwitchList * switchList()
Definition: KviKvsModuleInterface.h:82
const KviKvsScript * m_pCallback
Definition: KviKvsModuleInterface.h:92
Helper functions for the QString class.
KviKvsVariant * returnValue()
Definition: KviKvsModuleInterface.h:126
virtual bool getParameterCode(unsigned int uParamIdx, QString &szParamBuffer)
Definition: KviKvsRunTimeCall.cpp:44
void kvsUnregisterCallbackCommand(const QString &szCommand)
Definition: KviKvsModuleInterface.h:158
bool hasSwitch(unsigned short u, const QString &szSwitch)
Definition: KviKvsModuleInterface.h:85