<!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 Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="classes.html">Alphabetical List</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="functions.html">Class Members</a> | <a class="qindex" href="globals.html">File 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 <Python.h></span> 00021 <span class="preprocessor">#include <map></span> 00022 <span class="preprocessor">#include <queue></span> 00023 <span class="preprocessor">#include <fstream></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 &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 <Connection*> <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<string,string> <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 & 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>