File: classCapiSuite.html

package info (click to toggle)
capisuite 0.4.5-8
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 4,612 kB
  • ctags: 1,051
  • sloc: cpp: 3,981; sh: 3,465; python: 446; makefile: 265
file content (903 lines) | stat: -rw-r--r-- 35,261 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
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
<!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 Class Reference</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 Class Reference</h1>Main application class, implements <a class="el" href="classApplicationInterface.html">ApplicationInterface</a>.  
<a href="#_details">More...</a>
<p>
<code>#include &lt;<a class="el" href="capisuite_8h-source.html">capisuite.h</a>&gt;</code>
<p>
<p>Inheritance diagram for CapiSuite:
<p><center><img src="classCapiSuite.png" usemap="#CapiSuite_map" border="0" alt=""></center>
<map name="CapiSuite_map">
<area href="classApplicationInterface.html" alt="ApplicationInterface" shape="rect" coords="0,0,125,24">
</map>
<a href="classCapiSuite-members.html">List of all members.</a><table border=0 cellpadding=0 cellspacing=0>
<tr><td></td></tr>
<tr><td colspan=2><br><h2>Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classCapiSuite.html#a0">CapiSuite</a> (int argc, char **argv)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Constructor. General initializations.  <a href="#a0"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classCapiSuite.html#a1">~CapiSuite</a> ()</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Destructor. Kill Python interpreter.  <a href="#a1"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>virtual void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classCapiSuite.html#a2">callWaiting</a> (<a class="el" href="classConnection.html">Connection</a> *conn)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Callback: enqueue <a class="el" href="classConnection.html">Connection</a> in waiting.  <a href="#a2"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classCapiSuite.html#a3">mainLoop</a> ()</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Main Loop. Event Loop (handling incoming connections).  <a href="#a3"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classCapiSuite.html#a4">finish</a> ()</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Request finish of mainLoop.  <a href="#a4"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classCapiSuite.html#a5">parseConfigFile</a> (ifstream &amp;configfile)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Parse a given configuration file.  <a href="#a5"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classCapiSuite.html#a6">readConfiguration</a> ()</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Read configuration and set default values for options not found.  <a href="#a6"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classCapiSuite.html#a7">readCommandline</a> (int argc, char **argv)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Read commandline options.  <a href="#a7"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classCapiSuite.html#a8">help</a> ()</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Print help message.  <a href="#a8"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classCapiSuite.html#a9">reload</a> ()</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">restart some aspects if the process gets a SIGHUP  <a href="#a9"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classCapiSuite.html#a10">logMessage</a> (string message, int level)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">print a message to the log  <a href="#a10"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classCapiSuite.html#a11">errorMessage</a> (string message)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">print a message to the error log  <a href="#a11"></a><br></td></tr>
<tr><td colspan=2><br><h2>Private Member Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>string&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classCapiSuite.html#d0">prefix</a> ()</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">return a prefix containing this pointer and date for log messages  <a href="#d0"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classCapiSuite.html#d1">checkOption</a> (string key, string value)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Test a configuration variable and set default if undefined.  <a href="#d1"></a><br></td></tr>
<tr><td colspan=2><br><h2>Private Attributes</h2></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>queue&lt; <a class="el" href="classConnection.html">Connection</a> * &gt;&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classCapiSuite.html#r0">waiting</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">queue for waiting connection instances  <a href="#r0"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="classIdleScript.html">IdleScript</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classCapiSuite.html#r1">idle</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">reference to the <a class="el" href="classIdleScript.html">IdleScript</a> object created  <a href="#r1"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>PyThreadState *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classCapiSuite.html#r2">py_state</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">saves the created thread state of the main python interpreter  <a href="#r2"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>PycStringIO_CAPI *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classCapiSuite.html#r3">save_cStringIO</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">holds a pointer to the Python cStringIO C API  <a href="#r3"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="classCapi.html">Capi</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classCapiSuite.html#r4">capi</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">reference to <a class="el" href="classCapi.html">Capi</a> object to use, set in constructor  <a href="#r4"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>ostream *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classCapiSuite.html#r5">debug</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">debug stream  <a href="#r5"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>ostream *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classCapiSuite.html#r6">error</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">stream for error messages  <a href="#r6"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>unsigned short&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classCapiSuite.html#r7">debug_level</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">verbosity level for debug stream  <a href="#r7"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>bool&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classCapiSuite.html#r8">finish_flag</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">flag to finish <a class="el" href="classCapiSuite.html#a3">mainLoop()</a>  <a href="#r8"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>bool&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classCapiSuite.html#r9">daemonmode</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">flag set when we're running as daemon  <a href="#r9"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>map&lt; string, string &gt;&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classCapiSuite.html#r10">config</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">holds the configuration read from the configfile  <a href="#r10"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>string&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classCapiSuite.html#r11">custom_configfile</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">holds the name of the custom config file if given  <a href="#r11"></a><br></td></tr>
</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
Main application class, implements <a class="el" href="classApplicationInterface.html">ApplicationInterface</a>. 
<p>
This class realizes the main application and thus implements the <a class="el" href="classApplicationInterface.html">ApplicationInterface</a>. It firstly generates the necessary objects from the CAPI abstraction layer (one object of class <a class="el" href="classCapi.html">Capi</a>) and enables call listening.<p>
It contains the <a class="el" href="classCapiSuite.html#a3">mainLoop()</a> and creates handling objects of <a class="el" href="classIncomingScript.html">IncomingScript</a> for all incoming calls and one object of <a class="el" href="classIdleScript.html">IdleScript</a> which will start the idle script at regular intervals. The scripts are informed about disconnection / program termination but will delete themselves.<p>
<a class="el" href="main_8cpp.html#a0">main()</a> should create one CapiSuite object and then call <a class="el" href="classCapiSuite.html#a3">mainLoop()</a>.<p>
<dl compact><dt><b>Author:</b></dt><dd>Gernot Hillier </dd></dl>

