Main Page   Namespace List   Class Hierarchy   Data Structures   File List   Namespace Members   Data Fields   Globals   Related Pages  

DialOp.h

Go to the documentation of this file.
00001 /*
00002  * DialOp.h
00003  *
00004  * Copyright 2003, MobileSpear Inc. (www.mobilespear.com). All rights reserved.
00005  * Copyright 2003, David Resnick. All rights reserved.
00006  *
00007  * See the file doc\license.txt for the terms of usage and distribution.
00008  */
00009 
00010 #ifndef _BOGOTEL_DIALOP_H
00011 #define _BOGOTEL_DIALOP_H
00012 
00013 #include <bogotel/IOOp.h>
00014 #include <bogotel/timertarget.h>
00015 
00016 #include <stdexcept>
00017 #include <string>
00018 
00019 namespace bogotel {
00020 
00021     class CDialOp : public CIOOp {
00022     public:
00023         // these values cannot be allowed to conflict with those in CTermParms!
00024         enum timerType {
00025             singleDtmf = 1000
00026         };
00027 
00028         CDialOp(CVoiceDev*, const char *szDialStr, int iTargetType) 
00029             throw (std::invalid_argument);
00030         virtual ~CDialOp();
00031 
00032         virtual std::string toString();
00033         virtual void start();
00034 
00035     protected:
00036         virtual void _timerExpired(int timerType, int stateId);
00037         // override terminate so that we can check the target
00038         virtual void terminate(long reason);
00039         virtual long terminationEvent();
00040 
00041     private:
00042         static const char *    s_szValidDtmf;
00043         static const char *    s_szName;
00044         std::string            m_strDtmf;
00045         std::string::size_type m_iCurrDtmf;
00046         int                    m_iTargetType;
00047 
00048         void checkDialString() throw (std::invalid_argument);
00049         void dialSingleDigit();
00050     };
00051 }
00052 
00053 #endif // _BOGOTEL_DIALOP_H

Generated on Tue Aug 12 12:41:29 2003 for bogotel by doxygen 1.3. Hosted by SourceForge.net Logo