diff options
author | David Wagner <david.wagner@intel.com> | 2014-12-04 18:38:52 +0100 |
---|---|---|
committer | David Wagner <david.wagner@intel.com> | 2015-01-22 11:53:52 +0100 |
commit | ed744eb61b3fced13193fb59f728f26847748179 (patch) | |
tree | 2d7e412bb2df30a499eab98b1361574aacf92394 /parameter/ParameterMgr.h | |
parent | d8a53107d5f965c8ca406ee95f5999efd6694730 (diff) | |
download | external_parameter-framework-ed744eb61b3fced13193fb59f728f26847748179.zip external_parameter-framework-ed744eb61b3fced13193fb59f728f26847748179.tar.gz external_parameter-framework-ed744eb61b3fced13193fb59f728f26847748179.tar.bz2 |
New remote command for exporting a single domain
The command is used as follows:
getDomainWithSettingsXML <domain>
and outputs the requested domain to the standard output.
In that end, the const version of CConfigurableDomains::findConfigurableDomain
is made public. This somewhat breaks encapsulation but since the returned
domain is const, this has limited impact.
Change-Id: I9b854040a5d59913b9b405c8e38d29a3018a6079
Signed-off-by: David Wagner <david.wagner@intel.com>
Diffstat (limited to 'parameter/ParameterMgr.h')
-rw-r--r-- | parameter/ParameterMgr.h | 53 |
1 files changed, 48 insertions, 5 deletions
diff --git a/parameter/ParameterMgr.h b/parameter/ParameterMgr.h index 9e4a3fb..cd1c468 100644 --- a/parameter/ParameterMgr.h +++ b/parameter/ParameterMgr.h @@ -250,23 +250,54 @@ public: bool importDomainsXml(const std::string& strXmlSource, bool bWithSettings, bool bFromFile, std::string& strError); + + /** + * Export an element object to an Xml destination. + * + * + * @param[in,out] strXmlDest a string containing an xml description or a path to an xml file. + * @param[in] xmlSerializingContext the serializing context + * @param[in] bToFile a boolean that determines if the destination is an xml description in + * strXmlDest or contained in a file. In that case strXmlDest is just the file path. + * @param[in] element object to be serialized. + * @param[out] strError is used as the error output. + * + * @return false if any error occurs, true otherwise. + */ + bool serializeElement(std::string& strXmlDest, CXmlSerializingContext& xmlSerializingContext, + bool bToFile, const CElement& element, std::string& strError) const; + /** * Method that exports Configurable Domains to an Xml destination. - * If bToFile is false, the xml description from the xml document will be written - * in strXmlDest. Otherwise it will be written in a file located at the path in strXmlDest * - * @param[in:out] strXmlDest a std::string containing an xml description or a path to an xml file + * @param[in,out] strXmlDest a string containing an xml description or a path to an xml file * @param[in] bWithSettings a boolean that determines if the settings should be used in the * xml description * @param[in] bToFile a boolean that determines if the destination is an xml description in * strXmlDest or contained in a file. In that case strXmlDest is just the file path. * @param[out] strError is used as the error output * - * @return false if any error occures + * @return false if any error occurs, true otherwise. */ bool exportDomainsXml(std::string& strXmlDest, bool bWithSettings, bool bToFile, std::string& strError) const; + /** + * Method that exports a given Configurable Domain to an Xml destination. + * + * @param[in,out] strXmlDest a string containing an xml description or a path to an xml file + * @param[in] strDomainName the name of the domain to be exported + * @param[in] bWithSettings a boolean that determines if the settings should be used in the + * xml description + * @param[in] bToFile a boolean that determines if the destination is an xml description in + * strXmlDest or contained in a file. In that case strXmlDest is just the file path. + * @param[out] strError is used as the error output + * + * @return false if any error occurs, true otherwise. + */ + bool exportSingleDomainXml(std::string& strXmlDest, const std::string& strDomainName, + bool bWithSettings, bool bToFile, std::string& strError) const; + // Binary Import/Export bool importDomainsBinary(const std::string& strFileName, std::string& strError); bool exportDomainsBinary(const std::string& strFileName, std::string& strError); @@ -371,7 +402,7 @@ private: CCommandHandler::CommandStatus importSettingsCommmandProcess(const IRemoteCommand& remoteCommand, std::string& strResult); /** - * Command handler method for getConfigurableDomainWithSettings command. + * Command handler method for getConfigurableDomainsWithSettings command. * * @param[in] remoteCommand contains the arguments of the received command. * @param[out] strResult a std::string containing the result of the command @@ -383,6 +414,18 @@ private: const IRemoteCommand& remoteCommand, std::string& strResult); /** + * Command handler method for getConfigurableDomainWithSettings command. + * + * @param[in] remoteCommand contains the arguments of the received command. + * @param[out] strResult a string containing the result of the command + * + * @return CCommandHandler::ESucceeded if command succeeded or CCommandHandler::EFailed + * in the other case + */ + CCommandHandler::CommandStatus getConfigurableDomainWithSettingsXMLCommmandProcess( + const IRemoteCommand& remoteCommand, std::string& strResult); + + /** * Command handler method for setConfigurableDomainWithSettings command. * * @param[in] remoteCommand contains the arguments of the received command. |