From 6cae0ecf49ec7815aa59a4f4a0ec99976ca38032 Mon Sep 17 00:00:00 2001 From: Frederic Boisnard Date: Thu, 23 May 2013 18:48:58 +0200 Subject: Add showMapping command to the PFW MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit BZ: 99822 Developers often need to get the mapping corresponding to a specific parameter. However, the PFW doesn't provide a command to achieve this goal. This patch aims to add the showMapping command to the PFW. Change-Id: I05af64a408abe4ceb7f5d177a0ff5fa0461034d0 Signed-off-by: Frédéric Boisnard Reviewed-on: http://android.intel.com:8080/105145 Reviewed-by: Benavoli, Patrick Reviewed-by: Denneulin, Guillaume Reviewed-by: Gonzalve, Sebastien Tested-by: Barthes, FabienX Reviewed-by: buildbot Tested-by: buildbot --- parameter/ParameterMgr.h | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'parameter/ParameterMgr.h') diff --git a/parameter/ParameterMgr.h b/parameter/ParameterMgr.h index e7cb2bd..9677303 100644 --- a/parameter/ParameterMgr.h +++ b/parameter/ParameterMgr.h @@ -50,6 +50,7 @@ class CBackSynchronizer; class CParameterHandle; class CSubsystemPlugins; class CParameterAccessContext; +class CConfigurableElement; class CParameterMgr : private CElement { @@ -116,6 +117,17 @@ public: // Configuration application void applyConfigurations(); + /** + * Returns the CConfigurableElement corresponding to the path given in argument. + * + * @param[in] strPath A string representing a path to an element. + * @param[out] strError Error message + * + * @return A const pointer to the corresponding CConfigurableElement. + * On error, NULL is returned and the error is explained in strError. + */ + const CConfigurableElement* getConfigurableElement(const string& strPath, + string& strError) const; // Dynamic parameter handling CParameterHandle* createParameterHandle(const string& strPath, string& strError); @@ -140,6 +152,15 @@ public: // User set/get parameters bool accessValue(CParameterAccessContext& parameterAccessContext, const string& strPath, string& strValue, bool bSet, string& strError); bool accessParameterValue(const string& strPath, string& strValue, bool bSet, string& strError); + /** + * Returns the element mapping corresponding to the path given in parameter. + * + * @param[in] strPath Path of an element + * @param[out] strValue A sting containing the mapping + * + * @return true if a mapping was found for this element + */ + bool getParameterMapping(const string& strPath, string& strValue) const; bool accessConfigurationValue(const string &strDomain, const string &stConfiguration, const string& strPath, string& strValue, bool bSet, string& strError); ////////// Configuration/Domains handling ////////////// @@ -280,6 +301,8 @@ private: CCommandHandler::CommandStatus setConfigurationParameterCommmandProcess(const IRemoteCommand& remoteCommand, string& strResult); CCommandHandler::CommandStatus listBelongingDomainsCommmandProcess(const IRemoteCommand& remoteCommand, string& strResult); CCommandHandler::CommandStatus listAssociatedDomainsCommmandProcess(const IRemoteCommand& remoteCommand, string& strResult); + CCommandHandler::CommandStatus showMappingCommmandProcess(const IRemoteCommand& remoteCommand, + string& strResult); /// Browse CCommandHandler::CommandStatus listAssociatedElementsCommmandProcess(const IRemoteCommand& remoteCommand, string& strResult); CCommandHandler::CommandStatus listConflictingElementsCommmandProcess(const IRemoteCommand& remoteCommand, string& strResult); -- cgit v1.1