KVIrc  4.9.2
DeveloperAPIs
Macros | Functions | Variables
libkviserverdb.cpp File Reference
#include "KviModule.h"
#include "KviApplication.h"
#include "KviLocale.h"
#include "KviIrcServer.h"
#include "KviIrcServerDataBase.h"
#include <QString>

Macros

#define BEGIN_SERVERDB_GET_NETWORK_PROPERTY(__functionName)
 
#define BEGIN_SERVERDB_GET_SERVER_PROPERTY(__functionName)
 
#define END_SERVERDB_GET_NETWORK_PROPERTY
 
#define END_SERVERDB_GET_SERVER_PROPERTY
 
#define SERVERDB_GET_NETWORK_PROPERTY(__functionName, __callName)
 
#define SERVERDB_GET_SERVER_PROPERTY(__functionName, __callName, __variantSetCallName)
 
#define SERVERDB_SET_NETWORK_PROPERTY(__functionName, __callName)
 
#define SERVERDB_SET_SERVER_PROPERTY(__functionName, __callName)
 

Functions

 if (pAutoJoinChannels)
 
c returnValue () -> setArray(pArray)
 
static
END_SERVERDB_GET_SERVER_PROPERTY
bool 
serverdb_kvs_cmd_addNetwork (KviKvsModuleCommandCall *c)
 
static bool serverdb_kvs_cmd_addServer (KviKvsModuleCommandCall *c)
 
static bool serverdb_kvs_fnc_networkExists (KviKvsModuleFunctionCall *c)
 
static bool serverdb_kvs_fnc_serverExists (KviKvsModuleFunctionCall *c)
 
static bool serverdb_module_can_unload (KviModule *)
 
static bool serverdb_module_cleanup (KviModule *)
 
static bool serverdb_module_init (KviModule *m)
 

Variables

KVIRC_API KviIrcServerDataBaseg_pServerDataBase
 
KviKvsArraypArray = new KviKvsArray()
 
QStringList * pAutoJoinChannels = pNetwork->autoJoinChannelList()
 

Macro Definition Documentation

