+public:
+ CoreSession(UserId, bool restoreState, QObject *parent = 0);
+ ~CoreSession();
+
+ QList<BufferInfo> buffers() const;
+ UserId user() const;
+ Network *network(NetworkId) const;
+ NetworkConnection *networkConnection(NetworkId) const;
+ Identity *identity(IdentityId) const;
+
+ QVariant sessionState();
+
+ //! Retrieve a piece of session-wide data.
+ QVariant retrieveSessionData(const QString &key, const QVariant &def = QVariant());
+
+ SignalProxy *signalProxy() const;
+
+ void attachNetworkConnection(NetworkConnection *conn);
+
+ //! Return necessary data for restoring the session after restarting the core
+ void saveSessionState() const;
+ void restoreSessionState();
+
+public slots:
+ //! Store a piece session-wide data and distribute it to connected clients.
+ void storeSessionData(const QString &key, const QVariant &data);
+
+ void networkStateRequested();
+
+ void addClient(QObject *socket);
+
+ void connectToNetwork(QString, const QVariant &previousState = QVariant());
+ void connectToNetwork(NetworkId, const QVariant &previousState = QVariant());
+
+ //void processSignal(ClientSignal, QVariant, QVariant, QVariant);
+ void sendBacklog(BufferInfo, QVariant, QVariant);
+ 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);
+
+signals:
+ void initialized();
+
+ //void msgFromGui(uint netid, QString buf, QString message);
+ void displayMsg(Message message);
+ void displayStatusMsg(QString, QString);
+
+ //void connectToIrc(QString net);
+ //void disconnectFromIrc(QString net);