X-Git-Url: https://git.quassel-irc.org/?a=blobdiff_plain;f=src%2Fclient%2Fclientbacklogmanager.h;h=5f1e1cd9218071b7c637cee1a2d106107b3b94bf;hb=ab16c77fe03b73a863d9b52b11919bcbac903f58;hp=605149798fd6a65b513b04e66ed1558df2ad9780;hpb=26b9300ccab24e526a9f43bef95a2a70f59161df;p=quassel.git diff --git a/src/client/clientbacklogmanager.h b/src/client/clientbacklogmanager.h index 60514979..5f1e1cd9 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 * @@ -32,29 +32,41 @@ class ClientBacklogManager : public BacklogManager { public: ClientBacklogManager(QObject *parent = 0); - virtual const QMetaObject *syncMetaObject() const { return &BacklogManager::staticMetaObject; } - // helper for the backlogRequester, as it isn't a QObject and can't emit itself inline void emitMessagesRequested(const QString &msg) const { emit messagesRequested(msg); } void reset(); public slots: - virtual void receiveBacklog(BufferId bufferId, int limit, int offset, QVariantList msgs); + 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