diff options
author | Frédéric Boisnard <fredericx.boisnard@intel.com> | 2013-02-25 15:56:56 +0100 |
---|---|---|
committer | David Wagner <david.wagner@intel.com> | 2014-02-12 17:03:48 +0100 |
commit | e42dacdeaf82d63000be61c6f1583a2ab08e0a98 (patch) | |
tree | ffbdab1836280ba3e9a979802949edb046f21c04 /parameter/ConfigurableDomains.cpp | |
parent | 6bc17c03f4b006a411b768fca33269843144542d (diff) | |
download | external_parameter-framework-e42dacdeaf82d63000be61c6f1583a2ab08e0a98.zip external_parameter-framework-e42dacdeaf82d63000be61c6f1583a2ab08e0a98.tar.gz external_parameter-framework-e42dacdeaf82d63000be61c6f1583a2ab08e0a98.tar.bz2 |
[PFW] Access Configurations directly
BZ: 88357
This patch aims to enable direct access to Configurations
without using the main blackboard. 2 additional commands are
available:
- getConfigurationParameter <domain> <configuration> <param path>:
Get value for parameter at given path from configuration.
- setConfigurationParameter <domain> <configuration> <param path> <value>
Set value for parameter at given path to configuration.
Change-Id: I9357ba5141feee558fa3f7c10f62db14406433b6
Signed-off-by: Frédéric Boisnard <fredericx.boisnard@intel.com>
Reviewed-on: http://android.intel.com:8080/92325
Reviewed-by: cactus <cactus@intel.com>
Reviewed-by: Gonzalve, Sebastien <sebastien.gonzalve@intel.com>
Tested-by: Dixon, CharlesX <charlesx.dixon@intel.com>
Reviewed-by: buildbot <buildbot@intel.com>
Tested-by: buildbot <buildbot@intel.com>
Diffstat (limited to 'parameter/ConfigurableDomains.cpp')
-rw-r--r-- | parameter/ConfigurableDomains.cpp | 32 |
1 files changed, 31 insertions, 1 deletions
diff --git a/parameter/ConfigurableDomains.cpp b/parameter/ConfigurableDomains.cpp index fcfeb4d..bd5c3c5 100644 --- a/parameter/ConfigurableDomains.cpp +++ b/parameter/ConfigurableDomains.cpp @@ -1,4 +1,4 @@ -/* +/* * INTEL CONFIDENTIAL * Copyright © 2011 Intel * Corporation All Rights Reserved. @@ -503,6 +503,36 @@ bool CConfigurableDomains::removeConfigurableElementFromDomain(const string& str return pConfigurableDomain->removeConfigurableElement(pConfigurableElement, strError); } +CParameterBlackboard* CConfigurableDomains::findConfigurationBlackboard(const string& strDomain, + const string& strConfiguration, + const CConfigurableElement* pConfigurableElement, + uint32_t& uiBaseOffset, + bool& bIsLastApplied, + string& strError) const +{ + log_info("Find configuration blackboard for Domain:%s, Configuration:%s, Element:%s", + strDomain.c_str(), strConfiguration.c_str(), pConfigurableElement->getPath().c_str()); + + // Find domain + const CConfigurableDomain* pConfigurableDomain = findConfigurableDomain(strDomain, strError); + + if (!pConfigurableDomain) { + + return NULL; + } + + // Check that element belongs to the domain + if (!pConfigurableElement->belongsTo(pConfigurableDomain)) { + + strError = "Element \"" + pConfigurableElement->getPath() + "\" does not belong to domain \"" + strDomain + "\""; + + return NULL; + } + + // Find Configuration Blackboard and Base Offset + return pConfigurableDomain->findConfigurationBlackboard(strConfiguration, pConfigurableElement, uiBaseOffset, bIsLastApplied, strError); +} + // Binary settings load/store bool CConfigurableDomains::serializeSettings(const string& strBinarySettingsFilePath, bool bOut, uint8_t uiStructureChecksum, string& strError) { |