diff options
author | Stefan Radomski <radomski@tk.informatik.tu-darmstadt.de> | 2014-06-06 17:58:03 (GMT) |
---|---|---|
committer | Stefan Radomski <radomski@tk.informatik.tu-darmstadt.de> | 2014-06-06 17:58:03 (GMT) |
commit | e5a393584b030ac90c4e7abf65063ef72b910555 (patch) | |
tree | bfab1a3c3e4a1c8fc5dc3d27bd1b4f0044901293 /src/uscxml | |
parent | 4ecca617e628e94845dafafbdee46ce57f7bc843 (diff) | |
download | uscxml-e5a393584b030ac90c4e7abf65063ef72b910555.zip uscxml-e5a393584b030ac90c4e7abf65063ef72b910555.tar.gz uscxml-e5a393584b030ac90c4e7abf65063ef72b910555.tar.bz2 |
Changed getNames signature from set to list
Diffstat (limited to 'src/uscxml')
44 files changed, 322 insertions, 158 deletions
diff --git a/src/uscxml/Factory.cpp b/src/uscxml/Factory.cpp index 378f15e..c63fc0d 100644 --- a/src/uscxml/Factory.cpp +++ b/src/uscxml/Factory.cpp @@ -143,6 +143,16 @@ std::string Factory::getDefaultPluginPath() { void Factory::registerPlugins() { #ifdef BUILD_AS_PLUGINS + // these are part of core + { + InterpreterHTTPServlet* ioProcessor = new InterpreterHTTPServlet(); + registerIOProcessor(ioProcessor); + } + { + InterpreterWebSocketServlet* ioProcessor = new InterpreterWebSocketServlet(); + registerIOProcessor(ioProcessor); + } + if (_pluginPath.length() == 0) { // try to read USCXML_PLUGIN_PATH environment variable _pluginPath = (getenv("USCXML_PLUGIN_PATH") != NULL ? getenv("USCXML_PLUGIN_PATH") : ""); @@ -174,6 +184,14 @@ void Factory::registerPlugins() { DataModelImpl* dataModel = (*it)->create(); registerDataModel(dataModel); } + + std::vector<ExecutableContentImplProvider*> execContentProviders; + pluma.getProviders(execContentProviders); + for (std::vector<ExecutableContentImplProvider*>::iterator it = execContentProviders.begin() ; it != execContentProviders.end() ; ++it) { + ExecutableContentImpl* execContent = (*it)->create(); + registerExecutableContent(execContent); + } + } else { LOG(WARNING) << "No path to plugins known, export USCXML_PLUGIN_PATH or pass path as parameter"; } @@ -197,7 +215,6 @@ void Factory::registerPlugins() { #ifdef MILES_FOUND { - // eats 8MB of RAM! MilesSessionInvoker* invoker = new MilesSessionInvoker(); registerInvoker(invoker); } @@ -382,9 +399,56 @@ Factory::~Factory() { #endif } +#define LIST_COMPONENTS(type, name) \ +std::map<std::string, type*>::iterator iter = name.begin(); \ +while(iter != name.end()) { \ + std::list<std::string> names = iter->second->getNames(); \ + std::list<std::string>::iterator nameIter = names.begin(); \ + if (nameIter != names.end()) { \ + std::cout << "\t" << *nameIter; \ + nameIter++; \ + std::string seperator = ""; \ + if (nameIter != names.end()) { \ + std::cout << "\t("; \ + while(nameIter != names.end()) { \ + std::cout << seperator << *nameIter; \ + seperator = ", "; \ + nameIter++; \ + } \ + std::cout << ")"; \ + } \ + std::cout << std::endl; \ + } \ + iter++; \ +} + + +void Factory::listComponents() { + { + std::cout << "Available Datamodels:" << std::endl; + LIST_COMPONENTS(DataModelImpl, _dataModels); + } + { + std::cout << "Available Invokers:" << std::endl; + LIST_COMPONENTS(InvokerImpl, _invokers); + } + { + std::cout << "Available I/O Processors:" << std::endl; + LIST_COMPONENTS(IOProcessorImpl, _ioProcessors); + } + { + std::cout << "Available Elements:" << std::endl; + std::map<std::pair<std::string, std::string>, ExecutableContentImpl*>::iterator iter = _executableContent.begin(); + while(iter != _executableContent.end()) { + std::cout << "\t" << iter->second->getNamespace() << " / " << iter->second->getLocalName() << std::endl; + iter++; + } + } +} + void Factory::registerIOProcessor(IOProcessorImpl* ioProcessor) { - std::set<std::string> names = ioProcessor->getNames(); - std::set<std::string>::iterator nameIter = names.begin(); + std::list<std::string> names = ioProcessor->getNames(); + std::list<std::string>::iterator nameIter = names.begin(); if (nameIter != names.end()) { std::string canonicalName = *nameIter; _ioProcessors[canonicalName] = ioProcessor; @@ -396,8 +460,8 @@ void Factory::registerIOProcessor(IOProcessorImpl* ioProcessor) { } void Factory::registerDataModel(DataModelImpl* dataModel) { - std::set<std::string> names = dataModel->getNames(); - std::set<std::string>::iterator nameIter = names.begin(); + std::list<std::string> names = dataModel->getNames(); + std::list<std::string>::iterator nameIter = names.begin(); if (nameIter != names.end()) { std::string canonicalName = *nameIter; _dataModels[canonicalName] = dataModel; @@ -409,8 +473,8 @@ void Factory::registerDataModel(DataModelImpl* dataModel) { } void Factory::registerInvoker(InvokerImpl* invoker) { - std::set<std::string> names = invoker->getNames(); - std::set<std::string>::iterator nameIter = names.begin(); + std::list<std::string> names = invoker->getNames(); + std::list<std::string>::iterator nameIter = names.begin(); if (nameIter != names.end()) { std::string canonicalName = *nameIter; _invokers[canonicalName] = invoker; diff --git a/src/uscxml/Factory.h b/src/uscxml/Factory.h index 3a3080a..83b8433 100644 --- a/src/uscxml/Factory.h +++ b/src/uscxml/Factory.h @@ -112,7 +112,7 @@ class USCXML_API EventHandlerImpl { public: virtual ~EventHandlerImpl() {} - virtual std::set<std::string> getNames() = 0; + virtual std::list<std::string> getNames() = 0; virtual void setInterpreter(InterpreterImpl* interpreter) { _interpreter = interpreter; @@ -155,7 +155,7 @@ public: EventHandler(const EventHandler& other) : _impl(other._impl) { } virtual ~EventHandler() {}; - virtual std::set<std::string> getNames() { + virtual std::list<std::string> getNames() { return _impl->getNames(); } @@ -273,7 +273,7 @@ class USCXML_API DataModelImpl { public: virtual ~DataModelImpl() {} virtual boost::shared_ptr<DataModelImpl> create(InterpreterImpl* interpreter) = 0; - virtual std::set<std::string> getNames() = 0; + virtual std::list<std::string> getNames() = 0; virtual bool validate(const std::string& location, const std::string& schema) = 0; virtual void setEvent(const Event& event) = 0; @@ -352,7 +352,7 @@ public: return *this; } - virtual std::set<std::string> getNames() { + virtual std::list<std::string> getNames() { return _impl->getNames(); } @@ -453,6 +453,8 @@ public: std::map<std::string, IOProcessorImpl*> getIOProcessors(); + void listComponents(); + static Factory* getInstance(); static void setDefaultPluginPath(const std::string& path); diff --git a/src/uscxml/Interpreter.cpp b/src/uscxml/Interpreter.cpp index 0afdf04..3d3c181 100644 --- a/src/uscxml/Interpreter.cpp +++ b/src/uscxml/Interpreter.cpp @@ -2300,8 +2300,8 @@ void InterpreterImpl::setupIOProcessors() { } // register aliases - std::set<std::string> names = _ioProcessors[ioProcIter->first].getNames(); - std::set<std::string>::iterator nameIter = names.begin(); + std::list<std::string> names = _ioProcessors[ioProcIter->first].getNames(); + std::list<std::string>::iterator nameIter = names.begin(); while(nameIter != names.end()) { if (!boost::equal(*nameIter, ioProcIter->first)) _ioProcessors[*nameIter] = _ioProcessors[ioProcIter->first]; diff --git a/src/uscxml/UUID.h b/src/uscxml/UUID.h index d0dd50c..c4ccaee 100644 --- a/src/uscxml/UUID.h +++ b/src/uscxml/UUID.h @@ -20,6 +20,7 @@ #ifndef UUID_H_8X65R2EI #define UUID_H_8X65R2EI +#include "uscxml/Common.h" #include <boost/uuid/uuid.hpp> #include <boost/uuid/uuid_generators.hpp> #include <boost/uuid/uuid_io.hpp> @@ -27,7 +28,7 @@ namespace uscxml { -class UUID { +class USCXML_API UUID { public: static std::string getUUID(); static boost::uuids::random_generator uuidGen; diff --git a/src/uscxml/interpreter/InterpreterDraft6.h b/src/uscxml/interpreter/InterpreterDraft6.h index a958b47..2ab588e 100644 --- a/src/uscxml/interpreter/InterpreterDraft6.h +++ b/src/uscxml/interpreter/InterpreterDraft6.h @@ -24,7 +24,7 @@ namespace uscxml { -class InterpreterDraft6 : public InterpreterImpl { +class USCXML_API InterpreterDraft6 : public InterpreterImpl { protected: void interpret(); InterpreterState step(bool blocking); diff --git a/src/uscxml/plugins/datamodel/CMakeLists.txt b/src/uscxml/plugins/datamodel/CMakeLists.txt index 4e5ef00..f04cb78 100644 --- a/src/uscxml/plugins/datamodel/CMakeLists.txt +++ b/src/uscxml/plugins/datamodel/CMakeLists.txt @@ -23,6 +23,8 @@ if (BUILD_DM_ECMA) "../Plugins.cpp") target_link_libraries(datamodel_jsc uscxml ${JSC_LIBRARY}) set_target_properties(datamodel_jsc PROPERTIES FOLDER "Plugin DataModel") + set_target_properties(datamodel_jsc PROPERTIES COMPILE_FLAGS "-DPLUMA_EXPORTS") + set_target_properties(datamodel_jsc PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${OUTPUT_DIR}/lib") else() list (APPEND USCXML_FILES ${JSC_DATAMODEL}) list (APPEND USCXML_FILES ${JSC_DOM}) @@ -56,6 +58,8 @@ if (BUILD_DM_ECMA) "../Plugins.cpp") target_link_libraries(datamodel_v8 uscxml ${V8_LIBRARY}) set_target_properties(datamodel_v8 PROPERTIES FOLDER "Plugin DataModel") + set_target_properties(datamodel_v8 PROPERTIES COMPILE_FLAGS "-DPLUMA_EXPORTS") + set_target_properties(datamodel_v8 PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${OUTPUT_DIR}/lib") else() list (APPEND USCXML_FILES ${V8_DATAMODEL}) list (APPEND USCXML_FILES ${V8_DOM}) @@ -77,7 +81,10 @@ if (BUILD_AS_PLUGINS) add_library(datamodel_null SHARED ${NULL_DATAMODEL} "../Plugins.cpp") target_link_libraries(datamodel_null uscxml) set_target_properties(datamodel_null PROPERTIES FOLDER "Plugin DataModel") - set_target_properties(datamodel_null PROPERTIES COMPILE_FLAGS "-DPLUGIN_EXPORTS") + set_target_properties(datamodel_null PROPERTIES COMPILE_FLAGS "-DPLUMA_EXPORTS") + set_target_properties(datamodel_null PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${OUTPUT_DIR}/lib") + + else() list (APPEND USCXML_FILES ${NULL_DATAMODEL}) endif() @@ -96,6 +103,8 @@ if (BUILD_DM_XPATH) add_library(datamodel_xpath SHARED ${XPATH_DATAMODEL} "../Plugins.cpp") target_link_libraries(datamodel_xpath uscxml) set_target_properties(datamodel_xpath PROPERTIES FOLDER "Plugin DataModel") + set_target_properties(datamodel_xpath PROPERTIES COMPILE_FLAGS "-DPLUMA_EXPORTS") + set_target_properties(datamodel_xpath PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${OUTPUT_DIR}/lib") else() list (APPEND USCXML_FILES ${XPATH_DATAMODEL}) endif() @@ -132,6 +141,8 @@ if (SWI_FOUND AND BUILD_DM_PROLOG) ${CURSES_LIBRARIES} ${SWI_LIBRARY}) set_target_properties(datamodel_swi PROPERTIES FOLDER "Plugin DataModel") + set_target_properties(datamodel_swi PROPERTIES COMPILE_FLAGS "-DPLUMA_EXPORTS") + set_target_properties(datamodel_swi PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${OUTPUT_DIR}/lib") else() list (APPEND USCXML_FILES ${SWI_DATAMODEL}) endif() @@ -156,6 +167,8 @@ if (BUILD_DM_PROMELA) "../Plugins.cpp") target_link_libraries(datamodel_promela uscxml) set_target_properties(datamodel_promela PROPERTIES FOLDER "Plugin DataModel") + set_target_properties(datamodel_promela PROPERTIES COMPILE_FLAGS "-DPLUMA_EXPORTS") + set_target_properties(datamodel_promela PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${OUTPUT_DIR}/lib") else() list (APPEND USCXML_FILES ${PROMELA_DATAMODEL}) endif() diff --git a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/JSCDataModel.h b/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/JSCDataModel.h index 7443439..82882f0 100644 --- a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/JSCDataModel.h +++ b/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/JSCDataModel.h @@ -42,9 +42,9 @@ public: virtual ~JSCDataModel(); virtual boost::shared_ptr<DataModelImpl> create(InterpreterImpl* interpreter); - virtual std::set<std::string> getNames() { - std::set<std::string> names; - names.insert("ecmascript"); + virtual std::list<std::string> getNames() { + std::list<std::string> names; + names.push_back("ecmascript"); return names; } diff --git a/src/uscxml/plugins/datamodel/ecmascript/v8/V8DataModel.h b/src/uscxml/plugins/datamodel/ecmascript/v8/V8DataModel.h index a0a1b09..5bfca93 100644 --- a/src/uscxml/plugins/datamodel/ecmascript/v8/V8DataModel.h +++ b/src/uscxml/plugins/datamodel/ecmascript/v8/V8DataModel.h @@ -43,9 +43,9 @@ public: virtual ~V8DataModel(); virtual boost::shared_ptr<DataModelImpl> create(InterpreterImpl* interpreter); - virtual std::set<std::string> getNames() { - std::set<std::string> names; - names.insert("ecmascript"); + virtual std::list<std::string> getNames() { + std::list<std::string> names; + names.push_back("ecmascript"); return names; } diff --git a/src/uscxml/plugins/datamodel/null/NULLDataModel.h b/src/uscxml/plugins/datamodel/null/NULLDataModel.h index 7ce9fde..162ffdb 100644 --- a/src/uscxml/plugins/datamodel/null/NULLDataModel.h +++ b/src/uscxml/plugins/datamodel/null/NULLDataModel.h @@ -40,9 +40,9 @@ public: virtual ~NULLDataModel(); virtual boost::shared_ptr<DataModelImpl> create(InterpreterImpl* interpreter); - virtual std::set<std::string> getNames() { - std::set<std::string> names; - names.insert("null"); + virtual std::list<std::string> getNames() { + std::list<std::string> names; + names.push_back("null"); return names; } diff --git a/src/uscxml/plugins/datamodel/prolog/swi/SWIDataModel.h b/src/uscxml/plugins/datamodel/prolog/swi/SWIDataModel.h index 0e17f4b..f022811 100644 --- a/src/uscxml/plugins/datamodel/prolog/swi/SWIDataModel.h +++ b/src/uscxml/plugins/datamodel/prolog/swi/SWIDataModel.h @@ -54,9 +54,9 @@ public: virtual ~SWIDataModel(); virtual boost::shared_ptr<DataModelImpl> create(InterpreterImpl* interpreter); - virtual std::set<std::string> getNames() { - std::set<std::string> names; - names.insert("prolog"); + virtual std::list<std::string> getNames() { + std::list<std::string> names; + names.push_back("prolog"); return names; } diff --git a/src/uscxml/plugins/datamodel/promela/PromelaDataModel.h b/src/uscxml/plugins/datamodel/promela/PromelaDataModel.h index 6d7d505..cbbf570 100644 --- a/src/uscxml/plugins/datamodel/promela/PromelaDataModel.h +++ b/src/uscxml/plugins/datamodel/promela/PromelaDataModel.h @@ -35,9 +35,9 @@ public: virtual ~PromelaDataModel(); virtual boost::shared_ptr<DataModelImpl> create(InterpreterImpl* interpreter); - virtual std::set<std::string> getNames() { - std::set<std::string> names; - names.insert("promela"); + virtual std::list<std::string> getNames() { + std::list<std::string> names; + names.push_back("promela"); return names; } diff --git a/src/uscxml/plugins/datamodel/xpath/XPathDataModel.h b/src/uscxml/plugins/datamodel/xpath/XPathDataModel.h index ac041f9..d18d05a 100644 --- a/src/uscxml/plugins/datamodel/xpath/XPathDataModel.h +++ b/src/uscxml/plugins/datamodel/xpath/XPathDataModel.h @@ -85,9 +85,9 @@ public: virtual ~XPathDataModel(); virtual boost::shared_ptr<DataModelImpl> create(InterpreterImpl* interpreter); - virtual std::set<std::string> getNames() { - std::set<std::string> names; - names.insert("xpath"); + virtual std::list<std::string> getNames() { + std::list<std::string> names; + names.push_back("xpath"); return names; } diff --git a/src/uscxml/plugins/element/CMakeLists.txt b/src/uscxml/plugins/element/CMakeLists.txt index aa85b97..16a9a1d 100644 --- a/src/uscxml/plugins/element/CMakeLists.txt +++ b/src/uscxml/plugins/element/CMakeLists.txt @@ -13,6 +13,8 @@ if (BUILD_AS_PLUGINS) "../Plugins.cpp") target_link_libraries(element_fetch uscxml) set_target_properties(element_fetch PROPERTIES FOLDER "Plugin Element") + set_target_properties(element_fetch PROPERTIES COMPILE_FLAGS "-DPLUMA_EXPORTS") + set_target_properties(element_fetch PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${OUTPUT_DIR}/lib") else() list (APPEND USCXML_FILES ${FETCH_ELEMENT}) endif() @@ -31,6 +33,8 @@ endif() # "../Plugins.cpp") # target_link_libraries(element_mmi uscxml) # set_target_properties(element_mmi PROPERTIES FOLDER "Plugin Element") +# set_target_properties(element_mmi PROPERTIES COMPILE_FLAGS "-DPLUMA_EXPORTS") +# set_target_properties(element_mmi PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${OUTPUT_DIR}/lib") # else() # list (APPEND USCXML_FILES ${MMI_ELEMENT}) # endif() @@ -51,6 +55,8 @@ if (BUILD_AS_PLUGINS) "../Plugins.cpp") target_link_libraries(element_postpone uscxml) set_target_properties(element_postpone PROPERTIES FOLDER "Plugin Element") + set_target_properties(element_postpone PROPERTIES COMPILE_FLAGS "-DPLUMA_EXPORTS") + set_target_properties(element_postpone PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${OUTPUT_DIR}/lib") else() list (APPEND USCXML_FILES ${POSTPONE_ELEMENT}) endif() @@ -71,6 +77,8 @@ if (BUILD_AS_PLUGINS) "../Plugins.cpp") target_link_libraries(element_file uscxml) set_target_properties(element_file PROPERTIES FOLDER "Plugin Element") + set_target_properties(element_file PROPERTIES COMPILE_FLAGS "-DPLUMA_EXPORTS") + set_target_properties(element_file PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${OUTPUT_DIR}/lib") else() list (APPEND USCXML_FILES ${FILE_ELEMENT}) endif() @@ -91,6 +99,8 @@ if (BUILD_AS_PLUGINS) "../Plugins.cpp") target_link_libraries(element_respond uscxml) set_target_properties(element_respond PROPERTIES FOLDER "Plugin Element") + set_target_properties(element_respond PROPERTIES COMPILE_FLAGS "-DPLUMA_EXPORTS") + set_target_properties(element_respond PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${OUTPUT_DIR}/lib") else() list (APPEND USCXML_FILES ${RESPOND_ELEMENT}) endif() diff --git a/src/uscxml/plugins/invoker/CMakeLists.txt b/src/uscxml/plugins/invoker/CMakeLists.txt index 301f04a..f12a7a6 100644 --- a/src/uscxml/plugins/invoker/CMakeLists.txt +++ b/src/uscxml/plugins/invoker/CMakeLists.txt @@ -13,6 +13,8 @@ if (BUILD_AS_PLUGINS) "../Plugins.cpp") target_link_libraries(invoker_sample uscxml) set_target_properties(invoker_sample PROPERTIES FOLDER "Plugin Invoker") + set_target_properties(invoker_sample PROPERTIES COMPILE_FLAGS "-DPLUMA_EXPORTS") + set_target_properties(invoker_sample PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${OUTPUT_DIR}/lib") else() list (APPEND USCXML_FILES ${SAMPLE_INVOKER}) endif() @@ -32,6 +34,8 @@ if (BUILD_AS_PLUGINS) "../Plugins.cpp") target_link_libraries(invoker_dirmon uscxml) set_target_properties(invoker_dirmon PROPERTIES FOLDER "Plugin Invoker") + set_target_properties(invoker_dirmon PROPERTIES COMPILE_FLAGS "-DPLUMA_EXPORTS") + set_target_properties(invoker_dirmon PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${OUTPUT_DIR}/lib") else() list (APPEND USCXML_FILES ${DIRMON_INVOKER}) endif() @@ -71,6 +75,8 @@ if (BUILD_AS_PLUGINS) "../Plugins.cpp") target_link_libraries(invoker_xhtml uscxml) set_target_properties(invoker_xhtml PROPERTIES FOLDER "Plugin Invoker") + set_target_properties(invoker_xhtml PROPERTIES COMPILE_FLAGS "-DPLUMA_EXPORTS") + set_target_properties(invoker_xhtml PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${OUTPUT_DIR}/lib") else() list (APPEND USCXML_FILES ${XHTML_INVOKER}) endif() @@ -90,6 +96,8 @@ if (BUILD_AS_PLUGINS) "../Plugins.cpp") target_link_libraries(invoker_system uscxml) set_target_properties(invoker_system PROPERTIES FOLDER "Plugin Invoker") + set_target_properties(invoker_system PROPERTIES COMPILE_FLAGS "-DPLUMA_EXPORTS") + set_target_properties(invoker_system PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${OUTPUT_DIR}/lib") else() list (APPEND USCXML_FILES ${SYSTEM_INVOKER}) endif() @@ -111,6 +119,8 @@ if (EXPECT_FOUND AND TCL_FOUND) "../Plugins.cpp") target_link_libraries(invoker_expect uscxml ${EXPECT_LIBRARY} ${TCL_LIBRARY}) set_target_properties(invoker_expect PROPERTIES FOLDER "Plugin Invoker") + set_target_properties(invoker_expect PROPERTIES COMPILE_FLAGS "-DPLUMA_EXPORTS") + set_target_properties(invoker_expect PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${OUTPUT_DIR}/lib") else() list (APPEND USCXML_FILES ${EXPECT_INVOKER}) endif() @@ -133,6 +143,8 @@ if (CURL_HAS_SMTP) "../Plugins.cpp") target_link_libraries(invoker_smtp uscxml) set_target_properties(invoker_smtp PROPERTIES FOLDER "Plugin Invoker") + set_target_properties(invoker_smtp PROPERTIES COMPILE_FLAGS "-DPLUMA_EXPORTS") + set_target_properties(invoker_smtp PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${OUTPUT_DIR}/lib") else() list (APPEND USCXML_FILES ${SMTP_INVOKER}) endif() @@ -154,6 +166,8 @@ if (BUILD_AS_PLUGINS) "../Plugins.cpp") target_link_libraries(invoker_imap uscxml) set_target_properties(invoker_imap PROPERTIES FOLDER "Plugin Invoker") + set_target_properties(invoker_imap PROPERTIES COMPILE_FLAGS "-DPLUMA_EXPORTS") + set_target_properties(invoker_imap PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${OUTPUT_DIR}/lib") else() list (APPEND USCXML_FILES ${IMAP_INVOKER}) endif() @@ -174,6 +188,8 @@ if (SQLITE3_FOUND) "../Plugins.cpp") target_link_libraries(invoker_sqlite3 uscxml) set_target_properties(invoker_sqlite3 PROPERTIES FOLDER "Plugin Invoker") + set_target_properties(invoker_sqlite3 PROPERTIES COMPILE_FLAGS "-DPLUMA_EXPORTS") + set_target_properties(invoker_sqlite3 PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${OUTPUT_DIR}/lib") else() list (APPEND USCXML_FILES ${SQLITE3_INVOKER}) endif() @@ -196,6 +212,8 @@ if (FFMPEG_FOUND) "../Plugins.cpp") target_link_libraries(invoker_ffmpeg uscxml ${FFMPEG_LIBRARIES}) set_target_properties(invoker_ffmpeg PROPERTIES FOLDER "Plugin Invoker") + set_target_properties(invoker_ffmpeg PROPERTIES COMPILE_FLAGS "-DPLUMA_EXPORTS") + set_target_properties(invoker_ffmpeg PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${OUTPUT_DIR}/lib") else() list (APPEND USCXML_FILES ${FFMPEG_INVOKER}) endif() @@ -221,6 +239,8 @@ if (LIBPURPLE_FOUND) "../Plugins.cpp") target_link_libraries(invoker_im uscxml ${LIBPURPLE_LIBRARY} ${GLIB2_LIBRARIES} ${ICONV_LIBRARIES}) set_target_properties(invoker_im PROPERTIES FOLDER "Plugin Invoker") + set_target_properties(invoker_im PROPERTIES COMPILE_FLAGS "-DPLUMA_EXPORTS") + set_target_properties(invoker_im PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${OUTPUT_DIR}/lib") else() list (APPEND USCXML_FILES ${LIBPURPLE_INVOKER}) endif() @@ -243,6 +263,8 @@ if (LIBICAL_FOUND) "../Plugins.cpp") target_link_libraries(invoker_calendar uscxml ${LIBICAL_LIBRARIES}) set_target_properties(invoker_calendar PROPERTIES FOLDER "Plugin Invoker") + set_target_properties(invoker_calendar PROPERTIES COMPILE_FLAGS "-DPLUMA_EXPORTS") + set_target_properties(invoker_calendar PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${OUTPUT_DIR}/lib") else() list (APPEND USCXML_FILES ${CALENDAR_INVOKER}) endif() @@ -266,6 +288,8 @@ if (CORELOCATION_LIBRARY AND OFF) "../Plugins.cpp") target_link_libraries(invoker_location uscxml) set_target_properties(invoker_location PROPERTIES FOLDER "Plugin Invoker") + set_target_properties(invoker_location PROPERTIES COMPILE_FLAGS "-DPLUMA_EXPORTS") + set_target_properties(invoker_location PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${OUTPUT_DIR}/lib") else() list (APPEND USCXML_FILES ${LOCATION_INVOKER}) endif() @@ -301,6 +325,8 @@ if (UMUNDO_FOUND AND PROTOBUF_FOUND) debug ${PROTOBUF_LIBRARY_DEBUG}) endif() set_target_properties(invoker_umundo PROPERTIES FOLDER "Plugin Invoker") + set_target_properties(invoker_umundo PROPERTIES COMPILE_FLAGS "-DPLUMA_EXPORTS") + set_target_properties(invoker_umundo PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${OUTPUT_DIR}/lib") else() list (APPEND USCXML_FILES ${UMUNDO_INVOKER}) endif() @@ -319,9 +345,10 @@ if (BUILD_AS_PLUGINS) invoker_uscxml SHARED ${USCXML_INVOKER} "../Plugins.cpp") - target_link_libraries(invoker_uscxml - uscxml) - set_target_properties(invoker_uscxml PROPERTIES FOLDER "Plugin Invoker") + target_link_libraries(invoker_uscxml uscxml) + set_target_properties(invoker_uscxml PROPERTIES FOLDER "Plugin Invoker") + set_target_properties(invoker_uscxml PROPERTIES COMPILE_FLAGS "-DPLUMA_EXPORTS") + set_target_properties(invoker_uscxml PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${OUTPUT_DIR}/lib") else() list (APPEND USCXML_FILES ${USCXML_INVOKER}) endif() @@ -342,6 +369,8 @@ if (BUILD_AS_PLUGINS) target_link_libraries(invoker_httpserver uscxml) set_target_properties(invoker_httpserver PROPERTIES FOLDER "Plugin Invoker") + set_target_properties(invoker_httpserver PROPERTIES COMPILE_FLAGS "-DPLUMA_EXPORTS") + set_target_properties(invoker_httpserver PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${OUTPUT_DIR}/lib") else() list (APPEND USCXML_FILES ${HTTPSERVLET_INVOKER}) endif() @@ -362,6 +391,8 @@ if (BUILD_AS_PLUGINS) "../Plugins.cpp") target_link_libraries(invoker_heartbeat uscxml) set_target_properties(invoker_heartbeat PROPERTIES FOLDER "Plugin Invoker") + set_target_properties(invoker_heartbeat PROPERTIES COMPILE_FLAGS "-DPLUMA_EXPORTS") + set_target_properties(invoker_heartbeat PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${OUTPUT_DIR}/lib") else() list (APPEND USCXML_FILES ${HEARTBEAT_INVOKER}) endif() @@ -385,6 +416,8 @@ if (OPENSCENEGRAPH_FOUND AND OPENGL_FOUND) ${OPENGL_LIBRARIES} uscxml) set_target_properties(invoker_openscenegraph PROPERTIES FOLDER "Plugin Invoker") + set_target_properties(invoker_openscenegraph PROPERTIES COMPILE_FLAGS "-DPLUMA_EXPORTS") + set_target_properties(invoker_openscenegraph PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${OUTPUT_DIR}/lib") else() list (APPEND USCXML_FILES ${OPENSCENEGRAPH_INVOKER}) endif() @@ -405,6 +438,8 @@ if (OPENSCENEGRAPH_FOUND AND OPENGL_FOUND) ${OPENGL_LIBRARIES} uscxml) set_target_properties(invoker_openscenegraph_convert PROPERTIES FOLDER "Plugin Invoker") + set_target_properties(invoker_openscenegraph_convert PROPERTIES COMPILE_FLAGS "-DPLUMA_EXPORTS") + set_target_properties(invoker_openscenegraph_convert PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${OUTPUT_DIR}/lib") else() list (APPEND USCXML_FILES ${OPENSCENEGRAPH_CONVERTER_INVOKER}) endif() @@ -449,6 +484,8 @@ if (OPENAL_FOUND AND (LIBSNDFILE_FOUND OR AUDIOTOOLBOX_FOUND)) uscxml) endif() set_target_properties(invoker_openal PROPERTIES FOLDER "Plugin Invoker") + set_target_properties(invoker_openal PROPERTIES COMPILE_FLAGS "-DPLUMA_EXPORTS") + set_target_properties(invoker_openal PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${OUTPUT_DIR}/lib") else() list (APPEND USCXML_FILES ${OPENAL_INVOKER}) endif() @@ -472,13 +509,17 @@ if (MILES_FOUND) "../Plugins.cpp") target_link_libraries(invoker_miles ${MILES_LIBRARIES} - ${OPENAL_LIBRARY} ${JPEG_LIBRARIES} uscxml) if (ICONV_FOUND) target_link_libraries(invoker_miles ${ICONV_LIBRARIES}) endif() + if (OPENAL_FOUND) + target_link_libraries(invoker_miles ${OPENAL_LIBRARY}) + endif() set_target_properties(invoker_miles PROPERTIES FOLDER "Plugin Invoker") + set_target_properties(invoker_miles PROPERTIES COMPILE_FLAGS "-DPLUMA_EXPORTS") + set_target_properties(invoker_miles PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${OUTPUT_DIR}/lib") else() list (APPEND USCXML_FILES ${MILES_INVOKER}) endif() @@ -501,6 +542,8 @@ if (UMUNDO_FOUND AND OFF) "../Plugins.cpp") target_link_libraries(invoker_voicexml uscxml) set_target_properties(invoker_voicexml PROPERTIES FOLDER "Plugin Invoker") + set_target_properties(invoker_voicexml PROPERTIES COMPILE_FLAGS "-DPLUMA_EXPORTS") + set_target_properties(invoker_voicexml PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${OUTPUT_DIR}/lib") else() list (APPEND USCXML_FILES ${VXML_INVOKER}) endif() diff --git a/src/uscxml/plugins/invoker/audio/OpenALInvoker.h b/src/uscxml/plugins/invoker/audio/OpenALInvoker.h index 9771f6b..98524ed 100644 --- a/src/uscxml/plugins/invoker/audio/OpenALInvoker.h +++ b/src/uscxml/plugins/invoker/audio/OpenALInvoker.h @@ -61,11 +61,11 @@ public: virtual ~OpenALInvoker(); virtual boost::shared_ptr<InvokerImpl> create(InterpreterImpl* interpreter); - virtual std::set<std::string> getNames() { - std::set<std::string> names; - names.insert("openal"); - names.insert("spatial-audio"); - names.insert("http://uscxml.tk.informatik.tu-darmstadt.de/#openal"); + virtual std::list<std::string> getNames() { + std::list<std::string> names; + names.push_back("openal"); + names.push_back("spatial-audio"); + names.push_back("http://uscxml.tk.informatik.tu-darmstadt.de/#openal"); return names; } diff --git a/src/uscxml/plugins/invoker/expect/ExpectInvoker.h b/src/uscxml/plugins/invoker/expect/ExpectInvoker.h index 902885e..25a2517 100644 --- a/src/uscxml/plugins/invoker/expect/ExpectInvoker.h +++ b/src/uscxml/plugins/invoker/expect/ExpectInvoker.h @@ -44,10 +44,10 @@ public: virtual ~ExpectInvoker(); virtual boost::shared_ptr<InvokerImpl> create(InterpreterImpl* interpreter); - virtual std::set<std::string> getNames() { - std::set<std::string> names; - names.insert("expect"); - names.insert("http://uscxml.tk.informatik.tu-darmstadt.de/#expect"); + virtual std::list<std::string> getNames() { + std::list<std::string> names; + names.push_back("expect"); + names.push_back("http://uscxml.tk.informatik.tu-darmstadt.de/#expect"); return names; } diff --git a/src/uscxml/plugins/invoker/ffmpeg/FFMPEGInvoker.h b/src/uscxml/plugins/invoker/ffmpeg/FFMPEGInvoker.h index 7725ec9..964681b 100644 --- a/src/uscxml/plugins/invoker/ffmpeg/FFMPEGInvoker.h +++ b/src/uscxml/plugins/invoker/ffmpeg/FFMPEGInvoker.h @@ -40,10 +40,10 @@ public: virtual ~FFMPEGInvoker(); virtual boost::shared_ptr<InvokerImpl> create(InterpreterImpl* interpreter); - virtual std::set<std::string> getNames() { - std::set<std::string> names; - names.insert("ffmpeg"); - names.insert("http://uscxml.tk.informatik.tu-darmstadt.de/#ffmpeg"); + virtual std::list<std::string> getNames() { + std::list<std::string> names; + names.push_back("ffmpeg"); + names.push_back("http://uscxml.tk.informatik.tu-darmstadt.de/#ffmpeg"); return names; } diff --git a/src/uscxml/plugins/invoker/filesystem/dirmon/DirMonInvoker.h b/src/uscxml/plugins/invoker/filesystem/dirmon/DirMonInvoker.h index 9c3f873..78929c6 100644 --- a/src/uscxml/plugins/invoker/filesystem/dirmon/DirMonInvoker.h +++ b/src/uscxml/plugins/invoker/filesystem/dirmon/DirMonInvoker.h @@ -97,11 +97,11 @@ public: virtual ~DirMonInvoker(); virtual boost::shared_ptr<InvokerImpl> create(InterpreterImpl* interpreter); - virtual std::set<std::string> getNames() { - std::set<std::string> names; - names.insert("dirmon"); - names.insert("DirectoryMonitor"); - names.insert("http://uscxml.tk.informatik.tu-darmstadt.de/#dirmon"); + virtual std::list<std::string> getNames() { + std::list<std::string> names; + names.push_back("dirmon"); + names.push_back("DirectoryMonitor"); + names.push_back("http://uscxml.tk.informatik.tu-darmstadt.de/#dirmon"); return names; } diff --git a/src/uscxml/plugins/invoker/graphics/openscenegraph/OSGInvoker.h b/src/uscxml/plugins/invoker/graphics/openscenegraph/OSGInvoker.h index cda0ad3..af06e23 100644 --- a/src/uscxml/plugins/invoker/graphics/openscenegraph/OSGInvoker.h +++ b/src/uscxml/plugins/invoker/graphics/openscenegraph/OSGInvoker.h @@ -44,11 +44,11 @@ public: virtual ~OSGInvoker(); virtual boost::shared_ptr<InvokerImpl> create(InterpreterImpl* interpreter); - virtual std::set<std::string> getNames() { - std::set<std::string> names; - names.insert("3d"); - names.insert("scenegraph"); - names.insert("http://uscxml.tk.informatik.tu-darmstadt.de/#3d"); + virtual std::list<std::string> getNames() { + std::list<std::string> names; + names.push_back("3d"); + names.push_back("scenegraph"); + names.push_back("http://uscxml.tk.informatik.tu-darmstadt.de/#3d"); return names; } diff --git a/src/uscxml/plugins/invoker/graphics/openscenegraph/converter/OSGConverter.h b/src/uscxml/plugins/invoker/graphics/openscenegraph/converter/OSGConverter.h index a632a19..10e6fc9 100644 --- a/src/uscxml/plugins/invoker/graphics/openscenegraph/converter/OSGConverter.h +++ b/src/uscxml/plugins/invoker/graphics/openscenegraph/converter/OSGConverter.h @@ -36,12 +36,12 @@ public: virtual ~OSGConverter(); virtual boost::shared_ptr<InvokerImpl> create(InterpreterImpl* interpreter); - virtual std::set<std::string> getNames() { - std::set<std::string> names; - names.insert("osgconverter"); - names.insert("osgconvert"); - names.insert("http://uscxml.tk.informatik.tu-darmstadt.de/#osgconverter"); - names.insert("http://uscxml.tk.informatik.tu-darmstadt.de/#osgconvert"); + virtual std::list<std::string> getNames() { + std::list<std::string> names; + names.push_back("osgconverter"); + names.push_back("osgconvert"); + names.push_back("http://uscxml.tk.informatik.tu-darmstadt.de/#osgconverter"); + names.push_back("http://uscxml.tk.informatik.tu-darmstadt.de/#osgconvert"); return names; } diff --git a/src/uscxml/plugins/invoker/heartbeat/HeartbeatInvoker.h b/src/uscxml/plugins/invoker/heartbeat/HeartbeatInvoker.h index c44e362..a024181 100644 --- a/src/uscxml/plugins/invoker/heartbeat/HeartbeatInvoker.h +++ b/src/uscxml/plugins/invoker/heartbeat/HeartbeatInvoker.h @@ -34,10 +34,10 @@ public: virtual ~HeartbeatInvoker(); virtual boost::shared_ptr<InvokerImpl> create(InterpreterImpl* interpreter); - virtual std::set<std::string> getNames() { - std::set<std::string> names; - names.insert("heartbeat"); - names.insert("http://uscxml.tk.informatik.tu-darmstadt.de/#heartbeat"); + virtual std::list<std::string> getNames() { + std::list<std::string> names; + names.push_back("heartbeat"); + names.push_back("http://uscxml.tk.informatik.tu-darmstadt.de/#heartbeat"); return names; } diff --git a/src/uscxml/plugins/invoker/http/HTTPServletInvoker.h b/src/uscxml/plugins/invoker/http/HTTPServletInvoker.h index 7fb2438..59c25ca 100644 --- a/src/uscxml/plugins/invoker/http/HTTPServletInvoker.h +++ b/src/uscxml/plugins/invoker/http/HTTPServletInvoker.h @@ -35,10 +35,10 @@ public: virtual ~HTTPServletInvoker(); virtual boost::shared_ptr<InvokerImpl> create(InterpreterImpl* interpreter); - virtual std::set<std::string> getNames() { - std::set<std::string> names; - names.insert("httpservlet"); - names.insert("http://uscxml.tk.informatik.tu-darmstadt.de/#httpserver"); + virtual std::list<std::string> getNames() { + std::list<std::string> names; + names.push_back("httpservlet"); + names.push_back("http://uscxml.tk.informatik.tu-darmstadt.de/#httpserver"); return names; } diff --git a/src/uscxml/plugins/invoker/im/IMInvoker.h b/src/uscxml/plugins/invoker/im/IMInvoker.h index a3f129a..85c156e 100644 --- a/src/uscxml/plugins/invoker/im/IMInvoker.h +++ b/src/uscxml/plugins/invoker/im/IMInvoker.h @@ -72,11 +72,11 @@ public: virtual ~IMInvoker(); virtual boost::shared_ptr<InvokerImpl> create(InterpreterImpl* interpreter); - virtual std::set<std::string> getNames() { - std::set<std::string> names; - names.insert("im"); - names.insert("instant-messaging"); - names.insert("http://uscxml.tk.informatik.tu-darmstadt.de/#instant-messaging"); + virtual std::list<std::string> getNames() { + std::list<std::string> names; + names.push_back("im"); + names.push_back("instant-messaging"); + names.push_back("http://uscxml.tk.informatik.tu-darmstadt.de/#instant-messaging"); return names; } diff --git a/src/uscxml/plugins/invoker/imap/IMAPInvoker.h b/src/uscxml/plugins/invoker/imap/IMAPInvoker.h index b1da324..1f80e57 100644 --- a/src/uscxml/plugins/invoker/imap/IMAPInvoker.h +++ b/src/uscxml/plugins/invoker/imap/IMAPInvoker.h @@ -37,10 +37,10 @@ public: virtual ~IMAPInvoker(); virtual boost::shared_ptr<InvokerImpl> create(InterpreterImpl* interpreter); - virtual std::set<std::string> getNames() { - std::set<std::string> names; - names.insert("imap"); - names.insert("http://uscxml.tk.informatik.tu-darmstadt.de/#imap"); + virtual std::list<std::string> getNames() { + std::list<std::string> names; + names.push_back("imap"); + names.push_back("http://uscxml.tk.informatik.tu-darmstadt.de/#imap"); return names; } diff --git a/src/uscxml/plugins/invoker/miles/MilesSessionInvoker.cpp b/src/uscxml/plugins/invoker/miles/MilesSessionInvoker.cpp index b29e827..720cab3 100644 --- a/src/uscxml/plugins/invoker/miles/MilesSessionInvoker.cpp +++ b/src/uscxml/plugins/invoker/miles/MilesSessionInvoker.cpp @@ -49,6 +49,7 @@ MilesSessionInvoker::MilesSessionInvoker() { miles_init(); _isRunning = false; + _imageSeq = 0; num_connected = 0; } @@ -446,7 +447,15 @@ void MilesSessionInvoker::processEventThumbnail(const std::string& origin, const returnEvent(ev); return; } - URL imageURL("emptyface.jpg"); + + _imageSeq++; + if (_imageSeq > 4) + _imageSeq = 1; + + std::stringstream testImageName; + testImageName << "test" << _imageSeq << ".jpeg"; + + URL imageURL(testImageName.str()); imageURL.toAbsolute(_interpreter->getBaseURI()); std::stringstream ssImage; ssImage << imageURL; diff --git a/src/uscxml/plugins/invoker/miles/MilesSessionInvoker.h b/src/uscxml/plugins/invoker/miles/MilesSessionInvoker.h index 84bf280..148be68 100644 --- a/src/uscxml/plugins/invoker/miles/MilesSessionInvoker.h +++ b/src/uscxml/plugins/invoker/miles/MilesSessionInvoker.h @@ -63,10 +63,10 @@ public: virtual ~MilesSessionInvoker(); virtual boost::shared_ptr<InvokerImpl> create(InterpreterImpl* interpreter); - virtual std::set<std::string> getNames() { - std::set<std::string> names; - names.insert("miles"); - names.insert("http://uscxml.tk.informatik.tu-darmstadt.de/#miles"); + virtual std::list<std::string> getNames() { + std::list<std::string> names; + names.push_back("miles"); + names.push_back("http://uscxml.tk.informatik.tu-darmstadt.de/#miles"); return names; } diff --git a/src/uscxml/plugins/invoker/sample/SampleInvoker.h b/src/uscxml/plugins/invoker/sample/SampleInvoker.h index 16e4df1..562ebd6 100644 --- a/src/uscxml/plugins/invoker/sample/SampleInvoker.h +++ b/src/uscxml/plugins/invoker/sample/SampleInvoker.h @@ -34,10 +34,10 @@ public: virtual ~SampleInvoker(); virtual boost::shared_ptr<InvokerImpl> create(InterpreterImpl* interpreter); - virtual std::set<std::string> getNames() { - std::set<std::string> names; - names.insert("sample"); - names.insert("http://uscxml.tk.informatik.tu-darmstadt.de/#sample"); + virtual std::list<std::string> getNames() { + std::list<std::string> names; + names.push_back("sample"); + names.push_back("http://uscxml.tk.informatik.tu-darmstadt.de/#sample"); return names; } diff --git a/src/uscxml/plugins/invoker/scxml/USCXMLInvoker.h b/src/uscxml/plugins/invoker/scxml/USCXMLInvoker.h index f26955e..7d10bf1 100644 --- a/src/uscxml/plugins/invoker/scxml/USCXMLInvoker.h +++ b/src/uscxml/plugins/invoker/scxml/USCXMLInvoker.h @@ -47,12 +47,12 @@ public: USCXMLInvoker(); virtual ~USCXMLInvoker(); virtual boost::shared_ptr<InvokerImpl> create(InterpreterImpl* interpreter); - virtual std::set<std::string> getNames() { - std::set<std::string> names; - names.insert("scxml"); - names.insert("uscxml"); - names.insert("http://www.w3.org/TR/scxml"); - names.insert("http://www.w3.org/TR/scxml/"); + virtual std::list<std::string> getNames() { + std::list<std::string> names; + names.push_back("scxml"); + names.push_back("uscxml"); + names.push_back("http://www.w3.org/TR/scxml"); + names.push_back("http://www.w3.org/TR/scxml/"); return names; } diff --git a/src/uscxml/plugins/invoker/smtp/SMTPInvoker.h b/src/uscxml/plugins/invoker/smtp/SMTPInvoker.h index 2ae5482..5975b4b 100644 --- a/src/uscxml/plugins/invoker/smtp/SMTPInvoker.h +++ b/src/uscxml/plugins/invoker/smtp/SMTPInvoker.h @@ -36,10 +36,10 @@ public: virtual ~SMTPInvoker(); virtual boost::shared_ptr<InvokerImpl> create(InterpreterImpl* interpreter); - virtual std::set<std::string> getNames() { - std::set<std::string> names; - names.insert("smtp"); - names.insert("http://uscxml.tk.informatik.tu-darmstadt.de/#smtp"); + virtual std::list<std::string> getNames() { + std::list<std::string> names; + names.push_back("smtp"); + names.push_back("http://uscxml.tk.informatik.tu-darmstadt.de/#smtp"); return names; } diff --git a/src/uscxml/plugins/invoker/sqlite3/Sqlite3Invoker.h b/src/uscxml/plugins/invoker/sqlite3/Sqlite3Invoker.h index e024fd7..b6e5031 100644 --- a/src/uscxml/plugins/invoker/sqlite3/Sqlite3Invoker.h +++ b/src/uscxml/plugins/invoker/sqlite3/Sqlite3Invoker.h @@ -34,10 +34,10 @@ public: virtual ~Sqlite3Invoker(); virtual boost::shared_ptr<InvokerImpl> create(InterpreterImpl* interpreter); - virtual std::set<std::string> getNames() { - std::set<std::string> names; - names.insert("sqlite3"); - names.insert("http://uscxml.tk.informatik.tu-darmstadt.de/#sqlite3"); + virtual std::list<std::string> getNames() { + std::list<std::string> names; + names.push_back("sqlite3"); + names.push_back("http://uscxml.tk.informatik.tu-darmstadt.de/#sqlite3"); return names; } diff --git a/src/uscxml/plugins/invoker/system/SystemInvoker.h b/src/uscxml/plugins/invoker/system/SystemInvoker.h index 5be04eb..a3d1451 100644 --- a/src/uscxml/plugins/invoker/system/SystemInvoker.h +++ b/src/uscxml/plugins/invoker/system/SystemInvoker.h @@ -34,10 +34,10 @@ public: virtual ~SystemInvoker(); virtual boost::shared_ptr<InvokerImpl> create(InterpreterImpl* interpreter); - virtual std::set<std::string> getNames() { - std::set<std::string> names; - names.insert("system"); - names.insert("http://uscxml.tk.informatik.tu-darmstadt.de/#system"); + virtual std::list<std::string> getNames() { + std::list<std::string> names; + names.push_back("system"); + names.push_back("http://uscxml.tk.informatik.tu-darmstadt.de/#system"); return names; } diff --git a/src/uscxml/plugins/invoker/umundo/UmundoInvoker.h b/src/uscxml/plugins/invoker/umundo/UmundoInvoker.h index 9c64886..1c5c9a3 100644 --- a/src/uscxml/plugins/invoker/umundo/UmundoInvoker.h +++ b/src/uscxml/plugins/invoker/umundo/UmundoInvoker.h @@ -43,11 +43,11 @@ public: virtual ~UmundoInvoker(); virtual boost::shared_ptr<InvokerImpl> create(InterpreterImpl* interpreter); - virtual std::set<std::string> getNames() { - std::set<std::string> names; - names.insert("umundo"); - names.insert("http://umundo.tk.informatik.tu-darmstadt.de/"); - names.insert("http://umundo.tk.informatik.tu-darmstadt.de"); + virtual std::list<std::string> getNames() { + std::list<std::string> names; + names.push_back("umundo"); + names.push_back("http://umundo.tk.informatik.tu-darmstadt.de/"); + names.push_back("http://umundo.tk.informatik.tu-darmstadt.de"); return names; } diff --git a/src/uscxml/plugins/invoker/xhtml/XHTMLInvoker.h b/src/uscxml/plugins/invoker/xhtml/XHTMLInvoker.h index 03b9116..b1a9c5a 100644 --- a/src/uscxml/plugins/invoker/xhtml/XHTMLInvoker.h +++ b/src/uscxml/plugins/invoker/xhtml/XHTMLInvoker.h @@ -34,10 +34,10 @@ public: virtual ~XHTMLInvoker(); virtual boost::shared_ptr<InvokerImpl> create(InterpreterImpl* interpreter); - virtual std::set<std::string> getNames() { - std::set<std::string> names; - names.insert("xhtml"); - names.insert("http://www.w3.org/1999/xhtml"); + virtual std::list<std::string> getNames() { + std::list<std::string> names; + names.push_back("xhtml"); + names.push_back("http://www.w3.org/1999/xhtml"); return names; } 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; } diff --git a/src/uscxml/server/HTTPServer.cpp b/src/uscxml/server/HTTPServer.cpp index 2d2b5e0..3e7920c 100644 --- a/src/uscxml/server/HTTPServer.cpp +++ b/src/uscxml/server/HTTPServer.cpp @@ -179,6 +179,7 @@ tthread::recursive_mutex HTTPServer::_instanceMutex; HTTPServer* HTTPServer::getInstance(unsigned short port, unsigned short wsPort, SSLConfig* sslConf) { // tthread::lock_guard<tthread::recursive_mutex> lock(_instanceMutex); if (_instance == NULL) { + std::cout << "Instantiating new HTTPServer" << std::endl; #ifdef _WIN32 WSADATA wsaData; WSAStartup(MAKEWORD(2, 2), &wsaData); @@ -561,7 +562,7 @@ bool HTTPServer::registerServlet(const std::string& path, HTTPServlet* servlet) HTTPServer* INSTANCE = getInstance(); if (!INSTANCE->_httpHandle) - return true; + return true; // this is the culprit! tthread::lock_guard<tthread::recursive_mutex> lock(INSTANCE->_mutex); diff --git a/src/uscxml/server/InterpreterServlet.h b/src/uscxml/server/InterpreterServlet.h index 0315598..9ff1d34 100644 --- a/src/uscxml/server/InterpreterServlet.h +++ b/src/uscxml/server/InterpreterServlet.h @@ -35,10 +35,10 @@ public: virtual boost::shared_ptr<IOProcessorImpl> create(InterpreterImpl* interpreter); - virtual std::set<std::string> getNames() { - std::set<std::string> names; - names.insert("http"); - names.insert("http://www.w3.org/TR/scxml/#HTTPEventProcessor"); + 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; } @@ -86,10 +86,10 @@ public: virtual boost::shared_ptr<IOProcessorImpl> create(InterpreterImpl* interpreter); - virtual std::set<std::string> getNames() { - std::set<std::string> names; - names.insert("websocket"); - names.insert("http://www.w3.org/TR/scxml/#WebSocketEventProcessor"); + 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; } diff --git a/src/uscxml/transform/ChartToFSM.h b/src/uscxml/transform/ChartToFSM.h index 80f532a..ef80a6a 100644 --- a/src/uscxml/transform/ChartToFSM.h +++ b/src/uscxml/transform/ChartToFSM.h @@ -32,7 +32,7 @@ namespace uscxml { class GlobalState; class GlobalTransition; -class GlobalState { +class USCXML_API GlobalState { public: GlobalState() {} @@ -52,7 +52,7 @@ public: }; -class GlobalTransition { +class USCXML_API GlobalTransition { public: class Action { public: @@ -99,7 +99,7 @@ protected: std::list<std::string> getCommonEvents(const Arabica::XPath::NodeSet<std::string>& transitions); }; -class FlatteningInterpreter : public InterpreterDraft6, public InterpreterMonitor { +class USCXML_API FlatteningInterpreter : public InterpreterDraft6, public InterpreterMonitor { public: FlatteningInterpreter(const Arabica::DOM::Document<std::string>& doc); virtual ~FlatteningInterpreter(); @@ -146,7 +146,7 @@ protected: std::map<std::string, GlobalState*> _globalConf; }; -class ChartToFSM { +class USCXML_API ChartToFSM { public: static Interpreter flatten(const Interpreter& other); }; diff --git a/src/uscxml/transform/FSMToPromela.h b/src/uscxml/transform/FSMToPromela.h index 7872997..844d209 100644 --- a/src/uscxml/transform/FSMToPromela.h +++ b/src/uscxml/transform/FSMToPromela.h @@ -31,7 +31,7 @@ namespace uscxml { -class PromelaInline { +class USCXML_API PromelaInline { public: PromelaInline() : type(PROMELA_NIL) {} @@ -57,7 +57,7 @@ public: PromelaInlineType type; }; -class PromelaInlines { +class USCXML_API PromelaInlines { public: PromelaInlines() : progressLabels(0), acceptLabels(0), endLabels(0), eventSources(0), customEventSources(0), codes(0) {} @@ -84,7 +84,7 @@ public: int codes; }; -class PromelaEventSource { +class USCXML_API PromelaEventSource { public: enum PromelaEventSourceType { @@ -112,7 +112,7 @@ public: Trie* trie; }; -class FSMToPromela : public InterpreterDraft6 { +class USCXML_API FSMToPromela : public InterpreterDraft6 { public: static void writeProgram(std::ostream& stream, const Interpreter& interpreter); diff --git a/src/uscxml/util/Trie.h b/src/uscxml/util/Trie.h index 5c2d14e..1f8b201 100644 --- a/src/uscxml/util/Trie.h +++ b/src/uscxml/util/Trie.h @@ -20,13 +20,14 @@ #ifndef TRIE_H_UZMQRBO5 #define TRIE_H_UZMQRBO5 +#include "uscxml/Common.h" #include <string> #include <map> #include <list> namespace uscxml { -struct TrieNode { +struct USCXML_API TrieNode { TrieNode(); virtual ~TrieNode(); @@ -37,7 +38,7 @@ struct TrieNode { void dump(int indent = 0); }; -struct Trie { +struct USCXML_API Trie { Trie(); Trie(const std::string& seperator); virtual ~Trie(); |