| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354 |
- /*************************************************************************
- 【文件名】 Session.h
- 【功能模块和目的】 会话管理类头文件
- 【开发者及日期】 郑石诺 2016/07/28
- 【版本】 V1.0.0
- 【版权信息】 Copyright (C)2016 河南华谊网络科技有限公司
- 【更改记录】
- *************************************************************************/
- #pragma once
- class CFsProxy;
- class CVirtualChan;
- /*************************************************************************
- 【类名】 CSession
- 【功能】
- 【接口说明】 会话管理类
- 【开发者及日期】 郑石诺 2016/07/28
- 【版本】 V1.0.0
- 【版权信息】 Copyright (C)2016 河南华谊网络科技有限公司
- 【更改记录】
- *************************************************************************/
- class CSession
- {
- public:
- CSession(CFsProxy* pParent, LPCTSTR Id);
- ~CSession(void);
- // 属性接口
- LPCTSTR id(void) const { return m_Id; }
- bool isVoid(void) const { return m_ListChan.GetCount() == 0; }
- // 操作接口
- void prepare(PCHAN_EVENT_NOTIFY pNotify);
- void onChanEvent(PCHAN_EVENT_NOTIFY pNotify);
- void onChanDtmf(PDTMF_NOTIFY pNotify);
- void onChanHold(PHOLD_NOTIFY pNotify);
- CVirtualChan* getAssoChan(CVirtualChan* pChan);
- private:
- CVirtualChan* __getChan(LPCTSTR ChanId);
- CVirtualChan* __findChan(PCHAN_EVENT_NOTIFY pNotify);
- void __addChan(CVirtualChan* pChan);
- void __delChan(CVirtualChan* pChan);
- void __clearChan(void);
- void __notifySessionChanEvent(CVirtualChan* pChanHost, PCHAN_EVENT_NOTIFY pNotify);
- void __onChanFree(CVirtualChan* pChan, PCHAN_EVENT_NOTIFY pNotify);
- private:
- CFsProxy* m_pParent;
- CString m_Id;
- CList<CVirtualChan*, CVirtualChan*> m_ListChan;
- };
|