aboutsummaryrefslogtreecommitdiff
path: root/backends/networking/sdl_net/indexpagehandler.h
diff options
context:
space:
mode:
authorAlexander Tkachev2016-06-16 19:47:02 +0600
committerAlexander Tkachev2016-08-24 16:07:55 +0600
commit5176eaba81f4cda6cd5a14108c3516abd8ba0c84 (patch)
treefecfb6feb4ecfc45b00a59716a8275f69d889c30 /backends/networking/sdl_net/indexpagehandler.h
parent43071c09723472483af4b69cf454ca75a8cd4613 (diff)
downloadscummvm-rg350-5176eaba81f4cda6cd5a14108c3516abd8ba0c84.tar.gz
scummvm-rg350-5176eaba81f4cda6cd5a14108c3516abd8ba0c84.tar.bz2
scummvm-rg350-5176eaba81f4cda6cd5a14108c3516abd8ba0c84.zip
CLOUD: Add wwwroot
wwwroot.zip contains ScummVM local webserver's resources, such as template html pages, styles and images. One can make it from wwwroot directory contents by running make_archive.py script. It's added to scummvm.rc, so it's included in the executable (it works with MinGW, but I was unable to do that in VS yet). IndexPageHandler is the one who returns these resources. It uses index.html for "/". I'm replacing "{message}" with translated message, so that's the way I thought the templates should work.
Diffstat (limited to 'backends/networking/sdl_net/indexpagehandler.h')
-rw-r--r--backends/networking/sdl_net/indexpagehandler.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/backends/networking/sdl_net/indexpagehandler.h b/backends/networking/sdl_net/indexpagehandler.h
index 5a1d2d7cbc..143c300336 100644
--- a/backends/networking/sdl_net/indexpagehandler.h
+++ b/backends/networking/sdl_net/indexpagehandler.h
@@ -24,6 +24,7 @@
#define BACKENDS_NETWORKING_SDL_NET_INDEXPAGEHANDLER_H
#include "backends/networking/sdl_net/client.h"
+#include "common/archive.h"
#include "gui/object.h"
namespace Networking {
@@ -33,6 +34,12 @@ class IndexPageHandler: public GUI::CommandSender {
Common::String _code;
void handle(Client &client);
+ void handleResource(Client &client);
+
+ void replace(Common::String &source, const Common::String &what, const Common::String &with);
+ Common::ArchiveMemberList listArchive();
+ Common::SeekableReadStream *const getArchiveFile(Common::String name);
+ Common::String readEverythingFromStream(Common::SeekableReadStream *const stream);
public:
IndexPageHandler();