summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCătălin Badea <catalin.badea392@gmail.com>2012-08-21 17:45:40 (GMT)
committerCătălin Badea <catalin.badea392@gmail.com>2012-08-21 17:46:49 (GMT)
commit8539b9f1ef656147196ae57a3403b321d1032513 (patch)
tree99525b4b746a9e71a0e811b70e7c49be86ee9521 /Swiften
parente5548caf08dbb4fe4208a23ece9e8e9e0667a8dd (diff)
downloadswift-contrib-8539b9f1ef656147196ae57a3403b321d1032513.zip
swift-contrib-8539b9f1ef656147196ae57a3403b321d1032513.tar.bz2
Add experimental flags.catalinb/history2
Diffstat (limited to 'Swiften')
-rw-r--r--Swiften/Client/MemoryStorages.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/Swiften/Client/MemoryStorages.cpp b/Swiften/Client/MemoryStorages.cpp
index 9bae4e3..703e9ff 100644
--- a/Swiften/Client/MemoryStorages.cpp
+++ b/Swiften/Client/MemoryStorages.cpp
@@ -18,7 +18,9 @@ MemoryStorages::MemoryStorages() {
capsStorage = new CapsMemoryStorage();
avatarStorage = new AvatarMemoryStorage();
rosterStorage = new RosterMemoryStorage();
+#ifdef SWIFT_EXPERIMENTAL_HISTORY
historyStorage = new SQLiteHistoryStorage(":memory:");
+#endif
}
MemoryStorages::~MemoryStorages() {
@@ -26,7 +28,9 @@ MemoryStorages::~MemoryStorages() {
delete avatarStorage;
delete capsStorage;
delete vcardStorage;
+#ifdef SWIFT_EXPERIMENTAL_HISTORY
delete historyStorage;
+#endif
}
VCardStorage* MemoryStorages::getVCardStorage() const {
@@ -46,7 +50,11 @@ RosterStorage* MemoryStorages::getRosterStorage() const {
}
HistoryStorage* MemoryStorages::getHistoryStorage() const {
+#ifdef SWIFT_EXPERIMENTAL_HISTORY
return historyStorage;
+#else
+ return NULL;
+#endif
}