使用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
#include "StdAfx.h"
#include "MBShareDocMgr.h"
 
 
CMBShareDocMgr::CMBShareDocMgr(void)
{
     
}
 
 
CMBShareDocMgr::~CMBShareDocMgr(void)
{
     
}
 
bool  CMBShareDocMgr::AddDocInfo(CMBShareDocInfo *pDocInfo)
{
     return AddDocObj(pDocInfo);
}
 
CMBShareDocInfo* CMBShareDocMgr::GetDocInfo( CString strID )
{
     
    return (CMBShareDocInfo*)GetDocObj(strID);  
}
 
bool CMBShareDocMgr::RemoveAllDocInfo()
{
    return RemoveAllDocObj();
}
 
bool  CMBShareDocMgr::ParseXml( CString &strXml,CString &strErrInfo )
{
    if( strXml.IsEmpty() )
    { 
        strErrInfo = _T("CMBDocMgr::ParseXml,²ÎÊýstrXmlΪ¿Õ£¡");
        return false;
    }
 
    CString               strFileSize;
    pugi::xml_document    xmlDoc;
 
    if (!xmlDoc.load(strXml))   
    {  
        return false;
    }   
    pugi::xml_node form  = xmlDoc.child(_T("Body")).child(_T("Doc")); 
    for(pugi::xml_node node = form; node; node = node.next_sibling(_T("Doc")))
    {
        CMBShareDocInfo *pDocInfo = new CMBShareDocInfo();  
        pDocInfo->m_strID        = node.attribute(_T("ID")).value();
        pDocInfo->m_strName            = node.child_value(_T("Name"));
        pDocInfo->m_strStatus    = node.attribute(_T("Status")).value();
        pDocInfo->m_strFileType  = node.attribute(_T("FileType")).value();
        pDocInfo->m_strFileTime  = node.attribute(_T("FileTime")).value(); 
        strFileSize              = node.attribute(_T("FileSize")).value();
        pDocInfo->m_nFileSize    = _ttoi(strFileSize);
        pDocInfo->m_strDTCreate  = node.attribute(_T("DTCreate")).value();        
        pDocInfo->m_strCreatorID = node.attribute(_T("CreatorID")).value();
        pDocInfo->m_strCreatorName = node.attribute(_T("CreatorName")).value();
        
        pDocInfo->m_strLocker      = node.attribute(_T("Locker")).value(); 
        pDocInfo->m_strLockerName  = node.attribute(_T("LockerName")).value(); 
        pDocInfo->m_strLockTime    = node.attribute(_T("LockTime")).value(); 
 
        pDocInfo->m_strTags      = node.attribute(_T("Tags")).value();
        pDocInfo->m_strName      = node.child_value(_T("Name"));   
        // ThumbURL
        pDocInfo->m_strThumbURL         = node.child_value(_T("ThumbURL"));
 
        if( !AddDocInfo(pDocInfo) )
        {
            // ÖØÖÃËõÂÔͼµØÖ·
            GetDocInfo( pDocInfo->m_strID )->m_strThumbURL = pDocInfo->m_strThumbURL;
            delete pDocInfo;
            pDocInfo = NULL;
        }
    } 
 
    return true; 
}