<p>
<hr><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" name="a0" doxytag="CapiSuite::CapiSuite" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> CapiSuite::CapiSuite           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">int&nbsp;</td>
          <td class="mdname" nowrap> <em>argc</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap>char **&nbsp;</td>
          <td class="mdname" nowrap> <em>argv</em></td>
        </tr>
        <tr>
          <td></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Constructor. General initializations. 
<p>
Creates a <a class="el" href="classCapi.html">Capi</a> object, enables listening, calls readConfiguration, and initializes the Python interpreter in multithreading mode. It immediately releases the global Python lock after doing initialization.<p>
Also an <a class="el" href="classIdleScript.html">IdleScript</a> object is created and will regularly call the given script.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td></td><td valign=top><em>argc</em>&nbsp;</td><td>commandline argument count as given to <a class="el" href="main_8cpp.html#a0">main()</a> </td></tr>
    <tr><td></td><td valign=top><em>argv</em>&nbsp;</td><td>commandline arguments as given to <a class="el" href="main_8cpp.html#a0">main()</a></td></tr>
  </table>
</dl>
    </td>
  </tr>
</table>
<a class="anchor" name="a1" doxytag="CapiSuite::~CapiSuite" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> CapiSuite::~<a class="el" href="classCapiSuite.html">CapiSuite</a>           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Destructor. Kill Python interpreter. 
<p>
Request finishing of IdleThread and Python interpreter.    </td>
  </tr>
</table>
<hr><h2>Member Function Documentation</h2>
<a class="anchor" name="a2" doxytag="CapiSuite::callWaiting" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> void CapiSuite::callWaiting           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="classConnection.html">Connection</a> *&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>conn</em>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap><code> [virtual]</code></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Callback: enqueue <a class="el" href="classConnection.html">Connection</a> in waiting. 
<p>

<p>
Implements <a class="el" href="classApplicationInterface.html#a0">ApplicationInterface</a>.
<p>
    </td>
  </tr>
