summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPatrick Benavoli <patrick.benavoli@intel.com>2014-07-24 18:46:25 +0200
committerPhilippe Afonso <philippex.afonso@intel.com>2015-02-18 11:13:27 +0100
commit8ff3e0fed53fb64b27b01ab69acee60fbf4e4013 (patch)
tree33f5ffb7c1795e4705faea32ff9666c6b4fde511
parent7f9e3fe4eb15c9ba2ee4205c182ba68c8cc7be0f (diff)
downloadexternal_parameter-framework-8ff3e0fed53fb64b27b01ab69acee60fbf4e4013.zip
external_parameter-framework-8ff3e0fed53fb64b27b01ab69acee60fbf4e4013.tar.gz
external_parameter-framework-8ff3e0fed53fb64b27b01ab69acee60fbf4e4013.tar.bz2
Cleaned up XML export feature
BZ: 209937 This patch solves 1 issue regarding XML export feature: - ParameterMgr.cpp::exportElementToXMLString(): This method was receiving a useless bValidateWithSchema argument. Indeed, elements in memory are necessarily valid (unlike documents coming from external sources). Change-Id: I55bf84c8ff53c37c9fc55e60f7f64e8776a43dc7 Signed-off-by: Patrick Benavoli <patrick.benavoli@intel.com>
-rw-r--r--parameter/ParameterMgr.cpp12
-rw-r--r--parameter/ParameterMgr.h5
2 files changed, 10 insertions, 7 deletions
diff --git a/parameter/ParameterMgr.cpp b/parameter/ParameterMgr.cpp
index a1f2087..e11b1ad 100644
--- a/parameter/ParameterMgr.cpp
+++ b/parameter/ParameterMgr.cpp
@@ -1112,7 +1112,8 @@ CParameterMgr::CCommandHandler::CommandStatus CParameterMgr::listCriteriaCommman
// Get Root element where to export from
const CSelectionCriteriaDefinition* pSelectionCriteriaDefinition = getConstSelectionCriteria()->getSelectionCriteriaDefinition();
- if (!exportElementToXMLString(pSelectionCriteriaDefinition, "SelectionCriteria", false, strResult)) {
+ if (!exportElementToXMLString(pSelectionCriteriaDefinition, "SelectionCriteria",
+ strResult)) {
return CCommandHandler::EFailed;
}
@@ -1676,7 +1677,7 @@ CParameterMgr::CCommandHandler::CommandStatus
// Get Root element where to export from
const CSystemClass* pSystemClass = getSystemClass();
- if (!exportElementToXMLString(pSystemClass, pSystemClass->getKind(), false, strResult)) {
+ if (!exportElementToXMLString(pSystemClass, pSystemClass->getKind(), strResult)) {
return CCommandHandler::EFailed;
}
@@ -2612,15 +2613,16 @@ void CParameterMgr::doApplyConfigurations(bool bForce)
}
// Export to XML string
-bool CParameterMgr::exportElementToXMLString(const IXmlSource *pXmlSource, const string& strRootElementType, bool bValidateWithSchema, string& strResult) const
+bool CParameterMgr::exportElementToXMLString(const IXmlSource* pXmlSource,
+ const string& strRootElementType,
+ string& strResult) const
{
string strError;
CXmlSerializingContext xmlSerializingContext(strError);
// Use a doc source by loading data from instantiated Configurable Domains
- CXmlMemoryDocSource memorySource(pXmlSource, strRootElementType,
- bValidateWithSchema);
+ CXmlMemoryDocSource memorySource(pXmlSource, strRootElementType, false);
// Use a doc sink that write the doc data in a string
CXmlStringDocSink stringSink(strResult);
diff --git a/parameter/ParameterMgr.h b/parameter/ParameterMgr.h
index 03a1e92..6a3ecb8 100644
--- a/parameter/ParameterMgr.h
+++ b/parameter/ParameterMgr.h
@@ -344,12 +344,13 @@ public:
*
* @param[in] pXmlSource The source element to export
* @param[in] strRootElementType The XML root element name of the exported instance document
- * @param[in] bValidateWithSchema true if source XML document requires validation against schema
* @param[out] strResult contains the xml description or the error description in case false is returned
*
* @return true for success, false if any error occurs during the creation of the xml description (validation or encoding)
*/
- bool exportElementToXMLString(const IXmlSource* pXmlSource, const std::string& strRootElementType, bool bValidateWithSchema, std::string& strResult) const;
+ bool exportElementToXMLString(const IXmlSource* pXmlSource,
+ const std::string& strRootElementType,
+ std::string& strResult) const;
// CElement
virtual std::string getKind() const;