X-Git-Url: https://git.quassel-irc.org/?a=blobdiff_plain;f=src%2Fcore%2Fcore.h;h=8ee11296a10b3ea4218e23c47826878a7a40d25d;hb=dd653b781619e2de71c710eafab7af6911ee89ed;hp=c1f397aed36641aaf73b0047e6b375949ac080ec;hpb=e049ffc61b5e260a49d73102a74c3821af827e77;p=quassel.git diff --git a/src/core/core.h b/src/core/core.h index c1f397ae..8ee11296 100644 --- a/src/core/core.h +++ b/src/core/core.h @@ -33,6 +33,7 @@ # include # include #endif +#include "oidentdconfiggenerator.h" #include "storage.h" #include "bufferinfo.h" @@ -75,11 +76,11 @@ public: /** * \param userId The users Id * \param settingName The Name of the Setting - * \param default Value to return in case it's unset. + * \param defaultValue Value to return in case it's unset. * \return the Value of the Setting or the default value if it is unset. */ - static inline QVariant getUserSetting(UserId userId, const QString &settingName, const QVariant &data = QVariant()) { - return instance()->_storage->getUserSetting(userId, settingName, data); + static inline QVariant getUserSetting(UserId userId, const QString &settingName, const QVariant &defaultValue = QVariant()) { + return instance()->_storage->getUserSetting(userId, settingName, defaultValue); } /* Identity handling */ @@ -378,10 +379,34 @@ public: return instance()->_storage->bufferLastSeenMsgIds(user); } + //! Update the MarkerLineMsgId for a Buffer + /** This Method is used to make the marker line position 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 setBufferMarkerLineMsg(UserId user, const BufferId &bufferId, const MsgId &msgId) { + return instance()->_storage->setBufferMarkerLineMsg(user, bufferId, msgId); + } + + //! Get a Hash of all marker line message ids + /** This Method is called when the Quassel Core is started to restore the MarkerLineMsgIds + * \note This method is threadsafe. + * + * \param user The Owner of the buffers + */ + static inline QHash bufferMarkerLineMsgIds(UserId user) { + return instance()->_storage->bufferMarkerLineMsgIds(user); + } + const QDateTime &startTime() const { return _startTime; } static inline QTimer &syncTimer() { return instance()->_storageSyncTimer; } + inline OidentdConfigGenerator *oidentdConfigGenerator() { return _oidentdConfigGenerator; } + static const int AddClientEventId; public slots: @@ -450,6 +475,8 @@ private: QTcpServer _server, _v6server; #endif + OidentdConfigGenerator *_oidentdConfigGenerator; + QHash blocksizes; QHash clientInfo;