File: capisuite_8h-source.html

package info (click to toggle)
capisuite 0.4.5-6
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 4,596 kB
  • ctags: 1,051
  • sloc: cpp: 3,979; sh: 3,465; python: 446; makefile: 263
file content (204 lines) | stat: -rw-r--r-- 15,405 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>CapiSuite: capisuite.h Source File</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.3.8 -->
<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="hierarchy.html">Class&nbsp;Hierarchy</a> | <a class="qindex" href="classes.html">Alphabetical&nbsp;List</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a></div>
<h1>capisuite.h</h1><a href="capisuite_8h.html">Go to the documentation of this file.</a><pre class="fragment"><div>00001 
00008 <span class="comment">/***************************************************************************</span>
00009 <span class="comment"> *                                                                         *</span>
00010 <span class="comment"> *   This program is free software; you can redistribute it and/or modify  *</span>
00011 <span class="comment"> *   it under the terms of the GNU General Public License as published by  *</span>
00012 <span class="comment"> *   the Free Software Foundation; either version 2 of the License, or     *</span>
00013 <span class="comment"> *   (at your option) any later version.                                   *</span>
00014 <span class="comment"> *                                                                         *</span>
00015 <span class="comment"> ***************************************************************************/</span>
00016 
00017 <span class="preprocessor">#ifndef CAPISUITE_H</span>
00018 <span class="preprocessor"></span><span class="preprocessor">#define CAPISUITE_H</span>
00019 <span class="preprocessor"></span>
00020 <span class="preprocessor">#include &lt;Python.h&gt;</span>
00021 <span class="preprocessor">#include &lt;map&gt;</span>
00022 <span class="preprocessor">#include &lt;queue&gt;</span>
00023 <span class="preprocessor">#include &lt;fstream&gt;</span>
00024 <span class="preprocessor">#include "../backend/applicationinterface.h"</span>
00025 <span class="preprocessor">#include "<a class="code" href="applicationexception_8h.html">applicationexception.h</a>"</span>
00026 <span class="preprocessor">#include "<a class="code" href="capisuitemodule_8h.html">capisuitemodule.h</a>"</span>
00027 <span class="keyword">class </span><a class="code" href="classCapi.html">Capi</a>;
00028 <span class="keyword">class </span><a class="code" href="classIdleScript.html">IdleScript</a>;
00029 <span class="keyword">class </span>PycStringIO_CAPI;
00030 
<a name="l00046"></a><a class="code" href="classCapiSuite.html">00046</a> <span class="keyword">class </span><a class="code" href="classCapiSuite.html">CapiSuite</a>: <span class="keyword">public</span> <a class="code" href="classApplicationInterface.html">ApplicationInterface</a>
00047 {
00048         <span class="keyword">public</span>:
00060                 <a class="code" href="classCapiSuite.html#a0">CapiSuite</a>(<span class="keywordtype">int</span> argc, <span class="keywordtype">char</span>** argv);
00061 
00066                 <a class="code" href="classCapiSuite.html#a1">~CapiSuite</a>();
00067 
00070                 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classCapiSuite.html#a2">callWaiting</a> (<a class="code" href="classConnection.html">Connection</a> *conn);
00071 
00079                 <span class="keywordtype">void</span> <a class="code" href="classCapiSuite.html#a3">mainLoop</a>();
00080 
00083                 <span class="keywordtype">void</span> <a class="code" href="classCapiSuite.html#a4">finish</a>();
00084 
00093                 <span class="keywordtype">void</span> <a class="code" href="classCapiSuite.html#a5">parseConfigFile</a>(ifstream &amp;configfile);
00094 
00101                 <span class="keywordtype">void</span> <a class="code" href="classCapiSuite.html#a6">readConfiguration</a>();
00102 
00105                 <span class="keywordtype">void</span> <a class="code" href="classCapiSuite.html#a7">readCommandline</a>(<span class="keywordtype">int</span> argc, <span class="keywordtype">char</span>**argv);
00106 
00109                 <span class="keywordtype">void</span> <a class="code" href="classCapiSuite.html#a8">help</a>();
00110 
00115                 <span class="keywordtype">void</span> <a class="code" href="classCapiSuite.html#a9">reload</a>();
00116 
00124                 <span class="keywordtype">void</span> <a class="code" href="classCapiSuite.html#a10">logMessage</a>(string message, <span class="keywordtype">int</span> level);
00125 
00132                 <span class="keywordtype">void</span> <a class="code" href="classCapiSuite.html#a11">errorMessage</a>(string message);
00133 
00134         <span class="keyword">private</span>:
00139                 string <a class="code" href="classCapiSuite.html#d0">prefix</a>();
00140 
00146                 <span class="keywordtype">void</span> <a class="code" href="classCapiSuite.html#d1">checkOption</a>(string key, string value);
00147 
<a name="l00148"></a><a class="code" href="classCapiSuite.html#r0">00148</a>                 queue &lt;Connection*&gt; <a class="code" href="classCapiSuite.html#r0">waiting</a>; 
<a name="l00149"></a><a class="code" href="classCapiSuite.html#r1">00149</a>                 <a class="code" href="classIdleScript.html">IdleScript</a> *<a class="code" href="classCapiSuite.html#r1">idle</a>; 
00150 
<a name="l00151"></a><a class="code" href="classCapiSuite.html#r2">00151</a>                 PyThreadState *<a class="code" href="classCapiSuite.html#r2">py_state</a>; 
<a name="l00152"></a><a class="code" href="classCapiSuite.html#r3">00152</a>                 PycStringIO_CAPI* <a class="code" href="classCapiSuite.html#r3">save_cStringIO</a>; 
<a name="l00153"></a><a class="code" href="classCapiSuite.html#r4">00153</a>                 <a class="code" href="classCapi.html">Capi</a>* <a class="code" href="classCapiSuite.html#r4">capi</a>; 
00154                 ostream  *<a class="code" href="classCapiSuite.html#r5">debug</a>, 
<a name="l00155"></a><a class="code" href="classCapiSuite.html#r6">00155</a>                          *<a class="code" href="classCapiSuite.html#r6">error</a>; 
00156 
<a name="l00157"></a><a class="code" href="classCapiSuite.html#r7">00157</a>                 <span class="keywordtype">unsigned</span> <span class="keywordtype">short</span> <a class="code" href="classCapiSuite.html#r7">debug_level</a>; 
00158 
<a name="l00159"></a><a class="code" href="classCapiSuite.html#r8">00159</a>                 <span class="keywordtype">bool</span> <a class="code" href="classCapiSuite.html#r8">finish_flag</a>; 
00160 
<a name="l00161"></a><a class="code" href="classCapiSuite.html#r9">00161</a>                 <span class="keywordtype">bool</span> <a class="code" href="classCapiSuite.html#r9">daemonmode</a>; 
00162 
<a name="l00163"></a><a class="code" href="classCapiSuite.html#r10">00163</a>                 map&lt;string,string&gt; <a class="code" href="classCapiSuite.html#r10">config</a>; 
<a name="l00164"></a><a class="code" href="classCapiSuite.html#r11">00164</a>                 string <a class="code" href="classCapiSuite.html#r11">custom_configfile</a>; 
00165 
00166 };
00167 
00168 <span class="preprocessor">#endif</span>
00169 <span class="preprocessor"></span>
00170 <span class="comment">/* History</span>
00171 <span class="comment"></span>
00172 <span class="comment">$Log: capisuite.h,v $</span>
00173 <span class="comment">Revision 1.3  2003/02/25 13:23:19  gernot</span>
00174 <span class="comment">- comment fix</span>
00175 <span class="comment">- remove old, unused attribute</span>
00176 <span class="comment"></span>
00177 <span class="comment">Revision 1.2  2003/02/21 23:21:44  gernot</span>
00178 <span class="comment">- follow some a little bit stricter rules of gcc-2.95.3</span>
00179 <span class="comment"></span>
00180 <span class="comment">Revision 1.1.1.1  2003/02/19 08:19:53  gernot</span>
00181 <span class="comment">initial checkin of 0.4</span>
00182 <span class="comment"></span>
00183 <span class="comment">Revision 1.8  2003/01/31 11:25:53  ghillie</span>
00184 <span class="comment">- moved capisuiteInstance from header to cpp (mustn't be defined in</span>
00185 <span class="comment">  each file including capisuite.h, use extern there instead!)</span>
00186 <span class="comment"></span>
00187 <span class="comment">Revision 1.7  2003/01/19 12:06:25  ghillie</span>
00188 <span class="comment">- new methods logMessage() and errorMessage()</span>
00189 <span class="comment"></span>
00190 <span class="comment">Revision 1.6  2003/01/18 12:51:48  ghillie</span>
00191 <span class="comment">- added save_cStringIO attribute for Python cStringIO C API</span>
00192 <span class="comment"></span>
00193 <span class="comment">Revision 1.5  2003/01/13 21:24:47  ghillie</span>
00194 <span class="comment">- added new method checkOption</span>
00195 <span class="comment"></span>
00196 <span class="comment">Revision 1.4  2003/01/07 14:52:36  ghillie</span>
00197 <span class="comment">- added support for custom config files</span>
00198 <span class="comment">- added support for parsing commandline options</span>
00199 <span class="comment"></span>
00200 <span class="comment">Revision 1.3  2003/01/06 21:00:48  ghillie</span>
00201 <span class="comment">- added SIGHUP support (new method reload)</span>
00202 <span class="comment"></span>
00203 <span class="comment">Revision 1.2  2003/01/06 16:20:51  ghillie</span>
00204 <span class="comment">- updated comment</span>
00205 <span class="comment"></span>
00206 <span class="comment">Revision 1.1  2003/01/05 12:28:09  ghillie</span>
00207 <span class="comment">- renamed FlowControl to CapiSuite</span>
00208 <span class="comment">- the code from main() was moved to this class</span>
00209 <span class="comment"></span>
00210 <span class="comment">Revision 1.13  2003/01/04 15:58:38  ghillie</span>
00211 <span class="comment">- log improvements: log_level, timestamp</span>
00212 <span class="comment">- added finish() method</span>
00213 <span class="comment">- added static FlowControl pointer</span>
00214 <span class="comment"></span>
00215 <span class="comment">Revision 1.12  2002/12/11 13:02:56  ghillie</span>
00216 <span class="comment">- executeIdleScript() removed, its function is now done by IdleScript</span>
00217 <span class="comment">  object (changes in constructor and mainLoop())</span>
00218 <span class="comment">- removed getCapi()</span>
00219 <span class="comment">- minor docu bugs fixed</span>
00220 <span class="comment"></span>
00221 <span class="comment">Revision 1.11  2002/12/09 15:29:13  ghillie</span>
00222 <span class="comment">- debug stream given in constructor</span>
00223 <span class="comment">- doc update for callWaiting() and mainLoop()</span>
00224 <span class="comment">- obsolete debug() method removed</span>
00225 <span class="comment"></span>
00226 <span class="comment">Revision 1.10  2002/12/06 12:54:30  ghillie</span>
00227 <span class="comment">-removed callCompleted()</span>
00228 <span class="comment"></span>
00229 <span class="comment">Revision 1.9  2002/12/05 14:54:15  ghillie</span>
00230 <span class="comment">- constructor gets Capi* now</span>
00231 <span class="comment">- new method getCapi()</span>
00232 <span class="comment">- python idle script gets called with pointer to FlowControl now</span>
00233 <span class="comment"></span>
00234 <span class="comment">Revision 1.8  2002/12/02 12:30:30  ghillie</span>
00235 <span class="comment">- constructor now takes 3 additional arguments for the scripts to use</span>
00236 <span class="comment">- added support for an idle script which is started in regular intervals</span>
00237 <span class="comment"></span>
00238 <span class="comment">Revision 1.7  2002/11/29 10:20:44  ghillie</span>
00239 <span class="comment">- updated docs, use doxygen format now</span>
00240 <span class="comment"></span>
00241 <span class="comment">Revision 1.6  2002/11/27 15:58:13  ghillie</span>
00242 <span class="comment">updated comments for doxygen</span>
00243 <span class="comment"></span>
00244 <span class="comment">Revision 1.5  2002/11/19 15:57:18  ghillie</span>
00245 <span class="comment">- Added missing throw() declarations</span>
00246 <span class="comment">- phew. Added error handling. All exceptions are caught now.</span>
00247 <span class="comment"></span>
00248 <span class="comment">Revision 1.4  2002/11/18 14:21:07  ghillie</span>
00249 <span class="comment">- moved global severity_t to ApplicationError::severity_t</span>
00250 <span class="comment">- added throw() declarations to header files</span>
00251 <span class="comment"></span>
00252 <span class="comment">Revision 1.3  2002/11/13 08:34:54  ghillie</span>
00253 <span class="comment">moved history to the bottom</span>
00254 <span class="comment"></span>
00255 <span class="comment">Revision 1.2  2002/10/27 12:47:20  ghillie</span>
00256 <span class="comment">- added multithread support for python</span>
00257 <span class="comment">- changed callcontrol reference to stay in the python namespace</span>
00258 <span class="comment">- changed ApplicationError to support differen severity</span>
00259 <span class="comment"></span>
00260 <span class="comment">Revision 1.1  2002/10/25 13:29:38  ghillie</span>
00261 <span class="comment">grouped files into subdirectories</span>
00262 <span class="comment"></span>
00263 <span class="comment">Revision 1.6  2002/10/24 09:55:52  ghillie</span>
00264 <span class="comment">many fixes. Works for one call now</span>
00265 <span class="comment"></span>
00266 <span class="comment">Revision 1.5  2002/10/23 15:40:15  ghillie</span>
00267 <span class="comment">added python integration...</span>
00268 <span class="comment"></span>
00269 <span class="comment">Revision 1.4  2002/10/09 14:36:22  gernot</span>
00270 <span class="comment">added CallModule base class for all call handling modules</span>
00271 <span class="comment"></span>
00272 <span class="comment">Revision 1.3  2002/10/04 15:48:03  gernot</span>
00273 <span class="comment">structure changes completed &amp; compiles now!</span>
00274 <span class="comment"></span>
00275 <span class="comment">Revision 1.2  2002/10/04 13:27:15  gernot</span>
00276 <span class="comment">some restructuring to get it to a working state ;-)</span>
00277 <span class="comment"></span>
00278 <span class="comment">does not do anything useful yet nor does it even compile...</span>
00279 <span class="comment"></span>
00280 <span class="comment">Revision 1.1  2002/10/02 14:10:07  gernot</span>
00281 <span class="comment">first version</span>
00282 <span class="comment"></span>
00283 <span class="comment">*/</span>
</div></pre><hr size="1"><address style="align: right;"><small>Generated on Sun Nov 28 14:37:44 2004 for CapiSuite by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>
</body>
</html>