#define BEGIN_SERVERDB_GET_NETWORK_PROPERTY (   __functionName)
Value:
static bool __functionName(KviKvsModuleFunctionCall * c) \
{ \
QString szName; \
KVSM_PARAMETER("name", KVS_PT_STRING, 0, szName) \
if(szName.isEmpty()) \
{ \
c->error(__tr2qs_ctx("You must provide the network name as parameter", "serverdb")); \
return false; \
} \
\
KviIrcNetwork * pNetwork = g_pServerDataBase->findNetwork(szName); \
if(!pNetwork) \
{ \
c->error(__tr2qs_ctx("The specified network doesn't exist", "serverdb")); \
return false; \
}
if(pAutoJoinChannels)
Definition: libkviserverdb.cpp:479
Definition: KviKvsParameterProcessor.h:42
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
#define KVSM_PARAMETERS_BEGIN(pCall)
Definition: KviKvsModuleInterface.h:236
audacious __tr2qs_ctx("An interface for the UNIX Audacious media player.\n""Download it from http://audacious-media-player.org\n","mediaplayer")) static const char *xmms_lib_names[]
KVIRC_API KviIrcServerDataBase * g_pServerDataBase
Definition: KviApplication.cpp:154
#define KVSM_PARAMETERS_END(pCall)
Definition: KviKvsModuleInterface.h:239
Definition: KviKvsModuleInterface.h:110
KviIrcNetwork * findNetwork(const QString &szName)
Searches for a network.
Definition: KviIrcServerDataBase.cpp:82
#define KVSM_PARAMETER(a, b, c, d)
Definition: KviKvsModuleInterface.h:233
#define BEGIN_SERVERDB_GET_SERVER_PROPERTY (   __functionName)
#define END_SERVERDB_GET_NETWORK_PROPERTY
Value:
return true; \
}
#define END_SERVERDB_GET_SERVER_PROPERTY
Value:
return true; \
}
#define SERVERDB_GET_NETWORK_PROPERTY (   __functionName,
  __callName 
)
Value:
\
c->returnValue()->setString(pNetwork->__callName()); \
\
#define BEGIN_SERVERDB_GET_NETWORK_PROPERTY(__functionName)
Definition: libkviserverdb.cpp:218
#define END_SERVERDB_GET_NETWORK_PROPERTY
Definition: libkviserverdb.cpp:240
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
#define SERVERDB_GET_SERVER_PROPERTY (   __functionName,
  __callName,
  __variantSetCallName 
)
Value:
c->returnValue()->__variantSetCallName(pServer->__callName()); \
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
#define END_SERVERDB_GET_SERVER_PROPERTY
Definition: libkviserverdb.cpp:287
#define BEGIN_SERVERDB_GET_SERVER_PROPERTY(__functionName)
Definition: libkviserverdb.cpp:251
#define SERVERDB_SET_NETWORK_PROPERTY (   __functionName,
  __callName 
)
Value:
static bool __functionName(KviKvsModuleCommandCall * c) \
{ \
QString szName, szPropertyValue; \
KVSM_PARAMETER("name", KVS_PT_STRING, 0, szName) \
KVSM_PARAMETER("property", KVS_PT_STRING, KVS_PF_APPENDREMAINING, szPropertyValue) \
if(szName.isEmpty()) \
{ \
c->error(__tr2qs_ctx("You must provide the network name as parameter", "serverdb")); \
return false; \
} \
\
KviIrcNetwork * pNetwork = g_pServerDataBase->findNetwork(szName); \
if(!pNetwork) \
{ \
if(c->switches()->find('q', "quiet")) \
return true; \
c->error(__tr2qs_ctx("The specified network doesn't exist", "serverdb")); \
return false; \
} \
\
pNetwork->__callName(szPropertyValue); \
\
return true; \
}
if(pAutoJoinChannels)
Definition: libkviserverdb.cpp:479
Definition: KviKvsParameterProcessor.h:42
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
#define KVSM_PARAMETERS_BEGIN(pCall)
Definition: KviKvsModuleInterface.h:236
#define KVS_PF_APPENDREMAINING
Definition: KviKvsParameterProcessor.h:144
audacious __tr2qs_ctx("An interface for the UNIX Audacious media player.\n""Download it from http://audacious-media-player.org\n","mediaplayer")) static const char *xmms_lib_names[]
KVIRC_API KviIrcServerDataBase * g_pServerDataBase
Definition: KviApplication.cpp:154
#define KVSM_PARAMETERS_END(pCall)
Definition: KviKvsModuleInterface.h:239
Definition: KviKvsModuleInterface.h:67
KviIrcNetwork * findNetwork(const QString &szName)
Searches for a network.
Definition: KviIrcServerDataBase.cpp:82
#define KVSM_PARAMETER(a, b, c, d)
Definition: KviKvsModuleInterface.h:233
#define SERVERDB_SET_SERVER_PROPERTY (   __functionName,
  __callName 
)

Function Documentation

References pArray, and KviKvsArray::set().

c returnValue ( ) -> setArray(pArray)
static END_SERVERDB_GET_SERVER_PROPERTY bool serverdb_kvs_cmd_addNetwork ( KviKvsModuleCommandCall c)
static
static bool serverdb_kvs_cmd_addServer ( KviKvsModuleCommandCall c)
static
static bool serverdb_kvs_fnc_networkExists ( KviKvsModuleFunctionCall c)
static
static bool serverdb_kvs_fnc_serverExists ( KviKvsModuleFunctionCall c)
static
static bool serverdb_module_can_unload ( KviModule )
static
static bool serverdb_module_cleanup ( KviModule )
static
static bool serverdb_module_init ( KviModule m)
static

Variable Documentation

KVIRC_API KviIrcServerDataBase* g_pServerDataBase
QStringList * pAutoJoinChannels = pNetwork->autoJoinChannelList()