aboutsummaryrefslogtreecommitdiffstats
path: root/parameter/DomainConfiguration.h
diff options
context:
space:
mode:
authorPatrick Benavoli <patrickx.benavoli@intel.com>2011-10-24 18:50:03 +0200
committerDavid Wagner <david.wagner@intel.com>2014-02-10 17:14:57 +0100
commit63499d4763e42d76bfd39b79871f611381d2d164 (patch)
tree3f16d13707ec60a8ff2bb320ffce0a0e0cc6d91e /parameter/DomainConfiguration.h
parentcfb64dd41410d363fe2e24faf6cd33c9e846b401 (diff)
downloadexternal_parameter-framework-63499d4763e42d76bfd39b79871f611381d2d164.zip
external_parameter-framework-63499d4763e42d76bfd39b79871f611381d2d164.tar.gz
external_parameter-framework-63499d4763e42d76bfd39b79871f611381d2d164.tar.bz2
parameter-framework: Sequence
BZ: 13152 - Introduced sequence notion in configurations: Sequences are configuration specific and are controlled from the Settings related XML files (order of settings appearance) as well as from the tuning interface (new commands available to set and get the sequence (setElementSequence / getElementSequence). Notes: - sequences will only matter for domains which new "SequenceAware" attribute is set to true (false by default). This attribute is also controlable through the tuning interface (setSequenceAware / getSequenceAware commands). - sequence unaware domain configurations will be applied before sequence aware ones. To allow for such functionality, the XML for settings format had to be reworked, leading to an unfortunate compatibility break. However, one benefit is that now a clear Settings section appears at the bottom of the domain description, which is easier to maintain than the previous structure where the settings appeared as sub-nodes of associated elements. Change-Id: Ic93552fd510ed8847f9c8e7d9d6164f7ea3c8c45 Signed-off-by: Patrick Benavoli <patrickx.benavoli@intel.com> Reviewed-on: http://android.intel.com:8080/22558 Reviewed-by: Centelles, Sylvain <sylvain.centelles@intel.com> Tested-by: Barthes, FabienX <fabienx.barthes@intel.com> Reviewed-by: buildbot <buildbot@intel.com> Tested-by: buildbot <buildbot@intel.com> Reviewed-on: http://android.intel.com:8080/26780 Reviewed-by: Barthes, FabienX <fabienx.barthes@intel.com>
Diffstat (limited to 'parameter/DomainConfiguration.h')
-rw-r--r--parameter/DomainConfiguration.h25
1 files changed, 22 insertions, 3 deletions
diff --git a/parameter/DomainConfiguration.h b/parameter/DomainConfiguration.h
index 26b0c41..981ef77 100644
--- a/parameter/DomainConfiguration.h
+++ b/parameter/DomainConfiguration.h
@@ -38,6 +38,7 @@ class CAreaConfiguration;
class CParameterBlackboard;
class CConfigurationAccessContext;
class CCompoundRule;
+class CSyncerSet;
class CDomainConfiguration : public CBinarySerializableElement
{
@@ -50,13 +51,17 @@ public:
virtual ~CDomainConfiguration();
// Configurable Elements association
- void addConfigurableElement(const CConfigurableElement* pConfigurableElement);
+ void addConfigurableElement(const CConfigurableElement* pConfigurableElement, const CSyncerSet* pSyncerSet);
void removeConfigurableElement(const CConfigurableElement* pConfigurableElement);
+ // Sequence management
+ bool setElementSequence(const vector<string>& astrNewElementSequence, string& strError);
+ void getElementSequence(string& strResult) const;
+
// Save data from current
void save(const CParameterBlackboard* pMainBlackboard);
// Apply data to current
- void restore(CParameterBlackboard* pMainBlackboard) const;
+ bool restore(CParameterBlackboard* pMainBlackboard, bool bSync, string& strError) const;
// Ensure validity for configurable element area configuration
void validate(const CConfigurableElement* pConfigurableElement, const CParameterBlackboard* pMainBlackboard);
// Ensure validity of all area configurations
@@ -75,7 +80,8 @@ public:
void split(CConfigurableElement* pFromConfigurableElement);
// XML configuration settings parsing/composing
- bool serializeXmlSettings(const CConfigurableElement* pConfigurableElement, CXmlElement& xmlConfigurationSettingsElementContent, CConfigurationAccessContext& configurationAccessContext);
+ bool parseSettings(CXmlElement& xmlConfigurationSettingsElement, CXmlSerializingContext& serializingContext);
+ void composeSettings(CXmlElement& xmlConfigurationSettingsElement, CXmlSerializingContext& serializingContext) const;
// Presence of application condition
bool hasRule() const;
@@ -91,12 +97,25 @@ public:
private:
// Returns true if children dynamic creation is to be dealt with (here, will allow child deletion upon clean)
virtual bool childrenAreDynamic() const;
+ // XML configuration settings serializing
+ bool serializeConfigurableElementSettings(CAreaConfiguration* pAreaConfiguration, CXmlElement& xmlConfigurableElementSettingsElement, CXmlSerializingContext& serializingContext, bool bSerializeOut);
// AreaConfiguration retrieval from configurable element
CAreaConfiguration* getAreaConfiguration(const CConfigurableElement* pConfigurableElement) const;
+ // AreaConfiguration retrieval from present area configurations
+ CAreaConfiguration* findAreaConfiguration(const string& strConfigurableElementPath) const;
+ // AreaConfiguration retrieval from given area configuration list
+ CAreaConfiguration* findAreaConfiguration(const string& strConfigurableElementPath, const list<CAreaConfiguration*>& areaConfigurationList) const;
+ // Area configuration ordering
+ void reorderAreaConfigurations(const list<CAreaConfiguration*>& areaConfigurationList);
+ // Find area configuration rank from regular list: for ordered list maintainance
+ uint32_t getAreaConfigurationRank(const CAreaConfiguration* pAreaConfiguration) const;
+ // Find area configuration from regular list based on rank: for ordered list maintainance
+ CAreaConfiguration* getAreaConfiguration(uint32_t uiAreaConfigurationRank) const;
// Rule
const CCompoundRule* getRule() const;
// AreaConfigurations
list<CAreaConfiguration*> _areaConfigurationList;
+ list<CAreaConfiguration*> _orderedAreaConfigurationList;
};