X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fcore%2Fcore.h;h=3e19474f45e21125038f8651efed456a230d2548;hp=6d743e89366d3f13e24d801fc19fce96618341d7;hb=b9828e0dd235964b8e2e97f844f4bed3476d3bd4;hpb=41f90ea96aad92b534a982296168baff8b8da2d7 diff --git a/src/core/core.h b/src/core/core.h index 6d743e89..3e19474f 100644 --- a/src/core/core.h +++ b/src/core/core.h @@ -256,16 +256,26 @@ class Core : public QObject { return instance()->_storage->getBufferInfo(user, bufferId); } - //! Store a Message in the backlog. + //! Store a Message in the storage backend and set it's unique Id. /** \note This method is threadsafe. * - * \param msg The message object to be stored - * \return The globally unique id for the stored message + * \param message The message object to be stored + * \return true on success */ - static inline MsgId storeMessage(const Message &message) { + static inline bool storeMessage(Message &message) { return instance()->_storage->logMessage(message); } + //! Store a list of Messages in the storage backend and set their unique Id. + /** \note This method is threadsafe. + * + * \param messages The list message objects to be stored + * \return true on success + */ + static inline bool storeMessages(MessageList &messages) { + return instance()->_storage->logMessages(messages); + } + //! Request a certain number messages stored in a given buffer. /** \param buffer The buffer we request messages from * \param first if != -1 return only messages with a MsgId >= first