X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fcore%2Fcore.h;fp=src%2Fcore%2Fcore.h;h=f55553c1bb6d53f645367a08036884b86be1848f;hp=4428f023e367eea535ba6fc7bd17ab7c6b7be706;hb=097f625c4bd147f4127573ad8ab48555f9dc62d3;hpb=4ee99e398eab6e96cfc3750a32fcf6c0b87e1f6f diff --git a/src/core/core.h b/src/core/core.h index 4428f023..f55553c1 100644 --- a/src/core/core.h +++ b/src/core/core.h @@ -424,6 +424,25 @@ public: return instance()->_storage->requestMsgsFiltered(user, bufferId, first, last, limit, type, flags); } + //! Request a certain number messages stored in a given buffer, matching certain filters, ascending + /** \param buffer The buffer we request messages from + * \param first if != -1 return only messages with a MsgId >= first + * \param last if != -1 return only messages with a MsgId < last + * \param limit if != -1 limit the returned list to a max of \limit entries + * \param type The Message::Types that should be returned + * \return The requested list of messages + */ + static inline std::vector requestMsgsForward(UserId user, + BufferId bufferId, + MsgId first = -1, + MsgId last = -1, + int limit = -1, + Message::Types type = Message::Types{-1}, + Message::Flags flags = Message::Flags{-1}) + { + return instance()->_storage->requestMsgsForward(user, bufferId, first, last, limit, type, flags); + } + //! Request a certain number of messages across all buffers /** \param first if != -1 return only messages with a MsgId >= first * \param last if != -1 return only messages with a MsgId < last