aboutsummaryrefslogtreecommitdiff
path: root/backends/networking/sdl_net/indexpagehandler.h
diff options
context:
space:
mode:
authorAlexander Tkachev2016-06-16 15:19:13 +0600
committerAlexander Tkachev2016-08-24 16:07:55 +0600
commit5ac3adbd4fbf40c22fccab6ce8bf8dcab8f98eff (patch)
tree3b376dc1594ea7f4cddfaeedc6e7cacdc611021c /backends/networking/sdl_net/indexpagehandler.h
parent733d998e6a005af78b308817ea7326d1f5192069 (diff)
downloadscummvm-rg350-5ac3adbd4fbf40c22fccab6ce8bf8dcab8f98eff.tar.gz
scummvm-rg350-5ac3adbd4fbf40c22fccab6ce8bf8dcab8f98eff.tar.bz2
scummvm-rg350-5ac3adbd4fbf40c22fccab6ce8bf8dcab8f98eff.zip
CLOUD: Add IndexPageHandler
This commit also adds LocalWebserver's stopOnIdle(). That means server is not stopped immediately, but only when all clients are served.
Diffstat (limited to 'backends/networking/sdl_net/indexpagehandler.h')
-rw-r--r--backends/networking/sdl_net/indexpagehandler.h47
1 files changed, 47 insertions, 0 deletions
diff --git a/backends/networking/sdl_net/indexpagehandler.h b/backends/networking/sdl_net/indexpagehandler.h
new file mode 100644
index 0000000000..5a1d2d7cbc
--- /dev/null
+++ b/backends/networking/sdl_net/indexpagehandler.h
@@ -0,0 +1,47 @@
+/* ScummVM - Graphic Adventure Engine
+*
+* ScummVM is the legal property of its developers, whose names
+* are too numerous to list here. Please refer to the COPYRIGHT
+* file distributed with this source distribution.
+*
+* This program is free software; you can redistribute it and/or
+* modify it under the terms of the GNU General Public License
+* as published by the Free Software Foundation; either version 2
+* of the License, or (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not, write to the Free Software
+* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+*
+*/
+
+#ifndef BACKENDS_NETWORKING_SDL_NET_INDEXPAGEHANDLER_H
+#define BACKENDS_NETWORKING_SDL_NET_INDEXPAGEHANDLER_H
+
+#include "backends/networking/sdl_net/client.h"
+#include "gui/object.h"
+
+namespace Networking {
+class LocalWebserver;
+
+class IndexPageHandler: public GUI::CommandSender {
+ Common::String _code;
+
+ void handle(Client &client);
+
+public:
+ IndexPageHandler();
+ virtual ~IndexPageHandler();
+
+ void addPathHandler(LocalWebserver &server);
+ Common::String code();
+};
+
+} // End of namespace Networking
+
+#endif