diff options
Diffstat (limited to 'src/uscxml/plugins/ioprocessor')
6 files changed, 39 insertions, 19 deletions
diff --git a/src/uscxml/plugins/ioprocessor/CMakeLists.txt b/src/uscxml/plugins/ioprocessor/CMakeLists.txt index 7480b6b..f09a866 100644 --- a/src/uscxml/plugins/ioprocessor/CMakeLists.txt +++ b/src/uscxml/plugins/ioprocessor/CMakeLists.txt @@ -11,6 +11,8 @@ if (BUILD_AS_PLUGINS) "../Plugins.cpp") target_link_libraries(ioprocessor_sample uscxml) set_target_properties(ioprocessor_sample PROPERTIES FOLDER "Plugin IOProcessor") + set_target_properties(ioprocessor_sample PROPERTIES COMPILE_FLAGS "-DPLUMA_EXPORTS") + set_target_properties(ioprocessor_sample PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${OUTPUT_DIR}/lib") else() list (APPEND USCXML_FILES ${SAMPLE_IOPROCESSOR}) endif() @@ -28,6 +30,8 @@ if (BUILD_AS_PLUGINS) "../Plugins.cpp") target_link_libraries(ioprocessor_comet uscxml) set_target_properties(ioprocessor_comet PROPERTIES FOLDER "Plugin IOProcessor") + set_target_properties(ioprocessor_comet PROPERTIES COMPILE_FLAGS "-DPLUMA_EXPORTS") + set_target_properties(ioprocessor_comet PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${OUTPUT_DIR}/lib") else() list (APPEND USCXML_FILES ${COMET_IOPROCESSOR}) endif() @@ -48,6 +52,8 @@ if (BUILD_AS_PLUGINS) "../Plugins.cpp") target_link_libraries(ioprocessor_basichttp uscxml) set_target_properties(ioprocessor_basichttp PROPERTIES FOLDER "Plugin IOProcessor") + set_target_properties(ioprocessor_basichttp PROPERTIES COMPILE_FLAGS "-DPLUMA_EXPORTS") + set_target_properties(ioprocessor_basichttp PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${OUTPUT_DIR}/lib") else() list (APPEND USCXML_FILES ${BASICHTTP_IOPROCESSOR}) endif() @@ -60,15 +66,22 @@ file(GLOB_RECURSE SCXML_IOPROCESSOR scxml/*.cpp scxml/*.h ) +file(GLOB_RECURSE BASICHTTP_IOPROCESSOR + basichttp/*.cpp + basichttp/*.h +) if (BUILD_AS_PLUGINS) source_group("" FILES ${SCXML_IOPROCESSOR}) add_library( ioprocessor_scxml SHARED ${SCXML_IOPROCESSOR} + ${BASICHTTP_IOPROCESSOR} "../Plugins.cpp") # scxml ioprocessor is a basichttp ioprocessor - target_link_libraries(ioprocessor_scxml ioprocessor_basichttp uscxml) + target_link_libraries(ioprocessor_scxml uscxml) set_target_properties(ioprocessor_scxml PROPERTIES FOLDER "Plugin IOProcessor") + set_target_properties(ioprocessor_scxml PROPERTIES COMPILE_FLAGS "-DPLUMA_EXPORTS") + set_target_properties(ioprocessor_scxml PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${OUTPUT_DIR}/lib") else() list (APPEND USCXML_FILES ${SCXML_IOPROCESSOR}) endif() @@ -107,6 +120,8 @@ if (PROTOBUF_FOUND AND OFF) "../Plugins.cpp") target_link_libraries(ioprocessor_mmi uscxml mmi_proto) set_target_properties(ioprocessor_mmi PROPERTIES FOLDER "Plugin IOProcessor") + set_target_properties(ioprocessor_mmi PROPERTIES COMPILE_FLAGS "-DPLUMA_EXPORTS") + set_target_properties(ioprocessor_mmi PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${OUTPUT_DIR}/lib") else() list (APPEND USCXML_FILES ${MMI_IOPROCESSOR}) list (APPEND USCXML_OPT_LIBS mmi_proto) diff --git a/src/uscxml/plugins/ioprocessor/basichttp/BasicHTTPIOProcessor.cpp b/src/uscxml/plugins/ioprocessor/basichttp/BasicHTTPIOProcessor.cpp index 8489d60..7d9fcb8 100644 --- a/src/uscxml/plugins/ioprocessor/basichttp/BasicHTTPIOProcessor.cpp +++ b/src/uscxml/plugins/ioprocessor/basichttp/BasicHTTPIOProcessor.cpp @@ -49,12 +49,14 @@ namespace uscxml { -#ifdef BUILD_AS_PLUGINS +#ifndef ioprocessor_scxml_EXPORTS +# ifdef BUILD_AS_PLUGINS PLUMA_CONNECTOR bool pluginConnect(pluma::Host& host) { host.add( new BasicHTTPIOProcessorProvider() ); return true; } +# endif #endif // see http://www.w3.org/TR/scxml/#BasicHTTPEventProcessor diff --git a/src/uscxml/plugins/ioprocessor/basichttp/BasicHTTPIOProcessor.h b/src/uscxml/plugins/ioprocessor/basichttp/BasicHTTPIOProcessor.h index 20369d7..29bc208 100644 --- a/src/uscxml/plugins/ioprocessor/basichttp/BasicHTTPIOProcessor.h +++ b/src/uscxml/plugins/ioprocessor/basichttp/BasicHTTPIOProcessor.h @@ -55,10 +55,10 @@ public: virtual ~BasicHTTPIOProcessor(); virtual boost::shared_ptr<IOProcessorImpl> create(uscxml::InterpreterImpl* interpreter); - virtual std::set<std::string> getNames() { - std::set<std::string> names; - names.insert("basichttp"); - names.insert("http://www.w3.org/TR/scxml/#BasicHTTPEventProcessor"); + virtual std::list<std::string> getNames() { + std::list<std::string> names; + names.push_back("basichttp"); + names.push_back("http://www.w3.org/TR/scxml/#BasicHTTPEventProcessor"); return names; } @@ -86,8 +86,11 @@ protected: std::map<std::string, std::pair<URL, SendRequest> > _sendRequests; }; -#ifdef BUILD_AS_PLUGINS +// do not implement pluma plugins if we build an inherited plugin +#ifdef ioprocessor_basichttp_EXPORTS +# ifdef BUILD_AS_PLUGINS PLUMA_INHERIT_PROVIDER(BasicHTTPIOProcessor, IOProcessorImpl); +# endif #endif } diff --git a/src/uscxml/plugins/ioprocessor/comet/CometIOProcessor.h b/src/uscxml/plugins/ioprocessor/comet/CometIOProcessor.h index 8acbac0..e30bdb2 100644 --- a/src/uscxml/plugins/ioprocessor/comet/CometIOProcessor.h +++ b/src/uscxml/plugins/ioprocessor/comet/CometIOProcessor.h @@ -37,10 +37,10 @@ public: virtual ~CometIOProcessor(); virtual boost::shared_ptr<IOProcessorImpl> create(uscxml::InterpreterImpl* interpreter); - virtual std::set<std::string> getNames() { - std::set<std::string> names; - names.insert("comet"); - names.insert("http://www.w3.org/TR/scxml/#CometEventProcessor"); + virtual std::list<std::string> getNames() { + std::list<std::string> names; + names.push_back("comet"); + names.push_back("http://www.w3.org/TR/scxml/#CometEventProcessor"); return names; } diff --git a/src/uscxml/plugins/ioprocessor/sample/SampleIOProcessor.h b/src/uscxml/plugins/ioprocessor/sample/SampleIOProcessor.h index 1cbe922..05dd3ef 100644 --- a/src/uscxml/plugins/ioprocessor/sample/SampleIOProcessor.h +++ b/src/uscxml/plugins/ioprocessor/sample/SampleIOProcessor.h @@ -44,10 +44,10 @@ public: virtual ~SampleIOProcessor(); virtual boost::shared_ptr<IOProcessorImpl> create(uscxml::InterpreterImpl* interpreter); - virtual std::set<std::string> getNames() { - std::set<std::string> names; - names.insert("sample"); - names.insert("http://www.w3.org/TR/scxml/#SampleEventProcessor"); + virtual std::list<std::string> getNames() { + std::list<std::string> names; + names.push_back("sample"); + names.push_back("http://www.w3.org/TR/scxml/#SampleEventProcessor"); return names; } diff --git a/src/uscxml/plugins/ioprocessor/scxml/SCXMLIOProcessor.h b/src/uscxml/plugins/ioprocessor/scxml/SCXMLIOProcessor.h index c4fa677..3eca2db 100644 --- a/src/uscxml/plugins/ioprocessor/scxml/SCXMLIOProcessor.h +++ b/src/uscxml/plugins/ioprocessor/scxml/SCXMLIOProcessor.h @@ -34,10 +34,10 @@ public: virtual ~SCXMLIOProcessor(); virtual boost::shared_ptr<IOProcessorImpl> create(uscxml::InterpreterImpl* interpreter); - virtual std::set<std::string> getNames() { - std::set<std::string> names; - names.insert("http://www.w3.org/TR/scxml/#SCXMLEventProcessor"); - names.insert("scxml"); + virtual std::list<std::string> getNames() { + std::list<std::string> names; + names.push_back("scxml"); + names.push_back("http://www.w3.org/TR/scxml/#SCXMLEventProcessor"); return names; } |