中间件底层,websocket

IvrCore.h 2.1KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. /*************************************************************************
  2. 【文件名】 IvrCore.h
  3. 【功能模块和目的】 IVR系统核心控制类头文件
  4. 【开发者及日期】 郑石诺 2015/01/29
  5. 【版本】 V1.0.0
  6. 【版权信息】 Copyright (C)2015 河南加一信息技术有限公司
  7. 【更改记录】
  8. *************************************************************************/
  9. #pragma once
  10. #include "FlowTemplateMgr.h"
  11. #include "IvrFlowMgr.h"
  12. #include "IMsgObserver.h"
  13. /*************************************************************************
  14. 【类名】 CIvrCore
  15. 【功能】
  16. 【接口说明】 IVR系统核心控制类
  17. 【开发者及日期】 郑石诺 2015/01/29
  18. 【版本】 V1.0.0
  19. 【版权信息】 Copyright (C)2015 河南加一信息技术有限公司
  20. 【更改记录】
  21. *************************************************************************/
  22. class CIvrCore:public IMsgObserver
  23. {
  24. SINGLETON_DECLARE(CIvrCore)
  25. public:
  26. ~CIvrCore(void);
  27. bool stage1Start(void); // IVR1阶段启动
  28. bool stage2Start(void); // IVR2阶段启动
  29. void exit(void); // IVR系统退出
  30. void procPdu(CPduEntity* pPduEntity); // 处理PDU
  31. void onNetLinkUpdated(bool IsConnect); // 网络连接状态改变的处理函数
  32. CFlowTemplateMgr& flowTemplateMgr(void) { return m_TemplateMgr; }
  33. CIvrFlowMgr& ivrFLowMgr(void) { return m_FlowMgr; }
  34. int GetCurrPos(CIvrFlow* pFlow) {return m_FlowMgr.GetCurrIvrPos(pFlow);}
  35. //继承自IMsgObserver
  36. void onMessage(UINT MsgType, const PARAM lpContent);
  37. private:
  38. CIvrCore(void);
  39. bool __setupFlowEnvironment(void); // 设置流程环境
  40. void __procMsgCtiCallIn(CPduEntity* pPduEntity); // CTI通知IVR外线来电
  41. void __procMsgCtiPredictiveCall(CPduEntity* pPduEntity);// CTI通知IVR自动外呼
  42. void __procMsgCtiTurnIvr(CPduEntity* pPduEntity); // CTI通知IVR转IVR
  43. void __procMsgCtiHangup(CPduEntity* pPduEntity); // CTI通知IVR外线挂机
  44. private:
  45. CFlowTemplateMgr m_TemplateMgr;
  46. CIvrFlowMgr m_FlowMgr;
  47. int m_CurrentWaiterNumber;
  48. public:
  49. int GetCurrentWaiterNumber(void) const { return m_CurrentWaiterNumber; }
  50. void SetCurrentWaiterNumber(int CurrentWaiterNumber) { m_CurrentWaiterNumber = CurrentWaiterNumber; }
  51. };