diff options
author | Alexander Tkachev | 2016-07-06 18:33:34 +0600 |
---|---|---|
committer | Alexander Tkachev | 2016-08-24 16:07:55 +0600 |
commit | 8a9d126152f3e0ed1e91daa15dd90f0c18060492 (patch) | |
tree | d9f96a1f15e041ea493a7077ba1ab4ccc52a7da4 /backends/networking/sdl_net/localwebserver.h | |
parent | ab4361a76b40b56348ec46311121a0552f0c9d6b (diff) | |
download | scummvm-rg350-8a9d126152f3e0ed1e91daa15dd90f0c18060492.tar.gz scummvm-rg350-8a9d126152f3e0ed1e91daa15dd90f0c18060492.tar.bz2 scummvm-rg350-8a9d126152f3e0ed1e91daa15dd90f0c18060492.zip |
CLOUD: Move "/create" to separate Handler
It does redirect to "/files" on success, so user doesn't even see the
strange "/create" URL at all.
This commit is for keeping these handlers small, not making one
(FilesPageHandler in this case) do everything.
Diffstat (limited to 'backends/networking/sdl_net/localwebserver.h')
-rw-r--r-- | backends/networking/sdl_net/localwebserver.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/backends/networking/sdl_net/localwebserver.h b/backends/networking/sdl_net/localwebserver.h index 2e56209ab0..ed1860a937 100644 --- a/backends/networking/sdl_net/localwebserver.h +++ b/backends/networking/sdl_net/localwebserver.h @@ -25,6 +25,7 @@ #include "backends/networking/sdl_net/client.h" #include "backends/networking/sdl_net/handlers/basehandler.h" +#include "backends/networking/sdl_net/handlers/createdirectoryhandler.h" #include "backends/networking/sdl_net/handlers/filespagehandler.h" #include "backends/networking/sdl_net/handlers/indexpagehandler.h" #include "backends/networking/sdl_net/handlers/resourcehandler.h" @@ -59,6 +60,7 @@ class LocalWebserver : public Common::Singleton<LocalWebserver> { ClientHandlerCallback _defaultHandler; IndexPageHandler _indexPageHandler; FilesPageHandler _filesPageHandler; + CreateDirectoryHandler _createDirectoryHandler; ResourceHandler _resourceHandler; uint32 _idlingFrames; Common::Mutex _handleMutex; @@ -86,6 +88,8 @@ public: static void setClientGetHandler(Client &client, Common::String response, long code = 200, const char *mimeType = nullptr); static void setClientGetHandler(Client &client, Common::SeekableReadStream *responseStream, long code = 200, const char *mimeType = nullptr); + static void setClientRedirectHandler(Client &client, Common::String response, Common::String location, const char *mimeType = nullptr); + static void setClientRedirectHandler(Client &client, Common::SeekableReadStream *responseStream, Common::String location, const char *mimeType = nullptr); static const char *determineMimeType(Common::String &filename); static Common::String urlDecode(Common::String value); }; |