X-Git-Url: https://git.quassel-irc.org/?a=blobdiff_plain;f=src%2Fcore%2Fcore.h;h=d2b8092c4fca0a791f9dc7b2f323bbcaf5f44716;hb=00b029d3947bc751893d735a495b03ea8796e139;hp=b2c6c1efdee6286aa01c4de9b6c52d1b10a6b3a6;hpb=8f92b3f08df9f4eb8fd243ccec6aa9d4b563ec23;p=quassel.git diff --git a/src/core/core.h b/src/core/core.h index b2c6c1ef..d2b8092c 100644 --- a/src/core/core.h +++ b/src/core/core.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2019 by the Quassel Project * + * Copyright (C) 2005-2020 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * @@ -194,7 +194,7 @@ public: static void removeIdentity(UserId user, IdentityId identityId) { instance()->_storage->removeIdentity(user, identityId); } - static QList identities(UserId user) { return instance()->_storage->identities(user); } + static std::vector identities(UserId user) { return instance()->_storage->identities(user); } //! Create a Network in the Storage and store it's Id in the given NetworkInfo /** \note This method is thredsafe. @@ -230,9 +230,9 @@ public: /** \note This method is thredsafe. * * \param user The core user - * \return QList. + * \return std::vector. */ - static inline QList networks(UserId user) { return instance()->_storage->networks(user); } + static inline std::vector networks(UserId user) { return instance()->_storage->networks(user); } //! Get a list of Networks to restore /** Return a list of networks the user was connected at the time of core shutdown @@ -240,7 +240,7 @@ public: * * \param user The User Id in question */ - static inline QList connectedNetworks(UserId user) { return instance()->_storage->connectedNetworks(user); } + static inline std::vector connectedNetworks(UserId user) { return instance()->_storage->connectedNetworks(user); } //! Update the connected state of a network /** \note This method is threadsafe @@ -407,7 +407,7 @@ public: * \param limit if != -1 limit the returned list to a max of \limit entries * \return The requested list of messages */ - static inline QList requestMsgs(UserId user, BufferId bufferId, MsgId first = -1, MsgId last = -1, int limit = -1) + static inline std::vector requestMsgs(UserId user, BufferId bufferId, MsgId first = -1, MsgId last = -1, int limit = -1) { return instance()->_storage->requestMsgs(user, bufferId, first, last, limit); } @@ -420,7 +420,7 @@ public: * \param type The Message::Types that should be returned * \return The requested list of messages */ - static inline QList requestMsgsFiltered(UserId user, + static inline std::vector requestMsgsFiltered(UserId user, BufferId bufferId, MsgId first = -1, MsgId last = -1, @@ -437,7 +437,7 @@ public: * \param limit Max amount of messages * \return The requested list of messages */ - static inline QList requestAllMsgs(UserId user, MsgId first = -1, MsgId last = -1, int limit = -1) + static inline std::vector requestAllMsgs(UserId user, MsgId first = -1, MsgId last = -1, int limit = -1) { return instance()->_storage->requestAllMsgs(user, first, last, limit); } @@ -449,7 +449,7 @@ public: * \param type The Message::Types that should be returned * \return The requested list of messages */ - static inline QList requestAllMsgsFiltered(UserId user, + static inline std::vector requestAllMsgsFiltered(UserId user, MsgId first = -1, MsgId last = -1, int limit = -1, @@ -466,7 +466,7 @@ public: * \param user The user whose buffers we request * \return A list of the BufferInfos for all buffers as requested */ - static inline QList requestBuffers(UserId user) { return instance()->_storage->requestBuffers(user); } + static inline std::vector requestBuffers(UserId user) { return instance()->_storage->requestBuffers(user); } //! Request a list of BufferIds for a given NetworkId /** \note This method is threadsafe. @@ -475,7 +475,7 @@ public: * \param networkId The NetworkId of the network in question * \return List of BufferIds belonging to the Network */ - static inline QList requestBufferIdsForNetwork(UserId user, NetworkId networkId) + static inline std::vector requestBufferIdsForNetwork(UserId user, NetworkId networkId) { return instance()->_storage->requestBufferIdsForNetwork(user, networkId); } @@ -536,6 +536,14 @@ public: */ QString strictSysIdent(UserId user) const; + //! Get a Hash of all last message ids + /** This Method is called when the Quassel Core is started to restore the lastMsgIds + * \note This method is threadsafe. + * + * \param user The Owner of the buffers + */ + static inline QHash bufferLastMsgIds(UserId user) { return instance()->_storage->bufferLastMsgIds(user); } + //! Get a Hash of all last seen message ids /** This Method is called when the Quassel Core is started to restore the lastSeenMsgIds * \note This method is threadsafe.