diff options
author | Alexander Tkachev | 2016-06-16 19:34:57 +0600 |
---|---|---|
committer | Alexander Tkachev | 2016-08-24 16:07:55 +0600 |
commit | 43071c09723472483af4b69cf454ca75a8cd4613 (patch) | |
tree | 857d4e07bf836d1841e1d68dd2803831ab80f59d /backends/networking/sdl_net/localwebserver.h | |
parent | 0def9c50a7d05fc1743b622ffb5fdbba58e697e6 (diff) | |
download | scummvm-rg350-43071c09723472483af4b69cf454ca75a8cd4613.tar.gz scummvm-rg350-43071c09723472483af4b69cf454ca75a8cd4613.tar.bz2 scummvm-rg350-43071c09723472483af4b69cf454ca75a8cd4613.zip |
CLOUD: Update LocalWebserver
* fix handling connections;
* fix idling strategy;
* add setClientGetHandler() for SeekableReadStream;
* add determineMimeType().
Diffstat (limited to 'backends/networking/sdl_net/localwebserver.h')
-rw-r--r-- | backends/networking/sdl_net/localwebserver.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/backends/networking/sdl_net/localwebserver.h b/backends/networking/sdl_net/localwebserver.h index 2ad83f7b7a..f51c33b418 100644 --- a/backends/networking/sdl_net/localwebserver.h +++ b/backends/networking/sdl_net/localwebserver.h @@ -30,6 +30,10 @@ #include "common/singleton.h" #include "common/scummsys.h" +namespace Common { +class SeekableReadStream; +} + typedef struct _SDLNet_SocketSet *SDLNet_SocketSet; typedef struct _TCPsocket *TCPsocket; @@ -52,6 +56,7 @@ class LocalWebserver : public Common::Singleton<LocalWebserver> { bool _timerStarted, _stopOnIdle; Common::HashMap<Common::String, ClientHandler> _pathHandlers; IndexPageHandler _indexPageHandler; + uint32 _idlingFrames; void startTimer(int interval = TIMER_INTERVAL); void stopTimer(); @@ -71,7 +76,9 @@ public: IndexPageHandler &indexPageHandler(); - static void setClientGetHandler(Client &client, Common::String response, long code = 200); + 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 const char *determineMimeType(Common::String &filename); }; /** Shortcut for accessing the local webserver. */ |