</table>
<a class="anchor" name="d1" doxytag="CapiSuite::checkOption" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> void CapiSuite::checkOption           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">string&nbsp;</td>
          <td class="mdname" nowrap> <em>key</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap>string&nbsp;</td>
          <td class="mdname" nowrap> <em>value</em></td>
        </tr>
        <tr>
          <td></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"><code> [private]</code></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Test a configuration variable and set default if undefined. 
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td></td><td valign=top><em>key</em>&nbsp;</td><td>name of the config variable </td></tr>
    <tr><td></td><td valign=top><em>value</em>&nbsp;</td><td>default value to set if key is not defined in config map</td></tr>
  </table>
</dl>
    </td>
  </tr>
</table>
<a class="anchor" name="a11" doxytag="CapiSuite::errorMessage" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> void CapiSuite::errorMessage           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">string&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>message</em>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
print a message to the error log 
<p>
Prints message to the error log<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td></td><td valign=top><em>message</em>&nbsp;</td><td>the message</td></tr>
  </table>
</dl>
    </td>
  </tr>
</table>
<a class="anchor" name="a4" doxytag="CapiSuite::finish" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> void CapiSuite::finish           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Request finish of mainLoop. 
<p>
    </td>
  </tr>
</table>
<a class="anchor" name="a8" doxytag="CapiSuite::help" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> void CapiSuite::help           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Print help message. 
<p>
    </td>
  </tr>
</table>
<a class="anchor" name="a10" doxytag="CapiSuite::logMessage" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> void CapiSuite::logMessage           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">string&nbsp;</td>
          <td class="mdname" nowrap> <em>message</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap>int&nbsp;</td>
          <td class="mdname" nowrap> <em>level</em></td>
        </tr>
        <tr>
          <td></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
print a message to the log 
<p>
Prints message to the log if it's level is high enough.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td></td><td valign=top><em>message</em>&nbsp;</td><td>the message </td></tr>
    <tr><td></td><td valign=top><em>level</em>&nbsp;</td><td>level of the message</td></tr>
  </table>
</dl>
    </td>
  </tr>
</table>
<a class="anchor" name="a3" doxytag="CapiSuite::mainLoop" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> void CapiSuite::mainLoop           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Main Loop. Event Loop (handling incoming connections). 
<p>
For each incoming connection, an object of <a class="el" href="classIncomingScript.html">IncomingScript</a> is created which handles this call in an own thread.<p>
This loop will run until the program is finished.    </td>
  </tr>
