-/*
-void Core::processCoreSetup(QTcpSocket *socket, QVariantMap &msg) {
- if(msg["HasSettings"].toBool()) {
- QVariantMap auth;
- auth["User"] = msg["User"];
- auth["Password"] = msg["Password"];
- msg.remove("User");
- msg.remove("Password");
- qDebug() << "Initializing storage provider" << msg["Type"].toString();
-
- if(!initStorage(msg, true)) {
- // notify client to start wizard again
- qWarning("Core is currently not configured!");
- QVariantMap reply;
- reply["StartWizard"] = true;
- reply["StorageProviders"] = availableStorageProviders();
- SignalProxy::writeDataToDevice(socket, reply);
- } else {
- // write coresettings
- CoreSettings s;
- s.setDatabaseSettings(msg);
- // write admin user to database & make the core listen again to connections
- storage->addUser(auth["User"].toString(), auth["Password"].toString());
- startListening();
- // continue the normal procedure
- //processClientInit(socket, auth);
- }
- } else {
- // notify client to start wizard
- QVariantMap reply;
- reply["StartWizard"] = true;
- reply["StorageProviders"] = availableStorageProviders();
- SignalProxy::writeDataToDevice(socket, reply);
- }
-}
-*/
-