X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fcore%2Fcore.h;h=a29d6724efba9f277577db18da841ec0856414dc;hp=333d06700ecda6529d4b8d29bb99e401a651f409;hb=f932e5c8a0ec3ff689686a71c32ee61a428c4340;hpb=cfbd4daee17dbb3c4052d938bf33edd08711d728 diff --git a/src/core/core.h b/src/core/core.h index 333d0670..a29d6724 100644 --- a/src/core/core.h +++ b/src/core/core.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2016 by the Quassel Project * + * Copyright (C) 2005-2018 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * @@ -493,6 +493,14 @@ public: return instance()->_storage->setBufferLastSeenMsg(user, bufferId, msgId); } + //! Get the auth username associated with a userId + /** \param user The user to retrieve the username for + * \return The username for the user + */ + static inline const QString getAuthusername(UserId user) { + return instance()->_storage->getAuthusername(user); + } + //! Get a Hash of all last seen message ids /** This Method is called when the Quassel Core is started to restore the lastSeenMsgIds @@ -531,6 +539,39 @@ public: return instance()->_storage->bufferMarkerLineMsgIds(user); } + //! Update the BufferActivity for a Buffer + /** This Method is used to make the activity state of a Buffer persistent + * \note This method is threadsafe. + * + * \param user The Owner of that Buffer + * \param bufferId The buffer id + * \param MsgId The Message id where the marker line should be placed + */ + static inline void setBufferActivity(UserId user, BufferId bufferId, Message::Types activity) { + return instance()->_storage->setBufferActivity(user, bufferId, activity); + } + + + //! Get a Hash of all buffer activity states + /** This Method is called when the Quassel Core is started to restore the BufferActivity + * \note This method is threadsafe. + * + * \param user The Owner of the buffers + */ + static inline QHash bufferActivities(UserId user) { + return instance()->_storage->bufferActivities(user); + } + + //! Get the bitset of buffer activity states for a buffer + /** This method is used to load the activity state of a buffer when its last seen message changes. + * \note This method is threadsafe. + * + * \param bufferId The buffer + * \param lastSeenMsgId The last seen message + */ + static inline Message::Types bufferActivity(BufferId bufferId, MsgId lastSeenMsgId) { + return instance()->_storage->bufferActivity(bufferId, lastSeenMsgId); + } static inline QDateTime startTime() { return instance()->_startTime; } static inline bool isConfigured() { return instance()->_configured; }