Main Page | Modules | Class Hierarchy | Alphabetical List | Compound List | File List | Compound Members | File Members

callmodule.h

Go to the documentation of this file.
00001 
00008 /***************************************************************************
00009  *                                                                         *
00010  *   This program is free software; you can redistribute it and/or modify  *
00011  *   it under the terms of the GNU General Public License as published by  *
00012  *   the Free Software Foundation; either version 2 of the License, or     *
00013  *   (at your option) any later version.                                   *
00014  *                                                                         *
00015  ***************************************************************************/
00016 
00017 #ifndef CALLMODULE_H
00018 #define CALLMODULE_H
00019 
00020 #include "../backend/callinterface.h"
00021 #include "../backend/capiexception.h"
00022 
00023 class Connection;
00024 
00043 class CallModule: public CallInterface
00044 {
00045         public:
00052                 CallModule(Connection* connection, int timeout=-1, bool DTMF_exit=false);
00053 
00056                 ~CallModule();
00057 
00067                 virtual void mainLoop() throw (CapiWrongState, CapiMsgError, CapiExternalError);
00068 
00073                 virtual void transmissionComplete(void);
00074 
00079                 virtual void alerting (void);
00080 
00085                 virtual void callConnected (void);
00086 
00091                 virtual void callDisconnectedLogical (void);
00092 
00097                 virtual void callDisconnectedPhysical (void);
00098 
00103                 virtual void gotDTMF (void);
00104 
00109                 virtual void dataIn (unsigned char* data, unsigned length);
00110 
00111         protected:
00114                 virtual long getTime();
00115 
00118                 void resetTimer(int new_timeout);
00119 
00120                 bool DTMF_exit; 
00121                 bool finish;  
00122                 bool abort;   
00123                 Connection* conn; 
00124                 long exit_time; 
00125                 int timeout; 
00126 };
00127 
00128 #endif
00129 
00130 /* History
00131 
00132 $Log: callmodule.h,v $
00133 Revision 1.3  2003/04/17 10:40:32  gernot
00134 - support new ALERTING notification feature of backend
00135 
00136 Revision 1.2  2003/03/06 09:35:10  gernot
00137 - fixed typo
00138 
00139 Revision 1.1.1.1  2003/02/19 08:19:53  gernot
00140 initial checkin of 0.4
00141 
00142 Revision 1.12  2002/12/06 13:08:30  ghillie
00143 minor doc change
00144 
00145 Revision 1.11  2002/11/29 10:27:44  ghillie
00146 - updated comments, use doxygen format now
00147 
00148 Revision 1.10  2002/11/25 21:00:53  ghillie
00149 - improved documentation, now doxygen-readabl
00150 
00151 Revision 1.9  2002/11/25 11:56:21  ghillie
00152 - changed semantics of timeout parameter: -1 = infinite now, 0 = 0 seconds (i.e. abort immediately)
00153 
00154 Revision 1.8  2002/11/22 15:18:06  ghillie
00155 - added support for DTMF_exit
00156 - de-register Connection object uncondionally in destructor (checking for abort removed)
00157 
00158 Revision 1.7  2002/11/21 15:34:50  ghillie
00159 - mainLoop() doesn't return any value any more, but throws CapiWrongState when connection is lost
00160 
00161 Revision 1.6  2002/11/15 13:51:49  ghillie
00162 fix: call module wasn't finished when call was only connected/disconnected physically
00163 
00164 Revision 1.5  2002/11/14 17:05:19  ghillie
00165 major structural changes - much is easier, nicer and better prepared for the future now:
00166 - added DisconnectLogical handler to CallInterface
00167 - DTMF handling moved from CallControl to Connection
00168 - new call module ConnectModule for establishing connection
00169 - python script reduced from 2 functions to one (callWaiting, callConnected
00170   merged to callIncoming)
00171 - call modules implement the CallInterface now, not CallControl any more
00172   => this freed CallControl from nearly all communication stuff
00173 
00174 Revision 1.4  2002/11/13 15:25:08  ghillie
00175 fixed small typo
00176 
00177 Revision 1.3  2002/11/13 08:34:54  ghillie
00178 moved history to the bottom
00179 
00180 Revision 1.2  2002/11/12 15:52:08  ghillie
00181 added data in handler
00182 
00183 Revision 1.1  2002/10/25 13:29:39  ghillie
00184 grouped files into subdirectories
00185 
00186 Revision 1.3  2002/10/23 14:25:29  ghillie
00187 - a callmodule has to register itself at CallControl so it can be aborted if call is gone
00188 - added distinction between "exited normally" and "aborted because call is gone" -> different results of mainLoop()
00189 
00190 Revision 1.2  2002/10/10 12:45:40  gernot
00191 added AudioReceive module, some small details changed
00192 
00193 Revision 1.1  2002/10/09 14:34:22  gernot
00194 added CallModule class as base class for all call handling modules
00195 
00196 */

Generated on Sun Jan 18 11:12:46 2004 for CapiSuite by doxygen 1.3.2