diff options
author | Cătălin Badea <catalin.badea392@gmail.com> | 2012-08-19 18:34:48 (GMT) |
---|---|---|
committer | Cătălin Badea <catalin.badea392@gmail.com> | 2012-08-19 18:34:48 (GMT) |
commit | 7a46b1ddf4193c2f4ca789ef86b099f9d70842f9 (patch) | |
tree | bc8d7992bd6deb3967a0c868717308067174a9fa /Swiften/History/SQLiteHistoryManager.h | |
parent | 5aadc44a6f11c277a26865c7c908e3f356158fa0 (diff) | |
download | swift-contrib-7a46b1ddf4193c2f4ca789ef86b099f9d70842f9.zip swift-contrib-7a46b1ddf4193c2f4ca789ef86b099f9d70842f9.tar.bz2 |
Use appropriate folder for storing the history file.
Diffstat (limited to 'Swiften/History/SQLiteHistoryManager.h')
-rw-r--r-- | Swiften/History/SQLiteHistoryManager.h | 38 |
1 files changed, 0 insertions, 38 deletions
diff --git a/Swiften/History/SQLiteHistoryManager.h b/Swiften/History/SQLiteHistoryManager.h deleted file mode 100644 index b74fbde..0000000 --- a/Swiften/History/SQLiteHistoryManager.h +++ /dev/null @@ -1,38 +0,0 @@ -/* - * 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 <boost/optional.hpp> - -#include <Swiften/History/HistoryManager.h> - -struct sqlite3; - -namespace Swift { - class SQLiteHistoryManager : public HistoryManager { - public: - SQLiteHistoryManager(const std::string& file); - ~SQLiteHistoryManager(); - - void addMessage(const HistoryMessage& message); - ContactsMap getContacts(const JID& selfJID, HistoryMessage::Type type, const std::string& keyword) const; - std::vector<HistoryMessage> getMessagesFromDate(const JID& selfJID, const JID& contactJID, HistoryMessage::Type type, const boost::gregorian::date& date) const; - std::vector<HistoryMessage> getMessagesFromNextDate(const JID& selfJID, const JID& contactJID, HistoryMessage::Type type, const boost::gregorian::date& date) const; - std::vector<HistoryMessage> getMessagesFromPreviousDate(const JID& selfJID, const JID& contactJID, HistoryMessage::Type type, const boost::gregorian::date& date) const; - boost::posix_time::ptime getLastTimeStampFromMUC(const JID& selfJID, const JID& mucJID) const; - - private: - boost::gregorian::date getNextDateWithLogs(const JID& selfJID, const JID& contactJID, HistoryMessage::Type type, const boost::gregorian::date& date, bool reverseOrder) const; - int getIDForJID(const JID&); - int addJID(const JID&); - - boost::optional<JID> getJIDFromID(int id) const; - boost::optional<int> getIDFromJID(const JID& jid) const; - - sqlite3* db_; - }; -} |