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

AvayaLinkControl.h 1.7KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. /*************************************************************************
  2. 【文件名】 AvayaLinkControl.h
  3. 【功能模块和目的】 AVAYA设备DevLink模块控制应用类头文件
  4. 【开发者及日期】 郑石诺 2016/04/01
  5. 【版本】 V1.0.0
  6. 【版权信息】 Copyright (C)2016 河南华谊网络科技有限公司
  7. 【更改记录】
  8. *************************************************************************/
  9. #pragma once
  10. class CAvayaLinkGw;
  11. /*************************************************************************
  12. 【类名】 CAvayaLinkControl
  13. 【功能】
  14. 【接口说明】 AVAYA设备DevLink模块控制应用类
  15. 【开发者及日期】 郑石诺 2016/04/01
  16. 【版本】 V1.0.0
  17. 【版权信息】 Copyright (C)2016 河南华谊网络科技有限公司
  18. 【更改记录】
  19. *************************************************************************/
  20. class CAvayaLinkControl
  21. {
  22. SINGLETON_DECLARE(CAvayaLinkControl)
  23. public:
  24. ~CAvayaLinkControl(void);
  25. void open(void); // 连接启动
  26. void close(void); // 连接断开
  27. private:
  28. CAvayaLinkControl(void);
  29. // DevLink相关事件回调函数
  30. static void CALLBACK __devLinkCommsEvent(DWORD hPbx, DWORD nEvent, DWORD nParam1);
  31. static void CALLBACK __devLinkDetailEvent(DWORD hPbx, char* pszInfo);
  32. static UINT __dispatchEvent(LPVOID pParam); // 处理DevLink事件队列的线程函数
  33. void __wait(void);
  34. // 事件处理
  35. void __onConnectResult(bool IsSucceed); // DevLink连接结果事件
  36. void __onDetailEvent(char* Info); // DevLink明细消息事件
  37. UINT __procEvent(void);
  38. void __freeAllLinkGw(void);
  39. private:
  40. CList<CAvayaLinkGw*, CAvayaLinkGw*> m_ListDevLinkGw; // DevLink事件缓冲队列
  41. bool m_Stop; // 分发线程停止标识
  42. CEvent m_ThreadWaitFlag; // 消息分发线程睡眠的信号事件
  43. CWinThread* m_EventThread; // 保存分发事件的线程句柄
  44. CCriticalSection m_LockSection; // 事件缓冲队列的互斥对象
  45. };