diff options
Diffstat (limited to 'src/uscxml/plugins/ioprocessor/basichttp')
-rw-r--r-- | src/uscxml/plugins/ioprocessor/basichttp/BasicHTTPIOProcessor.cpp | 31 | ||||
-rw-r--r-- | src/uscxml/plugins/ioprocessor/basichttp/BasicHTTPIOProcessor.h | 39 |
2 files changed, 61 insertions, 9 deletions
diff --git a/src/uscxml/plugins/ioprocessor/basichttp/BasicHTTPIOProcessor.cpp b/src/uscxml/plugins/ioprocessor/basichttp/BasicHTTPIOProcessor.cpp index b5aa985..08cc749 100644 --- a/src/uscxml/plugins/ioprocessor/basichttp/BasicHTTPIOProcessor.cpp +++ b/src/uscxml/plugins/ioprocessor/basichttp/BasicHTTPIOProcessor.cpp @@ -1,7 +1,23 @@ -#ifdef _WIN32 -#include <winsock2.h> -#include <windows.h> -#endif +/** + * @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 + */ + +#include "uscxml/Common.h" #include "uscxml/plugins/ioprocessor/basichttp/BasicHTTPIOProcessor.h" #include "uscxml/Message.h" @@ -15,6 +31,11 @@ #include <io/uri.hpp> #include <glog/logging.h> +#ifdef _WIN32 +#include <winsock2.h> +#include <windows.h> +#endif + #ifndef _WIN32 #include <netdb.h> #include <arpa/inet.h> @@ -28,7 +49,7 @@ namespace uscxml { #ifdef BUILD_AS_PLUGINS PLUMA_CONNECTOR -bool connect(pluma::Host& host) { +bool pluginConnect(pluma::Host& host) { host.add( new BasicHTTPIOProcessorProvider() ); return true; } diff --git a/src/uscxml/plugins/ioprocessor/basichttp/BasicHTTPIOProcessor.h b/src/uscxml/plugins/ioprocessor/basichttp/BasicHTTPIOProcessor.h index c0fddc1..20369d7 100644 --- a/src/uscxml/plugins/ioprocessor/basichttp/BasicHTTPIOProcessor.h +++ b/src/uscxml/plugins/ioprocessor/basichttp/BasicHTTPIOProcessor.h @@ -1,6 +1,40 @@ +/** + * @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 BASICHTTPIOPROCESSOR_H_2CUY93KU #define BASICHTTPIOPROCESSOR_H_2CUY93KU +extern "C" { +#include <event2/http.h> +#include <event2/http_struct.h> +} + +#if defined(_WIN32) && !defined(USCXML_STATIC) +# if (defined ioprocessor_basichttp_EXPORTS || defined USCXML_EXPORT) +# define USCXML_PLUGIN_API __declspec(dllexport) +# else +# define USCXML_PLUGIN_API __declspec(dllimport) +# endif +#else +# define USCXML_PLUGIN_API +#endif + #include "uscxml/concurrency/eventqueue/DelayedEventQueue.h" #include "uscxml/server/HTTPServer.h" #include "uscxml/Interpreter.h" @@ -9,16 +43,13 @@ #include <sys/time.h> #endif -#include <event2/http.h> -#include <event2/http_struct.h> - #ifdef BUILD_AS_PLUGINS #include "uscxml/plugins/Plugins.h" #endif namespace uscxml { -class BasicHTTPIOProcessor : public IOProcessorImpl, public HTTPServlet, public URLMonitor { +class USCXML_PLUGIN_API BasicHTTPIOProcessor : public IOProcessorImpl, public HTTPServlet, public URLMonitor { public: BasicHTTPIOProcessor(); virtual ~BasicHTTPIOProcessor(); |