X-Git-Url: https://git.quassel-irc.org/?a=blobdiff_plain;ds=sidebyside;f=src%2Fcore%2Fcore.h;h=d2e698c7ea936f77e98ea9f1eb8e098136384ba9;hb=e497bef2a6bd36874192ebef7fd1899ce28f7c9c;hp=3e19474f45e21125038f8651efed456a230d2548;hpb=b9828e0dd235964b8e2e97f844f4bed3476d3bd4;p=quassel.git diff --git a/src/core/core.h b/src/core/core.h index 3e19474f..d2e698c7 100644 --- a/src/core/core.h +++ b/src/core/core.h @@ -45,6 +45,9 @@ class SessionThread; class SignalProxy; struct NetworkInfo; +class AbstractSqlMigrationReader; +class AbstractSqlMigrationWriter; + class Core : public QObject { Q_OBJECT @@ -399,6 +402,7 @@ private slots: void clientHasData(); void clientDisconnected(); + bool initStorage(const QString &backend, QVariantMap settings, bool setup = false); bool initStorage(QVariantMap dbSettings, bool setup = false); #ifdef HAVE_SSL @@ -419,8 +423,14 @@ private: QString setupCoreForInternalUsage(); QString setupCore(QVariantMap setupData); + void registerStorageBackends(); bool registerStorageBackend(Storage *); + void unregisterStorageBackends(); void unregisterStorageBackend(Storage *); + bool selectBackend(const QString &backend); + void createUser(); + void saveBackendSettings(const QString &backend, const QVariantMap &settings); + QVariantMap promptForSettings(const Storage *storage); QHash sessions; Storage *_storage; @@ -440,6 +450,13 @@ private: QDateTime _startTime; bool _configured; + + + static AbstractSqlMigrationReader *getMigrationReader(Storage *storage); + static AbstractSqlMigrationWriter *getMigrationWriter(Storage *storage); + static void stdInEcho(bool on); + static inline void enableStdInEcho() { stdInEcho(true); } + static inline void disableStdInEcho() { stdInEcho(false); } }; #endif