switching from timestamps to msgid regarding lastseen states
[quassel.git] / src / client / client.h
index 21e6102..b51cc50 100644 (file)
@@ -106,7 +106,7 @@ public:
   enum ClientMode { LocalCore, RemoteCore };
 
   static void checkForHighlight(Message &msg);
-  static void setBufferLastSeen(BufferId id, const QDateTime &seen); // this is synced to core and other clients
+  static void setBufferLastSeenMsg(BufferId id, const MsgId &msgId); // this is synced to core and other clients
   static void removeBuffer(BufferId id);
 
 signals:
@@ -170,7 +170,7 @@ private slots:
   void recvStatusMsg(QString network, QString message);
   void recvBacklogData(BufferInfo, QVariantList, bool);
   void updateBufferInfo(BufferInfo);
-  void updateLastSeen(BufferId id, const QDateTime &lastSeen);
+  void updateLastSeenMsg(BufferId id, const MsgId &msgId);
 
   void layoutMsg();
 
@@ -193,6 +193,8 @@ private:
   static void setCurrentCoreAccount(AccountId);
   static inline BufferSyncer *bufferSyncer() { return instance()->_bufferSyncer; }
 
+  Buffer *statusBuffer(const NetworkId &networkid) const;
+
   static QPointer<Client> instanceptr;
 
   QPointer<QIODevice> socket;
@@ -208,6 +210,7 @@ private:
   bool _connectedToCore, _syncedToCore;
 
   QHash<BufferId, Buffer *> _buffers;
+  QHash<NetworkId, Buffer *> _statusBuffers; // fast lookup
   QHash<NetworkId, Network *> _networks;
   QHash<IdentityId, Identity *> _identities;