00001
00002
00003
00004
00005
00006
00007
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
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
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