Ejemplo n.º 1
0
/* -------------------------- WIZDOCUMENTPARAMDATA -------------------------- */
bool WIZDOCUMENTPARAMDATA::LoadFromXmlRpc(CWizXmlRpcStructValue& data,
                                          const QString& kbGUID)
{
    strKbGUID = kbGUID;
    return data.GetString("param_name", strName)
        && data.GetString("param_value", strValue);
}
Ejemplo n.º 2
0
    BOOL LoadFromXmlRpc(CWizXmlRpcStructValue& data)
    {
        BOOL bInfo = FALSE;
        BOOL bData = FALSE;
        data.GetBool(_T("attachment_info"), bInfo);
        data.GetBool(_T("attachment_data"), bData);
        data.GetInt64(_T("version"), nVersion);
        //
        nParts = 0;
        nParts |= bInfo ? WIZKM_XMKRPC_ATTACHMENT_PART_INFO : 0;
        nParts |= bData ? WIZKM_XMKRPC_ATTACHMENT_PART_DATA : 0;
        //
        data.GetString(_T("attachment_guid"), strGUID);
        data.GetInt64(_T("version"), nVersion);
        //
        if (bInfo)
        {
            data.GetStr(_T("attachment_document_guid"), strDocumentGUID);
            data.GetStr(_T("attachment_name"), strName);
            data.GetStr(_T("attachment_url"), strURL);
            data.GetStr(_T("attachment_description"), strDescription);
            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.GetInt(_T("attachment_zip_size"), nDataSize);
        //
        return !strGUID.isEmpty();
    }
Ejemplo n.º 3
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);
 }
