diff options
author | Patrick Benavoli <patrick.benavoli@intel.com> | 2014-07-08 14:09:09 +0200 |
---|---|---|
committer | Philippe Afonso <philippex.afonso@intel.com> | 2015-02-18 11:13:26 +0100 |
commit | 0548523ab6bbca766dcce4be97a0c50efd529d90 (patch) | |
tree | 4df756d6875dc1a0afc7835c3a16fb69b451c1da /parameter/SelectionCriterion.cpp | |
parent | 79694d5d0a632ed4ca04ea42f19fb09c3fba0cdb (diff) | |
download | external_parameter-framework-0548523ab6bbca766dcce4be97a0c50efd529d90.zip external_parameter-framework-0548523ab6bbca766dcce4be97a0c50efd529d90.tar.gz external_parameter-framework-0548523ab6bbca766dcce4be97a0c50efd529d90.tar.bz2 |
Adding XML format to Criteria export tuning I/F
BZ: 209937
The "listCriteria" command returns the list of criteria in a human readable
way. However, external tools that require to know this list of criteria have
trouble parsing this output. An XML output would solve the issue.
Changed "listCriteria" command to accept "XML" as first and only argument.
In the end, listCriteria command accepts the 3 following forms:
- listCriteria => will list the criteria states and type content in a human
readable format
- listCriteria csv|CSV => will list the criteria states and type content in a
CSV format
- listCriteria xml|XML => will list the criteria states and type content in an
XML format
Removed python binding accordingly.
Change-Id: Ib060ec0a5d1ff87ba6c25caf4e0d5839a7927715
Signed-off-by: Patrick Benavoli <patrick.benavoli@intel.com>
Signed-off-by: Sebastien Gonzalve <sebastien.gonzalve@intel.com>
Diffstat (limited to 'parameter/SelectionCriterion.cpp')
-rw-r--r-- | parameter/SelectionCriterion.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/parameter/SelectionCriterion.cpp b/parameter/SelectionCriterion.cpp index f49137b..7818924 100644 --- a/parameter/SelectionCriterion.cpp +++ b/parameter/SelectionCriterion.cpp @@ -27,6 +27,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ + #include "SelectionCriterion.h" #include "AutoLog.h" @@ -168,3 +169,15 @@ std::string CSelectionCriterion::getFormattedDescription(bool bWithTypeInfo, boo } return strFormattedDescription; } + +// XML export +void CSelectionCriterion::toXml(CXmlElement& xmlElement, CXmlSerializingContext& serializingContext) const +{ + // Current Value + xmlElement.setAttributeString("Value", _pType->getFormattedState(_iState)); + + // Serialize Type node + _pType->toXml(xmlElement, serializingContext); + + base::toXml(xmlElement, serializingContext); +} |