00001
00002
00003
00004
00005
00006
00007
00008
00009
00010 #ifndef _BOGOTEL_PLAYOP_H
00011 #define _BOGOTEL_PLAYOP_H
00012
00013 #include <bogotel/IOOp.h>
00014 #include <bogotel/timertarget.h>
00015
00016 #include <dxtables.h>
00017 #include <srltpt.h>
00018
00019 #include <stdexcept>
00020
00021 namespace bogotel {
00022
00023 class CTermParms;
00024
00025 class CPlayOp : public CIOOp {
00026 public:
00027
00028 enum timerType {
00029 singleWav = 2000
00030 };
00031
00032 CPlayOp(CVoiceDev*, const DX_IOTT* pIOTT, const DV_TPT* pTPT);
00033 virtual ~CPlayOp();
00034 virtual void start();
00035 virtual long terminationEvent();
00036 virtual std::string toString();
00037
00038 protected:
00039 virtual void _timerExpired(int timerType, int stateId);
00040
00041 private:
00042 void processIottEntry() throw (std::invalid_argument);
00043 int getWavDuration(int hFile, long *plDuration);
00044
00045 static const char * s_szName;
00046 CTermParms* m_pTermParms;
00047 const DX_IOTT* m_pIott;
00048 bool m_bWasWavPlayed;
00049 };
00050
00051 }
00052
00053 #endif // _BOGOTEL_PLAYOP_H
00054