</table>
<a class="anchor" name="a5" doxytag="CapiSuite::parseConfigFile" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> void CapiSuite::parseConfigFile           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">ifstream &amp;&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>configfile</em>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Parse a given configuration file. 
<p>
This function reads the given configuration file. It must consist of key=value pairs separated on different lines.<p>
Lines beginning with "#" are treated as comments. Leading and trailing whitespaces and quotation marks (") surrounding the values will be ignored.    </td>
  </tr>
</table>
<a class="anchor" name="d0" doxytag="CapiSuite::prefix" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> string CapiSuite::prefix           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap><code> [private]</code></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
return a prefix containing this pointer and date for log messages 
<p>
<dl compact><dt><b>Returns:</b></dt><dd>constructed prefix as stringstream</dd></dl>
    </td>
  </tr>
</table>
<a class="anchor" name="a7" doxytag="CapiSuite::readCommandline" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> void CapiSuite::readCommandline           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">int&nbsp;</td>
          <td class="mdname" nowrap> <em>argc</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap>char **&nbsp;</td>
          <td class="mdname" nowrap> <em>argv</em></td>
        </tr>
        <tr>
          <td></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Read commandline options. 
<p>
    </td>
  </tr>
</table>
<a class="anchor" name="a6" doxytag="CapiSuite::readConfiguration" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> void CapiSuite::readConfiguration           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Read configuration and set default values for options not found. 
<p>
The configuration is read from PREFIX/etc/capisuite.conf (should exist), ~/.capisuite.conf (optional) and perhaps a given custom config file (optional), while the latter has higher priority. After that all configuration options are checked and set to default values if not found.    </td>
  </tr>
</table>
<a class="anchor" name="a9" doxytag="CapiSuite::reload" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> void CapiSuite::reload           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
restart some aspects if the process gets a SIGHUP 
<p>
Currently, this only reactivates the idle script if it was deactivated by too much errors in a row.    </td>
  </tr>
</table>
<hr><h2>Member Data Documentation</h2>
<a class="anchor" name="r4" doxytag="CapiSuite::capi" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> <a class="el" href="classCapi.html">Capi</a>* <a class="el" href="classCapiSuite.html#r4">CapiSuite::capi</a><code> [private]</code>          </td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
reference to <a class="el" href="classCapi.html">Capi</a> object to use, set in constructor 
<p>
    </td>
  </tr>
</table>
<a class="anchor" name="r10" doxytag="CapiSuite::config" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> map&lt;string,string&gt; <a class="el" href="classCapiSuite.html#r10">CapiSuite::config</a><code> [private]</code>          </td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
holds the configuration read from the configfile 
<p>
    </td>
  </tr>
</table>
<a class="anchor" name="r11" doxytag="CapiSuite::custom_configfile" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> string <a class="el" href="classCapiSuite.html#r11">CapiSuite::custom_configfile</a><code> [private]</code>          </td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
holds the name of the custom config file if given 
<p>
    </td>
  </tr>
</table>
<a class="anchor" name="r9" doxytag="CapiSuite::daemonmode" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> bool <a class="el" href="classCapiSuite.html#r9">CapiSuite::daemonmode</a><code> [private]</code>          </td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
flag set when we're running as daemon 
<p>
    </td>
  </tr>
</table>
<a class="anchor" name="r5" doxytag="CapiSuite::debug" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> ostream* <a class="el" href="classCapiSuite.html#r5">CapiSuite::debug</a><code> [private]</code>          </td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
debug stream 
<p>
    </td>
  </tr>
</table>
<a class="anchor" name="r7" doxytag="CapiSuite::debug_level" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> unsigned short <a class="el" href="classCapiSuite.html#r7">CapiSuite::debug_level</a><code> [private]</code>          </td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
verbosity level for debug stream 
<p>
    </td>
  </tr>
</table>
<a class="anchor" name="r6" doxytag="CapiSuite::error" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> ostream * <a class="el" href="classCapiSuite.html#r6">CapiSuite::error</a><code> [private]</code>          </td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
stream for error messages 
<p>
    </td>
  </tr>
</table>
<a class="anchor" name="r8" doxytag="CapiSuite::finish_flag" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> bool <a class="el" href="classCapiSuite.html#r8">CapiSuite::finish_flag</a><code> [private]</code>          </td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
flag to finish <a class="el" href="classCapiSuite.html#a3">mainLoop()</a> 
<p>
    </td>
  </tr>
</table>
<a class="anchor" name="r1" doxytag="CapiSuite::idle" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> <a class="el" href="classIdleScript.html">IdleScript</a>* <a class="el" href="classCapiSuite.html#r1">CapiSuite::idle</a><code> [private]</code>          </td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
reference to the <a class="el" href="classIdleScript.html">IdleScript</a> object created 
<p>
    </td>
  </tr>
</table>
<a class="anchor" name="r2" doxytag="CapiSuite::py_state" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> PyThreadState* <a class="el" href="classCapiSuite.html#r2">CapiSuite::py_state</a><code> [private]</code>          </td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
saves the created thread state of the main python interpreter 
<p>
    </td>
  </tr>
</table>
<a class="anchor" name="r3" doxytag="CapiSuite::save_cStringIO" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> PycStringIO_CAPI* <a class="el" href="classCapiSuite.html#r3">CapiSuite::save_cStringIO</a><code> [private]</code>          </td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
holds a pointer to the Python cStringIO C API 
<p>
    </td>
  </tr>
</table>
<a class="anchor" name="r0" doxytag="CapiSuite::waiting" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> queue&lt;<a class="el" href="classConnection.html">Connection</a>*&gt; <a class="el" href="classCapiSuite.html#r0">CapiSuite::waiting</a><code> [private]</code>          </td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
queue for waiting connection instances 
<p>
    </td>
  </tr>
</table>
<hr>The documentation for this class was generated from the following files:<ul>
<li><a class="el" href="capisuite_8h-source.html">capisuite.h</a><li>capisuite.cpp</ul>
<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>