summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2010-10-24 13:46:12 (GMT)
committerRemko Tronçon <git@el-tramo.be>2010-10-24 15:56:44 (GMT)
commit9dccf1e0c86b10d41dd2d5f3bf71faf1bf8d77c8 (patch)
tree4d054c17e759f5f206c67fbbef1ca3e77647ba07 /Swift/Controllers/FileStoragesFactory.h
parentefc2bed8610f6e1b7fc29b3dd6f13137fc19bdf6 (diff)
downloadswift-9dccf1e0c86b10d41dd2d5f3bf71faf1bf8d77c8.zip
swift-9dccf1e0c86b10d41dd2d5f3bf71faf1bf8d77c8.tar.bz2
Created Storages interface.
Diffstat (limited to 'Swift/Controllers/FileStoragesFactory.h')
-rw-r--r--Swift/Controllers/FileStoragesFactory.h24
1 files changed, 24 insertions, 0 deletions
diff --git a/Swift/Controllers/FileStoragesFactory.h b/Swift/Controllers/FileStoragesFactory.h
new file mode 100644
index 0000000..bd7cdfb
--- /dev/null
+++ b/Swift/Controllers/FileStoragesFactory.h
@@ -0,0 +1,24 @@
+/*
+ * Copyright (c) 2010 Remko Tronçon
+ * Licensed under the GNU General Public License v3.
+ * See Documentation/Licenses/GPLv3.txt for more information.
+ */
+
+#pragma once
+
+#include "Swift/Controllers/StoragesFactory.h"
+#include "Swiften/Client/FileStorages.h"
+
+namespace Swift {
+ class FileStoragesFactory : public StoragesFactory {
+ public:
+ FileStoragesFactory(const boost::filesystem::path& basePath) : basePath(basePath) {}
+
+ virtual Storages* createStorages(const JID& profile) const {
+ return new FileStorages(basePath, profile);
+ }
+
+ private:
+ boost::filesystem::path basePath;
+ };
+}