X-Git-Url: https://git.quassel-irc.org/?a=blobdiff_plain;f=src%2Fcore%2Fstorage.h;h=00a3b0be2ffc0009a37faafc51d7daeaf321f9de;hb=00cc0dfd645cce97c120111f5e5fd4c02ed021c1;hp=b49aee0ac3047d07de0d4989eed066ad0b0fd5af;hpb=a95ad2de573027f9bee36db972bcae4195168d0c;p=quassel.git diff --git a/src/core/storage.h b/src/core/storage.h index b49aee0a..00a3b0be 100644 --- a/src/core/storage.h +++ b/src/core/storage.h @@ -56,7 +56,6 @@ public: }; -public slots: /* General */ //! Check if the storage type is available. @@ -386,6 +385,12 @@ public slots: */ virtual void setBufferLastSeenMsg(UserId user, const BufferId& bufferId, const MsgId& msgId) = 0; + //! Get a Hash of all last message ids + /** This Method is called when the Quassel Core is started to restore the lastMsgIds + * \param user The Owner of the buffers + */ + virtual QHash bufferLastMsgIds(UserId user) = 0; + //! Get a Hash of all last seen message ids /** This Method is called when the Quassel Core is started to restore the lastSeenMsgIds * \param user The Owner of the buffers @@ -522,6 +527,23 @@ public slots: Message::Types type = Message::Types{-1}, Message::Flags flags = Message::Flags{-1}) = 0; + //! 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 + * \param flags The Message::Flags that should be returned + * \return The requested list of messages + */ + virtual 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}) = 0; + //! 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