Exemple #1
0
BOOL CWizXmlRpcBase64Value::Write(CWizXMLNode& nodeValue)
{
    CString strText;
    WizBase64Encode(m_arrayData, strText);
	nodeValue.SetChildNodeText(_T("base64"), CString(strText));
	return TRUE;
}
Exemple #2
0
BOOL WizXmlRpcParamsToXml(CWizXMLDocument& doc, const CString& strMethodName, CWizXmlRpcValue* pParam1, CWizXmlRpcValue* pParam2, CWizXmlRpcValue* pParam3, CWizXmlRpcValue* pParam4,
						  CWizXmlRpcValue* pParam5, CWizXmlRpcValue* pParam6, CWizXmlRpcValue* pParam7, CWizXmlRpcValue* pParam8)
{
	CWizXMLNode nodeMethodCall;
	doc.AppendChild(_T("methodCall"), nodeMethodCall);
	//
    nodeMethodCall.SetChildNodeText(_T("methodName"), strMethodName);
	//

	CWizXMLNode nodeParams;
	nodeMethodCall.AppendChild(_T("params"), nodeParams);
	//
	CWizXmlRpcValue* arrayParams[] = {pParam1, pParam2, pParam3, pParam4, pParam5, pParam6, pParam7, pParam8, NULL};
	//
	CWizXmlRpcValue** ppParam = arrayParams;

	while (*ppParam)
	{
		CWizXMLNode nodeParamValue;
		nodeParams.AppendNodeByPath(_T("param/value"), nodeParamValue);
		//
		CWizXmlRpcValue* pParam = *ppParam;
		//
		pParam->Write(nodeParamValue);
		//
		ppParam++;
	}
	//
	return TRUE;
}
Exemple #3
0
BOOL CWizXmlRpcStructValue::Write(CWizXMLNode& nodeValue)
{
	CWizXMLNode nodeStruct;
	nodeValue.AppendChild(_T("struct"), nodeStruct);
	//
	for (std::map<CString, CWizXmlRpcValue*>::const_iterator it = m_map.begin();
		it != m_map.end();
		it++)
	{
		CString strName = it->first;
		CWizXmlRpcValue* pValue = it->second;
		//
		CWizXMLNode nodeMember;
		nodeStruct.AppendChild(_T("member"), nodeMember);
		//
		nodeMember.SetChildNodeText(_T("name"), strName);
		//
		CWizXMLNode nodeElementValue;
		nodeMember.AppendChild(_T("value"), nodeElementValue);
		//
		pValue->Write(nodeElementValue);
	}
	//
	return TRUE;
}
bool CWizXmlRpcBase64Value::Write(CWizXMLNode& nodeValue)
{
    QString strText;
    WizBase64Encode(m_arrayData, strText);
    nodeValue.SetChildNodeText("base64", strText);
    return true;
}
Exemple #5
0
CWizXmlRpcRequest::CWizXmlRpcRequest(const QString& strMethodName)
{
    CWizXMLNode nodeMethodCall;
    m_doc.AppendChild("methodCall", nodeMethodCall);
    nodeMethodCall.SetChildNodeText("methodName", strMethodName);

    CWizXMLNode nodeParams;
    nodeMethodCall.AppendChild("params", nodeParams);
}
bool CWizXmlRpcStructValue::Write(CWizXMLNode& nodeValue)
{
	CWizXMLNode nodeStruct;
    nodeValue.AppendChild("struct", nodeStruct);

    std::map<QString, CWizXmlRpcValue*>::const_iterator it;
    for (it = m_map.begin(); it != m_map.end(); it++) {
        QString strName = it->first;
		CWizXmlRpcValue* pValue = it->second;

		CWizXMLNode nodeMember;
        nodeStruct.AppendChild("member", nodeMember);

        nodeMember.SetChildNodeText("name", strName);

		CWizXMLNode nodeElementValue;
        nodeMember.AppendChild("value", nodeElementValue);

		pValue->Write(nodeElementValue);
	}

    return true;
}
Exemple #7
0
BOOL CWizXmlRpcBoolValue::Write(CWizXMLNode& nodeValue)
{
	nodeValue.SetChildNodeText(_T("boolean"), WizIntToStr(m_b ? 1 : 0));
	return TRUE;
}
Exemple #8
0
bool CWizXmlRpcIntValue::Write(CWizXMLNode& nodeValue)
{
    nodeValue.SetChildNodeText("int", WizIntToStr(m_n));
    return true;
}
Exemple #9
0
BOOL CWizXmlRpcTimeValue::Write(CWizXMLNode& nodeValue)
{
    CString str = WizDateTimeToIso8601String(m_t);
    nodeValue.SetChildNodeText(_T("dateTime.iso8601"), str);
	return TRUE;
}
Exemple #10
0
BOOL CWizXmlRpcStringValue::Write(CWizXMLNode& nodeValue)
{
	nodeValue.SetChildNodeText(_T("string"), m_str);
	return TRUE;
}
bool CWizXmlRpcTimeValue::Write(CWizXMLNode& nodeValue)
{
    QString str = WizDateTimeToIso8601String(m_t);
    nodeValue.SetChildNodeText("dateTime.iso8601", str);
    return true;
}
bool CWizXmlRpcStringValue::Write(CWizXMLNode& nodeValue)
{
    nodeValue.SetChildNodeText("string", m_str);
    return true;
}
bool CWizXmlRpcBoolValue::Write(CWizXMLNode& nodeValue)
{
    nodeValue.SetChildNodeText("boolean", m_b ? "1" : "0");
    return true;
}
bool CWizXmlRpcIntValue::Write(CWizXMLNode& nodeValue)
{
    nodeValue.SetChildNodeText("int", QString::number(m_n));
    return true;
}