| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273 |
- /*************************************************************************
- 【文件名】 LineOpImplement.h
- 【功能模块和目的】 线路操作实现类头文件
- 【开发者及日期】 郑石诺 2015/02/27
- 【版本】 V1.0.0
- 【版权信息】 Copyright (C)2015 河南华谊网络科技有限公司
- 【更改记录】
- *************************************************************************/
- #pragma once
- class CLine;
- class CLineAudio;
- class CLineRecordDig;
- class CLineRecordAna;
- /*************************************************************************
- 【类名】 CLineOpImplement
- 【功能】
- 【接口说明】 线路操作实现类
- 【开发者及日期】 郑石诺 2015/02/27
- 【版本】 V1.0.0
- 【版权信息】 Copyright (C)2015 河南华谊网络科技有限公司
- 【更改记录】
- *************************************************************************/
- class CLineOpImplement
- {
- SINGLETON_DECLARE(CLineOpImplement)
- public:
- ~CLineOpImplement(void);
- //放音路线命令处理
- void onCmdLinePlay(CLineAudio *pLine, CPduEntity* pPduEntity); // 放音命令处理
- void onCmdLinePlayControl(CLineAudio *pLine, CPduEntity* pPduEntity); // 放音线路控制命令处理
- void onCmdFax(CLineAudio *pLine, CPduEntity* pPduEntity); // 传真操作命令处理
- void onCmdLeaveWord(CLineAudio *pLine, CPduEntity* pPduEntity); // 留言操作处理
- void onCmdLineHangUp(CLineAudio *pLine); // 挂机操作
- //录音线路命令处理
- void onCmdLineRecord(CLine *pLine, CPduEntity* pPduEntity); // 录音命令处理
- void onCmdLineRecControl(CLine *pLine, CPduEntity * pPduEntity); // 录音线路控制命令处理
- void onCmdStopRecord(CLine *pLine); // 停止录音命令处理
- //放音线路事件处理
- void onMsgReturnRecord(CLineAudio *pLine); // 录音完成或留言事件
- void onMsgPlayState(CLineAudio *pLine, int State); // 放音线路状态
- void onMsgReturnPlay(CLineAudio *pLine); // 结束放音
- void onMsgReturnDTMF(CLineAudio *pLine); // DTMF结束
- void onMsgReturnFax(CLineAudio *pLine, int Return); // 传真结束事件
- //录音线路事件处理
- void onMsgDigState(CLineRecordDig* pLine, int State); // 数字录音事件处理
- void onMsgAnaState(CLineRecordAna* pLine, int State); // 模拟录音事件处理
- private:
- CLineOpImplement(void);
- bool __createFilePath(LPCTSTR FilePath); // 创建文件路径
- bool __startPlay(CLine *pLine, LPCTSTR PlayContent); // 放音
- void __stopPlay(CLine *pLine); // 停止放音及收号
- bool __waitForDtmf(CLine *pLine, int DtmfLen, char EndFlag, int DtmfSpan); // 设置等待收号
- bool __linkFax(CLineAudio *pLine); // 关联一传真资源
- void __unLinkFax(CLineAudio *pLine); // 释放一传真资源
- void __hangUp(int LineID); // 放音线路挂机
- bool __startRecord(CLine *pLine, LPCTSTR FileName, char FinishKey, int LeaveTime); // 录音
- void __stopRecord(CLine *pLine); // 停止留言/录音
- bool __pauseRecord(int LineID); // 暂停录音
- bool __resumeRecord(int LineID); // 继续录音
- void __pickUp(int LineID); // 执行摘机
- };
|