summaryrefslogtreecommitdiffstats
path: root/parameter/ConfigurableDomain.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'parameter/ConfigurableDomain.cpp')
-rw-r--r--parameter/ConfigurableDomain.cpp29
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)
{