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/ConfigurableDomains.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/ConfigurableDomains.h')
-rw-r--r-- | parameter/ConfigurableDomains.h | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/parameter/ConfigurableDomains.h b/parameter/ConfigurableDomains.h index 8016cb9..3cc16df 100644 --- a/parameter/ConfigurableDomains.h +++ b/parameter/ConfigurableDomains.h @@ -49,6 +49,30 @@ public: // Configuration/Domains handling /// Domains bool createDomain(const std::string& strName, std::string& strError); + + /* + * Adds a domain object to configurable domains. The ConfigurableDomains + * object takes ownership of the ConfigurableDomain object. + * + * @param[in] pDomain the domain object. + * @param[in] bOverwrite if false, will refuse to overwrite an existing + * domain, otherwise, an existing domain with the same name will first be + * removed. + * @param[in,out] strError error message + * + * @returns true if the domain was successfully added + */ + bool addDomain(CConfigurableDomain& domain, bool bOverwrite, std::string& strError); + + /** + * Delete a domain by name + * + * @param[in] strName name of the domain to be deleted + * @param[in,out] strError error message + * + * @returns true of the domain was sucessfully deleted, false otherwise (i.e. + * the domain didn't exist). + */ bool deleteDomain(const std::string& strName, std::string& strError); void deleteAllDomains(); bool renameDomain(const std::string& strName, const std::string& strNewName, std::string& strError); @@ -105,6 +129,14 @@ public: // Class kind virtual std::string getKind() const; private: + /** Delete a domain + * + * @param(in] configurableDomain domain to be deleted + * @param[in,out] strError error message + * @returns true of the domain was sucessfully deleted, false otherwise (i.e. + * the domain didn't exist). + */ + void deleteDomain(CConfigurableDomain& configurableDomain); // Returns true if children dynamic creation is to be dealt with virtual bool childrenAreDynamic() const; // Gather owned configurable elements owned by any domain |