+public:
+ CoreSession(UserId, bool restoreState, QObject *parent = 0);
+ ~CoreSession();
+
+ QList<BufferInfo> buffers() const;
+ UserId user() const;
+ CoreNetwork *network(NetworkId) const;
+ NetworkConnection *networkConnection(NetworkId) const;
+ Identity *identity(IdentityId) const;
+
+ QVariant sessionState();
+
+ SignalProxy *signalProxy() const;
+
+ inline CoreIrcListHelper *ircListHelper() const { return _ircListHelper; }
+
+ void attachNetworkConnection(NetworkConnection *conn);
+
+ //! Return necessary data for restoring the session after restarting the core
+ void saveSessionState() const;
+ void restoreSessionState();
+
+public slots:
+ void networkStateRequested();
+
+ void addClient(QObject *socket);
+
+ void connectToNetwork(NetworkId);
+ void disconnectFromNetwork(NetworkId id);
+
+ void msgFromClient(BufferInfo, QString message);
+
+ //! Create an identity and propagate the changes to the clients.
+ /** \param identity The identity to be created.
+ */
+ 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.
+ */
+ void removeIdentity(IdentityId identity);
+
+ //! Create a network and propagate the changes to the clients.
+ /** \param info The network's settings.
+ */
+ void createNetwork(const NetworkInfo &info);
+
+ //! Update a network and propagate the changes to the clients.
+ /** \param info The updated network settings.
+ */
+ void updateNetwork(const NetworkInfo &info);
+
+ //! Remove identity and propagate that fact to the clients.
+ /** \param identity The identity to be removed.
+ */
+ 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);