Skip to content

Commit

Permalink
RDK-34055 - Added changes to build Services on top of Thunder R2 & R4" (
Browse files Browse the repository at this point in the history
rdkcentral#4074)" (rdkcentral#4106)

Added changes to build Services on top of Thunder R2 & R4

Signed-off-by: Karunakaran A <[email protected]>
  • Loading branch information
karuna2git authored Jun 7, 2023
1 parent 5ff2977 commit 1403b9f
Show file tree
Hide file tree
Showing 59 changed files with 434 additions and 66 deletions.
4 changes: 4 additions & 0 deletions AVInput/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ All notable changes to this RDK Service will be documented in this file.
* Changes in CHANGELOG should be updated when commits are added to the main or release branches. There should be one CHANGELOG entry per JIRA Ticket. This is not enforced on sprint branches since there could be multiple changes for the same JIRA ticket during development.

* For more details, refer to [versioning](https://github.com/rdkcentral/rdkservices#versioning) section under Main README.
## [1.2.2] - 2023-06-05
### Added
- Added Support to build the plugin to both R4 & R2

## [1.2.1] - 2023-04-12
### Fixed
- Fixed IARM_Bus_UnRegisterEventHandler call to IARM_Bus_RemoveEventHandler
Expand Down
16 changes: 11 additions & 5 deletions AVInput/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,12 @@ set(PLUGIN_NAME AVInput)
set(MODULE_NAME ${NAMESPACE}${PLUGIN_NAME})

find_package(${NAMESPACE}Plugins REQUIRED)
find_package(${NAMESPACE}Protocols REQUIRED)

if (USE_THUNDER_R4)
find_package(${NAMESPACE}COM REQUIRED)
else ()
find_package(${NAMESPACE}Protocols REQUIRED)
endif (USE_THUNDER_R4)

set(PLUGIN_AVINPUT_STARTUPORDER "" CACHE STRING "To configure startup order of AVInput plugin")

Expand All @@ -36,10 +41,11 @@ target_compile_definitions(${MODULE_NAME} PRIVATE MODULE_NAME=Plugin_${PLUGIN_NA

target_include_directories(${MODULE_NAME} PRIVATE ../helpers)

target_link_libraries(${MODULE_NAME}
PRIVATE
${NAMESPACE}Protocols::${NAMESPACE}Protocols
)
if (USE_THUNDER_R4)
target_link_libraries(${MODULE_NAME} PRIVATE ${NAMESPACE}COM::${NAMESPACE}COM)
else ()
target_link_libraries(${MODULE_NAME} PRIVATE ${NAMESPACE}Protocols::${NAMESPACE}Protocols)
endif (USE_THUNDER_R4)

find_package(DS)
find_package(IARMBus)
Expand Down
4 changes: 4 additions & 0 deletions CompositeInput/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ All notable changes to this RDK Service will be documented in this file.

* For more details, refer to [versioning](https://github.com/rdkcentral/rdkservices#versioning) section under Main README.

## [1.0.4] - 2023-06-05
### Added
- Added Support to build the plugin to both R4 & R2

## [1.0.3] - 2023-05-05
### Fixed
- Added Gunit test support
Expand Down
9 changes: 5 additions & 4 deletions CompositeInput/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,11 @@ set_target_properties(${MODULE_NAME} PROPERTIES

target_compile_definitions(${MODULE_NAME} PRIVATE MODULE_NAME=Plugin_${PLUGIN_NAME})

target_link_libraries(${MODULE_NAME}
PRIVATE
${NAMESPACE}Protocols::${NAMESPACE}Protocols
)
if (USE_THUNDER_R4)
target_link_libraries(${MODULE_NAME} PRIVATE ${NAMESPACE}COM::${NAMESPACE}COM)
else ()
target_link_libraries(${MODULE_NAME} PRIVATE ${NAMESPACE}Protocols::${NAMESPACE}Protocols)
endif (USE_THUNDER_R4)

find_package(DS)
find_package(IARMBus)
Expand Down
6 changes: 5 additions & 1 deletion ContinueWatching/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ All notable changes to this RDK Service will be documented in this file.

* For more details, refer to [versioning](https://github.com/rdkcentral/rdkservices#versioning) section under Main README.

## [1.0.2] - 2023-06-05
### Added
- Added Support to build the plugin to both R4 & R2

## [1.0.1] - 2023-5-18
### Fixed
- Fixed setApplicationToken call by regeneration of the key if it or cipher fails to load.
Expand All @@ -26,4 +30,4 @@ All notable changes to this RDK Service will be documented in this file.

### Change
- Reset API version to 1.0.0
- Change README to inform how to update changelog and API version
- Change README to inform how to update changelog and API version
16 changes: 11 additions & 5 deletions ContinueWatching/test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,11 @@
# limitations under the License.

set(PLUGIN_NAME CWTestThunderClient)
find_package(${NAMESPACE}Protocols REQUIRED)
if (USE_THUNDER_R4)
find_package(${NAMESPACE}COM REQUIRED)
else ()
find_package(${NAMESPACE}Protocols REQUIRED)
endif (USE_THUNDER_R4)

add_executable(${PLUGIN_NAME} CWTestThunderClient.cpp)

Expand All @@ -26,9 +30,11 @@ set_target_properties(${PLUGIN_NAME} PROPERTIES
)


target_link_libraries(${PLUGIN_NAME}
PRIVATE
${NAMESPACE}Protocols::${NAMESPACE}Protocols
)
if (USE_THUNDER_R4)
target_link_libraries(${PLUGIN_NAME} PRIVATE ${NAMESPACE}COM::${NAMESPACE}COM)
else ()
target_link_libraries(${PLUGIN_NAME} PRIVATE ${NAMESPACE}Protocols::${NAMESPACE}Protocols)
endif (USE_THUNDER_R4)


install(TARGETS ${PLUGIN_NAME} DESTINATION bin)
4 changes: 4 additions & 0 deletions ControlService/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ All notable changes to this RDK Service will be documented in this file.

* For more details, refer to [versioning](https://github.com/rdkcentral/rdkservices#versioning) section under Main README.

## [1.0.3] - 2023-06-05
### Added
- Added Support to build the plugin to both R4 & R2

## [1.0.2] - 2023-04-10
### Fixed
- Fixed warnings treated as errors for unit tests workflow
Expand Down
18 changes: 13 additions & 5 deletions ControlService/test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,13 @@
# limitations under the License.

set(PLUGIN_NAME controlSvcTestClient)
find_package(${NAMESPACE}Protocols REQUIRED)

if (USE_THUNDER_R4)
find_package(${NAMESPACE}COM REQUIRED)
find_package(${NAMESPACE}WebSocket REQUIRED)
else ()
find_package(${NAMESPACE}Protocols REQUIRED)
endif (USE_THUNDER_R4)

add_executable(${PLUGIN_NAME} controlSvcTestClient.cpp)

Expand All @@ -25,9 +31,11 @@ set_target_properties(${PLUGIN_NAME} PROPERTIES
CXX_STANDARD_REQUIRED YES
)

target_link_libraries(${PLUGIN_NAME}
PRIVATE
${NAMESPACE}Protocols::${NAMESPACE}Protocols
)
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)
4 changes: 4 additions & 0 deletions DeviceIdentification/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ All notable changes to this RDK Service will be documented in this file.

* For more details, refer to [versioning](https://github.com/rdkcentral/rdkservices#versioning) section under Main README.

## [1.0.3] - 2023-06-05
### Added
- Added Support to build the plugin to both R4 & R2

## [1.0.2] - 2022-11-03
### Fixed
- Fixed DeviceIdentification plugin activation issue
Expand Down
2 changes: 2 additions & 0 deletions DeviceIdentification/DeviceIdentification.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@
#pragma once

#include "Module.h"
#ifndef USE_THUNDER_R4
#include <interfaces/IDeviceIdentification.h>
#endif /* USE_THUNDER_R4 */
#include <interfaces/json/JsonData_DeviceIdentification.h>

namespace WPEFramework {
Expand Down
2 changes: 2 additions & 0 deletions DeviceIdentification/Implementation/Broadcom/Broadcom.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@
*/

#include "../../Module.h"
#ifndef USE_THUNDER_R4
#include <interfaces/IDeviceIdentification.h>
#endif /* USE_THUNDER_R4 */

#include <fstream>

Expand Down
4 changes: 4 additions & 0 deletions DeviceInfo/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ All notable changes to this RDK Service will be documented in this file.

* For more details, refer to [versioning](https://github.com/rdkcentral/rdkservices#versioning) section under Main README.

## [1.0.6] - 2023-06-05
### Added
- Added Support to build the plugin to both R4 & R2

## [1.0.5]
### Fixed
- Move IARMMgrs patches to generic layer
Expand Down
4 changes: 4 additions & 0 deletions DeviceInfo/DeviceInfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,11 @@ namespace Plugin {
// TODO RB: I guess we should do something here to return other info (e.g. time) as well.

result->ContentType = Web::MIMETypes::MIME_JSON;
#ifndef USE_THUNDER_R4
result->Body(Core::proxy_cast<Web::IBody>(response));
#else
result->Body(Core::ProxyType<Web::IBody>(response));
#endif /* USE_THUNDER_R4 */
} else {
result->ErrorCode = Web::STATUS_BAD_REQUEST;
result->Message = _T("Unsupported request for the [DeviceInfo] service.");
Expand Down
5 changes: 5 additions & 0 deletions DisplaySettings/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@ All notable changes to this RDK Service will be documented in this file.
* Changes in CHANGELOG should be updated when commits are added to the main or release branches. There should be one CHANGELOG entry per JIRA Ticket. This is not enforced on sprint branches since there could be multiple changes for the same JIRA ticket during development.

* For more details, refer to [versioning](https://github.com/rdkcentral/rdkservices#versioning) section under Main README.

## [1.0.23] - 2023-06-05
### Added
- Added Support to build the plugin to both R4 & R2

## [1.0.22] - 2023-04-26
### Fixed
- Fixed getVolumeLevel for HDMI_ARC0 port
Expand Down
9 changes: 8 additions & 1 deletion DisplaySettings/DisplaySettings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -169,8 +169,11 @@ namespace WPEFramework {

namespace {
// Display Settings should use inter faces

#ifndef USE_THUNDER_R4
class Job : public Core::IDispatchType<void> {
#else
class Job : public Core::IDispatch {
#endif /* USE_THUNDER_R4 */
public:
Job(std::function<void()> work)
: _work(work)
Expand Down Expand Up @@ -203,7 +206,11 @@ namespace WPEFramework {
{
uint32_t result = Core::ERROR_ASYNC_FAILED;
Core::Event event(false, true);
#ifndef USE_THUNDER_R4
Core::IWorkerPool::Instance().Submit(Core::ProxyType<Core::IDispatchType<void>>(Core::ProxyType<Job>::Create([&]() {
#else
Core::IWorkerPool::Instance().Submit(Core::ProxyType<Core::IDispatch>(Core::ProxyType<Job>::Create([&]() {
#endif /* USE_THUNDER_R4 */
auto interface = shell->QueryInterfaceByCallsign<PluginHost::IShell>(callsign);
if (interface == nullptr) {
result = Core::ERROR_UNAVAILABLE;
Expand Down
4 changes: 4 additions & 0 deletions HdcpProfile/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ All notable changes to this RDK Service will be documented in this file.

* For more details, refer to [versioning](https://github.com/rdkcentral/rdkservices#versioning) section under Main README.

## [1.0.5] - 2023-06-05
### Added
- Added Support to build the plugin to both R4 & R2

## [1.0.4] - 2023-02-09
### Fixed
- Fixed IARM_Bus_UnRegisterEventHandler call to IARM_Bus_RemoveEventHandler
Expand Down
15 changes: 10 additions & 5 deletions HdcpProfile/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,11 @@ set(PLUGIN_HDCPPROFILE_AUTOSTART "false" CACHE STRING "Automatically start HdcpP
set(PLUGIN_HDCPPROFILE_STARTUPORDER "" CACHE STRING "To configure startup order of HdcpProfile plugin")

find_package(${NAMESPACE}Plugins REQUIRED)
find_package(${NAMESPACE}Protocols REQUIRED)
if (USE_THUNDER_R4)
find_package(${NAMESPACE}COM REQUIRED)
else ()
find_package(${NAMESPACE}Protocols REQUIRED)
endif (USE_THUNDER_R4)

add_library(${MODULE_NAME} SHARED
HdcpProfile.cpp
Expand All @@ -34,10 +38,11 @@ set_target_properties(${MODULE_NAME} PROPERTIES

target_compile_definitions(${MODULE_NAME} PRIVATE MODULE_NAME=Plugin_${PLUGIN_NAME})

target_link_libraries(${MODULE_NAME}
PRIVATE
${NAMESPACE}Protocols::${NAMESPACE}Protocols
)
if (USE_THUNDER_R4)
target_link_libraries(${MODULE_NAME} PRIVATE ${NAMESPACE}COM::${NAMESPACE}COM)
else ()
target_link_libraries(${MODULE_NAME} PRIVATE ${NAMESPACE}Protocols::${NAMESPACE}Protocols)
endif (USE_THUNDER_R4)

find_package(DS)
find_package(IARMBus)
Expand Down
4 changes: 4 additions & 0 deletions HdmiInput/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ All notable changes to this RDK Service will be documented in this file.

* For more details, refer to [versioning](https://github.com/rdkcentral/rdkservices#versioning) section under Main README.

## [1.0.5] - 2023-06-05
### Added
- Added Support to build the plugin to both R4 & R2

## [1.0.4] - 2023-04-12
### Fixed
- Fixed IARM_Bus_UnRegisterEventHandler call to IARM_Bus_RemoveEventHandler
Expand Down
16 changes: 11 additions & 5 deletions HdmiInput/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,11 @@ set(MODULE_NAME ${NAMESPACE}${PLUGIN_NAME})
set(PLUGIN_HDMIINPUT_STARTUPORDER "" CACHE STRING "To configure startup order of HdmiInput plugin")

find_package(${NAMESPACE}Plugins REQUIRED)
find_package(${NAMESPACE}Protocols REQUIRED)
if (USE_THUNDER_R4)
find_package(${NAMESPACE}COM REQUIRED)
else ()
find_package(${NAMESPACE}Protocols REQUIRED)
endif (USE_THUNDER_R4)

add_library(${MODULE_NAME} SHARED
HdmiInput.cpp
Expand All @@ -36,10 +40,12 @@ target_compile_definitions(${MODULE_NAME} PRIVATE MODULE_NAME=Plugin_${PLUGIN_NA

target_include_directories(${MODULE_NAME} PRIVATE ../helpers)

target_link_libraries(${MODULE_NAME}
PRIVATE
${NAMESPACE}Protocols::${NAMESPACE}Protocols
)
if (USE_THUNDER_R4)
target_link_libraries(${MODULE_NAME} PRIVATE ${NAMESPACE}COM::${NAMESPACE}COM)
else ()
target_link_libraries(${MODULE_NAME} PRIVATE ${NAMESPACE}Protocols::${NAMESPACE}Protocols)
endif (USE_THUNDER_R4)


find_package(DS)
find_package(IARMBus)
Expand Down
6 changes: 5 additions & 1 deletion LocationSync/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,14 @@ All notable changes to this RDK Service will be documented in this file.

* For more details, refer to [versioning](https://github.com/rdkcentral/rdkservices#versioning) section under Main README.

## [1.0.1] - 2023-06-05
### Added
- Added Support to build the plugin to both R4 & R2

## [1.0.0] - 2022-05-11
### Added
- Add CHANGELOG

### Change
- Reset API version to 1.0.0
- Change README to inform how to update changelog and API version
- Change README to inform how to update changelog and API version
12 changes: 12 additions & 0 deletions LocationSync/LocationService.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,11 @@ namespace Plugin {
#ifdef __WINDOWS__
#pragma warning(disable : 4355)
#endif
#ifndef USE_THUNDER_R4
LocationService::LocationService(Core::IDispatchType<void>* callback)
#else
LocationService::LocationService(Core::IDispatch* callback)
#endif /* USE_THUNDER_R4 */
: BaseClass(1, g_Factory, false, Core::NodeId(), Core::NodeId(), 256, 1024)
, _adminLock()
, _state(IDLE)
Expand Down Expand Up @@ -436,7 +440,11 @@ namespace Plugin {

ASSERT(_infoCarrier.IsValid() == true);

#ifndef USE_THUNDER_R4
element->Body<Web::IBody>(Core::proxy_cast<Web::IBody>(Core::ProxyType<Web::TextBody>::Create()));
#else
element->Body<Web::IBody>(Core::ProxyType<Web::IBody>(Core::ProxyType<Web::TextBody>::Create()));
#endif
}
}

Expand Down Expand Up @@ -591,7 +599,11 @@ namespace Plugin {

// See if we need rescheduling
if (result != Core::infinite) {
#ifndef USE_THUNDER_R4
_activity.Schedule(Core::Time::Now().Add(result));
#else
_activity.Reschedule(Core::Time::Now().Add(result));
#endif /* USE_THUNDER_R4 */
}
}

Expand Down
4 changes: 4 additions & 0 deletions LocationSync/LocationService.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,11 @@ namespace Plugin {
typedef Web::WebLinkType<Core::SocketStream, Web::Response, Web::Request, Core::ProxyPoolType<Web::Response>&> BaseClass;

public:
#ifndef USE_THUNDER_R4
LocationService(Core::IDispatchType<void>* update);
#else
LocationService(Core::IDispatch* update);
#endif /* USE_THUNDER_R4 */
~LocationService() override;

public:
Expand Down
Loading

0 comments on commit 1403b9f

Please sign in to comment.