KVIrc  4.9.2
DeveloperAPIs
Macros | Functions
libkvicontext.cpp File Reference
#include "KviModule.h"
#include "KviLocale.h"
#include "KviQString.h"
#include "KviWindow.h"
#include "KviMainWindow.h"
#include "KviConsoleWindow.h"
#include "KviApplication.h"
#include "KviIrcServer.h"
#include "KviIrcNetwork.h"
#include "KviIrcContext.h"
#include "KviIrcConnection.h"
#include "KviIrcConnectionServerInfo.h"
#include "KviIrcConnectionUserInfo.h"
#include "KviIrcConnectionTarget.h"
#include "KviIrcConnectionStatistics.h"
#include "KviIrcLink.h"
#include "KviIrcSocket.h"

Macros

#define GET_CONNECTION_FROM_STANDARD_PARAMS
 
#define GET_CONSOLE_FROM_STANDARD_PARAMS
 
#define STANDARD_IRC_CONNECTION_TARGET_PARAMETER(_fncName, _setCall)
 
#define STANDARD_SERVERINFO_TARGET_PARAMETER(_fncName, _setCall)
 

Functions

static bool context_kvs_cmd_clearQueue (KviKvsModuleCommandCall *c)
 
static bool context_kvs_fnc_getSSLCertInfo (KviKvsModuleFunctionCall *c)
 
static bool context_kvs_fnc_list (KviKvsModuleFunctionCall *c)
 
static bool context_kvs_fnc_queueSize (KviKvsModuleFunctionCall *c)
 
static bool context_module_cleanup (KviModule *)
 
static bool context_module_init (KviModule *m)
 
c returnValue () -> setString(pConnection->target() ->network() ->name())) STANDARD_IRC_CONNECTION_TARGET_PARAMETER(context_kvs_fnc_serverHostName, c->returnValue() ->setString(pConnection->currentServerName())) STANDARD_IRC_CONNECTION_TARGET_PARAMETER(context_kvs_fnc_serverdbServerHostName, c->returnValue() ->setString(pConnection->target() ->server() ->hostName())) STANDARD_IRC_CONNECTION_TARGET_PARAMETER(context_kvs_fnc_serverIpAddress, c->returnValue() ->setString(pConnection->target() ->server() ->ip())) STANDARD_IRC_CONNECTION_TARGET_PARAMETER(context_kvs_fnc_serverIsIPV6, c->returnValue() ->setBoolean(pConnection->target() ->server() ->isIPv6())) STANDARD_IRC_CONNECTION_TARGET_PARAMETER(context_kvs_fnc_serverIsSSL, c->returnValue() ->setBoolean(pConnection->target() ->server() ->useSSL())) STANDARD_SERVERINFO_TARGET_PARAMETER(context_kvs_fnc_serverSoftware, c->returnValue() ->setString(pConnection->serverInfo() ->software())) STANDARD_IRC_CONNECTION_TARGET_PARAMETER(context_kvs_fnc_serverPassword, c->returnValue() ->setString(pConnection->target() ->server() ->password())) STANDARD_IRC_CONNECTION_TARGET_PARAMETER(context_kvs_fnc_serverPort, c->returnValue() ->setInteger(pConnection->target() ->server() ->port())) static bool context_kvs_fnc_state(KviKvsModuleFunctionCall *c)
 
 STANDARD_IRC_CONNECTION_TARGET_PARAMETER (context_kvs_fnc_networkName, c->returnValue() ->setString(pConnection->currentNetworkName())) STANDARD_IRC_CONNECTION_TARGET_PARAMETER(context_kvs_fnc_serverdbNetworkName
 
 STANDARD_IRC_CONNECTION_TARGET_PARAMETER (context_kvs_fnc_connectionStartTime, c->returnValue() ->setInteger((kvs_int_t)(pConnection->statistics() ->connectionStartTime()));) STANDARD_IRC_CONNECTION_TARGET_PARAMETER(context_kvs_fnc_lastMessageTime
 

Macro Definition Documentation

#define GET_CONNECTION_FROM_STANDARD_PARAMS
Value:
GET_CONSOLE_FROM_STANDARD_PARAMS \
KviIrcConnection * pConnection = NULL; \
if(pConsole) \
pConnection = pConsole->context()->connection();
char * NULL
Definition: KviIrcNumericCodes.h:391
if(m_pFile) delete m_pFile

Referenced by context_kvs_fnc_queueSize().

#define GET_CONSOLE_FROM_STANDARD_PARAMS
Value:
kvs_uint_t iContextId; \
KVSM_PARAMETER("irc_context_id", KVS_PT_UINT, KVS_PF_OPTIONAL, iContextId) \
KviConsoleWindow * pConsole = NULL; \
if(c->parameterCount() > 0) \
pConsole = g_pApp->findConsole(iContextId); \
else \
pConsole = c->window()->console();
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
char * NULL
Definition: KviIrcNumericCodes.h:391
#define KVSM_PARAMETERS_BEGIN(pCall)
Definition: KviKvsModuleInterface.h:236
if(m_pFile) delete m_pFile
KVIRC_API KviApplication * g_pApp
Definition: KviApplication.cpp:151
#define KVSM_PARAMETERS_END(pCall)
Definition: KviKvsModuleInterface.h:239
kvi_u64_t kvs_uint_t
Definition: KviKvsTypes.h:34
#define KVS_PF_OPTIONAL
Definition: KviKvsParameterProcessor.h:142
#define KVSM_PARAMETER(a, b, c, d)
Definition: KviKvsModuleInterface.h:233
KviConsoleWindow * findConsole(unsigned int ircContextId)
Definition: KviApplication.cpp:1768
Definition: KviKvsParameterProcessor.h:58

Referenced by returnValue().

#define STANDARD_IRC_CONNECTION_TARGET_PARAMETER (   _fncName,
  _setCall 
)
Value:
static bool _fncName(KviKvsModuleFunctionCall * c) \
{ \
if(pConnection) \
{ \
if(pConnection->target()) \
{ \
_setCall; \
return true; \
} \
} \
c->returnValue()->setNothing(); \
return true; \
}
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
if(m_pFile) delete m_pFile
Definition: KviKvsModuleInterface.h:110
#define STANDARD_SERVERINFO_TARGET_PARAMETER (   _fncName,
  _setCall 
)
Value:
static bool _fncName(KviKvsModuleFunctionCall * c) \
{ \
if(pConnection) \
{ \
if(pConnection->serverInfo()) \
{ \
_setCall; \
return true; \
} \
} \
c->returnValue()->setNothing(); \
return true; \
}
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
if(m_pFile) delete m_pFile
Definition: KviKvsModuleInterface.h:110

