File: classCallModule.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 (716 lines) | stat: -rw-r--r-- 30,522 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
<!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: CallModule 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>CallModule Class Reference</h1>Base class for all call handling modules.  
<a href="#_details">More...</a>
<p>
<code>#include &lt;<a class="el" href="callmodule_8h-source.html">callmodule.h</a>&gt;</code>
<p>
<p>Inheritance diagram for CallModule:
<p><center><img src="classCallModule.png" usemap="#CallModule_map" border="0" alt=""></center>
<map name="CallModule_map">
<area href="classCallInterface.html" alt="CallInterface" shape="rect" coords="0,0,117,24">
<area href="classAudioReceive.html" alt="AudioReceive" shape="rect" coords="127,112,244,136">
<area href="classAudioSend.html" alt="AudioSend" shape="rect" coords="127,168,244,192">
<area href="classCallOutgoing.html" alt="CallOutgoing" shape="rect" coords="127,224,244,248">
<area href="classConnectModule.html" alt="ConnectModule" shape="rect" coords="127,280,244,304">
<area href="classDisconnectModule.html" alt="DisconnectModule" shape="rect" coords="127,336,244,360">
<area href="classFaxReceive.html" alt="FaxReceive" shape="rect" coords="127,392,244,416">
<area href="classFaxSend.html" alt="FaxSend" shape="rect" coords="127,448,244,472">
<area href="classReadDTMF.html" alt="ReadDTMF" shape="rect" coords="127,504,244,528">
<area href="classSwitch2FaxG3.html" alt="Switch2FaxG3" shape="rect" coords="127,560,244,584">
</map>
<a href="classCallModule-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="classCallModule.html#a0">CallModule</a> (<a class="el" href="classConnection.html">Connection</a> *connection, int <a class="el" href="classCallModule.html#p5">timeout</a>=-1, bool <a class="el" href="classCallModule.html#p0">DTMF_exit</a>=false)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Constructor. Register this module at the according <a class="el" href="classConnection.html">Connection</a> object.  <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="classCallModule.html#a1">~CallModule</a> ()</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Destructor. Deregister this module at the according <a class="el" href="classConnection.html">Connection</a> object.  <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="classCallModule.html#a2">mainLoop</a> ()  throw (CapiWrongState,CapiMsgError,CapiExternalError,CapiError)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Waits in busy loop until the module is completed.  <a href="#a2"></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="classCallModule.html#a3">transmissionComplete</a> (void)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">empty here.  <a href="#a3"></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="classCallModule.html#a4">alerting</a> (void)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">empty here.  <a href="#a4"></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="classCallModule.html#a5">callConnected</a> (void)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">empty here.  <a href="#a5"></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="classCallModule.html#a6">callDisconnectedLogical</a> (void)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">abort current modul if logical connection is lost.  <a href="#a6"></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="classCallModule.html#a7">callDisconnectedPhysical</a> (void)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">abort current module if physical connection is lost.  <a href="#a7"></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="classCallModule.html#a8">gotDTMF</a> (void)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">finish current module if DTMF is received.  <a href="#a8"></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="classCallModule.html#a9">dataIn</a> (unsigned char *data, unsigned length)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">empty here.  <a href="#a9"></a><br></td></tr>
<tr><td colspan=2><br><h2>Protected Member Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>virtual long&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classCallModule.html#b0">getTime</a> ()</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">get the current time in # of seconds sinc 1/1/1970  <a href="#b0"></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="classCallModule.html#b1">resetTimer</a> (int new_timeout)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">restart the timer with new timeout value  <a href="#b1"></a><br></td></tr>
<tr><td colspan=2><br><h2>Protected Attributes</h2></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>bool&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classCallModule.html#p0">DTMF_exit</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">if set to true, we will finish when we receive a DTMF signal  <a href="#p0"></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="classCallModule.html#p1">finish</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">set this if the module should exit nicely for any reason  <a href="#p1"></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="classCallModule.html#p2">abort</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">set this for hard exit because connection is lost, causes <a class="el" href="classCapiWrongState.html">CapiWrongState</a> to be throwed in mainLoop  <a href="#p2"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="classConnection.html">Connection</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classCallModule.html#p3">conn</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">reference to the according <a class="el" href="classConnection.html">Connection</a> object  <a href="#p3"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>long&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classCallModule.html#p4">exit_time</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">time when the timeout should occur  <a href="#p4"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>int&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classCallModule.html#p5">timeout</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">timeout period in seconds  <a href="#p5"></a><br></td></tr>
</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
Base class for all call handling modules. 
<p>
This class implements the <a class="el" href="classCallInterface.html">CallInterface</a>. It is the base class for all special call handling modules like FaxReceive/FaxSend, AudioReceive/AudioSend, etc. It contains basic code for registering with the according <a class="el" href="classConnection.html">Connection</a> object, realizing exits because of timeouts, received DTMF and call clearing from the other party.<p>
The general usage is: create a CallModule object, then run <a class="el" href="classCallModule.html#a2">mainLoop()</a>. <a class="el" href="classCallModule.html#a2">mainLoop()</a> will exit if necessary.<p>
To be able to recognize call clearing of the other party, the <a class="el" href="classCapiWrongState.html">CapiWrongState</a> exception is used. It is triggered by <a class="el" href="classCallModule.html#a2">mainLoop()</a>.<p>
Sub classes will mainly overwrite <a class="el" href="classCallModule.html#a2">mainLoop()</a> and the other signals they need for their tasks.<p>
If you don't change the semantics in the sub classes, the module will terminate when at least one of the following events occurs:<ul>
<li>logical connection is ended</li><li>physical connection is ended</li><li>DTMF code is received (depending on the value of DTMF_exit given in the constructor)</li></ul>
<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="CallModule::CallModule" ></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"> CallModule::CallModule           </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="mdname" nowrap> <em>connection</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>timeout</em> = <code>-1</code>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap>bool&nbsp;</td>
          <td class="mdname" nowrap> <em>DTMF_exit</em> = <code>false</code></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. Register this module at the according <a class="el" href="classConnection.html">Connection</a> object. 
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td></td><td valign=top><em>connection</em>&nbsp;</td><td>reference to <a class="el" href="classConnection.html">Connection</a> object </td></tr>
    <tr><td></td><td valign=top><em>timeout</em>&nbsp;</td><td>timeout for this module in seconds (only considered in mainLoop!), -1=infinite (default) </td></tr>
    <tr><td></td><td valign=top><em>DTMF_exit</em>&nbsp;</td><td>if this is set to true, then the current module is exited if we receive a DTMF tone</td></tr>
  </table>
