[PFW] Add getFormattedMapping for InstanceConfigurableElements
BZ: 99822
The mapping data need to be printed, however helper methods are
missing to achieve this easily.
This patch aims to add a new method "getFormattedMapping()" for
CMappingData, allowing to format the mapping data as a string.
Change-Id: Ia030c6b88905fcb7591ad45339712051eb88d1c1
Signed-off-by: Frederic Boisnard <fredericx.boisnard@intel.com>
Reviewed-on: http://android.intel.com:8080/109301
Reviewed-by: Benavoli, Patrick <patrick.benavoli@intel.com>
Reviewed-by: De Chivre, Renaud <renaud.de.chivre@intel.com>
Reviewed-by: Rocard, KevinX <kevinx.rocard@intel.com>
Reviewed-by: Denneulin, Guillaume <guillaume.denneulin@intel.com>
Tested-by: Barthes, FabienX <fabienx.barthes@intel.com>
Reviewed-by: buildbot <buildbot@intel.com>
Tested-by: buildbot <buildbot@intel.com>
diff --git a/parameter/ParameterMgr.cpp b/parameter/ParameterMgr.cpp
index 02bedb9..6293129 100644
--- a/parameter/ParameterMgr.cpp
+++ b/parameter/ParameterMgr.cpp
@@ -771,7 +771,9 @@
list<string> lstrSelectionCriteria;
getSelectionCriteria()->listSelectionCriteria(lstrSelectionCriteria, false, true);
// Concatenate the criterion list as the command result
- CUtility::concatenate(lstrSelectionCriteria, strResult);
+ string strCriteriaStates;
+ CUtility::asString(lstrSelectionCriteria, strCriteriaStates);
+ strResult += strCriteriaStates;
return CCommandHandler::ESucceeded;
}
@@ -933,7 +935,7 @@
getSelectionCriteria()->listSelectionCriteria(lstrResult, true, humanReadable);
// Concatenate the criterion list as the command result
- CUtility::concatenate(lstrResult, strResult);
+ CUtility::asString(lstrResult, strResult);
return CCommandHandler::ESucceeded;
}
@@ -1077,7 +1079,7 @@
list<string> lstrResult;
if (!restoreConfiguration(remoteCommand.getArgument(0), remoteCommand.getArgument(1), lstrResult)) {
//Concatenate the error list as the command result
- CUtility::concatenate(lstrResult, strResult);
+ CUtility::asString(lstrResult, strResult);
return CCommandHandler::EFailed;
}
@@ -1652,7 +1654,7 @@
list<string> lstrError;
if (! syncerSet.sync(*_pMainParameterBlackboard, false, &lstrError)){
- CUtility::concatenate(lstrError, strError);
+ CUtility::asString(lstrError, strError);
return false;
};