File: connection_8h-source.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 (442 lines) | stat: -rw-r--r-- 41,059 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
<!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: connection.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>connection.h</h1><a href="connection_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 CONNECTION_H</span>
00018 <span class="preprocessor"></span><span class="preprocessor">#define CONNECTION_H</span>
00019 <span class="preprocessor"></span>
00020 <span class="preprocessor">#include &lt;capi20.h&gt;</span>
00021 <span class="preprocessor">#include &lt;vector&gt;</span>
00022 <span class="preprocessor">#include &lt;string&gt;</span>
00023 <span class="preprocessor">#include &lt;fstream&gt;</span>
00024 <span class="preprocessor">#include "<a class="code" href="capiexception_8h.html">capiexception.h</a>"</span>
00025 
00026 <span class="keyword">class </span><a class="code" href="classCallInterface.html">CallInterface</a>;
00027 <span class="keyword">class </span><a class="code" href="classCapi.html">Capi</a>;
00028 
00029 <span class="keyword">using</span> <span class="keyword">namespace </span>std;
00030 
<a name="l00049"></a><a class="code" href="classConnection.html">00049</a> <span class="keyword">class </span><a class="code" href="classConnection.html">Connection</a>
00050 {
00051         <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="classCapi.html">Capi</a>;
00052 
00053         <span class="keyword">public</span>:
<a name="l00064"></a><a class="code" href="classConnection.html#w10">00064</a>                 <span class="keyword">enum</span> <a class="code" href="classConnection.html#w10">service_t</a> {
00065                         <a class="code" href="classConnection.html#w10w0">VOICE</a>, 
00066                         <a class="code" href="classConnection.html#w10w1">FAXG3</a>,  
00067                         <a class="code" href="classConnection.html#w10w2">OTHER</a>   
00068                 };
00069 
00088                 <a class="code" href="classConnection.html#a0">Connection</a> (<a class="code" href="classCapi.html">Capi</a>* capi, _cdword controller, string call_from, <span class="keywordtype">bool</span> clir, string call_to, service_t service, string faxStationID, string faxHeadline) <span class="keywordflow">throw</span> (<a class="code" href="classCapiExternalError.html">CapiExternalError</a>, <a class="code" href="classCapiMsgError.html">CapiMsgError</a>);
00089 
00100                 <a class="code" href="classConnection.html#a1">~Connection</a>();
00101 
00106                 <span class="keywordtype">void</span> <a class="code" href="classConnection.html#a2">registerCallInterface</a>(<a class="code" href="classCallInterface.html">CallInterface</a> *call_if);
00107 
00126                 <span class="keywordtype">void</span> <a class="code" href="classConnection.html#a3">changeProtocol</a> (service_t desired_service, string faxStationID, string faxHeadline) <span class="keywordflow">throw</span> (<a class="code" href="classCapiMsgError.html">CapiMsgError</a>, <a class="code" href="classCapiExternalError.html">CapiExternalError</a>, <a class="code" href="classCapiWrongState.html">CapiWrongState</a>);
00127 
00141                 <span class="keywordtype">void</span> <a class="code" href="classConnection.html#a4">start_file_transmission</a>(string filename) <span class="keywordflow">throw</span> (<a class="code" href="classCapiError.html">CapiError</a>,<a class="code" href="classCapiWrongState.html">CapiWrongState</a>,<a class="code" href="classCapiExternalError.html">CapiExternalError</a>,<a class="code" href="classCapiMsgError.html">CapiMsgError</a>);
00142 
00147                 <span class="keywordtype">void</span> <a class="code" href="classConnection.html#a5">stop_file_transmission</a>();
00148 
00160                 <span class="keywordtype">void</span> <a class="code" href="classConnection.html#a6">start_file_reception</a>(string filename) <span class="keywordflow">throw</span> (<a class="code" href="classCapiWrongState.html">CapiWrongState</a>, <a class="code" href="classCapiExternalError.html">CapiExternalError</a>);
00161 
00166                 <span class="keywordtype">void</span> <a class="code" href="classConnection.html#a7">stop_file_reception</a>();
00167 
<a name="l00170"></a><a class="code" href="classConnection.html#w11">00170</a>                 <span class="keyword">enum</span> <a class="code" href="classConnection.html#w11">disconnect_mode_t</a> {
00171                         <a class="code" href="classConnection.html#w11w3">ALL</a>, 
00172                         <a class="code" href="classConnection.html#w11w4">PHYSICAL_ONLY</a>, 
00173                         <a class="code" href="classConnection.html#w11w5">LOGICAL_ONLY</a> 
00174                 };
00175 
00194                 <span class="keywordtype">void</span> <a class="code" href="classConnection.html#a8">disconnectCall</a>(disconnect_mode_t disconnect_mode=ALL) <span class="keywordflow">throw</span> (<a class="code" href="classCapiMsgError.html">CapiMsgError</a>);
00195 
00207                 <span class="keywordtype">void</span> <a class="code" href="classConnection.html#a9">connectWaiting</a>(service_t desired_service, string faxStationID=<span class="stringliteral">""</span>, string faxHeadline=<span class="stringliteral">""</span>)  <span class="keywordflow">throw</span> (<a class="code" href="classCapiWrongState.html">CapiWrongState</a>,<a class="code" href="classCapiExternalError.html">CapiExternalError</a>,<a class="code" href="classCapiMsgError.html">CapiMsgError</a>);
00208 
00218                 <span class="keywordtype">void</span> <a class="code" href="classConnection.html#a10">rejectWaiting</a>(_cword reject) <span class="keywordflow">throw</span> (<a class="code" href="classCapiWrongState.html">CapiWrongState</a>, <a class="code" href="classCapiMsgError.html">CapiMsgError</a>, <a class="code" href="classCapiExternalError.html">CapiExternalError</a>);
00219 
00229                 <span class="keywordtype">void</span> <a class="code" href="classConnection.html#a11">acceptWaiting</a>() throw (<a class="code" href="classCapiMsgError.html">CapiMsgError</a>, <a class="code" href="classCapiWrongState.html">CapiWrongState</a>);
00230 
00240                 <span class="keywordtype">void</span> enableDTMF() throw (CapiWrongState, CapiMsgError);
00241 
00247                 <span class="keywordtype">void</span> disableDTMF() throw (CapiWrongState, CapiMsgError);
00248 
00255                 string getDTMF();
00256 
00259                 <span class="keywordtype">void</span> clearDTMF();
00260 
00265                 string getCalledPartyNumber();
00266 
00271                 string getCallingPartyNumber();
00272 
00277                 service_t getService();
00278 
00286                 _cword getCause();
00287 
00295                 _cword getCauseB3();
00296 
00297 
<a name="l00300"></a><a class="code" href="classConnection.html#w12">00300</a>                 enum connection_state_t {
00301                         <a class="code" href="classConnection.html#w12w6">DOWN</a>, 
00302                         <a class="code" href="classConnection.html#w12w7">WAITING</a>, 
00303                         <a class="code" href="classConnection.html#w12w8">UP</a>, 
00304                         <a class="code" href="classConnection.html#w12w9">OTHER_STATE</a> 
00305                 };
00306 
00311                 connection_state_t <a class="code" href="classConnection.html#a21">getState</a>();
00312 
<a name="l00318"></a><a class="code" href="structConnection_1_1fax__info__t.html">00318</a>                 <span class="keyword">struct </span><a class="code" href="structConnection_1_1fax__info__t.html">fax_info_t</a> {
<a name="l00319"></a><a class="code" href="structConnection_1_1fax__info__t.html#o0">00319</a>                         <span class="keywordtype">int</span> <a class="code" href="structConnection_1_1fax__info__t.html#o0">rate</a>; 
<a name="l00320"></a><a class="code" href="structConnection_1_1fax__info__t.html#o1">00320</a>                         <span class="keywordtype">bool</span> <a class="code" href="structConnection_1_1fax__info__t.html#o1">hiRes</a>; 
<a name="l00321"></a><a class="code" href="structConnection_1_1fax__info__t.html#o2">00321</a>                         <span class="keywordtype">unsigned</span> <span class="keywordtype">short</span> <a class="code" href="structConnection_1_1fax__info__t.html#o2">format</a>; 
<a name="l00322"></a><a class="code" href="structConnection_1_1fax__info__t.html#o3">00322</a>                         <span class="keywordtype">int</span> <a class="code" href="structConnection_1_1fax__info__t.html#o3">pages</a>; 
<a name="l00323"></a><a class="code" href="structConnection_1_1fax__info__t.html#o4">00323</a>                         std::string <a class="code" href="structConnection_1_1fax__info__t.html#o4">stationID</a>; 
00324                 };
00325 
00330                 <a class="code" href="structConnection_1_1fax__info__t.html">fax_info_t</a>* <a class="code" href="classConnection.html#a22">getFaxInfo</a>();
00331 
00339                 <span class="keywordtype">void</span> <a class="code" href="classConnection.html#a23">errorMessage</a>(string message);
00340 
00341 
00350                 <span class="keywordtype">void</span> <a class="code" href="classConnection.html#a24">debugMessage</a>(string message, <span class="keywordtype">unsigned</span> <span class="keywordtype">short</span> level);
00351 
00352         <span class="keyword">protected</span>:
00353 
00368                 <a class="code" href="classConnection.html#a0">Connection</a> (_cmsg&amp; message, <a class="code" href="classCapi.html">Capi</a> *capi, <span class="keywordtype">unsigned</span> <span class="keywordtype">short</span> DDILength=0, <span class="keywordtype">unsigned</span> <span class="keywordtype">short</span> DDIBaseLength=0, std::vector&lt;std::string&gt; DDIStopNumbers=std::vector&lt;std::string&gt;());
00369 
00370                 <span class="comment">/********************************************************************************/</span>
00371                 <span class="comment">/*          methods handling CAPI messages - called by the Capi class           */</span>
00372                 <span class="comment">/********************************************************************************/</span>
00373 
00374                 <span class="comment">/*************************** INDICATIONS ****************************************/</span>
00375 
00385                 <span class="keywordtype">void</span> <a class="code" href="classConnection.html#b1">connect_active_ind</a>(_cmsg&amp; message) <span class="keywordflow">throw</span> (<a class="code" href="classCapiWrongState.html">CapiWrongState</a>, <a class="code" href="classCapiMsgError.html">CapiMsgError</a>);
00386 
00395                 <span class="keywordtype">void</span> <a class="code" href="classConnection.html#b2">connect_b3_ind</a>(_cmsg&amp; message) <span class="keywordflow">throw</span> (<a class="code" href="classCapiWrongState.html">CapiWrongState</a>, <a class="code" href="classCapiMsgError.html">CapiMsgError</a>);
00396 
00406                 <span class="keywordtype">void</span> <a class="code" href="classConnection.html#b3">connect_b3_active_ind</a>(_cmsg&amp; message) <span class="keywordflow">throw</span> (<a class="code" href="classCapiError.html">CapiError</a>,<a class="code" href="classCapiWrongState.html">CapiWrongState</a>,<a class="code" href="classCapiExternalError.html">CapiExternalError</a>);
00407 
00417                 <span class="keywordtype">void</span> <a class="code" href="classConnection.html#b4">data_b3_ind</a>(_cmsg&amp; message) <span class="keywordflow">throw</span> (<a class="code" href="classCapiError.html">CapiError</a>,<a class="code" href="classCapiWrongState.html">CapiWrongState</a>,<a class="code" href="classCapiMsgError.html">CapiMsgError</a>);
00418 
00428                 <span class="keywordtype">void</span> <a class="code" href="classConnection.html#b5">facility_ind_DTMF</a>(_cmsg&amp; message) <span class="keywordflow">throw</span> (<a class="code" href="classCapiError.html">CapiError</a>,<a class="code" href="classCapiWrongState.html">CapiWrongState</a>);
00429 
00438                 <span class="keywordtype">void</span> <a class="code" href="classConnection.html#b6">info_ind_alerting</a>(_cmsg&amp; message) <span class="keywordflow">throw</span> (<a class="code" href="classCapiError.html">CapiError</a>,<a class="code" href="classCapiWrongState.html">CapiWrongState</a>);
00439 
00451                 <span class="keywordtype">bool</span> <a class="code" href="classConnection.html#b7">info_ind_called_party_nr</a>(_cmsg&amp; message) <span class="keywordflow">throw</span> (<a class="code" href="classCapiError.html">CapiError</a>,<a class="code" href="classCapiWrongState.html">CapiWrongState</a>);
00452 
00462                 <span class="keywordtype">void</span> <a class="code" href="classConnection.html#b8">disconnect_b3_ind</a>(_cmsg&amp; message) <span class="keywordflow">throw</span> (<a class="code" href="classCapiError.html">CapiError</a>,<a class="code" href="classCapiWrongState.html">CapiWrongState</a>);
00463 
00473                 <span class="keywordtype">void</span> <a class="code" href="classConnection.html#b9">disconnect_ind</a>(_cmsg&amp; message) <span class="keywordflow">throw</span> (<a class="code" href="classCapiError.html">CapiError</a>,<a class="code" href="classCapiWrongState.html">CapiWrongState</a>,<a class="code" href="classCapiMsgError.html">CapiMsgError</a>);
00474 
00475                 <span class="comment">/*************************** CONFIRMATIONS **************************************/</span>
00476 
00483                 <span class="keywordtype">void</span> <a class="code" href="classConnection.html#b10">connect_conf</a>(_cmsg&amp; message) <span class="keywordflow">throw</span> (<a class="code" href="classCapiWrongState.html">CapiWrongState</a>, <a class="code" href="classCapiMsgError.html">CapiMsgError</a>);
00484 
00491                 <span class="keywordtype">void</span> <a class="code" href="classConnection.html#b11">connect_b3_conf</a>(_cmsg&amp; message) <span class="keywordflow">throw</span> (<a class="code" href="classCapiWrongState.html">CapiWrongState</a>, <a class="code" href="classCapiMsgError.html">CapiMsgError</a>);
00492 
00500                 <span class="keywordtype">void</span> <a class="code" href="classConnection.html#b12">select_b_protocol_conf</a>(_cmsg&amp; message) <span class="keywordflow">throw</span> (<a class="code" href="classCapiError.html">CapiError</a>,<a class="code" href="classCapiWrongState.html">CapiWrongState</a>,<a class="code" href="classCapiMsgError.html">CapiMsgError</a>);
00501 
00509                 <span class="keywordtype">void</span> <a class="code" href="classConnection.html#b13">alert_conf</a>(_cmsg&amp; message) <span class="keywordflow">throw</span> (<a class="code" href="classCapiError.html">CapiError</a>,<a class="code" href="classCapiWrongState.html">CapiWrongState</a>,<a class="code" href="classCapiMsgError.html">CapiMsgError</a>);
00510 
00521                 <span class="keywordtype">void</span> <a class="code" href="classConnection.html#b14">data_b3_conf</a>(_cmsg&amp; message) <span class="keywordflow">throw</span> (<a class="code" href="classCapiError.html">CapiError</a>,<a class="code" href="classCapiWrongState.html">CapiWrongState</a>, <a class="code" href="classCapiMsgError.html">CapiMsgError</a>, <a class="code" href="classCapiExternalError.html">CapiExternalError</a>);
00522 
00530                 <span class="keywordtype">void</span> <a class="code" href="classConnection.html#b15">facility_conf_DTMF</a>(_cmsg&amp; message) <span class="keywordflow">throw</span> (<a class="code" href="classCapiError.html">CapiError</a>,<a class="code" href="classCapiWrongState.html">CapiWrongState</a>,<a class="code" href="classCapiMsgError.html">CapiMsgError</a>);
00531 
00539                 <span class="keywordtype">void</span> <a class="code" href="classConnection.html#b16">disconnect_b3_conf</a>(_cmsg&amp; message) <span class="keywordflow">throw</span> (<a class="code" href="classCapiError.html">CapiError</a>,<a class="code" href="classCapiWrongState.html">CapiWrongState</a>,<a class="code" href="classCapiMsgError.html">CapiMsgError</a>);
00540 
00548                 <span class="keywordtype">void</span> <a class="code" href="classConnection.html#b17">disconnect_conf</a>(_cmsg&amp; message) <span class="keywordflow">throw</span> (<a class="code" href="classCapiError.html">CapiError</a>,<a class="code" href="classCapiWrongState.html">CapiWrongState</a>,<a class="code" href="classCapiMsgError.html">CapiMsgError</a>);
00549 
00550                 <span class="comment">/********************************************************************************/</span>
00551                 <span class="comment">/*                             internal methods                                 */</span>
00552                 <span class="comment">/********************************************************************************/</span>
00553 
00558                 string <a class="code" href="classConnection.html#b18">prefix</a>();
00559 
00566                 string <a class="code" href="classConnection.html#b19">getNumber</a> (_cstruct capi_input, <span class="keywordtype">bool</span> isCallingNr);
00567 
00581                 <span class="keywordtype">void</span> <a class="code" href="classConnection.html#b20">send_block</a>() throw (<a class="code" href="classCapiError.html">CapiError</a>,<a class="code" href="classCapiWrongState.html">CapiWrongState</a>,<a class="code" href="classCapiExternalError.html">CapiExternalError</a>,<a class="code" href="classCapiMsgError.html">CapiMsgError</a>);
00582 
00603                 <span class="keywordtype">void</span> buildBconfiguration(_cdword controller, service_t service, string faxStationID, string faxHeadline, _cword&amp; B1proto, _cword&amp; B2proto, _cword&amp; B3proto, _cstruct&amp; B1config, _cstruct&amp; B2config, _cstruct&amp; B3config) throw (CapiExternalError);
00604 
00614                 <span class="keywordtype">void</span> convertToCP437(string &amp;text);
00615 
00616                 <span class="comment">/********************************************************************************/</span>
00617                 <span class="comment">/*                             attributes                                       */</span>
00618                 <span class="comment">/********************************************************************************/</span>
00619 
<a name="l00625"></a><a class="code" href="classConnection.html#x17">00625</a>                 enum plci_state_t {
00626                         <a class="code" href="classConnection.html#x17x0">P0</a>,     
00627                         <a class="code" href="classConnection.html#x17x1">P01</a>,    
00628                         <a class="code" href="classConnection.html#x17x2">P1</a>,     
00629                         <a class="code" href="classConnection.html#x17x3">P2</a>,     
00630                         <a class="code" href="classConnection.html#x17x4">P3</a>,     
00631                         <a class="code" href="classConnection.html#x17x5">P4</a>,     
00632                         <a class="code" href="classConnection.html#x17x6">P5</a>,     
00633                         <a class="code" href="classConnection.html#x17x7">P6</a>,     
00634                         <a class="code" href="classConnection.html#x17x8">PACT</a>    
00635                 } plci_state;
00636 
<a name="l00641"></a><a class="code" href="classConnection.html#x18">00641</a>                 <span class="keyword">enum</span> <a class="code" href="classConnection.html#x18">ncci_state_t</a> {
00642                         <a class="code" href="classConnection.html#x18x9">N0</a>,     
00643                         <a class="code" href="classConnection.html#x18x10">N01</a>,    
00644                         <a class="code" href="classConnection.html#x18x11">N1</a>,     
00645                         <a class="code" href="classConnection.html#x18x12">N2</a>,     
00646                         <a class="code" href="classConnection.html#x18x13">N3</a>,     
00647                         <a class="code" href="classConnection.html#x18x14">N4</a>,     
00648                         <a class="code" href="classConnection.html#x18x15">N5</a>,     
00649                         <a class="code" href="classConnection.html#x18x16">NACT</a>    
00650                 } ncci_state;
00651 
<a name="l00652"></a><a class="code" href="classConnection.html#p2">00652</a>                 _cdword <a class="code" href="classConnection.html#p2">plci</a>;    
<a name="l00653"></a><a class="code" href="classConnection.html#p3">00653</a>                 _cdword <a class="code" href="classConnection.html#p3">ncci</a>;    
00654 
<a name="l00655"></a><a class="code" href="classConnection.html#p4">00655</a>                 <a class="code" href="classConnection.html#w10">service_t</a> <a class="code" href="classConnection.html#p4">service</a>; 
00656 
<a name="l00657"></a><a class="code" href="classConnection.html#p5">00657</a>                 _cword <a class="code" href="classConnection.html#p5">connect_ind_msg_nr</a>; 
00658 
00659                 _cword <a class="code" href="classConnection.html#p6">disconnect_cause</a>, 
<a name="l00660"></a><a class="code" href="classConnection.html#p7">00660</a>                         <a class="code" href="classConnection.html#p7">disconnect_cause_b3</a>; 
00661 
<a name="l00662"></a><a class="code" href="classConnection.html#p8">00662</a>                 string <a class="code" href="classConnection.html#p8">call_from</a>; 
<a name="l00663"></a><a class="code" href="classConnection.html#p9">00663</a>                 string <a class="code" href="classConnection.html#p9">call_to</a>;   
00664 
<a name="l00665"></a><a class="code" href="classConnection.html#p10">00665</a>                 string <a class="code" href="classConnection.html#p10">received_dtmf</a>; 
00666 
00667                 <span class="keywordtype">bool</span> <a class="code" href="classConnection.html#p11">keepPhysicalConnection</a>, 
<a name="l00668"></a><a class="code" href="classConnection.html#p12">00668</a>                         <a class="code" href="classConnection.html#p12">our_call</a>; 
00669 
<a name="l00670"></a><a class="code" href="classConnection.html#p13">00670</a>                 <a class="code" href="classCallInterface.html">CallInterface</a> *<a class="code" href="classConnection.html#p13">call_if</a>; 
<a name="l00671"></a><a class="code" href="classConnection.html#p14">00671</a>                 <a class="code" href="classCapi.html">Capi</a> *capi; 
00672 
00673                 pthread_mutex_t <a class="code" href="classConnection.html#p15">send_mutex</a>,  
<a name="l00674"></a><a class="code" href="classConnection.html#p15">00674</a>                                 <a class="code" href="classConnection.html#p16">receive_mutex</a>; 
00675 
<a name="l00676"></a><a class="code" href="classConnection.html#p17">00676</a>                 ofstream *<a class="code" href="classConnection.html#p17">file_for_reception</a>; 
<a name="l00677"></a><a class="code" href="classConnection.html#p18">00677</a>                 ifstream *<a class="code" href="classConnection.html#p18">file_to_send</a>;  
00678                                      
00679                 ostream &amp;<a class="code" href="classConnection.html#p19">debug</a>, 
<a name="l00680"></a><a class="code" href="classConnection.html#p20">00680</a>                         &amp;<a class="code" href="classConnection.html#p20">error</a>; 
<a name="l00681"></a><a class="code" href="classConnection.html#p21">00681</a>                 <span class="keywordtype">unsigned</span> <span class="keywordtype">short</span> <a class="code" href="classConnection.html#p21">debug_level</a>; 
00682 
<a name="l00691"></a><a class="code" href="classConnection.html#p22">00691</a>                 <span class="keywordtype">char</span> <a class="code" href="classConnection.html#p22">send_buffer</a>[7][2048];
00692 
00693                 <span class="keywordtype">unsigned</span> <span class="keywordtype">short</span> <a class="code" href="classConnection.html#p23">buffer_start</a>, 
<a name="l00694"></a><a class="code" href="classConnection.html#p24">00694</a>                         <a class="code" href="classConnection.html#p24">buffers_used</a>; 
00695 
<a name="l00696"></a><a class="code" href="classConnection.html#p25">00696</a>                 <a class="code" href="structConnection_1_1fax__info__t.html">fax_info_t</a>* <a class="code" href="classConnection.html#p25">fax_info</a>; 
00697 
<a name="l00698"></a><a class="code" href="classConnection.html#p26">00698</a>                 <span class="keywordtype">unsigned</span> <span class="keywordtype">short</span> DDILength; 
<a name="l00699"></a><a class="code" href="classConnection.html#p27">00699</a>                 <span class="keywordtype">unsigned</span> <span class="keywordtype">short</span> DDIBaseLength; 
<a name="l00700"></a><a class="code" href="classConnection.html#p28">00700</a>                 vector&lt;string&gt; <a class="code" href="classConnection.html#p28">DDIStopNumbers</a>; 
00701 };
00702 
00703 <span class="preprocessor">#endif</span>
00704 <span class="preprocessor"></span>
00705 <span class="comment">/*  History</span>
00706 <span class="comment"></span>
00707 <span class="comment">$Log: connection.h,v $</span>
00708 <span class="comment">Revision 1.6.2.4  2003/11/11 21:05:41  gernot</span>
00709 <span class="comment">- fix typo in comment</span>
00710 <span class="comment"></span>
00711 <span class="comment">Revision 1.6.2.3  2003/11/02 14:58:16  gernot</span>
00712 <span class="comment">- use DDI_base_length instead of DDI_base</span>
00713 <span class="comment">- added DDI_stop_numbers option</span>
00714 <span class="comment">- use DDI_* options in the Connection class</span>
00715 <span class="comment">- call the Python script if number is complete</span>
00716 <span class="comment"></span>
00717 <span class="comment">Revision 1.6.2.2  2003/11/01 22:59:33  gernot</span>
00718 <span class="comment">- read CalledPartyNr InfoElements</span>
00719 <span class="comment"></span>
00720 <span class="comment">Revision 1.6.2.1  2003/10/26 16:51:55  gernot</span>
00721 <span class="comment">- begin implementation of DDI, get DDI Info Elements</span>
00722 <span class="comment"></span>
00723 <span class="comment">Revision 1.6  2003/06/28 12:49:47  gernot</span>
00724 <span class="comment">- convert fax headline to CP437, so that german umlauts and other special</span>
00725 <span class="comment">  characters will work now</span>
00726 <span class="comment"></span>
00727 <span class="comment">Revision 1.5  2003/05/25 13:38:30  gernot</span>
00728 <span class="comment">- support reception of color fax documents</span>
00729 <span class="comment"></span>
00730 <span class="comment">Revision 1.4  2003/05/24 13:48:54  gernot</span>
00731 <span class="comment">- get fax details (calling station ID, transfer format, ...), handle PLCI</span>
00732 <span class="comment"></span>
00733 <span class="comment">Revision 1.3  2003/04/17 10:39:42  gernot</span>
00734 <span class="comment">- support ALERTING notification (to know when it's ringing on the other side)</span>
00735 <span class="comment">- cosmetical fixes in capi.cpp</span>
00736 <span class="comment"></span>
00737 <span class="comment">Revision 1.2  2003/04/04 09:17:59  gernot</span>
00738 <span class="comment">- buildBconfiguration() now checks the abilities of the given controller</span>
00739 <span class="comment">  and throws an error if it doesn't support the service</span>
00740 <span class="comment">- it also sets the fax protocol setting now the highest available ability</span>
00741 <span class="comment">  (fax G3 or fax G3 extended) of the controller, thus preparing fax polling</span>
00742 <span class="comment">  and *working around a severe bug in the AVM drivers producing a kernel</span>
00743 <span class="comment">  oops* with some analog fax devices. AVM knows about this and analyzes it.</span>
00744 <span class="comment"></span>
00745 <span class="comment">Revision 1.1.1.1  2003/02/19 08:19:53  gernot</span>
00746 <span class="comment">initial checkin of 0.4</span>
00747 <span class="comment"></span>
00748 <span class="comment">Revision 1.30  2003/02/10 14:20:52  ghillie</span>
00749 <span class="comment">merged from NATIVE_PTHREADS to HEAD</span>
00750 <span class="comment"></span>
00751 <span class="comment">Revision 1.29.2.1  2003/02/10 14:07:54  ghillie</span>
00752 <span class="comment">- use pthread_mutex_* instead of CommonC++ Semaphore</span>
00753 <span class="comment"></span>
00754 <span class="comment">Revision 1.29  2003/01/04 16:08:22  ghillie</span>
00755 <span class="comment">- log improvements: log_level, timestamp</span>
00756 <span class="comment">- added methods debugMessage(), errorMessage(), removed get*Stream()</span>
00757 <span class="comment">- added some additional debug output for connection setup / finish</span>
00758 <span class="comment"></span>
00759 <span class="comment">Revision 1.28  2002/12/16 13:13:47  ghillie</span>
00760 <span class="comment">- added getCauseB3 to return B3 cause</span>
00761 <span class="comment"></span>
00762 <span class="comment">Revision 1.27  2002/12/13 11:46:59  ghillie</span>
00763 <span class="comment">- added attribute our_call to differ outgoing and incoming calls</span>
00764 <span class="comment"></span>
00765 <span class="comment">Revision 1.26  2002/12/11 13:39:05  ghillie</span>
00766 <span class="comment">- added support for PHYSICAL_ONLY disconnect in disconnectCall()</span>
00767 <span class="comment"></span>
00768 <span class="comment">Revision 1.25  2002/12/10 15:06:15  ghillie</span>
00769 <span class="comment">- new methods get*Stream() for use in capisuitemodule</span>
00770 <span class="comment"></span>
00771 <span class="comment">Revision 1.24  2002/12/09 15:42:24  ghillie</span>
00772 <span class="comment">- save debug and error stream in own attributes</span>
00773 <span class="comment"></span>
00774 <span class="comment">Revision 1.23  2002/12/06 15:25:47  ghillie</span>
00775 <span class="comment">- new return value for getState(): WAITING</span>
00776 <span class="comment"></span>
00777 <span class="comment">Revision 1.22  2002/12/06 13:07:36  ghillie</span>
00778 <span class="comment">- update docs because application is now responsible to delete</span>
00779 <span class="comment">  Connection object</span>
00780 <span class="comment">- new methods getCause() and getState()</span>
00781 <span class="comment"></span>
00782 <span class="comment">Revision 1.21  2002/12/05 15:05:12  ghillie</span>
00783 <span class="comment">- moved constructor for incoming calls to "private:"</span>
00784 <span class="comment"></span>
00785 <span class="comment">Revision 1.20  2002/12/02 12:31:36  ghillie</span>
00786 <span class="comment">renamed Connection::SPEECH to Connection::VOICE</span>
00787 <span class="comment"></span>
00788 <span class="comment">Revision 1.19  2002/11/29 10:25:01  ghillie</span>
00789 <span class="comment">- updated comments, use doxygen format now</span>
00790 <span class="comment"></span>
00791 <span class="comment">Revision 1.18  2002/11/27 16:03:20  ghillie</span>
00792 <span class="comment">updated comments for doxygen</span>
00793 <span class="comment"></span>
00794 <span class="comment">Revision 1.17  2002/11/25 11:51:54  ghillie</span>
00795 <span class="comment">- removed the unhandy CIP parameters from the interface to the application layer, use service type instead</span>
00796 <span class="comment">- rejectWaiting() tests against cause!=0 now</span>
00797 <span class="comment">- removed isUp() method</span>
00798 <span class="comment"></span>
00799 <span class="comment">Revision 1.16  2002/11/22 15:13:44  ghillie</span>
00800 <span class="comment">- new attribute keepPhysicalConnection which prevents disconnect_b3_ind() from sending disconnect_req()</span>
00801 <span class="comment">- moved the ugly B*configuration, B*protocol settings from some methods to private method buildBconfiguration</span>
00802 <span class="comment">- new methods changeProtocol(), select_b_protocol_conf(), clearDTMF()</span>
00803 <span class="comment">- disconnect_b3_ind sets ncci_state to N0 before calling the callbacks</span>
00804 <span class="comment">- added parameter disconnect_mode to disconnectCall()</span>
00805 <span class="comment">- getDTMF() does non-destructive read now</span>
00806 <span class="comment"></span>
00807 <span class="comment">Revision 1.15  2002/11/21 15:30:28  ghillie</span>
00808 <span class="comment">- added new method Connection::acceptWaiting() - sends ALERT_REQ</span>
00809 <span class="comment">- updated description of Connection::connectWaiting()</span>
00810 <span class="comment"></span>
00811 <span class="comment">Revision 1.14  2002/11/19 15:57:19  ghillie</span>
00812 <span class="comment">- Added missing throw() declarations</span>
00813 <span class="comment">- phew. Added error handling. All exceptions are caught now.</span>
00814 <span class="comment"></span>
00815 <span class="comment">Revision 1.13  2002/11/18 14:24:09  ghillie</span>
00816 <span class="comment">- moved global severity_t to CapiError::severity_t</span>
00817 <span class="comment">- added throw() declarations</span>
00818 <span class="comment"></span>
00819 <span class="comment">Revision 1.12  2002/11/18 12:24:33  ghillie</span>
00820 <span class="comment">- changed disconnectCall() so that it doesn't throw exceptions any more,</span>
00821 <span class="comment">  so that we can call it in any state</span>
00822 <span class="comment"></span>
00823 <span class="comment">Revision 1.11  2002/11/17 14:40:55  ghillie</span>
00824 <span class="comment">added isUp()</span>
00825 <span class="comment"></span>
00826 <span class="comment">Revision 1.10  2002/11/15 15:25:53  ghillie</span>
00827 <span class="comment">added ALERT_REQ so we don't loose a call when we wait before connection establishment</span>
00828 <span class="comment"></span>
00829 <span class="comment">Revision 1.9  2002/11/15 13:49:10  ghillie</span>
00830 <span class="comment">fix: callmodule wasn't aborted when call was only connected/disconnected physically</span>
00831 <span class="comment"></span>
00832 <span class="comment">Revision 1.8  2002/11/14 17:05:19  ghillie</span>
00833 <span class="comment">major structural changes - much is easier, nicer and better prepared for the future now:</span>
00834 <span class="comment">- added DisconnectLogical handler to CallInterface</span>
00835 <span class="comment">- DTMF handling moved from CallControl to Connection</span>
00836 <span class="comment">- new call module ConnectModule for establishing connection</span>
00837 <span class="comment">- python script reduced from 2 functions to one (callWaiting, callConnected</span>
00838 <span class="comment">  merged to callIncoming)</span>
00839 <span class="comment">- call modules implement the CallInterface now, not CallControl any more</span>
00840 <span class="comment">  =&gt; this freed CallControl from nearly all communication stuff</span>
00841 <span class="comment"></span>
00842 <span class="comment">Revision 1.7  2002/11/13 08:34:54  ghillie</span>
00843 <span class="comment">moved history to the bottom</span>
00844 <span class="comment"></span>
00845 <span class="comment">Revision 1.6  2002/11/10 17:05:18  ghillie</span>
00846 <span class="comment">changed to support multiple buffers -&gt; deadlock in stop_file_transmission!!</span>
00847 <span class="comment"></span>
00848 <span class="comment">Revision 1.5  2002/11/08 07:57:07  ghillie</span>
00849 <span class="comment">added functions to initiate a call</span>
00850 <span class="comment">corrected FACILITY calls to use PLCI instead of NCCI in DTMF processing as told by Mr. Ortmann on comp.dcom.isdn.capi</span>
00851 <span class="comment"></span>
00852 <span class="comment">Revision 1.4  2002/10/31 12:40:06  ghillie</span>
00853 <span class="comment">added DTMF support</span>
00854 <span class="comment">small fixes like making some unnecessary global variables local, removed some unnecessary else cases</span>
00855 <span class="comment"></span>
00856 <span class="comment">Revision 1.3  2002/10/30 14:29:25  ghillie</span>
00857 <span class="comment">added getCIPvalue</span>
00858 <span class="comment"></span>
00859 <span class="comment">Revision 1.2  2002/10/29 14:27:42  ghillie</span>
00860 <span class="comment">added stop_file_*, added semaphores</span>
00861 <span class="comment"></span>
00862 <span class="comment">Revision 1.1  2002/10/25 13:29:38  ghillie</span>
00863 <span class="comment">grouped files into subdirectories</span>
00864 <span class="comment"></span>
00865 <span class="comment">Revision 1.10  2002/10/10 12:45:40  gernot</span>
00866 <span class="comment">added AudioReceive module, some small details changed</span>
00867 <span class="comment"></span>
00868 <span class="comment">Revision 1.9  2002/10/09 11:18:59  gernot</span>
00869 <span class="comment">cosmetic changes (again...) and changed info function of CAPI class</span>
00870 <span class="comment"></span>
00871 <span class="comment">Revision 1.8  2002/10/04 15:48:03  gernot</span>
00872 <span class="comment">structure changes completed &amp; compiles now!</span>
00873 <span class="comment"></span>
00874 <span class="comment">Revision 1.7  2002/10/04 13:27:15  gernot</span>
00875 <span class="comment">some restructuring to get it to a working state ;-)</span>
00876 <span class="comment"></span>
00877 <span class="comment">does not do anything useful yet nor does it even compile...</span>
00878 <span class="comment"></span>
00879 <span class="comment">Revision 1.6  2002/10/01 09:02:04  gernot</span>
00880 <span class="comment">changes for compilation with gcc3.2</span>
00881 <span class="comment"></span>
00882 <span class="comment">Revision 1.5  2002/09/22 14:22:53  gernot</span>
00883 <span class="comment">some cosmetic comment improvements ;-)</span>
00884 <span class="comment"></span>
00885 <span class="comment">Revision 1.4  2002/09/19 12:08:19  gernot</span>
00886 <span class="comment">added magic CVS strings</span>
00887 <span class="comment"></span>
00888 <span class="comment">* Sun Sep 15 2002 - gernot@hillier.de</span>
00889 <span class="comment">- put under CVS, cvs changelog follows above</span>
00890 <span class="comment"></span>
00891 <span class="comment">* Sun May 20 2002 - gernot@hillier.de</span>
00892 <span class="comment">- first version</span>
00893 <span class="comment"></span>
00894 <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>