X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fclient%2Fclient.h;h=30ef2d9f1d8a4237d0f88ded95eeaec2e5967b6f;hp=a516e2521e099464a299e18e8d16f923877171b1;hb=da2507ded5eaecc8e7f06b9035c5d1b7cec13b9b;hpb=fa00b68a21c777682d9feb37ade6b3904fc19d92 diff --git a/src/client/client.h b/src/client/client.h index a516e252..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,14 +119,15 @@ 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 isSynced(); static bool internalCore(); 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); @@ -169,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(); @@ -176,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(); @@ -201,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 +242,9 @@ private: QHash _networks; QHash _identities; + bool _connected; + static Quassel::Features _coreFeatures; + QString _debugLogBuffer; QTextStream _debugLog;