diff options
author | David Wagner <david.wagner@intel.com> | 2014-12-10 15:01:22 +0100 |
---|---|---|
committer | David Wagner <david.wagner@intel.com> | 2015-01-22 11:53:52 +0100 |
commit | fd21197b84f46ba53ace3a1b9d0c05596815dd51 (patch) | |
tree | 27864e4d136bf8e9b0aca22f96724ca23a9fa79c /parameter/ParameterMgr.h | |
parent | ed744eb61b3fced13193fb59f728f26847748179 (diff) | |
download | external_parameter-framework-fd21197b84f46ba53ace3a1b9d0c05596815dd51.zip external_parameter-framework-fd21197b84f46ba53ace3a1b9d0c05596815dd51.tar.gz external_parameter-framework-fd21197b84f46ba53ace3a1b9d0c05596815dd51.tar.bz2 |
New command for importing a single domain from a file
The command is used as follows:
importDomainWithSettingsXML <file path> [overwrite]
It reads the file given as first argument (path must be absolute) and imports
the domain found in it.
It does not check whether it overlaps with another domain (same elements in two
domains). It does, however, check if there is an existing domain with the same
name as the one being imported. If so and if the (optional) second argument
is "overwrite", it will first delete the existing domain; if not it will refuse
to import the new domain.
Change-Id: I7aaa225f2f1a296f52dc8a97f55e1ff70c06d567
Signed-off-by: David Wagner <david.wagner@intel.com>
Diffstat (limited to 'parameter/ParameterMgr.h')
-rw-r--r-- | parameter/ParameterMgr.h | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/parameter/ParameterMgr.h b/parameter/ParameterMgr.h index cd1c468..7962294 100644 --- a/parameter/ParameterMgr.h +++ b/parameter/ParameterMgr.h @@ -250,6 +250,31 @@ public: bool importDomainsXml(const std::string& strXmlSource, bool bWithSettings, bool bFromFile, std::string& strError); + /** + * Method that imports a single Configurable Domain from an Xml source. + * + * @param[in] strXmlSource 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] bFromFile a boolean that determines if the source is an xml description in + * strXmlSource or contained in a file. In that case strXmlSource is just the file path. + * @param[out] strError is used as the error output + * + * @return false if any error occurs + */ + bool importSingleDomainXml(const std::string& strXmlSource, bool bOverwrite, + std::string& strError); + + /** + * Method that imports a single Configurable Domain, with settings, from an Xml file. + * + * @param[in] strXmlFilePath absolute path to the xml file containing the domain + * @param[out] strError is used as the error output + * + * @return false if any error occurs + */ + bool importDomainFromFile(const std::string& strXmlFilePath, bool bOverwrite, std::string& strError); + /** * Export an element object to an Xml destination. @@ -398,6 +423,7 @@ private: CCommandHandler::CommandStatus importConfigurableDomainsFromXMLCommmandProcess(const IRemoteCommand& remoteCommand, std::string& strResult); CCommandHandler::CommandStatus exportConfigurableDomainsWithSettingsToXMLCommmandProcess(const IRemoteCommand& remoteCommand, std::string& strResult); CCommandHandler::CommandStatus importConfigurableDomainsWithSettingsFromXMLCommmandProcess(const IRemoteCommand& remoteCommand, std::string& strResult); + CCommandHandler::CommandStatus importConfigurableDomainWithSettingsFromXMLCommmandProcess(const IRemoteCommand& remoteCommand, std::string& strResult); CCommandHandler::CommandStatus exportSettingsCommmandProcess(const IRemoteCommand& remoteCommand, std::string& strResult); CCommandHandler::CommandStatus importSettingsCommmandProcess(const IRemoteCommand& remoteCommand, std::string& strResult); |