summaryrefslogtreecommitdiffstats
path: root/src/uscxml/server/InterpreterServlet.h
diff options
context:
space:
mode:
authorStefan Radomski <github@mintwerk.de>2016-05-12 13:12:33 (GMT)
committerStefan Radomski <github@mintwerk.de>2016-05-12 13:12:33 (GMT)
commitb62e7979600feee23dc7cdb61042a8fc7673122b (patch)
treef7351372f37979dd2d048e0b68a16a4cd3b2aadb /src/uscxml/server/InterpreterServlet.h
parent1b11b310be61e51b3ac5ebb83f7c8a33aef3d6e8 (diff)
downloaduscxml-b62e7979600feee23dc7cdb61042a8fc7673122b.zip
uscxml-b62e7979600feee23dc7cdb61042a8fc7673122b.tar.gz
uscxml-b62e7979600feee23dc7cdb61042a8fc7673122b.tar.bz2
Major Refactoring v2.0
Diffstat (limited to 'src/uscxml/server/InterpreterServlet.h')
-rw-r--r--src/uscxml/server/InterpreterServlet.h135
1 files changed, 0 insertions, 135 deletions
diff --git a/src/uscxml/server/InterpreterServlet.h b/src/uscxml/server/InterpreterServlet.h
deleted file mode 100644
index 436574b..0000000
--- a/src/uscxml/server/InterpreterServlet.h
+++ /dev/null
@@ -1,135 +0,0 @@
-/**
- * @file
- * @author 2012-2013 Stefan Radomski (stefan.radomski@cs.tu-darmstadt.de)
- * @copyright Simplified BSD
- *
- * @cond
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the FreeBSD license as published by the FreeBSD
- * project.
- *
- * 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.
- *
- * You should have received a copy of the FreeBSD license along with this
- * program. If not, see <http://www.opensource.org/licenses/bsd-license>.
- * @endcond
- */
-
-#ifndef INTERPRETERSERVLET_H_XQLWNMH4
-#define INTERPRETERSERVLET_H_XQLWNMH4
-
-#include "HTTPServer.h"
-#include "uscxml/messages/SendRequest.h" // for SendRequest
-#include "uscxml/plugins/IOProcessor.h" // for IOProcessorImpl
-
-namespace uscxml {
-
-class InterpreterImpl;
-
-class InterpreterHTTPServlet : public HTTPServlet, public IOProcessorImpl {
-public:
- InterpreterHTTPServlet() {};
- InterpreterHTTPServlet(InterpreterImpl* interpreter);
- virtual ~InterpreterHTTPServlet();
-
- virtual boost::shared_ptr<IOProcessorImpl> create(InterpreterImpl* interpreter);
-
- virtual std::list<std::string> getNames() {
- std::list<std::string> names;
- names.push_back("http");
- names.push_back("http://www.w3.org/TR/scxml/#HTTPEventProcessor");
- return names;
- }
-
- Data getDataModelVariables();
- virtual void send(const SendRequest& req);
-
- virtual bool httpRecvRequest(const HTTPServer::Request& req);
-
- std::string getPath() {
- return _path;
- }
- std::string getURL() {
- return _url;
- }
- void setURL(const std::string& url) {
- _url = url;
- }
- bool canAdaptPath() {
- return false;
- }
-
-
- std::map<std::string, HTTPServer::Request>& getRequests() {
- return _requests;
- }
- tthread::recursive_mutex& getMutex() {
- return _mutex;
- }
-
-protected:
- InterpreterImpl* _interpreter;
-
- tthread::recursive_mutex _mutex;
- std::map<std::string, HTTPServer::Request> _requests;
- std::string _path;
- std::string _url;
-
-};
-
-class InterpreterWebSocketServlet : public WebSocketServlet, public IOProcessorImpl {
-public:
- InterpreterWebSocketServlet() {};
- InterpreterWebSocketServlet(InterpreterImpl* interpreter);
- virtual ~InterpreterWebSocketServlet();
-
- virtual boost::shared_ptr<IOProcessorImpl> create(InterpreterImpl* interpreter);
-
- virtual std::list<std::string> getNames() {
- std::list<std::string> names;
- names.push_back("websocket");
- names.push_back("http://www.w3.org/TR/scxml/#WebSocketEventProcessor");
- return names;
- }
-
- Data getDataModelVariables();
- virtual void send(const SendRequest& req);
-
- virtual bool wsRecvRequest(struct evws_connection *conn, const HTTPServer::WSFrame& frame);
-
- std::string getPath() {
- return _path;
- }
- std::string getURL() {
- return _url;
- }
- void setURL(const std::string& url) {
- _url = url;
- }
- bool canAdaptPath() {
- return false;
- }
-
- std::map<std::string, struct evws_connection*>& getRequests() {
- return _requests;
- }
- tthread::recursive_mutex& getMutex() {
- return _mutex;
- }
-
-protected:
- InterpreterImpl* _interpreter;
-
- tthread::recursive_mutex _mutex;
- std::map<std::string, struct evws_connection*> _requests;
- std::string _path;
- std::string _url;
-
-};
-
-}
-
-
-#endif /* end of include guard: INTERPRETERSERVLET_H_XQLWNMH4 */