| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455 |
- /*************************************************************************
- 【文件名】 AvayaLinkControl.h
- 【功能模块和目的】 AVAYA设备DevLink模块控制应用类头文件
- 【开发者及日期】 郑石诺 2016/04/01
- 【版本】 V1.0.0
- 【版权信息】 Copyright (C)2016 河南华谊网络科技有限公司
- 【更改记录】
- *************************************************************************/
- #pragma once
- class CAvayaLinkGw;
- /*************************************************************************
- 【类名】 CAvayaLinkControl
- 【功能】
- 【接口说明】 AVAYA设备DevLink模块控制应用类
- 【开发者及日期】 郑石诺 2016/04/01
- 【版本】 V1.0.0
- 【版权信息】 Copyright (C)2016 河南华谊网络科技有限公司
- 【更改记录】
- *************************************************************************/
- class CAvayaLinkControl
- {
- SINGLETON_DECLARE(CAvayaLinkControl)
- public:
- ~CAvayaLinkControl(void);
- void open(void); // 连接启动
- void close(void); // 连接断开
- private:
- CAvayaLinkControl(void);
- // DevLink相关事件回调函数
- static void CALLBACK __devLinkCommsEvent(DWORD hPbx, DWORD nEvent, DWORD nParam1);
- static void CALLBACK __devLinkDetailEvent(DWORD hPbx, char* pszInfo);
- static UINT __dispatchEvent(LPVOID pParam); // 处理DevLink事件队列的线程函数
- void __wait(void);
- // 事件处理
- void __onConnectResult(bool IsSucceed); // DevLink连接结果事件
- void __onDetailEvent(char* Info); // DevLink明细消息事件
- UINT __procEvent(void);
- void __freeAllLinkGw(void);
- private:
- CList<CAvayaLinkGw*, CAvayaLinkGw*> m_ListDevLinkGw; // DevLink事件缓冲队列
- bool m_Stop; // 分发线程停止标识
- CEvent m_ThreadWaitFlag; // 消息分发线程睡眠的信号事件
- CWinThread* m_EventThread; // 保存分发事件的线程句柄
- CCriticalSection m_LockSection; // 事件缓冲队列的互斥对象
- };
|