Ejemplo n.º 4
0
/* ---------------------------- WIZKVRETURN ---------------------------- */
bool WIZKVRETURN::LoadFromXmlRpc(CWizXmlRpcStructValue& data)
{
    data.GetInt("return_code", nCode);
    data.GetString("value_of_key", value);
    data.GetInt64("version", nVersion);

    return nCode == 200;
}
Ejemplo n.º 5
0
/* ---------------------------- WIZKVRETURN ---------------------------- */
bool WIZKVRETURN::LoadFromXmlRpc(CWizXmlRpcStructValue& data, const QString& kbGUID)
{
    Q_UNUSED(kbGUID);

    data.GetInt("return_code", nCode);
    data.GetString("value_of_key", value);
    data.GetInt64("version", nVersion);

    return nCode == 200;
}
Ejemplo n.º 6
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;
}
Ejemplo n.º 7
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;
}
Ejemplo n.º 8
0
bool WIZDOCUMENTDATABASE::LoadFromXmlRpc(CWizXmlRpcStructValue& data)
{
    data.GetString("data_md5", strDataMD5);
    data.GetString("document_category", strLocation);
    data.GetString("document_guid", strGUID);
    data.GetString("document_title", strTitle);

    data.GetTime("dt_info_modified", tInfoModified);
    data.GetTime("dt_data_modified", tDataModified);
    data.GetTime("dt_param_modified", tParamModified);

    data.GetString("info_md5", strInfoMD5);
    data.GetString("param_md5", strParamMD5);

    data.GetInt64("version", nVersion);

    return !strGUID.isEmpty();
}
Ejemplo n.º 9
0
CString CWizXmlRpcFaultValue::GetFaultString() const
{
	CString str;
	m_val.GetString(_T("faultString"), str);
	return str;
}
Ejemplo n.º 10
0
bool WIZMESSAGEDATA::LoadFromXmlRpc(CWizXmlRpcStructValue& data)
{
    data.GetString("biz_guid", bizGUID);
    data.GetString("kb_guid", kbGUID);
    data.GetString("document_guid", documentGUID);

    data.GetInt64("id", nId);
    data.GetTime("dt_created", tCreated);
    data.GetInt("message_type", nMessageType);
    data.GetInt("read_status", nReadStatus);
    data.GetInt("email_status", nEmailStatus);
    data.GetInt("sms_status", nSMSStatus);

    data.GetString("title", title);
    data.GetString("message_body", messageBody);
    data.GetString("note", note);

    data.GetString("receiver_alias", receiverAlias);
    data.GetString("receiver_guid", receiverGUID);
    data.GetString("receiver_id", receiverId);

    data.GetString("sender_alias", senderAlias);
    data.GetString("sender_guid", senderGUID);
    data.GetString("sender_id", senderId);

    data.GetInt64("version", nVersion);

    return true;
}
Ejemplo n.º 11
0
bool WIZGROUPDATA::LoadFromXmlRpc(CWizXmlRpcStructValue& data)
{
    data.GetString("biz_guid", bizGUID);
    data.GetString("biz_name", bizName);

    data.GetTime("dt_created", tCreated);
    data.GetTime("dt_modified", tModified);
    data.GetTime("dt_role_created", tRoleCreated);

    data.GetString("kapi_url", strDatabaseServer);

    data.GetString("kb_guid", strGroupGUID);
    data.GetString("kb_id", strId);
    data.GetString("kb_name", strGroupName);
    data.GetString("kb_note", strGroupNote);
    data.GetString("kb_seo", strGroupSEO);
    data.GetString("kb_type", strType);
    data.GetString("owner_name", strOwner);
    data.GetString("role_note", strRoleNote);
    data.GetString("server_url", strServerUrl);
    data.GetString("tag_names", strGroupTags);
    data.GetInt("user_group", nUserGroup);
    data.GetString("user_name", strUserName);

    return !strGroupName.isEmpty()
            && !strGroupGUID.isEmpty()
            && !strDatabaseServer.isEmpty();
}
Ejemplo n.º 12
0
BOOL WIZDOCUMENTDATAEX::LoadFromXmlRpc(CWizXmlRpcStructValue& data)
{
    bool bInfo = false;
    bool bData = false;
    bool bParam = false;
    data.GetBool("document_info", bInfo);
    data.GetBool("document_data", bData);
    data.GetBool("document_param", bParam);
    data.GetInt64("version", nVersion);

    // document_data field default is 0, aquire data use other api now.
    Q_ASSERT(!bData);

    nObjectPart = 0;
    nObjectPart |= bInfo ? WIZKM_XMKRPC_DOCUMENT_PART_INFO : 0;
    nObjectPart |= bData ? WIZKM_XMKRPC_DOCUMENT_PART_DATA : 0;
    nObjectPart |= bParam ? WIZKM_XMKRPC_DOCUMENT_PART_PARAM : 0;

    data.GetString("document_guid", strGUID);

    if (bInfo) {
        data.GetString("document_title", strTitle);
        data.GetString("document_category", strLocation);
        data.GetString("document_filename", strName);
        data.GetString("document_seo", strSEO);
        data.GetString("document_url", strURL);
        data.GetString("document_author", strAuthor);
        data.GetString("document_keywords", strKeywords);
        data.GetString("document_type", strType);
        data.GetString("document_owner", strOwner);
        data.GetString("document_filetype", strFileType);
        data.GetString("document_styleguid", strStyleGUID);
        data.GetInt("document_iconindex", nIconIndex);
        data.GetInt("document_protected", nProtected);
        data.GetInt("document_attachment_count", nAttachmentCount);

        // md5
        data.GetString("data_md5", strDataMD5);
        data.GetString("info_md5", strInfoMD5);
        data.GetString("param_md5", strParamMD5);

        // time
        data.GetTime("dt_created", tCreated);
        data.GetTime("dt_modified", tModified);
        data.GetTime("dt_accessed", tAccessed);
        data.GetTime("dt_data_modified", tDataModified);
        data.GetTime("dt_info_modified", tInfoModified);
        data.GetTime("dt_param_modified", tParamModified);

        data.GetStringArray("document_tags", arrayTagGUID);
    }

    if (bData) {
        Q_ASSERT(0);
    }

    if (bParam) {
        CWizDocumentParamDataArray params;
        if (!data.GetArray("document_params", params)) {
            TOLOG("Failed to load document param when parse xml-rpc!");
            return false;
        }

        arrayParam.assign(params.begin(), params.end());
    }

    return !strGUID.isEmpty();
}
Ejemplo n.º 13
0
/* -------------------------- WIZDOCUMENTPARAMDATA -------------------------- */
bool WIZDOCUMENTPARAMDATA::LoadFromXmlRpc(CWizXmlRpcStructValue& data)
{
    return data.GetString("param_name", strName)
        && data.GetString("param_value", strValue);
}