X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fcore%2Fcore.h;h=f31b3776ebcf10db64b8c68c0d3cadddf7967068;hp=2c1fa07d87ab33d1ce2bd18a50c9ea1743efd5b6;hb=00fcb4ab7fd1a2af1c81d9cab13ee23fb7d7b73c;hpb=1e2d0392fd5470b5e055079ca95f37ce20674087 diff --git a/src/core/core.h b/src/core/core.h index 2c1fa07d..f31b3776 100644 --- a/src/core/core.h +++ b/src/core/core.h @@ -48,8 +48,8 @@ struct NetworkInfo; class Core : public QObject { Q_OBJECT - public: - static Core * instance(); +public: + static Core *instance(); static void destroy(); static void saveState(); @@ -380,12 +380,15 @@ class Core : public QObject { static inline QTimer &syncTimer() { return instance()->_storageSyncTimer; } + static const int AddClientEventId; + public slots: //! Make storage data persistent /** \note This method is threadsafe. */ void syncStorage(); void setupInternalClientSession(SignalProxy *proxy); + signals: //! Sent when a BufferInfo is updated in storage. void bufferInfoUpdated(UserId user, const BufferInfo &info); @@ -393,6 +396,9 @@ signals: //! Relay From CoreSession::sessionState(const QVariant &). Used for internal connection only void sessionState(const QVariant &); +protected: + virtual void customEvent(QEvent *event); + private slots: bool startListening(); void stopListening(const QString &msg = QString()); @@ -415,6 +421,7 @@ private: SessionThread *createSession(UserId userId, bool restoreState = false); void setupClientSession(QTcpSocket *socket, UserId uid); + void addClientHelper(QTcpSocket *socket, UserId uid); void processClientMessage(QTcpSocket *socket, const QVariantMap &msg); //void processCoreSetup(QTcpSocket *socket, QVariantMap &msg); QString setupCoreForInternalUsage();