中间件标准版5.1git,去除基础模块

LineOpImplement.h 2.8KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. /*************************************************************************
  2. 【文件名】 LineOpImplement.h
  3. 【功能模块和目的】 线路操作实现类头文件
  4. 【开发者及日期】 郑石诺 2015/02/27
  5. 【版本】 V1.0.0
  6. 【版权信息】 Copyright (C)2015 河南华谊网络科技有限公司
  7. 【更改记录】
  8. *************************************************************************/
  9. #pragma once
  10. class CLine;
  11. class CLineAudio;
  12. class CLineRecordDig;
  13. class CLineRecordAna;
  14. /*************************************************************************
  15. 【类名】 CLineOpImplement
  16. 【功能】
  17. 【接口说明】 线路操作实现类
  18. 【开发者及日期】 郑石诺 2015/02/27
  19. 【版本】 V1.0.0
  20. 【版权信息】 Copyright (C)2015 河南华谊网络科技有限公司
  21. 【更改记录】
  22. *************************************************************************/
  23. class CLineOpImplement
  24. {
  25. SINGLETON_DECLARE(CLineOpImplement)
  26. public:
  27. ~CLineOpImplement(void);
  28. //放音路线命令处理
  29. void onCmdLinePlay(CLineAudio *pLine, CPduEntity* pPduEntity); // 放音命令处理
  30. void onCmdLinePlayControl(CLineAudio *pLine, CPduEntity* pPduEntity); // 放音线路控制命令处理
  31. void onCmdFax(CLineAudio *pLine, CPduEntity* pPduEntity); // 传真操作命令处理
  32. void onCmdLeaveWord(CLineAudio *pLine, CPduEntity* pPduEntity); // 留言操作处理
  33. void onCmdLineHangUp(CLineAudio *pLine); // 挂机操作
  34. //录音线路命令处理
  35. void onCmdLineRecord(CLine *pLine, CPduEntity* pPduEntity); // 录音命令处理
  36. void onCmdLineRecControl(CLine *pLine, CPduEntity * pPduEntity); // 录音线路控制命令处理
  37. void onCmdStopRecord(CLine *pLine); // 停止录音命令处理
  38. //放音线路事件处理
  39. void onMsgReturnRecord(CLineAudio *pLine); // 录音完成或留言事件
  40. void onMsgPlayState(CLineAudio *pLine, int State); // 放音线路状态
  41. void onMsgReturnPlay(CLineAudio *pLine); // 结束放音
  42. void onMsgReturnDTMF(CLineAudio *pLine); // DTMF结束
  43. void onMsgReturnFax(CLineAudio *pLine, int Return); // 传真结束事件
  44. //录音线路事件处理
  45. void onMsgDigState(CLineRecordDig* pLine, int State); // 数字录音事件处理
  46. void onMsgAnaState(CLineRecordAna* pLine, int State); // 模拟录音事件处理
  47. private:
  48. CLineOpImplement(void);
  49. bool __createFilePath(LPCTSTR FilePath); // 创建文件路径
  50. bool __startPlay(CLine *pLine, LPCTSTR PlayContent); // 放音
  51. void __stopPlay(CLine *pLine); // 停止放音及收号
  52. bool __waitForDtmf(CLine *pLine, int DtmfLen, char EndFlag, int DtmfSpan); // 设置等待收号
  53. bool __linkFax(CLineAudio *pLine); // 关联一传真资源
  54. void __unLinkFax(CLineAudio *pLine); // 释放一传真资源
  55. void __hangUp(int LineID); // 放音线路挂机
  56. bool __startRecord(CLine *pLine, LPCTSTR FileName, char FinishKey, int LeaveTime); // 录音
  57. void __stopRecord(CLine *pLine); // 停止留言/录音
  58. bool __pauseRecord(int LineID); // 暂停录音
  59. bool __resumeRecord(int LineID); // 继续录音
  60. void __pickUp(int LineID); // 执行摘机
  61. };