</dl>
    </td>
  </tr>
</table>
<a class="anchor" name="a1" doxytag="CallModule::~CallModule" ></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"> CallModule::~<a class="el" href="classCallModule.html">CallModule</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. Deregister this module at the according <a class="el" href="classConnection.html">Connection</a> object. 
<p>
    </td>
  </tr>
</table>
<hr><h2>Member Function Documentation</h2>
<a class="anchor" name="a4" doxytag="CallModule::alerting" ></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 CallModule::alerting           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">void&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>          </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>
empty here. 
<p>
empty function to overwrite if necessary
<p>
Implements <a class="el" href="classCallInterface.html#a0">CallInterface</a>.
<p>

<p>
Reimplemented in <a class="el" href="classCallOutgoing.html#a3">CallOutgoing</a>.
<p>
    </td>
  </tr>
</table>
<a class="anchor" name="a5" doxytag="CallModule::callConnected" ></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 CallModule::callConnected           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">void&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>          </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>
empty here. 
<p>
empty function to overwrite if necessary
<p>
Implements <a class="el" href="classCallInterface.html#a1">CallInterface</a>.
<p>

<p>
Reimplemented in <a class="el" href="classCallOutgoing.html#a2">CallOutgoing</a>, <a class="el" href="classConnectModule.html#a2">ConnectModule</a>, and <a class="el" href="classSwitch2FaxG3.html#a3">Switch2FaxG3</a>.
<p>
    </td>
  </tr>
