X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fclient%2Fclient.h;h=30ef2d9f1d8a4237d0f88ded95eeaec2e5967b6f;hp=56083a96ba7fa120f72db1410ff398fd66d31f55;hb=7582ce11d6fb8b5123f7ac4794c57e981a634e93;hpb=4f2cf796763079da1079751bbdac9b905689ec11 diff --git a/src/client/client.h b/src/client/client.h index 56083a96..30ef2d9f 100644 --- a/src/client/client.h +++ b/src/client/client.h @@ -26,6 +26,7 @@ #include "bufferinfo.h" #include "coreconnection.h" +#include "quassel.h" #include "types.h" class Message; @@ -118,6 +119,7 @@ public: static inline CoreAccountModel *coreAccountModel() { return instance()->_coreAccountModel; } static inline CoreConnection *coreConnection() { return instance()->_coreConnection; } static inline CoreAccount currentCoreAccount() { return coreConnection()->currentAccount(); } + static inline Quassel::Features coreFeatures() { return _coreFeatures; } static bool isConnected(); static bool internalCore(); @@ -125,6 +127,7 @@ public: static void userInput(const BufferInfo &bufferInfo, const QString &message); static void setBufferLastSeenMsg(BufferId id, const MsgId &msgId); // this is synced to core and other clients + static void setBufferMarkerLine(BufferId id, const MsgId &msgId); // this is synced to core and other clients static void removeBuffer(BufferId id); static void renameBuffer(BufferId bufferId, const QString &newName); static void mergeBuffersPermanently(BufferId bufferId1, BufferId bufferId2); @@ -168,6 +171,13 @@ signals: void logUpdated(const QString &msg); + //! Emitted when a buffer has been marked as read + /** This is currently triggered by setting lastSeenMsg, either local or remote, + * or by bringing the window to front. + * \param id The buffer that has been marked as read + */ + void bufferMarkedAsRead(BufferId id); + public slots: void disconnectFromCore(); @@ -175,6 +185,8 @@ public slots: void bufferRenamed(BufferId bufferId, const QString &newName); void buffersPermanentlyMerged(BufferId bufferId1, BufferId bufferId2); + void markBufferAsRead(BufferId id); + private slots: void setSyncedToCore(); void setDisconnectedFromCore(); @@ -200,6 +212,7 @@ private: void init(); static void addNetwork(Network *); + static void setCoreFeatures(Quassel::Features); static inline BufferSyncer *bufferSyncer() { return instance()->_bufferSyncer; } static QPointer instanceptr; @@ -230,6 +243,7 @@ private: QHash _identities; bool _connected; + static Quassel::Features _coreFeatures; QString _debugLogBuffer; QTextStream _debugLog;