| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758 |
- /*************************************************************************
- 【文件名】 NetworkClient.h
- 【功能模块和目的】 ACD端网络控制类头文件
- 【开发者及日期】 郑石诺 2015/09/22
- 【版本】 V1.0.0
- 【版权信息】 Copyright (C)2015 河南加一信息技术有限公司
- 【更改记录】
- *************************************************************************/
- #pragma once
- #include "../Public/GlobalDef/CommonTypeDef.h"
- #include <functional>
- /*************************************************************************
- 【类名】 CNetworkClient
- 【功能】
- 【接口说明】 ACD端网络控制类
- 【开发者及日期】 郑石诺 2015/09/22
- 【版本】 V1.0.0
- 【版权信息】 Copyright (C)2015 河南加一信息技术有限公司
- 【更改记录】
- *************************************************************************/
- class CNetworkClient
- {
- SINGLETON_DECLARE(CNetworkClient)
- public:
- CNetworkClient(void);
- virtual ~CNetworkClient(void);
- bool isAcdConnected() const { return m_IsAcdConnected; } // 获取Acd连接状态
- bool isCtiConnected() const { return m_IsCtiConnected; }
- bool init(void); // 初始化
- void release(void); // 连接释放
- bool send2ACD(CPduEntity* a_pPduEntity);
-
- ////////////////////////////////////////////////////////////////////////////////
- //继承自IPduLinkProc, IPduCommProc
- void OnLinkStateChanged(const PduLinkContent& linkContent); // PDU连接状态变化事件处理
- void OnRecvCommand(CPduEntity* a_pPduEntity); // PDU命令到达事件处理
- typedef std::function<void(CPduEntity*)> AcdRecMsgFun;
- void setAcdRecMsgFun(AcdRecMsgFun fun) { this->m_acdRecvMsgFun = fun; };
- private:
- int m_AcdDevID; // ACD设备ID
- bool m_IsAcdConnected; // 连接与否
- bool m_IsCtiConnected; // cti是否连接
- CCriticalSection m_Lock4CTi;
- AcdRecMsgFun m_acdRecvMsgFun;
- };
|