KVIrc  4.9.2
DeveloperAPIs
KviKvsCoreCallbackCommands.h
Go to the documentation of this file.
1 #ifndef _KVI_KVS_CORECALLBACKCOMMANDS_H_
2 #define _KVI_KVS_CORECALLBACKCOMMANDS_H_
3 //=============================================================================
4 //
5 // File : KviKvsCoreCallbackCommands.h
6 // Creation date : Fri 31 Oct 2003 04:07:58 by Szymon Stefanek
7 //
8 // This file is part of the KVIrc IRC client distribution
9 // Copyright (C) 2003-2010 Szymon Stefanek <pragma at kvirc dot net>
10 //
11 // This program is FREE software. You can redistribute it and/or
12 // modify it under the terms of the GNU General Public License
13 // as published by the Free Software Foundation; either version 2
14 // of the License, or (at your option) any later version.
15 //
16 // This program is distributed in the HOPE that it will be USEFUL,
17 // but WITHOUT ANY WARRANTY; without even the implied warranty of
18 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
19 // See the GNU General Public License for more details.
20 //
21 // You should have received a copy of the GNU General Public License
22 // along with this program. If not, write to the Free Software Foundation,
23 // Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
24 //
25 //=============================================================================
26 
27 #include "kvi_settings.h"
28 #include "KviKvsRunTimeContext.h"
29 #include "KviKvsVariantList.h"
30 #include "KviKvsSwitchList.h"
31 #include "KviKvsScript.h"
33 
34 #define KVSCCC(_name) bool _name(KviKvsRunTimeContext * __pContext, KviKvsVariantList * __pParams, KviKvsSwitchList * __pSwitches, const KviKvsScript * __pCallback)
35 
36 #define KVSCCC_pContext __pContext
37 #define KVSCCC_pParams __pParams
38 #define KVSCCC_pSwitches __pSwitches
39 #define KVSCCC_pCallback __pCallback
40 
41 #define KVSCCC_PARAMETER(a, b, c, d) KVS_PARAMETER(a, b, c, d)
42 
43 #define KVSCCC_PARAMETERS_BEGIN \
44  KVS_PARAMETERS_BEGIN(parameter_format_list)
45 
46 #define KVSCCC_PARAMETERS_END \
47  KVS_PARAMETERS_END \
48  if(!KviKvsParameterProcessor::process(KVSCCC_pParams, KVSCCC_pContext, parameter_format_list)) \
49  return false;
50 
51 #define KVSCCC_REQUIRE_CONNECTION \
52  if(!KVSCCC_pContext->window()->context()) \
53  return KVSCCC_pContext->errorNoIrcContext(); \
54  if(!KVSCCC_pContext->window()->connection()) \
55  return KVSCCC_pContext->warningNoIrcConnection();
56 
57 #define KVSCCC_pWindow __pContext->window()
58 #define KVSCCC_pConnection __pContext->window()->connection()
59 #define KVSCCC_pIrcContext __pContext->context()
60 
61 namespace KviKvsCoreCallbackCommands
62 {
63  KVSCCC(ahost);
64  KVSCCC(awhois);
65  KVSCCC(alias);
66  KVSCCC(button);
67  KVSCCC(event);
68  KVSCCC(exec);
69  KVSCCC(privateimpl);
70  KVSCCC(timer);
71 
72  void init();
73 };
74 
75 #endif
KVIrc Script manager.
Parser class to handle variant variables lists.
This file contains compile time settings.
KVSCCC(ahost)
Definition: KviKvsCoreCallbackCommands.cpp:133
void init()
Definition: KviKvsCoreCallbackCommands.cpp:1211