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 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; }
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; }
bool CWizXmlRpcArrayValue::Write(CWizXMLNode& nodeValue) { CWizXMLNode nodeData; nodeValue.AppendNodeByPath("array/data", nodeData); std::deque<CWizXmlRpcValue*>::const_iterator it; for (it = m_array.begin(); it != m_array.end(); it++) { CWizXmlRpcValue* pValue = *it; CWizXMLNode nodeElementValue; nodeData.AppendChild("value", nodeElementValue); pValue->Write(nodeElementValue); } return true; }
BOOL CWizXmlRpcArrayValue::Write(CWizXMLNode& nodeValue) { CWizXMLNode nodeData; nodeValue.AppendNodeByPath(_T("array/data"), nodeData); // for (std::deque<CWizXmlRpcValue*>::const_iterator it = m_array.begin(); it != m_array.end(); it++) { CWizXmlRpcValue* pValue = *it; // CWizXMLNode nodeElementValue; nodeData.AppendChild(_T("value"), nodeElementValue); // pValue->Write(nodeElementValue); } // return TRUE; }