diff options
author | Patrick Benavoli <patrickx.benavoli@intel.com> | 2011-10-24 18:50:03 +0200 |
---|---|---|
committer | David Wagner <david.wagner@intel.com> | 2014-02-10 17:14:57 +0100 |
commit | 63499d4763e42d76bfd39b79871f611381d2d164 (patch) | |
tree | 3f16d13707ec60a8ff2bb320ffce0a0e0cc6d91e /parameter/AreaConfiguration.cpp | |
parent | cfb64dd41410d363fe2e24faf6cd33c9e846b401 (diff) | |
download | external_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/AreaConfiguration.cpp')
-rw-r--r-- | parameter/AreaConfiguration.cpp | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/parameter/AreaConfiguration.cpp b/parameter/AreaConfiguration.cpp index d9d3fcf..2e8c63d 100644 --- a/parameter/AreaConfiguration.cpp +++ b/parameter/AreaConfiguration.cpp @@ -34,8 +34,10 @@ #include "BinaryStream.h" #include <assert.h> -CAreaConfiguration::CAreaConfiguration(const CConfigurableElement* pConfigurableElement) : _pConfigurableElement(pConfigurableElement), _bValid(false) +CAreaConfiguration::CAreaConfiguration(const CConfigurableElement* pConfigurableElement, const CSyncerSet* pSyncerSet) + : _pConfigurableElement(pConfigurableElement), _pSyncerSet(pSyncerSet), _bValid(false) { + // Size blackboard _blackboard.setSize(_pConfigurableElement->getFootPrint()); } @@ -46,11 +48,22 @@ void CAreaConfiguration::save(const CParameterBlackboard* pMainBlackboard) } // Apply data to current -void CAreaConfiguration::restore(CParameterBlackboard* pMainBlackboard) const +bool CAreaConfiguration::restore(CParameterBlackboard* pMainBlackboard, bool bSync, string& strError) const { assert(_bValid); pMainBlackboard->restoreFrom(&_blackboard, _pConfigurableElement->getOffset()); + + // Synchronize if required + if (bSync) { + + if (!_pSyncerSet->sync(*pMainBlackboard, false, strError)) { + + return false; + } + } + + return true; } // Ensure validity @@ -91,7 +104,7 @@ void CAreaConfiguration::validateAgainst(const CAreaConfiguration* pValidAreaCon } // XML configuration settings parsing -bool CAreaConfiguration::serializeXmlSettings(CXmlElement& xmlConfigurationSettingsElementContent, CConfigurationAccessContext& configurationAccessContext) +bool CAreaConfiguration::serializeXmlSettings(CXmlElement& xmlConfigurableElementSettingsElementContent, CConfigurationAccessContext& configurationAccessContext) { // Assign blackboard to configuration context configurationAccessContext.setParameterBlackboard(&_blackboard); @@ -100,7 +113,7 @@ bool CAreaConfiguration::serializeXmlSettings(CXmlElement& xmlConfigurationSetti configurationAccessContext.setBaseOffset(_pConfigurableElement->getOffset()); // Parse configuration settings (element contents) - if (_pConfigurableElement->serializeXmlSettings(xmlConfigurationSettingsElementContent, configurationAccessContext)) { + if (_pConfigurableElement->serializeXmlSettings(xmlConfigurableElementSettingsElementContent, configurationAccessContext)) { if (!configurationAccessContext.serializeOut()) { |