diff options
author | Alexander Tkachev | 2016-06-15 16:38:37 +0600 |
---|---|---|
committer | Alexander Tkachev | 2016-08-24 16:07:55 +0600 |
commit | 0af97e59bc63538d18d2241285b68ed287ccd87c (patch) | |
tree | dd6a0a2ef7cfc0346365d380e27eeddd4f2218ae /gui | |
parent | 9f7bea156aa4c763fd637a9a12ff89e124b51a6c (diff) | |
download | scummvm-rg350-0af97e59bc63538d18d2241285b68ed287ccd87c.tar.gz scummvm-rg350-0af97e59bc63538d18d2241285b68ed287ccd87c.tar.bz2 scummvm-rg350-0af97e59bc63538d18d2241285b68ed287ccd87c.zip |
CLOUD: Add LocalWebserver
Available as LocalServer singleton. It's being started and stopped by
StorageWizardDialog. It doesn't handle clients yet, though.
Diffstat (limited to 'gui')
-rw-r--r-- | gui/storagewizarddialog.cpp | 20 | ||||
-rw-r--r-- | gui/storagewizarddialog.h | 4 |
2 files changed, 21 insertions, 3 deletions
diff --git a/gui/storagewizarddialog.cpp b/gui/storagewizarddialog.cpp index 46be812f6d..579591ba18 100644 --- a/gui/storagewizarddialog.cpp +++ b/gui/storagewizarddialog.cpp @@ -24,9 +24,11 @@ #include "gui/widgets/list.h" #include "gui/widget.h" #include "gui/gui-manager.h" - -#include "common/translation.h" #include "backends/cloud/cloudmanager.h" +#ifdef USE_SDL_NET +#include "backends/networking/sdl_net/localwebserver.h" +#endif +#include "common/translation.h" #include "widgets/edittext.h" namespace GUI { @@ -64,6 +66,20 @@ StorageWizardDialog::StorageWizardDialog(uint32 storageId): Dialog("GlobalOption _connectWidget = new ButtonWidget(this, "GlobalOptions_Cloud_ConnectionWizard.ConnectButton", _("Connect"), 0, kConnectCmd); } +void StorageWizardDialog::open() { + Dialog::open(); +#ifdef USE_SDL_NET + LocalServer.start(); +#endif +} + +void StorageWizardDialog::close() { +#ifdef USE_SDL_NET + LocalServer.stop(); +#endif + Dialog::close(); +} + void StorageWizardDialog::handleCommand(CommandSender *sender, uint32 cmd, uint32 data) { switch (cmd) { case kCodeBoxCmd: { diff --git a/gui/storagewizarddialog.h b/gui/storagewizarddialog.h index 93e368463c..fa45f922d9 100644 --- a/gui/storagewizarddialog.h +++ b/gui/storagewizarddialog.h @@ -66,7 +66,9 @@ class StorageWizardDialog : public Dialog { public: StorageWizardDialog(uint32 storageId); - void handleCommand(CommandSender *sender, uint32 cmd, uint32 data); + virtual void open(); + virtual void close(); + virtual void handleCommand(CommandSender *sender, uint32 cmd, uint32 data); }; } // End of namespace GUI |