X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fclient%2Fbacklogrequester.h;h=2ecb09a437104785dfd65e27f619d8bf83871e71;hp=c8a51e6afc4fa350509e9469da60c55cdd5ebe4a;hb=HEAD;hpb=52209badc8e769e50aa3019b63689dda0e79e9d0 diff --git a/src/client/backlogrequester.h b/src/client/backlogrequester.h index c8a51e6a..3a94529c 100644 --- a/src/client/backlogrequester.h +++ b/src/client/backlogrequester.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2019 by the Quassel Project * + * Copyright (C) 2005-2022 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * @@ -39,6 +39,7 @@ public: InvalidRequester = 0, PerBufferFixed, PerBufferUnread, + AsNeeded, ///< Only request backlog on cores without Feature::BufferActivitySync GlobalUnread }; @@ -114,3 +115,20 @@ private: int _limit; int _additional; }; + +// ======================================== +// AS NEEDED BACKLOG REQUESTER +// ======================================== +/** + * Backlog requester that only fetches initial backlog when the core doesn't support buffer activity + * tracking + */ +class AsNeededBacklogRequester : public BacklogRequester +{ +public: + AsNeededBacklogRequester(ClientBacklogManager* backlogManager); + void requestBacklog(const BufferIdList& bufferIds) override; + +private: + int _legacyBacklogCount; +};