From e42dacdeaf82d63000be61c6f1583a2ab08e0a98 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Boisnard?= Date: Mon, 25 Feb 2013 15:56:56 +0100 Subject: [PFW] Access Configurations directly MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit BZ: 88357 This patch aims to enable direct access to Configurations without using the main blackboard. 2 additional commands are available: - getConfigurationParameter : Get value for parameter at given path from configuration. - setConfigurationParameter Set value for parameter at given path to configuration. Change-Id: I9357ba5141feee558fa3f7c10f62db14406433b6 Signed-off-by: Frédéric Boisnard Reviewed-on: http://android.intel.com:8080/92325 Reviewed-by: cactus Reviewed-by: Gonzalve, Sebastien Tested-by: Dixon, CharlesX Reviewed-by: buildbot Tested-by: buildbot --- parameter/DomainConfiguration.cpp | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) (limited to 'parameter/DomainConfiguration.cpp') diff --git a/parameter/DomainConfiguration.cpp b/parameter/DomainConfiguration.cpp index 1aa3e0d..ec6e186 100644 --- a/parameter/DomainConfiguration.cpp +++ b/parameter/DomainConfiguration.cpp @@ -318,6 +318,37 @@ void CDomainConfiguration::getApplicationRule(string& strResult) const } } +/** + * Get the Configuration Blackboard. + * + * Fetch the Configuration Blackboard related to the ConfigurableElement given in parameter. This + * Element is used to retrieve the correct AreaConfiguration where the Blackboard is stored. + * + * @param[in] pConfigurableElement A pointer to a ConfigurableElement that is part of the + * Domain. This must have been checked previously, as an + * assertion is performed. + * + * return Pointer to the Blackboard of the Configuration. + */ +CParameterBlackboard* CDomainConfiguration::getBlackboard(const CConfigurableElement* pConfigurableElement) const +{ + AreaConfigurationListIterator it; + + for (it = _areaConfigurationList.begin(); it != _areaConfigurationList.end(); ++it) { + + CAreaConfiguration* pAreaConfiguration = *it; + + // Check if the Element is associated with the Domain + if (pAreaConfiguration->getConfigurableElement() == pConfigurableElement) { + + return &pAreaConfiguration->getBlackboard(); + } + } + + assert(0); + return NULL; +} + // Save data from current void CDomainConfiguration::save(const CParameterBlackboard* pMainBlackboard) { -- cgit v1.1