summaryrefslogtreecommitdiffstats
path: root/src/Common/StorageBackend.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/Common/StorageBackend.h')
-rw-r--r--src/Common/StorageBackend.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/Common/StorageBackend.h b/src/Common/StorageBackend.h
index 1d53570..abec185 100644
--- a/src/Common/StorageBackend.h
+++ b/src/Common/StorageBackend.h
@@ -38,9 +38,15 @@ class StorageBackend {
virtual std::set<std::string> listTypes() throw (Core::Exception) = 0;
virtual std::set<std::string> list(const std::string &type) throw (Core::Exception) = 0;
+ virtual bool exists(const std::string &type, const std::string &name) throw (Core::Exception) {
+ return (list(type).count(name) > 0);
+ }
+
virtual void store(const std::string &type, const std::string &name, const XmlData *data) throw (Core::Exception) = 0;
virtual boost::shared_ptr<XmlData> load(const std::string &type, const std::string &name) throw (Core::Exception) = 0;
+ virtual void remove(const std::string &type, const std::string &name) throw (Core::Exception) = 0;
+
public:
virtual ~StorageBackend() {}
};