Sophie

Sophie

distrib > Mandriva > 2010.0 > i586 > media > contrib-release > by-pkgid > 06e1e0ab98898582c876a8be34ecb5e9 > files > 171

capisuite-0.4.5-5mdv2010.0.i586.rpm

<!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: audioreceive.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>audioreceive.h</h1><a href="audioreceive_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 AUDIORECEIVE_H</span>
00018 <span class="preprocessor"></span><span class="preprocessor">#define AUDIORECEIVE_H</span>
00019 <span class="preprocessor"></span>
00020 <span class="preprocessor">#include &lt;string&gt;</span>
00021 <span class="preprocessor">#include "<a class="code" href="callmodule_8h.html">callmodule.h</a>"</span>
00022 
00023 <span class="keyword">class </span><a class="code" href="classConnection.html">Connection</a>;
00024 
00025 <span class="keyword">using</span> <span class="keyword">namespace </span>std;
00026 
<a name="l00042"></a><a class="code" href="classAudioReceive.html">00042</a> <span class="keyword">class </span><a class="code" href="classAudioReceive.html">AudioReceive</a>: <span class="keyword">public</span> <a class="code" href="classCallModule.html">CallModule</a>
00043 {
00044         <span class="keyword">public</span>:
00056                 <a class="code" href="classAudioReceive.html#a0">AudioReceive</a>(<a class="code" href="classConnection.html">Connection</a> *conn, string <a class="code" href="classAudioReceive.html#r2">file</a>, <span class="keywordtype">int</span> timeout, <span class="keywordtype">int</span> <a class="code" href="classAudioReceive.html#r1">silence_timeout</a>, <span class="keywordtype">bool</span> DTMF_exit) <span class="keywordflow">throw</span> (<a class="code" href="classCapiExternalError.html">CapiExternalError</a>);
00057 
00065                 <span class="keywordtype">void</span> <a class="code" href="classAudioReceive.html#a1">mainLoop</a>() <span class="keywordflow">throw</span> (<a class="code" href="classCapiWrongState.html">CapiWrongState</a>, <a class="code" href="classCapiExternalError.html">CapiExternalError</a>);
00066 
00075                 <span class="keywordtype">void</span> <a class="code" href="classAudioReceive.html#a2">dataIn</a>(<span class="keywordtype">unsigned</span> <span class="keywordtype">char</span>* data, <span class="keywordtype">unsigned</span> length);
00076 
00081                 <span class="keywordtype">long</span> <a class="code" href="classAudioReceive.html#a3">duration</a>();
00082 
00083         <span class="keyword">private</span>:
<a name="l00084"></a><a class="code" href="classAudioReceive.html#r0">00084</a>                 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="classAudioReceive.html#r0">silence_count</a>; 
<a name="l00085"></a><a class="code" href="classAudioReceive.html#r1">00085</a>                 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> silence_timeout; 
<a name="l00086"></a><a class="code" href="classAudioReceive.html#r2">00086</a>                 string file; 
00087                 <span class="keywordtype">long</span> <a class="code" href="classAudioReceive.html#r3">start_time</a>, 
<a name="l00088"></a><a class="code" href="classAudioReceive.html#r3">00088</a>                         <a class="code" href="classAudioReceive.html#r4">end_time</a>; 
00089 };
00090 
00091 <span class="preprocessor">#endif</span>
00092 <span class="preprocessor"></span>
00093 <span class="comment">/* History</span>
00094 <span class="comment"></span>
00095 <span class="comment">$Log: audioreceive.h,v $</span>
00096 <span class="comment">Revision 1.1  2003/02/19 08:19:53  gernot</span>
00097 <span class="comment">Initial revision</span>
00098 <span class="comment"></span>
00099 <span class="comment">Revision 1.14  2003/01/16 13:03:07  ghillie</span>
00100 <span class="comment">- added attribute end_time</span>
00101 <span class="comment">- updated comment to reflect new truncation of silence</span>
00102 <span class="comment"></span>
00103 <span class="comment">Revision 1.13  2002/12/04 11:38:50  ghillie</span>
00104 <span class="comment">- added time measurement: save time in start_time at the begin of mainLoop() and return difference to getTime() in duration()</span>
00105 <span class="comment"></span>
00106 <span class="comment">Revision 1.12  2002/12/02 12:32:21  ghillie</span>
00107 <span class="comment">renamed Connection::SPEECH to Connection::VOICE</span>
00108 <span class="comment"></span>
00109 <span class="comment">Revision 1.11  2002/11/29 10:26:10  ghillie</span>
00110 <span class="comment">- updated comments, use doxygen format now</span>
00111 <span class="comment">- removed transmissionComplete() method as this makes no sense in receiving!</span>
00112 <span class="comment"></span>
00113 <span class="comment">Revision 1.10  2002/11/25 11:54:21  ghillie</span>
00114 <span class="comment">- tests for speech mode before receiving now</span>
00115 <span class="comment">- small performance improvement (use string::empty() instead of comparison to "")</span>
00116 <span class="comment"></span>
00117 <span class="comment">Revision 1.9  2002/11/22 15:16:20  ghillie</span>
00118 <span class="comment">added support for finishing when DTMF is received</span>
00119 <span class="comment"></span>
00120 <span class="comment">Revision 1.8  2002/11/21 15:32:40  ghillie</span>
00121 <span class="comment">- moved code from constructor/destructor to overwritten mainLoop() method</span>
00122 <span class="comment"></span>
00123 <span class="comment">Revision 1.7  2002/11/19 15:57:19  ghillie</span>
00124 <span class="comment">- Added missing throw() declarations</span>
00125 <span class="comment">- phew. Added error handling. All exceptions are caught now.</span>
00126 <span class="comment"></span>
00127 <span class="comment">Revision 1.6  2002/11/14 17:05:19  ghillie</span>
00128 <span class="comment">major structural changes - much is easier, nicer and better prepared for the future now:</span>
00129 <span class="comment">- added DisconnectLogical handler to CallInterface</span>
00130 <span class="comment">- DTMF handling moved from CallControl to Connection</span>
00131 <span class="comment">- new call module ConnectModule for establishing connection</span>
00132 <span class="comment">- python script reduced from 2 functions to one (callWaiting, callConnected</span>
00133 <span class="comment">  merged to callIncoming)</span>
00134 <span class="comment">- call modules implement the CallInterface now, not CallControl any more</span>
00135 <span class="comment">  =&gt; this freed CallControl from nearly all communication stuff</span>
00136 <span class="comment"></span>
00137 <span class="comment">Revision 1.5  2002/11/13 15:24:25  ghillie</span>
00138 <span class="comment">finished silence detection code</span>
00139 <span class="comment"></span>
00140 <span class="comment">Revision 1.4  2002/11/13 08:34:54  ghillie</span>
00141 <span class="comment">moved history to the bottom</span>
00142 <span class="comment"></span>
00143 <span class="comment">Revision 1.3  2002/11/12 15:52:08  ghillie</span>
00144 <span class="comment">added data in handler</span>
00145 <span class="comment"></span>
00146 <span class="comment">Revision 1.2  2002/10/29 14:28:22  ghillie</span>
00147 <span class="comment">added stop_file_* calls to make sure transmission is cancelled when it's time...</span>
00148 <span class="comment"></span>
00149 <span class="comment">Revision 1.1  2002/10/25 13:29:39  ghillie</span>
00150 <span class="comment">grouped files into subdirectories</span>
00151 <span class="comment"></span>
00152 <span class="comment">Revision 1.2  2002/10/24 09:55:52  ghillie</span>
00153 <span class="comment">many fixes. Works for one call now</span>
00154 <span class="comment"></span>
00155 <span class="comment">Revision 1.1  2002/10/23 09:47:30  ghillie</span>
00156 <span class="comment">added audioreceive module</span>
00157 <span class="comment"></span>
00158 <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>