</table>
<a class="anchor" name="a6" doxytag="CallModule::callDisconnectedLogical" ></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 CallModule::callDisconnectedLogical           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">void&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>          </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>
abort current modul if logical connection is lost. 
<p>
will abort currently running module. May be overwritten with complete new behaviour if needed.
<p>
Implements <a class="el" href="classCallInterface.html#a2">CallInterface</a>.
<p>

<p>
Reimplemented in <a class="el" href="classDisconnectModule.html#a2">DisconnectModule</a>, and <a class="el" href="classSwitch2FaxG3.html#a2">Switch2FaxG3</a>.
<p>
    </td>
  </tr>
</table>
<a class="anchor" name="a7" doxytag="CallModule::callDisconnectedPhysical" ></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 CallModule::callDisconnectedPhysical           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">void&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>          </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>
abort current module if physical connection is lost. 
<p>
will abort currently running module. Only overwrite if you know what you do!
<p>
Implements <a class="el" href="classCallInterface.html#a3">CallInterface</a>.
<p>

<p>
Reimplemented in <a class="el" href="classDisconnectModule.html#a3">DisconnectModule</a>.
<p>
    </td>
  </tr>
</table>
<a class="anchor" name="a9" doxytag="CallModule::dataIn" ></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 CallModule::dataIn           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">unsigned char *&nbsp;</td>
          <td class="mdname" nowrap> <em>data</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap>unsigned&nbsp;</td>
          <td class="mdname" nowrap> <em>length</em></td>
        </tr>
        <tr>
          <td></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"><code> [virtual]</code></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
empty here. 
<p>
empty function to overwrite if necessary
<p>
Implements <a class="el" href="classCallInterface.html#a6">CallInterface</a>.
<p>

<p>
Reimplemented in <a class="el" href="classAudioReceive.html#a2">AudioReceive</a>.
<p>
    </td>
  </tr>
</table>
<a class="anchor" name="b0" doxytag="CallModule::getTime" ></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"> long CallModule::getTime           </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> [protected, virtual]</code></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
get the current time in # of seconds sinc 1/1/1970 
<p>
    </td>
  </tr>
</table>
<a class="anchor" name="a8" doxytag="CallModule::gotDTMF" ></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 CallModule::gotDTMF           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">void&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>          </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>
finish current module if DTMF is received. 
<p>
finish current module if DTMF_exit was enabled
<p>
Implements <a class="el" href="classCallInterface.html#a5">CallInterface</a>.
<p>

<p>
Reimplemented in <a class="el" href="classReadDTMF.html#a2">ReadDTMF</a>.
<p>
    </td>
  </tr>
</table>
<a class="anchor" name="a2" doxytag="CallModule::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 CallModule::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>  throw (<a class="el" href="classCapiWrongState.html">CapiWrongState</a>,<a class="el" href="classCapiMsgError.html">CapiMsgError</a>,<a class="el" href="classCapiExternalError.html">CapiExternalError</a>,<a class="el" href="classCapiError.html">CapiError</a>)<code> [virtual]</code></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Waits in busy loop until the module is completed. 
<p>
Waits in a busy loop (sleeping 100 msecs between each iteration) until a DTMF signal is reached (if enabled) or the timeout is reached (if enabled).<p>
This method will likely be overwritten in each sub class. You can call <a class="el" href="classCallModule.html#a2">CallModule::mainLoop()</a> there to implement busy loops. <dl compact><dt><b>Exceptions:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td></td><td valign=top><em>CapiWrongState</em>&nbsp;</td><td>Something is tried in a wrong connection state. This usually means our call was finished (raised directly). </td></tr>
    <tr><td></td><td valign=top><em>CapiMsgError</em>&nbsp;</td><td>A CAPI function hasn't succeeded for some reason (not thrown by CallModule, but may be thrown in subclasses). </td></tr>
    <tr><td></td><td valign=top><em>CapiError</em>&nbsp;</td><td>Some internal error has occured (not thrown by CallModule, but may be thrown in subclasses). </td></tr>
    <tr><td></td><td valign=top><em>CapiExternalError</em>&nbsp;</td><td>A given command didn't succeed for a reason not caused by the CAPI (not thrown by CallModule, but may be thrown in subclasses)</td></tr>
  </table>
