X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fclient%2Fclientbacklogmanager.h;h=2aa399b5e9b9e26ca74089d181e3f5ee6170a1cd;hp=a3f19aef246e6fa45144a5b2ed9d0073ee7cfb7e;hb=0bc4b2b4a25adea85d5f6c6947cfd31f9098149e;hpb=de1619ce11bf386490cdb38bc1be134a391eeaae diff --git a/src/client/clientbacklogmanager.h b/src/client/clientbacklogmanager.h index a3f19aef..2aa399b5 100644 --- a/src/client/clientbacklogmanager.h +++ b/src/client/clientbacklogmanager.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-08 by the Quassel IRC Team * + * Copyright (C) 2005-09 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,21 +38,35 @@ public: void reset(); public slots: - virtual void receiveBacklog(BufferId bufferId, MsgId first, MsgId last, int limit, QVariantList msgs); + virtual QVariantList requestBacklog(BufferId bufferId, MsgId first = -1, MsgId last = -1, int limit = -1, int additional = 0); + virtual void receiveBacklog(BufferId bufferId, MsgId first, MsgId last, int limit, int additional, QVariantList msgs); + virtual void receiveBacklogAll(MsgId first, MsgId last, int limit, int additional, QVariantList msgs); + void requestInitialBacklog(); + void checkForBacklog(BufferId bufferId); + void checkForBacklog(const BufferIdList &bufferIds); + signals: void messagesReceived(BufferId bufferId, int count) const; void messagesRequested(const QString &) const; void messagesProcessed(const QString &) const; + void updateProgress(int, int); + private: bool isBuffering(); - void stopBuffering(); + BufferIdList filterNewBufferIds(const BufferIdList &bufferIds); void dispatchMessages(const MessageList &messages, bool sort = false); BacklogRequester *_requester; + QSet _buffersRequested; }; +// inlines +inline void ClientBacklogManager::checkForBacklog(BufferId bufferId) { + checkForBacklog(BufferIdList() << bufferId); +} + #endif // CLIENTBACKLOGMANAGER_H