使用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
140
141
142
143
144
145
146
147
148
149
150
151
#pragma once
#include "MBAMDBDef.h"
// CMBAMDBConnect command target
 
class AFX_EXT_CLASS CMBAMDBConnect : public CObject
{
public:
    CMBAMDBConnect();
    virtual ~CMBAMDBConnect();
// Attributers
public:
    CString                m_strLogin;        // User Login Name
    CString                m_strServerID;    // Server ID
    CString                m_strDBFile;    // DB File Name 
    CDBConnect            m_AConnect;        // Local Database
    BOOL                m_bOpenDB;        //ÊÇ·ñÒѾ­Á¬½ÓÁËÊý¾Ý¿â
private:
    int                    m_nAddRef;
    
// Operations
public:
 
    //Á¬½ÓÊý¾Ý¿â
    int     OpenDB( CString strLogin, CString strServerID, BOOL &bFirstDB );
    //Á¬½ÓÖ¸¶¨Êý¾Ý¿âÎļþ
    int        OpenDB( CString strDBFile);
    //ÊÇ·ñÒѾ­Á¬½ÓÁ˵±Ç°Êý¾Ý¿â
    BOOL    IsThisDB( CString strLogin, CString strServerID );
    //¹Ø±ÕÊý¾Ý¿âÁ¬½Ó
    BOOL    CloseDB();
    //ÊÇ·ñÒѾ­Á¬½ÓÁËÊý¾Ý¿â
    BOOL    IsOpenDB();
    void    AddRef();
    void    Release();
    //»ñÈ¡Êý¾Ý¿âÁ¬½Ó¶ÔÏó
    CDBConnect* GetDBConnect(  );
    // ÊÂÎñ²Ù×÷
    BOOL        StartTransaction();
    BOOL        Commit();
    BOOL        Abort();
 
public:
    //°Ñ×Ö·û´®²åÈëblob
    BOOL        InsertPropStringData(  CString strPropClass, 
        CString strPropName, int nPropVer,CString strPropValue, CString strPropExtValue );
    //°Ñ×Ö·û´®¸üе½blob
    BOOL        UpdatePropStringData(  CString strPropClass,
        CString strPropName, int nPropVer,CString strPropValue, CString strPropExtValue );
    //°ÑÎļþ²åÈëblob
    BOOL        InsertPropFileData( CString strPropClass, 
        CString strPropName, int nPropVer, CString strPropValue,  CString strPropDataFile );
    //°ÑÎļþ¸üе½blob
    BOOL        UpdatePropFileData( CString strPropClass,
        CString strPropName, int nPropVer,CString strPropValue,  CString strPropDataFile );
    //»ñÈ¡blobµÄÄÚÈݱ£´æµ½Îļþ
    BOOL        GetPropFileData( CString strPropClass, 
        CString strPropName, int &nPropVer,CString &strPropValue, CString strPropDataFile );
    //»ñÈ¡blobµÄÄÚÈÝ
    BOOL        GetPropStringData( CString strPropClass,
        CString strPropName, int &nPropVer,CString &strPropValue, CString &strPropExtValue );
    //»ñÈ¡°æ±¾
    BOOL  GetPropVersion(CString strPropClass, CString strPropName, int &nPropVer );
    //ÉèÖð汾
    BOOL  SetPropVersion(CString strPropClass, CString strPropName, int nPropVer );
    //»ñÈ¡ÊôÐÔ±íÄÚÈÝ
    BOOL  GetPropertyData(CString strPropClass, CString strPropName, CString &strPropValue );
    //ÉèÖÃÊôÐÔ±íÄÚÈÝ
    BOOL  SetPropertyData(CString strPropClass, CString strPropName, CString strPropValue );
    //ÒÆ³ý ×î½üÁªÏµÈË
    BOOL RemoveLastContact( CString strID, int nType);
    // »ñÈ¡×î½üÁªÏµÈË
    BOOL    LoadLastContact(CArraySTKLastContact &arLastContact, int nLimitCount );
    // »ñȡָ¶¨µÄ×î½üÁªÏµÈË
    BOOL    GetLastContactItem(CString strID, int nType,stSTKLastContact &itemLastContact );
    // »ñȡָ¶¨Óû§»òÕßȺµÄδ¶ÁÏûÏ¢ÊýÄ¿
    int        GetUnreadMsgCount( CString strID, int nType);
    // »ñȡδ¶ÁÏûÏ¢ÊýÄ¿
    int        GetUnreadMsgCount( );
    // ÒƳýδ¶ÁÏûÏ¢
    BOOL    RemoveUnreadMsg(CString strMsgID);
    // ÅжÏÏûÏ¢ÊÇ·ñ´æÔÚ
    int        CheckMsgExist( LPCTSTR lpszMsgID );
    // »ñÈ¡¸½¼þÐÅÏ¢
    BOOL GetMsgFileInfo(CString strMsgID,  CString strFileID, CString &strFileName, CString &strFileSflag, __int64 &nFileSize );
    // »ñÈ¡ÏûÏ¢¸½¼þId
    BOOL GetMsgFilesInfo( CString strMsgID,CStringArray &arAttachID);
    // »ñÈ¡¸½¼þ·¾¶
    BOOL GetMsgFilePath(CString strMsgID, CString strFileID, CString &strFilePath );
    // ÉèÖÃÎļþ·¾¶
    BOOL SetMsgFilePath( CString strMsgID, CString strFileID, CString strFilePath );
    // Áгöδ¶ÁÏûÏ¢
    BOOL ListUnReadMsg( CObList &listMsg );
        //ɾ³ýȺÏûÏ¢
    BOOL DeletCrowdMsg( CString strMsgID,CString strGroupID);
    // É¾³ýȺ¹²ÏíÎļþÐÅÏ¢
    BOOL    DeleteGroupFileInfo( CString strGroupID, CString strShareID);
    // ¸üÐÂȺ¹²ÏíÎļþÐÅÏ¢
    BOOL    UpdateGroupFileInfo( CString strGroupID, CString strShareID, CString strFilePath, CString strFileName = _T(""), __int64 nFileSize = 0);
    // Ìí¼ÓÊÕµ½Èº¹²ÏíÎļþÐÅÏ¢
    BOOL    AddGroupFileInfo( CString strGroupID, CString strShareID, CString strFileName, __int64 nFileSize );
    // ×°ÔØÈº¹²ÏíÎļþÐÅÏ¢
    BOOL    LoadGroupFilePath( CString strGroupID, CString strShareID, CString &strFilePath  );
    // ×°ÔØÈº¹²ÏíÎļþÐÅÏ¢
    BOOL    LoadGroupFileInfo( CString strGroupID, CString strShareID, CString &strFileName, __int64 &nFileSize  );
    BOOL    LoadGroupFileInfo2( CString strGroupID, CString strShareID, CString &strFileName,CString &strFilePath , __int64 &nFileSize  );
    // »ñÈ¡µ±ÌìµÄÏûÏ¢
    BOOL    ListMsg(CString strDate,CString strSender,long nLimitCount,CArrayShortMsg &arUserMsg,BOOL bTimeAsc = FALSE  );
    // »ñÈ¡²å¼þµ±ÌìÏûÏ¢
    BOOL    ListMsg2(CString strDate,CString strExtType,long nLimitCount,CArrayShortMsg &arUserMsg,BOOL bTimeAsc = FALSE  );
    // Çå¿ÕÏûÏ¢¹ÜÀíÆ÷ÏûÏ¢
    BOOL        ClearReceiveBoxMsg(CString strStartDate,CString strEndDate, CString strUser,CString strUserName,CString strContentKey, int nAttach);
    BOOL        ClearSendBoxMsg(CString strStartDate,CString strEndDate, CString strUser,CString strUserName,CString strContentKey, int nAttach);
    BOOL        ClearSysBoxMsg(CString strStartDate,CString strEndDate);
    BOOL        ClearFavBoxMsg(CString strStartDate,CString strEndDate, CString strContentKey, int nFavFolder);
    BOOL        ClearCrowdMsgBox(CString strStartDate,CString strEndDate, CString strCrowdID, CString strKey);
    // »ñÈ¡·¢¼þÈË
    bool            GetSendPerson( CArrayAMObject &arAMObject);
    // »ñÈ¡ÊÕ¼þÈË
    bool            GetReceivePerson( CArrayAMObject &arAMObject);
    // »ñÈ¡¸øµ±Ç°Óû§·¢Ë͹ý¸½¼þµÄÓû§
    bool            GetSendAttachPerson(CArrayAMObject &arAMObject);
    // »ñȡȺ
    bool            GetCrowds(CArrayAMObject &arAMObject);
    // ´¦ÀíÓû§ÐÅÏ¢
    BOOL    LoadPropStringValue( CString strPropClass,CString strPropName, int &nPropVer,CString &strPropValue);
    BOOL    UpdatePropStringValue( CString strPropClass,CString strPropName, int nPropVer,CString strPropValue);
    BOOL    RemovePropStringValue( CString strPropClass,CString strPropName);
    BOOL    LoadUsersPropValue(CString strClass, CMapStringToString &mapPropValue);
 
