diff options
author | Cătălin Badea <catalin.badea392@gmail.com> | 2012-08-21 19:06:05 (GMT) |
---|---|---|
committer | Kevin Smith <git@kismith.co.uk> | 2012-08-30 20:54:18 (GMT) |
commit | 7d0cd94de71d9e55e573e28206470439ecde3db5 (patch) | |
tree | c361caa96dac71d53a74ba76aa3dc1d349a0c59e /Swiften/Client/MemoryStorages.cpp | |
parent | 6856199274e9c5e581220fccf520b8f011519d17 (diff) | |
download | swift-contrib-7d0cd94de71d9e55e573e28206470439ecde3db5.zip swift-contrib-7d0cd94de71d9e55e573e28206470439ecde3db5.tar.bz2 |
History dialog
Add history dialog as an experimental feature.
License: This patch is BSD-licensed, see Documentation/Licenses/BSD-simplified.txt for details.
Diffstat (limited to 'Swiften/Client/MemoryStorages.cpp')
-rw-r--r-- | Swiften/Client/MemoryStorages.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/Swiften/Client/MemoryStorages.cpp b/Swiften/Client/MemoryStorages.cpp index fe171f7..703e9ff 100644 --- a/Swiften/Client/MemoryStorages.cpp +++ b/Swiften/Client/MemoryStorages.cpp @@ -9,6 +9,7 @@ #include <Swiften/Avatars/AvatarMemoryStorage.h> #include <Swiften/Disco/CapsMemoryStorage.h> #include <Swiften/Roster/RosterMemoryStorage.h> +#include <Swiften/History/SQLiteHistoryStorage.h> namespace Swift { @@ -17,6 +18,9 @@ MemoryStorages::MemoryStorages() { capsStorage = new CapsMemoryStorage(); avatarStorage = new AvatarMemoryStorage(); rosterStorage = new RosterMemoryStorage(); +#ifdef SWIFT_EXPERIMENTAL_HISTORY + historyStorage = new SQLiteHistoryStorage(":memory:"); +#endif } MemoryStorages::~MemoryStorages() { @@ -24,6 +28,9 @@ MemoryStorages::~MemoryStorages() { delete avatarStorage; delete capsStorage; delete vcardStorage; +#ifdef SWIFT_EXPERIMENTAL_HISTORY + delete historyStorage; +#endif } VCardStorage* MemoryStorages::getVCardStorage() const { @@ -42,5 +49,13 @@ RosterStorage* MemoryStorages::getRosterStorage() const { return rosterStorage; } +HistoryStorage* MemoryStorages::getHistoryStorage() const { +#ifdef SWIFT_EXPERIMENTAL_HISTORY + return historyStorage; +#else + return NULL; +#endif +} + } |