</dl>

<p>
Reimplemented in <a class="el" href="classAudioReceive.html#a1">AudioReceive</a>, <a class="el" href="classAudioSend.html#a1">AudioSend</a>, <a class="el" href="classCallOutgoing.html#a1">CallOutgoing</a>, <a class="el" href="classConnectModule.html#a1">ConnectModule</a>, <a class="el" href="classDisconnectModule.html#a1">DisconnectModule</a>, <a class="el" href="classFaxReceive.html#a1">FaxReceive</a>, <a class="el" href="classFaxSend.html#a1">FaxSend</a>, <a class="el" href="classReadDTMF.html#a1">ReadDTMF</a>, and <a class="el" href="classSwitch2FaxG3.html#a1">Switch2FaxG3</a>.
<p>
    </td>
  </tr>
</table>
<a class="anchor" name="b1" doxytag="CallModule::resetTimer" ></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 CallModule::resetTimer           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">int&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>new_timeout</em>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap><code> [protected]</code></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
restart the timer with new timeout value 
<p>
    </td>
  </tr>
</table>
<a class="anchor" name="a3" doxytag="CallModule::transmissionComplete" ></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 CallModule::transmissionComplete           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">void&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>          </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>
empty here. 
<p>
empty function to overwrite if necessary
<p>
Implements <a class="el" href="classCallInterface.html#a4">CallInterface</a>.
<p>

<p>
Reimplemented in <a class="el" href="classAudioSend.html#a2">AudioSend</a>, <a class="el" href="classFaxReceive.html#a2">FaxReceive</a>, and <a class="el" href="classFaxSend.html#a2">FaxSend</a>.
<p>
    </td>
  </tr>
</table>
<hr><h2>Member Data Documentation</h2>
<a class="anchor" name="p2" doxytag="CallModule::abort" ></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="classCallModule.html#p2">CallModule::abort</a><code> [protected]</code>          </td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
set this for hard exit because connection is lost, causes <a class="el" href="classCapiWrongState.html">CapiWrongState</a> to be throwed in mainLoop 
<p>
    </td>
  </tr>
</table>
<a class="anchor" name="p3" doxytag="CallModule::conn" ></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="classConnection.html">Connection</a>* <a class="el" href="classCallModule.html#p3">CallModule::conn</a><code> [protected]</code>          </td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
reference to the according <a class="el" href="classConnection.html">Connection</a> object 
<p>
    </td>
  </tr>
</table>
<a class="anchor" name="p0" doxytag="CallModule::DTMF_exit" ></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="classCallModule.html#p0">CallModule::DTMF_exit</a><code> [protected]</code>          </td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
if set to true, we will finish when we receive a DTMF signal 
<p>
    </td>
  </tr>
</table>
<a class="anchor" name="p4" doxytag="CallModule::exit_time" ></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"> long <a class="el" href="classCallModule.html#p4">CallModule::exit_time</a><code> [protected]</code>          </td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
time when the timeout should occur 
<p>
    </td>
  </tr>
</table>
<a class="anchor" name="p1" doxytag="CallModule::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"> bool <a class="el" href="classCallModule.html#p1">CallModule::finish</a><code> [protected]</code>          </td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
set this if the module should exit nicely for any reason 
<p>
    </td>
  </tr>
</table>
<a class="anchor" name="p5" doxytag="CallModule::timeout" ></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"> int <a class="el" href="classCallModule.html#p5">CallModule::timeout</a><code> [protected]</code>          </td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
timeout period in seconds 
<p>
    </td>
  </tr>
</table>
<hr>The documentation for this class was generated from the following files:<ul>
<li><a class="el" href="callmodule_8h-source.html">callmodule.h</a><li>callmodule.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>