parameter-framework: Changed criterion interface
BZ: 9561
- separated selection criterion change event indication form configuration application requests in different APIs
- added a way to retrieve selection criterion from its name
- updated version number 0.2.1
Change-Id: Icf4560fe67001655a171401f106296b9aa09afb3
Orig-Change-Id: I8dfb05ba1e704888c5c1ff9268a2a2e9a46af9bb
Signed-off-by: Patrick Benavoli <patrickx.benavoli@intel.com>
Reviewed-on: http://android.intel.com:8080/20208
Reviewed-by: Barthes, FabienX <fabienx.barthes@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/ParameterMgr.cpp b/parameter/ParameterMgr.cpp
index a8335c8..329ab37 100644
--- a/parameter/ParameterMgr.cpp
+++ b/parameter/ParameterMgr.cpp
@@ -305,9 +305,6 @@
return false;
}
- // All is loaded, we're ready to observe selection criteria change events
- getSelectionCriteria()->setObserver(this);
-
// Start remote processor server if appropriate
return handleRemoteProcessingInterface(strError);
}
@@ -554,10 +551,17 @@
return getSelectionCriteria()->createSelectionCriterion(strName, pSelectionCriterionType);
}
-// Selection criteria changed event
-void CParameterMgr::selectionCriterionChanged(const CSelectionCriterion* pSelectionCriterion)
+// Selection criterion retrieval
+CSelectionCriterion* CParameterMgr::getSelectionCriterion(const string& strName)
{
- CAutoLog autoLog(this, "Selection criterion changed event: " + pSelectionCriterion->getFormattedDescription(false));
+ // Propagate
+ return getSelectionCriteria()->getSelectionCriterion(strName);
+}
+
+// Selection criteria changed event
+bool CParameterMgr::applyConfigurations(string& strError)
+{
+ CAutoLog autoLog(this, "Configuration application request");
// Lock state
CAutoLock autoLock(&_tuningModeMutex);
@@ -565,13 +569,15 @@
if (!_bTuningModeIsOn) {
// Apply configuration(s)
- string strError;
-
if (!getConfigurableDomains()->apply(_pMainParameterBlackboard, false, strError)) {
log("Failed to apply configurations!");
+
+ return false;
}
}
+
+ return true;
}
// Command processing