X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fcore%2Fcoresession.h;h=a52e03993ba5468e49c2fe7353047bb843c68568;hp=9726f4c134d2d678199eeff1bffb787b9e1f7291;hb=bd1a18355495899b5ce3003599a67e1ea7ca01cc;hpb=28e33cd3255a838a045303bed073f4f9c40a3af4 diff --git a/src/core/coresession.h b/src/core/coresession.h index 9726f4c1..a52e0399 100644 --- a/src/core/coresession.h +++ b/src/core/coresession.h @@ -26,6 +26,7 @@ #include "message.h" +class BufferSyncer; class Identity; class NetworkConnection; class Network; @@ -88,7 +89,7 @@ public slots: //! Create a network and propagate the changes to the clients. /** \param info The network's settings. */ - void createNetwork(const NetworkInfo &info, bool useId = false); + void createNetwork(const NetworkInfo &info); //! Update a network and propagate the changes to the clients. /** \param info The updated network settings. @@ -100,6 +101,20 @@ public slots: */ void removeNetwork(NetworkId network); + //! Remove a buffer and it's backlog permanently + /** \param bufferId The id of the buffer to be removed. + * emits bufferRemoved(bufferId) on success. + */ + void removeBufferRequested(BufferId bufferId); + + //! Rename a Buffer for a given network + /* \param networkId The id of the network the buffer belongs to + * \param newName The new name of the buffer + * \param oldName The old name of the buffer + * emits bufferRenamed(bufferId, newName) on success. + */ + void renameBuffer(const NetworkId &networkId, const QString &newName, const QString &oldName); + signals: void initialized(); @@ -130,13 +145,17 @@ signals: void networkCreated(NetworkId); void networkRemoved(NetworkId); + void bufferRemoved(BufferId); + void bufferRenamed(BufferId, QString); private slots: void recvStatusMsgFromServer(QString msg); - void recvMessageFromServer(Message::Type, QString target, QString text, QString sender = "", quint8 flags = Message::None); + void recvMessageFromServer(Message::Type, BufferInfo::Type, QString target, QString text, QString sender = "", quint8 flags = Message::None); void networkConnected(NetworkId networkid); void networkDisconnected(NetworkId networkid); + void destroyNetwork(NetworkId); + //! Called when storage updated a BufferInfo. /** This emits bufferInfoUpdated() via SignalProxy, iff it's one of our buffers. * \param user The buffer's owner (not necessarily us) @@ -144,6 +163,8 @@ private slots: */ void updateBufferInfo(UserId user, const BufferInfo &bufferInfo); + void storeBufferLastSeen(BufferId buffer, const QDateTime &lastSeen); + void scriptRequest(QString script); private: @@ -155,8 +176,11 @@ private: SignalProxy *_signalProxy; QHash _connections; QHash _networks; + QHash _networksToRemove; QHash _identities; + BufferSyncer *_bufferSyncer; + QScriptEngine *scriptEngine; };