X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=core%2Fbacklog.h;fp=core%2Fbacklog.h;h=0000000000000000000000000000000000000000;hp=9dc0dcf18cceeef28a346adba593dc0cb2feddf3;hb=077d44f36d2f5c730283ef6be839aea7dd073d56;hpb=f0a6776fc5102ff6a7fe1469917fe231e4cd3a8a diff --git a/core/backlog.h b/core/backlog.h deleted file mode 100644 index 9dc0dcf1..00000000 --- a/core/backlog.h +++ /dev/null @@ -1,85 +0,0 @@ -/*************************************************************************** - * Copyright (C) 2005-07 by The Quassel Team * - * devel@quassel-irc.org * - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation; either version 2 of the License, or * - * (at your option) any later version. * - * * - * This program is distributed in the hope that it will be useful, * - * but WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * - * GNU General Public License for more details. * - * * - * You should have received a copy of the GNU General Public License * - * along with this program; if not, write to the * - * Free Software Foundation, Inc., * - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * - ***************************************************************************/ - -#ifndef _BACKLOG_H_ -#define _BACKLOG_H_ - -#include -#include - -#include "global.h" -#include "message.h" - -// TODO: is this threadsafe? should it be? -class Backlog : public QObject { - Q_OBJECT - - public: - Backlog(); - ~Backlog(); - - void init(QString user); - void setDefaultSettings(int lines = -1, QDateTime time = QDateTime()); - void setSettings(QString network, QString buffer, int lines = -1, QDateTime time = QDateTime()); - - BufferId getBufferId(QString network, QString buffer); - uint logMessage(Message msg); - - QList requestMsgs(BufferId, int lastlines = -1, int offset = -1); - QList requestMsgs(BufferId, QDateTime since, int offset = -1); - //QList requestMsgRange(BufferId, int first, int last); - - QList requestBuffers(QDateTime since = QDateTime()); - - public slots: - void importOldBacklog(); - - signals: - void bufferIdUpdated(BufferId); // sent also if a new bufferid is created - - private: - QString user; - bool backlogEnabled; - QSqlDatabase logDb; - - uint nextMsgId, nextBufferId, nextSenderId; - - QTimer cleanupTimer; - - void cleanup(); - - // Old stuff, just for importing old file-based data - void initBackLogOld(); - void logMessageOld(QString net, Message); - - bool backLogEnabledOld; - QDir backLogDir; - QHash > backLog; - //QHash netIdx; - QHash logFiles; - QHash logStreams; - QHash logFileDates; - QHash logFileDirs; - -}; - - - -#endif