diff --git a/CMakeLists.txt b/CMakeLists.txt index 7c0b844c..8d0a2cc0 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/Miracast/MiracastPlayer/CMakeLists.txt b/Miracast/MiracastPlayer/CMakeLists.txt index 5777fc9c..d89892e9 100644 --- a/Miracast/MiracastPlayer/CMakeLists.txt +++ b/Miracast/MiracastPlayer/CMakeLists.txt @@ -42,11 +42,7 @@ find_package(GStreamer REQUIRED) find_library(GLIB_LIBRARY NAMES glib-2.0 ) -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_library(${MODULE_NAME} SHARED MiracastPlayer.cpp Module.cpp) @@ -72,11 +68,7 @@ set_target_properties(${PLUGIN_IMPLEMENTATION} PROPERTIES CXX_STANDARD_REQUIRED YES) set_source_files_properties(MiracastPlayer.cpp PROPERTIES COMPILE_FLAGS "-fexceptions") -if (USE_THUNDER_R4) target_link_libraries(${PLUGIN_IMPLEMENTATION} PRIVATE ${NAMESPACE}COM::${NAMESPACE}COM) -else () -target_link_libraries(${PLUGIN_IMPLEMENTATION} PRIVATE ${NAMESPACE}Protocols::${NAMESPACE}Protocols) -endif (USE_THUNDER_R4) if (RDK_SERVICES_L1_TEST) target_sources(${PLUGIN_IMPLEMENTATION} @@ -116,4 +108,4 @@ endif() install(TARGETS ${PLUGIN_IMPLEMENTATION} DESTINATION lib/${STORAGE_DIRECTORY}/plugins) -write_config(${PLUGIN_NAME}) \ No newline at end of file +write_config(${PLUGIN_NAME}) diff --git a/Miracast/MiracastPlayer/MiracastPlayerImplementation.h b/Miracast/MiracastPlayer/MiracastPlayerImplementation.h index 81af7bab..fb1e34fc 100644 --- a/Miracast/MiracastPlayer/MiracastPlayerImplementation.h +++ b/Miracast/MiracastPlayer/MiracastPlayerImplementation.h @@ -97,11 +97,7 @@ namespace WPEFramework public: static Core::ProxyType Create(MiracastPlayerImplementation *miracastPlayerImplementation, Event event, ParamsType params) { - #ifndef USE_THUNDER_R4 - return (Core::proxy_cast(Core::ProxyType::Create(miracastPlayerImplementation, event, params))); - #else return (Core::ProxyType(Core::ProxyType::Create(miracastPlayerImplementation, event, params))); - #endif } virtual void Dispatch() { @@ -150,4 +146,4 @@ namespace WPEFramework friend class Job; }; } // namespace Plugin -} // namespace WPEFramework \ No newline at end of file +} // namespace WPEFramework diff --git a/Miracast/MiracastPlayer/Module.h b/Miracast/MiracastPlayer/Module.h index 2c4ee5b9..5d941b7b 100644 --- a/Miracast/MiracastPlayer/Module.h +++ b/Miracast/MiracastPlayer/Module.h @@ -22,8 +22,8 @@ #define MODULE_NAME MiracastPlayer #endif +#include #include -#include #undef EXTERNAL #define EXTERNAL diff --git a/Miracast/MiracastService/CMakeLists.txt b/Miracast/MiracastService/CMakeLists.txt index 53d9c047..840c349a 100644 --- a/Miracast/MiracastService/CMakeLists.txt +++ b/Miracast/MiracastService/CMakeLists.txt @@ -39,11 +39,7 @@ find_package(WPEFrameworkSecurityUtil) find_library(GLIB_LIBRARY NAMES glib-2.0 ) -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_library(${MODULE_NAME} SHARED MiracastService.cpp Module.cpp) @@ -70,11 +66,7 @@ set_target_properties(${PLUGIN_IMPLEMENTATION} PROPERTIES CXX_STANDARD_REQUIRED YES) set_source_files_properties(MiracastService.cpp PROPERTIES COMPILE_FLAGS "-fexceptions") -if (USE_THUNDER_R4) target_link_libraries(${PLUGIN_IMPLEMENTATION} PRIVATE ${NAMESPACE}COM::${NAMESPACE}COM) -else () -target_link_libraries(${PLUGIN_IMPLEMENTATION} PRIVATE ${NAMESPACE}Protocols::${NAMESPACE}Protocols) -endif (USE_THUNDER_R4) target_include_directories(${PLUGIN_IMPLEMENTATION} PRIVATE ./) target_include_directories(${PLUGIN_IMPLEMENTATION} PRIVATE ../common) @@ -95,4 +87,4 @@ endif() install(TARGETS ${PLUGIN_IMPLEMENTATION} DESTINATION lib/${STORAGE_DIRECTORY}/plugins) -write_config(${PLUGIN_NAME}) \ No newline at end of file +write_config(${PLUGIN_NAME}) diff --git a/Miracast/MiracastService/MiracastServiceImplementation.h b/Miracast/MiracastService/MiracastServiceImplementation.h index 0428d1ff..3a901e5d 100644 --- a/Miracast/MiracastService/MiracastServiceImplementation.h +++ b/Miracast/MiracastService/MiracastServiceImplementation.h @@ -118,11 +118,7 @@ namespace WPEFramework public: static Core::ProxyType Create(MiracastServiceImplementation *miracastServiceImplementation, Event event, JsonObject params) { - #ifndef USE_THUNDER_R4 - return (Core::proxy_cast(Core::ProxyType::Create(miracastServiceImplementation, event, params))); - #else return (Core::ProxyType(Core::ProxyType::Create(miracastServiceImplementation, event, params))); - #endif } virtual void Dispatch() @@ -240,4 +236,4 @@ namespace WPEFramework friend class Job; }; // class MiracastServiceImplementation } // namespace Plugin -} // namespace WPEFramework \ No newline at end of file +} // namespace WPEFramework diff --git a/Miracast/MiracastService/Module.h b/Miracast/MiracastService/Module.h index d19abb49..a6908a57 100644 --- a/Miracast/MiracastService/Module.h +++ b/Miracast/MiracastService/Module.h @@ -22,8 +22,8 @@ #define MODULE_NAME MiracastService #endif +#include #include -#include #undef EXTERNAL #define EXTERNAL diff --git a/XCast/CMakeLists.txt b/XCast/CMakeLists.txt index a8476abf..c276b086 100644 --- a/XCast/CMakeLists.txt +++ b/XCast/CMakeLists.txt @@ -26,21 +26,13 @@ set(PLUGIN_XCAST_MODE "Local" CACHE STRING "Controls if the plugin should run in find_package(${NAMESPACE}Plugins REQUIRED) find_package(RFC) find_package(GLIB REQUIRED) -find_package(WPEFrameworkSecurityUtil) find_package(${NAMESPACE}Definitions REQUIRED) -if(NOT WPEFRAMEWORK_SECURITYUTIL_FOUND) - add_definitions(-DSECURITY_TOKEN_ENABLED=0) -endif() find_library(GLIB_LIBRARY NAMES glib-2.0) find_library(XDIAL_LIBRARIES NAMES gdial-server) -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_library(${MODULE_NAME} SHARED XCast.cpp @@ -74,16 +66,12 @@ set_target_properties(${PLUGIN_IMPLEMENTATION} PROPERTIES CXX_STANDARD_REQUIRED YES) -if (USE_THUNDER_R4) target_link_libraries(${PLUGIN_IMPLEMENTATION} PRIVATE ${NAMESPACE}COM::${NAMESPACE}COM) -else () -target_link_libraries(${PLUGIN_IMPLEMENTATION} PRIVATE ${NAMESPACE}Protocols::${NAMESPACE}Protocols) -endif (USE_THUNDER_R4) find_package(IARMBus) find_package(CEC) -find_library(NMPROXY_LIB NAMES ${NAMESPACE}NetworkManagerProxy PATHS ${CMAKE_SYSROOT}/usr/lib/wpeframework/proxystubs) +find_library(NMPROXY_LIB NAMES ${NAMESPACE}NetworkManagerProxy PATHS ${CMAKE_SYSROOT}/usr/lib/${STORAGE_DIRECTORY}/proxystubs) if (RDK_SERVICE_L2_TEST) message ("L2 test Enabled") diff --git a/XCast/Module.h b/XCast/Module.h index af6e2179..0c2783b7 100644 --- a/XCast/Module.h +++ b/XCast/Module.h @@ -22,8 +22,8 @@ #define MODULE_NAME Plugin_XCast #endif +#include #include -#include #undef EXTERNAL #define EXTERNAL diff --git a/XCast/XCastImplementation.h b/XCast/XCastImplementation.h index 28d110e9..06b1e5ec 100644 --- a/XCast/XCastImplementation.h +++ b/XCast/XCastImplementation.h @@ -104,11 +104,7 @@ namespace WPEFramework public: static Core::ProxyType Create(XCastImplementation *tts, Event event,string callsign,JsonObject params) { - #ifndef USE_THUNDER_R4 - return (Core::proxy_cast(Core::ProxyType::Create(tts, event, callsign, params))); - #else return (Core::ProxyType(Core::ProxyType::Create(tts, event, callsign, params))); - #endif } virtual void Dispatch() { @@ -332,4 +328,4 @@ namespace WPEFramework friend class Job; }; } // namespace Plugin -} // namespace WPEFramework \ No newline at end of file +} // namespace WPEFramework diff --git a/helpers/UtilsController.h b/helpers/UtilsController.h index f3729bb6..e53290ee 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)