使用soui开发的mbc,只支持windows版本
w1146869587
2022-01-24 4905e2e7537d507f218e8e9595485e09d9f3a2b4
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
// MsgMap.h: interface for the CMsgMap class.
//
//////////////////////////////////////////////////////////////////////
 
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
 
class CQLSession;
 
// AddIn_Flag
#define        ADDIN_FLAG_ONSTART_PIPE        ( 1 )        // ÔÚ AM Pipe Æô¶¯Ê±ºòµÄ×Ô¶¯Æô¶¯
#define        ADDIN_FLAG_ONSTART_CONECT    ( 2 )        // ÔÚ AM Pipe Æô¶¯Connect µÄʱ¼ä×Ô¶¯Æô¶¯
#define        ADDIN_FLAG_MSGER_CMD        ( 4 )        // ËµÃ÷ΪÃüÁî¶ÔÏó,½«ÔÚAmsger ÖеÄÀ©Õ¹ÃüÁî²Ëµ¥ÖÐÁгö
#define        ADDIN_FLAG_MSGER_SETTING    ( 8 )        // ÔÊÐíÔÚ AMsger ÖнøÐРOption ÉèÖÃ
#define        ADDIN_FLAG_ONSTART_MSGER    ( 16 )        // ÔÚ AMsger Æô¶¯Ê±ºòµÄ×Ô¶¯Æô¶¯
 
// AddIn Target Type
#define        ADDIN_TARGETTYPE_GUID        ( 0 )    // Target ÖÐΪ CLSID
#define        ADDIN_TARGETTYPE_PROID        ( 1 )    // Target ÖÐΪ ProID
#define        ADDIN_TARGETTYPE_VBSCRIPT    ( 2 )    // Target ÖÐΪ VBS FileName
 
#define        MSGMAP_FLAG_ENGROSS            ( 1 )    // ¶ÀÕ¼
#define        MSGMAP_FLAG_CONCEDE            ( 2 )    // Èò½
#define        MSGMAP_FLAG_CLOSEADDIN        ( 4 )    // ÔÚµ÷ÓúÃÖ®ºóÒªCloseAddIn
 
// Msg Categroy
#define    MSGCATEGORY_SYSMSG        _T( "SYSMSG" )    // ÏµÍ³Ê¼þÏûÏ¢
#define    MSGCATEGORY_MSG            _T( "MSG" )        // ÐÂÏûÏ¢µ½´ï
 
// Msg Type of SYSMSG
#define    MSGTYPE_SYS_NLN        _T( "NLN" )        // Í¨ÖªÓû§×´Ì¬¸Ä±ä
#define    MSGTYPE_SYS_FLN        _T( "FLN" )        // Í¨ÖªÓû§ÀëÏß
#define    MSGTYPE_SYS_NTY        _T( "NTY" )        // ÏµÍ³Í¨Öª
 
// Msg Type of MSG
#define    MSGTYPE_GEN            _T( "GEN" )        // ³£¹æÏûÏ¢
 
 
class AFX_EXT_CLASS CMsgTag : public CObject
{
public:
    CMsgTag();
    virtual ~CMsgTag();
    void operator = ( const CMsgTag &Item );
 
// Attributers
public:
    CString                m_strMapStr;
 
    CString                m_strName;
    CStringArray        m_asParamName;
    CStringArray        m_asParamValue;
 
protected:
 
// Operations
public:
    BOOL        SetData( CString strTag );
    BOOL        ParseData( CString strTag, CString &strName, CStringArray &asParamName, CStringArray &asParamValue );
 
    void        AddParam( CString strName, CString strValue );
    BOOL        RemoveParam( CString strName, CString strValue = _T( "" ) );
    int            FindParam( CStringArray &asParamName, CStringArray &asParamValue, CString strName, CString strValue );
 
    BOOL        IsSubscibe( CString strTag );
    BOOL        IsSame( CString strTag );
 
protected:
    BOOL        GetStrItem( CString &strBuff, CString &strItem, char chApart );
 
};
 
class AFX_EXT_CLASS CMsgMap : public CObject  
{
public:
    CMsgMap();
    virtual ~CMsgMap();
 
// Attributers
public:
    CString            m_strMsgCategory;
    CMsgTag            m_MsgTag;            // ÏûÏ¢ÀàÐÍ£¬±êʶ×Ö´®
 
    // Online Msg Map
    CQLSession        *m_pSession;
 
    // Offline Msg Map
    CString            m_strAddInName;        // AddIn Name
    UINT            m_nTargetType;        // Target Type
    CString            m_strTarget;        // ¸ù¾Ý TargetType µÄ²»Í¬£¬Æä´ú±íµÄÒâÒåÒ²¾Í²»Í¬
    UINT            m_nOwnerSessionID;    // Owner's Session ID
 
    DWORD            m_dwFlag;            // 
    CString            m_strParam;            // 
 
// Operations
public:
    BOOL        IsSubscibe( CString strMsgCategory, CString strMapStr );
    BOOL        IsSame( CString strMsgCategory, CString strMapStr );
 
};
 
///////////////////////////////////
// ÏûÏ¢¶¨ÔĹÜÀí
///////////////////////////////////
class AFX_EXT_CLASS CMsgMapMgr
{
public:
    CMsgMapMgr();
    virtual ~CMsgMapMgr();
 
// Attributers
public:
    CList<CMsgMap*, CMsgMap*>    m_listMsgMap;
 
// Operations
public:
    // Session
    BOOL        AddMsgMap( CString strMsgCategory, CString strMapStr, CQLSession *pSession, DWORD dwFlag, CString strParam, int nLevel = 0 );
    BOOL        RemoveMsgMap( CString strMsgCategory, CString strMapStr, CQLSession *pSession );
    BOOL        RemoveMsgMap( CQLSession *pSession );
    POSITION    FindMsgMap( CString strMsgCategory, CString strMapStr, CQLSession *pSession = NULL );
 
    // AddIn
    BOOL        AddMsgMap( CString strMsgCategory, CString strMapStr, CString strAddInName, UINT nTargetType, CString strTarget, DWORD dwFlag, CString strParam = _T( "" ), UINT nOwnerSessionID = 0, int nLevel = 0 );
    BOOL        RemoveMsgMap( CString strMsgCategory, CString strMapStr, CString strAddInName );
    BOOL        RemoveMsgMap( CString strAddInName );
    POSITION    FindMsgMap( CString strMsgCategory, CString strMapStr, CString strAddInName );
 
    // Common
    void        RemoveAllMsgMap();
    POSITION    FindSubscibe( CString strMsgCategory, CString strMapStr, 
                                POSITION posStart = NULL , UINT nOwnerSessionID = 0 );
    BOOL        LoadAddInMap( CString strKeyParent, CString strSubKey, UINT nOwnerSessionID = 0 );
 
protected:
 
};