Close notifications on other connected clients as well
[quassel.git] / src / client / client.h
index 56083a9..30ef2d9 100644 (file)
@@ -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<Client> instanceptr;
@@ -230,6 +243,7 @@ private:
   QHash<IdentityId, Identity *> _identities;
 
   bool _connected;
+  static Quassel::Features _coreFeatures;
 
   QString _debugLogBuffer;
   QTextStream _debugLog;