summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/tileweb.h
diff options
context:
space:
mode:
authorFlorian Diebold <flodiebold@gmail.com>2011-12-14 15:26:17 +0100
committerFlorian Diebold <flodiebold@gmail.com>2011-12-14 15:26:33 +0100
commit6948da42db755c925fedcb369b39f7d1e77b15ab (patch)
tree1e233e8f3a0e291603232addd03f738091edd680 /crawl-ref/source/tileweb.h
parent49bbf3296986d89275363dbb8e71129cc4ddd876 (diff)
downloadcrawl-ref-6948da42db755c925fedcb369b39f7d1e77b15ab.tar.gz
crawl-ref-6948da42db755c925fedcb369b39f7d1e77b15ab.zip
Webtiles: Tell the crawl process if it is being controlled from the web client.
The tiles flag in scorefile entries is set accordingly.
Diffstat (limited to 'crawl-ref/source/tileweb.h')
-rw-r--r--crawl-ref/source/tileweb.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/crawl-ref/source/tileweb.h b/crawl-ref/source/tileweb.h
index 5bd69075d6..a40cbcd6d8 100644
--- a/crawl-ref/source/tileweb.h
+++ b/crawl-ref/source/tileweb.h
@@ -78,6 +78,7 @@ public:
void send_message(const char *format = "", ...);
bool has_receivers() { return !m_dest_addrs.empty(); }
+ bool is_controlled_from_web() { return m_controlled_from_web; }
/* Webtiles can receive input both via stdin, and on the
socket. Also, while waiting for input, it should be
@@ -132,6 +133,8 @@ protected:
std::string m_msg_buf;
std::vector<sockaddr_un> m_dest_addrs;
+ bool m_controlled_from_web;
+
void _await_connection();
wint_t _handle_control_message(sockaddr_un addr, std::string data);
wint_t _receive_control_message();