X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fcore%2Fcore.h;h=aec046936074eabce74e531f911868ade39db220;hp=126e3a5799d69de7185618ef9e0cc9bbc7919c14;hb=8836fdc8e4107437e5fff0e10e18d581297d59e4;hpb=d9398c1b8bfa66680d266bf968dc90f386c4ee7b diff --git a/src/core/core.h b/src/core/core.h index 126e3a57..aec04693 100644 --- a/src/core/core.h +++ b/src/core/core.h @@ -43,6 +43,9 @@ class Core : public QObject { static CoreSession * localSession(); static CoreSession * createSession(UserId); + static QVariant connectLocalClient(QString user, QString passwd); + static QVariant disconnectLocalClient(); + private slots: void recvProxySignal(CoreSignal, QVariant, QVariant, QVariant); bool startListening(uint port = 4242); @@ -58,6 +61,13 @@ class Core : public QObject { void init(); static Core *instanceptr; + //! Initiate a session for the user with the given credentials if one does not already exist. + /** This function is called during the init process for a new client. If there is no session for the + * given user, one is created. + * \param userId The user + * \return A QVariant containing the session data, e.g. global data and buffers + */ + QVariant initSession(UserId userId); void processClientInit(QTcpSocket *socket, const QVariant &v); void processClientUpdate(QTcpSocket *socket, QString key, const QVariant &data);