    // »ñÈ¡Êý¾Ý¿âÏûÏ¢×îÔçÏûÏ¢µÄÈÕÆÚ
    CString         GetOldestMsg();
    // »ñÈ¡Êý¾Ý¿âÏûÏ¢×îÐÂÏûÏ¢µÄÈÕÆÚ
    CString            GetUpToDateMsg();
    // »ñÈ¡Êý¾Ý¿âÏûÏ¢Êý
    BOOL             GetMsgDataCount(long &nMsgCount,long &nRelatedCount);
    // Çå³ý¸ÃÈÕÆÚ֮ǰµÄÏà¹ØÏûÏ¢ÄÚÈÝ
    BOOL             CleanDateBeforeMsg(CString strDate);
    // Çå³ý¸ÃÈÕÆÚÖ®ºóµÄÏà¹ØÏûÏ¢ÄÚÈÝ
    BOOL             CleanDateAfterMsg(CString strDate);
    // Çå³ý¸ÃºÍÏûÏ¢²»Ïà¹Ø±íµÄÄÚÈÝ
    BOOL            CleanAMExtraData();
    // É¾³ýÏûÏ¢
    BOOL            DeleteMsgFromDB( CString strMsgID);
    // É¾³ýÊղؼÐ
    BOOL        DeleteFolder(long nFolderID,int nMoveMsg);
    // ×°ÔØÖ¸¶¨ÀàÐÍÁªÏµÈ˵ÄÏûÏ¢ÏÔʾȨÏÞ
    BOOL    LoadContactMsgRight(CString strClass,  CMapStringToInt &mapMsgRight);
private:
    //»ñÈ¡Êý¾Ý¿âÃÜÂë
    void    GetDBPassword( CString &strDBPassword );
};