parameter-framework: improvements and corrections

BZ: 6721

- Bug correction concerning selection criteria display (inclusive type)
- Adapted XML format to allow for only on parameter to be associated to
  a domain
- Removed unused files in parameter project

Change-Id: I9f42d08ff8cb60354714fe3d6b0f0b321ad0a7bf
Orig-Change-Id: I837e553070f5acf2d275082c986ba29433493e31
Signed-off-by: Patrick Benavoli <patrickx.benavoli@intel.com>
Reviewed-on: http://android.intel.com:8080/16878
Reviewed-by: Mahe, Erwan <erwan.mahe@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/ConfigurableElement.cpp b/parameter/ConfigurableElement.cpp
index 9707fb2..2fcde7a 100644
--- a/parameter/ConfigurableElement.cpp
+++ b/parameter/ConfigurableElement.cpp
@@ -34,6 +34,7 @@
 #include "ConfigurableDomain.h"
 #include "ConfigurationAccessContext.h"
 #include "ConfigurableElementAggregator.h"
+#include <sstream>
 #include <assert.h>
 
 #define base CElement
@@ -47,14 +48,14 @@
 }
 
 // XML configuration settings parsing
-bool CConfigurableElement::serializeXmlSettings(CXmlElement& xmlConfigurableElementSettingsElement, CConfigurationAccessContext& configurationAccessContext) const
+bool CConfigurableElement::serializeXmlSettings(CXmlElement& xmlConfigurationSettingsElementContent, CConfigurationAccessContext& configurationAccessContext) const
 {
     uint32_t uiIndex;
     uint32_t uiNbChildren = getNbChildren();
 
     if (!configurationAccessContext.serializeOut()) {
         // Just do basic checks and propagate to children
-        CXmlElement::CChildIterator it(xmlConfigurableElementSettingsElement);
+        CXmlElement::CChildIterator it(xmlConfigurationSettingsElementContent);
 
         CXmlElement xmlChildConfigurableElementSettingsElement;
 
@@ -113,7 +114,7 @@
             // Create corresponding child element
             CXmlElement xmlChildConfigurableElementSettingsElement;
 
-            xmlConfigurableElementSettingsElement.createChild(xmlChildConfigurableElementSettingsElement, pChildConfigurableElement->getKind());
+            xmlConfigurationSettingsElementContent.createChild(xmlChildConfigurableElementSettingsElement, pChildConfigurableElement->getKind());
 
             // Handle element name attribute
             xmlChildConfigurableElementSettingsElement.setNameAttribute(pChildConfigurableElement->getName());
@@ -126,67 +127,6 @@
     return true;
 }
 
-#if 0
-bool CConfigurableElement::serializeXmlSettings(CXmlElement& xmlConfigurableElementSettingsElement, CConfigurationAccessContext& configurationAccessContext) const
-{
-    if (!configurationAccessContext.serializeOut()) {
-        // Just do basic checks and propagate to children
-        CXmlElement::CChildIterator it(xmlConfigurableElementSettingsElement);
-
-        CXmlElement xmlChildConfigurableElementSettingsElement;
-
-        while (it.next(xmlChildConfigurableElementSettingsElement)) {
-
-            // Find child configurable element
-            const CConfigurableElement* pChildConfigurableElement = static_cast<const CConfigurableElement*>(findChild(xmlChildConfigurableElementSettingsElement.getNameAttribute()));
-
-            if (!pChildConfigurableElement) {
-
-                configurationAccessContext.setError("Configuration settings parsing: Unable to find configurable element " + xmlChildConfigurableElementSettingsElement.getNameAttribute() +  " under configurable element " + getName());
-
-                return false;
-            }
-
-            // Check element type matches
-            if (xmlChildConfigurableElementSettingsElement.getType() != pChildConfigurableElement->getKind()) {
-
-                configurationAccessContext.setError("Settings for configurable element " + pChildConfigurableElement->getName() + " does not match expected type: " + xmlChildConfigurableElementSettingsElement.getType() + " instead of " + pChildConfigurableElement->getKind());
-
-                return false;
-            }
-
-            // Parse child configurable element's settings
-            if (!pChildConfigurableElement->serializeXmlSettings(xmlChildConfigurableElementSettingsElement, configurationAccessContext)) {
-
-                return false;
-            }
-        }
-    } else {
-        // Propagate to children
-        uint32_t uiIndex;
-        uint32_t uiNbChildren = getNbChildren();
-
-        for (uiIndex = 0; uiIndex < uiNbChildren; uiIndex++) {
-
-            const CConfigurableElement* pChildConfigurableElement = static_cast<const CConfigurableElement*>(getChild(uiIndex));
-
-            // Create corresponding child element
-            CXmlElement xmlChildConfigurableElementSettingsElement;
-
-            xmlConfigurableElementSettingsElement.createChild(xmlChildConfigurableElementSettingsElement, pChildConfigurableElement->getKind());
-
-            // Handle element name attribute
-            xmlChildConfigurableElementSettingsElement.setNameAttribute(pChildConfigurableElement->getName());
-
-            // Propagate
-            pChildConfigurableElement->serializeXmlSettings(xmlChildConfigurableElementSettingsElement, configurationAccessContext);
-        }
-    }
-    // Done
-    return true;
-}
-#endif
-
 // Parameter access
 bool CConfigurableElement::setValue(CPathNavigator& pathNavigator, const string& strValue, CErrorContext& errorContext) const
 {
@@ -406,6 +346,17 @@
     }
 }
 
+// Footprint as string
+string CConfigurableElement::getFootprintAsString() const
+{
+    // Get size as string
+    ostringstream str;
+
+    str << getFootPrint() << " bytes";
+
+    return str.str();
+}
+
 // Matching check for no domain association
 bool CConfigurableElement::hasNoDomainAssociated() const
 {