diff options
author | Frédéric Boisnard <fredericx.boisnard@intel.com> | 2012-09-06 18:03:20 +0200 |
---|---|---|
committer | David Wagner <david.wagner@intel.com> | 2014-02-12 17:03:14 +0100 |
commit | 8b243f50a38a26e6b373287e07cb7e4743a8cd28 (patch) | |
tree | 01a0ac75b9ef0a1e41c027febf91f63c4c3000d9 /parameter/ConfigurableDomain.cpp | |
parent | daaa63ce33fa4795403f9339bc872694c9ab6113 (diff) | |
download | external_parameter-framework-8b243f50a38a26e6b373287e07cb7e4743a8cd28.zip external_parameter-framework-8b243f50a38a26e6b373287e07cb7e4743a8cd28.tar.gz external_parameter-framework-8b243f50a38a26e6b373287e07cb7e4743a8cd28.tar.bz2 |
PFW: Show pending configurations in status command
BZ: 56118
Update the "status" command of the PFW to display the current pending
configurations for all domains, that is to say configurations that
are waiting the next call to "applyConfiguration()" to be applied.
This improvement will help developers to better understand
the current state of the PFW, in particular when dealing with HAL
modifications.
Change-Id: I6300620ad8cedcb534fb2859b57b7ab2988fa618
Signed-off-by: Frédéric Boisnard <fredericx.boisnard@intel.com>
Reviewed-on: http://android.intel.com:8080/64796
Reviewed-by: De Chivre, Renaud <renaud.de.chivre@intel.com>
Reviewed-by: Benavoli, Patrick <patrick.benavoli@intel.com>
Reviewed-by: Rocard, KevinX <kevinx.rocard@intel.com>
Tested-by: Barthes, FabienX <fabienx.barthes@intel.com>
Reviewed-by: buildbot <buildbot@intel.com>
Tested-by: buildbot <buildbot@intel.com>
Diffstat (limited to 'parameter/ConfigurableDomain.cpp')
-rw-r--r-- | parameter/ConfigurableDomain.cpp | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/parameter/ConfigurableDomain.cpp b/parameter/ConfigurableDomain.cpp index 01e4a69..8c83f48 100644 --- a/parameter/ConfigurableDomain.cpp +++ b/parameter/ConfigurableDomain.cpp @@ -420,6 +420,23 @@ bool CConfigurableDomain::split(CConfigurableElement* pConfigurableElement, stri return true; } +// Check if there is a pending configuration for this domain: i.e. an applicable configuration different from the last applied configuration +const CDomainConfiguration* CConfigurableDomain::getPendingConfiguration() const +{ + const CDomainConfiguration* pApplicableDomainConfiguration = findApplicableDomainConfiguration(); + + if (pApplicableDomainConfiguration) { + + // Check not the last one before applying + if (!_pLastAppliedConfiguration || (_pLastAppliedConfiguration != pApplicableDomainConfiguration)) { + + return pApplicableDomainConfiguration; + } + } + + return NULL; +} + // Configuration application if required bool CConfigurableDomain::apply(CParameterBlackboard* pParameterBlackboard, CSyncerSet& syncerSet, bool bForce, string& strError) const { @@ -707,6 +724,18 @@ string CConfigurableDomain::getLastAppliedConfigurationName() const return "<none>"; } +// Pending configuration +string CConfigurableDomain::getPendingConfigurationName() const +{ + const CDomainConfiguration* pPendingConfiguration = getPendingConfiguration(); + + if (pPendingConfiguration) { + + return pPendingConfiguration->getName(); + } + return "<none>"; +} + // Ensure validity on whole domain from main blackboard void CConfigurableDomain::validate(const CParameterBlackboard* pMainBlackboard) { |