Function Documentation

static bool context_kvs_cmd_clearQueue ( KviKvsModuleCommandCall c)
static
static bool context_kvs_fnc_getSSLCertInfo ( KviKvsModuleFunctionCall c)
static
static bool context_kvs_fnc_list ( KviKvsModuleFunctionCall c)
static
static bool context_kvs_fnc_queueSize ( KviKvsModuleFunctionCall c)
static
static bool context_module_cleanup ( KviModule )
static
static bool context_module_init ( KviModule m)
static
c returnValue ( ) -> setString(pConnection->target() ->network() ->name())) STANDARD_IRC_CONNECTION_TARGET_PARAMETER(context_kvs_fnc_serverHostName, c->returnValue() ->setString(pConnection->currentServerName())) STANDARD_IRC_CONNECTION_TARGET_PARAMETER(context_kvs_fnc_serverdbServerHostName, c->returnValue() ->setString(pConnection->target() ->server() ->hostName())) STANDARD_IRC_CONNECTION_TARGET_PARAMETER(context_kvs_fnc_serverIpAddress, c->returnValue() ->setString(pConnection->target() ->server() ->ip())) STANDARD_IRC_CONNECTION_TARGET_PARAMETER(context_kvs_fnc_serverIsIPV6, c->returnValue() ->setBoolean(pConnection->target() ->server() ->isIPv6())) STANDARD_IRC_CONNECTION_TARGET_PARAMETER(context_kvs_fnc_serverIsSSL, c->returnValue() ->setBoolean(pConnection->target() ->server() ->useSSL())) STANDARD_SERVERINFO_TARGET_PARAMETER(context_kvs_fnc_serverSoftware, c->returnValue() ->setString(pConnection->serverInfo() ->software())) STANDARD_IRC_CONNECTION_TARGET_PARAMETER(context_kvs_fnc_serverPassword, c->returnValue() ->setString(pConnection->target() ->server() ->password())) STANDARD_IRC_CONNECTION_TARGET_PARAMETER(context_kvs_fnc_serverPort, c->returnValue() ->setInteger(pConnection->target() ->server() ->port())) static bool context_kvs_fnc_state(KviKvsModuleFunctionCall *c)
STANDARD_IRC_CONNECTION_TARGET_PARAMETER ( context_kvs_fnc_networkName  ,
c->  returnValue) ->setString(pConnection->currentNetworkName() 
)
STANDARD_IRC_CONNECTION_TARGET_PARAMETER ( context_kvs_fnc_connectionStartTime  ,
c->returnValue() ->setInteger((kvs_int_t)(pConnection->statistics() ->connectionStartTime()));   
)