diff --git a/CMakeLists.txt b/CMakeLists.txt index 02791948..3f9de5ce 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -19,7 +19,7 @@ cmake_minimum_required(VERSION 3.3) -find_package(WPEFramework) +find_package(Thunder NAMES WPEFramework Thunder) # All packages that did not deliver a CMake Find script (and some deprecated scripts that need to be removed) # are located in the cmake directory. Include it in the search. diff --git a/LEDControl/Module.h b/LEDControl/Module.h index f750aa9d..87f68341 100644 --- a/LEDControl/Module.h +++ b/LEDControl/Module.h @@ -22,8 +22,8 @@ #define MODULE_NAME Plugin_LEDControl #endif +#include #include -#include #undef EXTERNAL #define EXTERNAL diff --git a/MotionDetection/Module.h b/MotionDetection/Module.h index 8aa6ad0c..ee6bf018 100644 --- a/MotionDetection/Module.h +++ b/MotionDetection/Module.h @@ -24,8 +24,8 @@ #define MODULE_NAME Plugin_MotionDetection #endif +#include #include -#include #undef EXTERNAL #define EXTERNAL diff --git a/RemoteControl/Module.h b/RemoteControl/Module.h index 5a85aa78..87ba0809 100644 --- a/RemoteControl/Module.h +++ b/RemoteControl/Module.h @@ -22,8 +22,8 @@ #define MODULE_NAME RemoteControl #endif +#include #include -#include #undef EXTERNAL #define EXTERNAL diff --git a/RemoteControl/test/CMakeLists.txt b/RemoteControl/test/CMakeLists.txt index 12d256c2..7ca51bd8 100644 --- a/RemoteControl/test/CMakeLists.txt +++ b/RemoteControl/test/CMakeLists.txt @@ -20,11 +20,7 @@ set(PLUGIN_NAME remoteControlTestClient) find_package(${NAMESPACE}Core REQUIRED) -if (USE_THUNDER_R4) - find_package(${NAMESPACE}COM REQUIRED) -else () - find_package(${NAMESPACE}Protocols REQUIRED) -endif (USE_THUNDER_R4) +find_package(${NAMESPACE}COM REQUIRED) add_executable(${PLUGIN_NAME} remoteControlTestClient.cpp) @@ -35,11 +31,7 @@ set_target_properties(${PLUGIN_NAME} PROPERTIES target_link_libraries(${PLUGIN_NAME} PRIVATE ${NAMESPACE}Core::${NAMESPACE}Core) -if (USE_THUNDER_R4) target_link_libraries(${PLUGIN_NAME} PRIVATE ${NAMESPACE}COM::${NAMESPACE}COM ${NAMESPACE}WebSocket::${NAMESPACE}WebSocket) -else () -target_link_libraries(${PLUGIN_NAME} PRIVATE ${NAMESPACE}Protocols::${NAMESPACE}Protocols) -endif (USE_THUNDER_R4) install(TARGETS ${PLUGIN_NAME} DESTINATION bin) diff --git a/VoiceControl/Module.h b/VoiceControl/Module.h index d85f7dce..ffa4d2e5 100644 --- a/VoiceControl/Module.h +++ b/VoiceControl/Module.h @@ -22,8 +22,8 @@ #define MODULE_NAME VoiceControl #endif +#include #include -#include #undef EXTERNAL #define EXTERNAL diff --git a/helpers/UtilsController.h b/helpers/UtilsController.h index f3729bb6..1537785e 100644 --- a/helpers/UtilsController.h +++ b/helpers/UtilsController.h @@ -158,11 +158,7 @@ namespace Utils return thunderClient; } -#ifndef USE_THUNDER_R4 - class Job : public Core::IDispatchType -#else class Job : public Core::IDispatch -#endif /* USE_THUNDER_R4 */ { public: Job(std::function work) @@ -202,13 +198,8 @@ namespace Utils uint32_t result = Core::ERROR_ASYNC_FAILED; Core::Event event(false, true); -#ifndef USE_THUNDER_R4 - Core::IWorkerPool::Instance().Submit(Core::ProxyType>(Core::ProxyType::Create([&]() - { -#else Core::IWorkerPool::Instance().Submit(Core::ProxyType(Core::ProxyType::Create([&]() { -#endif /* USE_THUNDER_R4 */ auto interface = shell->QueryInterfaceByCallsign(callsign); if (interface == nullptr) { result = Core::ERROR_UNAVAILABLE; diff --git a/helpers/UtilsJsonRpc.h b/helpers/UtilsJsonRpc.h index bff772aa..b56770c7 100644 --- a/helpers/UtilsJsonRpc.h +++ b/helpers/UtilsJsonRpc.h @@ -69,8 +69,6 @@ * You should be capable of just using "Notify". */ -#if ((THUNDER_VERSION >= 4) && (THUNDER_VERSION_MINOR == 4)) - #define sendNotify(event,params) { \ std::string json; \ params.ToString(json); \ @@ -85,22 +83,6 @@ Notify(event,params); \ } -#else - -#define sendNotify(event,params) { \ - std::string json; \ - params.ToString(json); \ - LOGINFO("Notify %s %s", event, json.c_str()); \ - for (uint8_t i = 1; GetHandler(i); i++) GetHandler(i)->Notify(event,params); \ -} -#define sendNotifyMaskParameters(event,params) { \ - std::string json; \ - params.ToString(json); \ - LOGINFO("Notify %s <***>", event); \ - for (uint8_t i = 1; GetHandler(i); i++) GetHandler(i)->Notify(event,params); \ -} - -#endif /** * DO NOT USE THIS. * diff --git a/helpers/frontpanel.h b/helpers/frontpanel.h index 5fb1b82c..49631630 100644 --- a/helpers/frontpanel.h +++ b/helpers/frontpanel.h @@ -32,6 +32,7 @@ #include #include +#include #include namespace WPEFramework