Exemplo n.º 1
0
 BOOL LoadFromXmlRpc(CWizXmlRpcStructValue& data)
 {
     data.GetInt64(_T("obj_size"), nObjectSize);
     data.GetInt(_T("eof"), bEOF);
     data.GetInt64(_T("part_size"), nPartSize);
     data.GetString(_T("part_md5"), strPartMD5);
     return data.GetStream(_T("data"), stream);
 }
Exemplo n.º 2
0
bool WIZOBJECTPARTDATA::LoadFromXmlRpc(CWizXmlRpcStructValue& data)
{
    data.GetInt("eof", bEOF);
    data.GetInt64("obj_size", nObjectSize);
    data.GetString("part_md5", strPartMD5);
    data.GetInt64("part_size", nPartSize);

    if (!data.GetStream("data", arrayData)){
        TOLOG("Fault error, data is null!");
        return false;
    }

    return true;
}
Exemplo n.º 3
0
bool WIZOBJECTPARTDATA::LoadFromXmlRpc(CWizXmlRpcStructValue& data, const QString& kbGUID)
{
    strKbGUID = kbGUID;
    data.GetInt64(_T("obj_size"), nObjectSize);
    data.GetInt(_T("eof"), bEOF);
    data.GetInt64(_T("part_size"), nPartSize);
    data.GetString(_T("part_md5"), strPartMD5);
    if (!data.GetStream("data", arrayData))
    {
        TOLOG(_T("Fault error, data is null!"));
        return false;
    }

    return true;
}
Exemplo n.º 4
0
 BOOL LoadFromXmlRpc(CWizXmlRpcStructValue& data)
 {
     BOOL bInfo = FALSE;
     BOOL bData = FALSE;
     BOOL bParam = FALSE;
     data.GetBool(_T("document_info"), bInfo);
     data.GetBool(_T("document_data"), bData);
     data.GetBool(_T("document_param"), bParam);
     data.GetInt64(_T("version"), nVersion);
     //
     nParts = 0;
     nParts |= bInfo ? WIZKM_XMKRPC_DOCUMENT_PART_INFO : 0;
     nParts |= bData ? WIZKM_XMKRPC_DOCUMENT_PART_DATA : 0;
     nParts |= bParam ? WIZKM_XMKRPC_DOCUMENT_PART_PARAM : 0;
     //
     data.GetStr(_T("document_guid"), strGUID);
     //
     if (bInfo)
     {
         data.GetStr(_T("document_title"), strTitle);
         data.GetStr(_T("document_category"), strLocation);
         data.GetStr(_T("document_filename"), strName);
         data.GetStr(_T("document_seo"), strSEO);
         data.GetStr(_T("document_url"), strURL);
         data.GetStr(_T("document_author"), strAuthor);
         data.GetStr(_T("document_keywords"), strKeywords);
         data.GetStr(_T("document_type"), strType);
         data.GetStr(_T("document_owner"), strOwner);
         data.GetStr(_T("document_filetype"), strFileType);
         data.GetStr(_T("document_styleguid"), strStyleGUID);
         data.GetTime(_T("dt_created"), tCreated);
         data.GetTime(_T("dt_modified"), tModified);
         data.GetTime(_T("dt_accessed"), tAccessed);
         data.GetInt(_T("document_iconindex"), nIconIndex);
         data.GetInt(_T("document_protected"), nProtected);
         //data.GetInt(_T("document_readcount"), nReadCount);
         data.GetInt(_T("document_attachment_count"), nAttachmentCount);
         data.GetTime(_T("dt_info_modified"), tInfoModified);
         data.GetStr(_T("info_md5"), strInfoMD5);
         data.GetTime(_T("dt_data_modified"), tDataModified);
         data.GetStr(_T("data_md5"), strDataMD5);
         data.GetTime(_T("dt_param_modified"), tParamModified);
         data.GetStr(_T("param_md5"), strParamMD5);
         //
         data.GetStringArray(_T("document_tags"), arrayTagGUID);
     }
     //
     if (bData)
     {
         data.GetInt(_T("document_zip_size"), nDataSize);
         if (nApiVersion < 2)
         {
             if (!data.GetStream(_T("document_zip_data"), arrayData))
             {
                 TOLOG(_T("Failed to get note data!"));
                 return FALSE;
             }
         }
     }
     //
     if (bParam)
     {
         std::deque<WIZDOCUMENTPARAMDATA> params;
         if (!data.GetArray(_T("document_params"), params))
         {
             TOLOG(_T("Failed to get note param!"));
             return FALSE;
         }
         arrayParam.assign(params.begin(), params.end());
     }
     //
     return !strGUID.isEmpty();
 }