From 4bed9212041d94d52e55e624bd081fcbf01ee04e Mon Sep 17 00:00:00 2001 From: Patrick Benavoli Date: Thu, 27 Oct 2011 14:18:00 +0200 Subject: PFW: Dynamic parameter access BZ: 13272 Added dynamic parameter setting / getting interface for hosting platforms This new API allows: - getting any parameter - setting any parameter as long as it is rogue (attached to no domains) Passed parameter values are in the form of strings. Change-Id: I01a34597fcb4dafb225519cbc01dfffb22b5d52a Signed-off-by: Patrick Benavoli Reviewed-on: http://android.intel.com:8080/22629 Reviewed-by: Centelles, Sylvain Tested-by: Barthes, FabienX Reviewed-by: buildbot Tested-by: buildbot Reviewed-on: http://android.intel.com:8080/26781 Reviewed-by: Barthes, FabienX --- parameter/ParameterAccessContext.cpp | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) (limited to 'parameter/ParameterAccessContext.cpp') diff --git a/parameter/ParameterAccessContext.cpp b/parameter/ParameterAccessContext.cpp index e296d23..769565a 100644 --- a/parameter/ParameterAccessContext.cpp +++ b/parameter/ParameterAccessContext.cpp @@ -35,13 +35,13 @@ CParameterAccessContext::CParameterAccessContext(string& strError, CParameterBlackboard* pParameterBlackboard, bool bValueSpaceIsRaw, bool bOutputRawFormatIsHex) : base(strError), _pParameterBlackboard(pParameterBlackboard), _bValueSpaceIsRaw(bValueSpaceIsRaw), _bOutputRawFormatIsHex(bOutputRawFormatIsHex), - _bBigEndianSubsystem(false), _bAutoSync(true) + _bBigEndianSubsystem(false), _bAutoSync(true), _bDynamicAccess(false) { } CParameterAccessContext::CParameterAccessContext(string& strError) : base(strError), _pParameterBlackboard(NULL), _bValueSpaceIsRaw(false), - _bOutputRawFormatIsHex(false), _bBigEndianSubsystem(false), _bAutoSync(true) + _bOutputRawFormatIsHex(false), _bBigEndianSubsystem(false), _bAutoSync(true), _bDynamicAccess(false) { } @@ -97,5 +97,16 @@ void CParameterAccessContext::setAutoSync(bool bAutoSync) bool CParameterAccessContext::getAutoSync() const { - return _bAutoSync; + return _bAutoSync || _bDynamicAccess; +} + +// Dynamic access +void CParameterAccessContext::setDynamicAccess(bool bDynamicAccess) +{ + _bDynamicAccess = bDynamicAccess; +} + +bool CParameterAccessContext::isDynamicAccess() const +{ + return _bDynamicAccess; } -- cgit v1.1