X-Git-Url: https://git.quassel-irc.org/?a=blobdiff_plain;f=src%2Fcore%2Fcoresession.h;h=27417e5ea8f799220c9beb9048c03415ec1811e4;hb=a3a8e528916f4930bd731ed074bcdd190d4fe327;hp=32e34ec5a0128a84439f418c4955a3e83f237d5f;hpb=8699dd758516d0ded076811e8ea656adc95e69d0;p=quassel.git diff --git a/src/core/coresession.h b/src/core/coresession.h index 32e34ec5..27417e5e 100644 --- a/src/core/coresession.h +++ b/src/core/coresession.h @@ -28,7 +28,7 @@ #include "message.h" class Identity; -class Server; +class NetworkConnection; class SignalProxy; class Storage; @@ -51,7 +51,7 @@ public: SignalProxy *signalProxy() const; - void attachServer(Server *server); + void attachNetworkConnection(NetworkConnection *conn); //! Return necessary data for restoring the session after restarting the core QVariant state() const; @@ -61,7 +61,7 @@ public slots: //! Store a piece session-wide data and distribute it to connected clients. void storeSessionData(const QString &key, const QVariant &data); - void serverStateRequested(); + void networkStateRequested(); void addClient(QIODevice *connection); @@ -72,10 +72,15 @@ public slots: void sendBacklog(BufferInfo, QVariant, QVariant); void msgFromGui(BufferInfo, QString message); - //! Create or update an identity and propagate the changes to the clients. - /** \param identity The identity to be created/updated. + //! Create an identity and propagate the changes to the clients. + /** \param identity The identity to be created. */ - void createOrUpdateIdentity(const Identity &identity); + void createIdentity(const Identity &identity); + + //! Update an identity and propagate the changes to the clients. + /** \param identity The identity to be updated. + */ + void updateIdentity(const Identity &identity); //! Remove identity and propagate that fact to the clients. /** \param identity The identity to be removed. @@ -113,8 +118,8 @@ signals: private slots: void recvStatusMsgFromServer(QString msg); void recvMessageFromServer(Message::Type, QString target, QString text, QString sender = "", quint8 flags = Message::None); - void serverConnected(uint networkid); - void serverDisconnected(uint networkid); + void networkConnected(uint networkid); + void networkDisconnected(uint networkid); void scriptRequest(QString script); @@ -125,7 +130,7 @@ private: SignalProxy *_signalProxy; Storage *storage; - QHash servers; + QHash connections; QVariantMap sessionData; QMutex mutex;