|
#if _MSC_VER > 1000
|
#pragma once
|
#endif // _MSC_VER > 1000
|
// QLSession.h : header file
|
//
|
|
#include "QLObj.h"
|
#include "MsgMap.h"
|
#include "QLResponse.h"
|
#include "QLCommander.h"
|
|
class CQLLoginInfo;
|
class CQLConnect;
|
class CQLSysMsg;
|
class CQLCallBackBase;
|
|
//#include "MsgItem.h"
|
|
#define SESSION_FLAG_CONNECTONLY ( 0X1 ) // Ö»ÄܵǼһÀàÐÍ(Èç¹ûÓиÃÑ¡ÏÔòÒª¸ù¾Ý strName ½øÐÐÅųâ)
|
|
/////////////////////////////////////////////////////////////////////////////
|
// CQLSession window
|
|
class AFX_EXT_CLASS CQLSession : public CQLObj
|
{
|
// Construction
|
public:
|
CQLSession();
|
virtual ~CQLSession();
|
|
// Attributes
|
public:
|
UINT m_nID;
|
CString m_strName;
|
|
CString m_strConnectType; // ÓÃÓÚÏò·þÎñ¶Ë×¢²áÁ¬½ÓÀàÐÍ
|
CString m_strAppType;
|
DWORD m_dwFlag;
|
|
protected:
|
CQLConnect *m_pConnect;
|
CQLCallBackBase *m_pCallBack;
|
|
CMsgMapMgr m_mgrMsgMap; // Msg Map; Temp
|
|
// Operations
|
public:
|
void SetCallBack( CQLCallBackBase *pCallBack );
|
void SetOIConnect( CQLConnect *pConnect );
|
CQLConnect * GetOIConnect();
|
CQLLoginInfo * GetOILoginInfo();
|
UINT GetID();
|
BOOL CloseSession();
|
|
BOOL AddMsgMap( CString strMsgCategory, CString strMapStr, long nFlag, CString strParam, long nLevel );
|
BOOL RemoveMsgMap( CString strMsgCategory, CString strMapStr );
|
BOOL RemoveAllMsgMap();
|
|
UINT DoSysCmd( CQLSysMsg *pSysMsg );
|
BOOL SetCmderCancel( long nTrID );
|
BOOL SetLoginInfo( CQLLoginInfo *pLoginInfo );
|
void SetTimeout( int nSecond = 20 );
|
|
BOOL SignIn( CQLLoginInfo *pLoginInfo );
|
|
// Notify Process
|
BOOL OnSignIn( enum SIGN_IN_STATE nState, int nErrCode = 0 );
|
void OnConnectionClosed();
|
bool OnChallenges( CQLResponse *pResponse );
|
void OnNtyUserStatusChanged( CQLResponse *pResponse );
|
void OnNtyKillOut( CQLResponse *pResponse );
|
virtual void OnNtyNotify( CQLResponse *pResponse );
|
virtual void OnNtyOtherSysMsg( CQLResponse *pResponse, CString strCmdType = _T( "" ) );
|
void OnNotifyResponse( CQLResponse *pResponse );
|
|
/* void OnNtyNewMsg( CMsgItem *pMsg );
|
void OnNtyOpenMsg( CQLResponse *pResponse );
|
void OnNtyMeetRing( CQLResponse *pResponse );
|
void OnNtyMeetAskJoin( CQLResponse *pResponse );
|
void OnNotifySMA( CQLResponse *pResponse );
|
void OnNtyVioceRing( CQLResponse *pResponse );
|
void OnNtyNewMsg_AddIn( CString strAddInName, CMsgItem *pMsg );
|
|
void OnMeetConnectionClosed( CString strMeetID );
|
void OnMeetNotifyResponse( CQLResponse *pResponse );
|
void OnMeetNewMsg( CMsgItem *pMsg );
|
void OnMeetError( UINT nErrCode, CString strMeetID, UINT nTrID );
|
void OnMeetResponse( CQLResponse *pResponse );
|
*/
|
// Commander Process
|
virtual void OnCmderError( UINT nErrCode, UINT nTrID, CString strParam );
|
virtual void OnCmderResponse( CQLResponse *pResponse, CQLCommander *pCmder, BOOL &bRemoveCmder );
|
void OnCmderResponse( CQLResponse *pResponse, CString strBodfy = _T( "" ) );
|
|
// void CancelUploadFile( int nTrID, CString strAttachFile );
|
// void CancelDownloadFile( int nTrID, CString strAttachFile );
|
|
// void OnMsgSendAttach( UINT nTrID, CString strMsgID, CString strFileName, int nReaded, int nAttachSize );
|
// void OnMsgDownloadAttach( UINT nTrID, CString strMsgID, CString strFileName, int nWrited, int nAttachSize );
|
|
virtual CQLCommander * NewCmderByCMDName( CString strMethod ) { return NULL; }
|
|
};
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
//{{AFX_INSERT_LOCATION}}
|
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
|