多数据源中间件标准版1.0

DeviceMgr.h 1.8KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. /*************************************************************************
  2. 【文件名】 DeviceMgr.h
  3. 【功能模块和目的】 设备管理类头文件
  4. 【开发者及日期】 郑石诺 2015/02/12
  5. 【版本】 V1.0.0
  6. 【版权信息】 Copyright (C)2015 河南华谊网络科技有限公司
  7. 【更改记录】
  8. *************************************************************************/
  9. #pragma once
  10. class CDevFax;
  11. class CLine;
  12. /*************************************************************************
  13. 【类名】 CDeviceMgr
  14. 【功能】
  15. 【接口说明】 设备管理类
  16. 【开发者及日期】 郑石诺 2015/02/12
  17. 【版本】 V1.0.0
  18. 【版权信息】 Copyright (C)2015 河南华谊网络科技有限公司
  19. 【更改记录】
  20. *************************************************************************/
  21. class CDeviceMgr
  22. {
  23. SINGLETON_DECLARE(CDeviceMgr)
  24. public:
  25. ~CDeviceMgr(void);
  26. bool initDev(void); // 设备初始化
  27. void closeDev(void); // 退出系统
  28. void procCmd(CPduEntity* a_pPduEntity); // 处理SOCKET命令
  29. void hangupAllLine(void); // 对所有线路进行挂机操作
  30. int getDevType(void); // 获取设备类型所有基本类型的设备
  31. CDevFax* getFreeDevFax(void); // 查找一空闲传真资源
  32. CDevFax* getFaxByID(int DevID); // 通过资源ID获取传真资源
  33. CLine* findLineByID(int LineID); // 根据逻辑线号查找线路基类
  34. private:
  35. CDeviceMgr(void);
  36. void __release(void);
  37. void __initLineObject(void); // 初始化线路对象
  38. CLine* __findLineByCicID(int CicId); // 根据数字线路的逻辑编号查找指定数字中继线路
  39. CLine* __findLineByIPOLineID(int IpoLineID); // 根据IPO-号查找线路基类
  40. void __callBackProc(PSSM_EVENT pEvent); // 事件回调
  41. static int CALLBACK __eventCallBackProc(PSSM_EVENT pEvent); // 事件回调
  42. private:
  43. CArray<CLine*, CLine*> m_LineArray; // 线路对象索引表
  44. CList<CDevFax*, CDevFax*> m_FaxList; // 传真资源列表
  45. };