X-Git-Url: https://git.quassel-irc.org/?a=blobdiff_plain;f=src%2Fcore%2Fcore.h;h=ae1c05c26a9d8487877dc7af3e0b31c1ddd34889;hb=99445d2c7ce2f5336798098963f4954eaafebdde;hp=15a2e90a925bd8614a9b34fc74e255300f781e5d;hpb=44b22c4419f478a20f6324f9f3a700a2dec56302;p=quassel.git diff --git a/src/core/core.h b/src/core/core.h index 15a2e90a..ae1c05c2 100644 --- a/src/core/core.h +++ b/src/core/core.h @@ -26,7 +26,8 @@ #include #include -#include "coreproxy.h" +#include "global.h" +#include "types.h" class CoreSession; class Storage; @@ -46,20 +47,20 @@ class Core : public QObject { static void disconnectLocalClient(); private slots: - void recvProxySignal(CoreSignal, QVariant, QVariant, QVariant); bool startListening(uint port = DEFAULT_PORT); void stopListening(); void incomingConnection(); void clientHasData(); void clientDisconnected(); - void updateGlobalData(UserId, QString); + + bool initStorageSqlite(QVariantMap dbSettings, bool setup); private: Core(); ~Core(); 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. @@ -67,16 +68,19 @@ class Core : public QObject { * \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); + void processClientInit(QTcpSocket *socket, const QVariantMap &msg); + void processCoreSetup(QTcpSocket *socket, QVariantMap &msg); + + QStringList availableStorageProviders(); UserId guiUser; QHash sessions; Storage *storage; QTcpServer server; // TODO: implement SSL - QHash validClients; QHash blockSizes; + + bool configured; }; #endif