Skip to content

Commit

Permalink
Merge pull request #5530 from npoltorapavlo/DELIA-65243_main
Browse files Browse the repository at this point in the history
Delia 65243 main
  • Loading branch information
anand-ky authored Jul 15, 2024
2 parents 1bfa6a3 + b249451 commit 547af1e
Show file tree
Hide file tree
Showing 8 changed files with 27 additions and 57 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/L2-PersistentStore.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
- name: Build
working-directory: ${{github.workspace}}
run: |
cmake -S ${GITHUB_REPOSITORY}/PersistentStore -B build/PersistentStore -DCMAKE_INSTALL_PREFIX="install" -DCMAKE_CXX_FLAGS="-Wall -Werror" -DPLUGIN_PERSISTENTSTORE_PATH="/tmp/persistentstore/l2test/test"
cmake -S ${GITHUB_REPOSITORY}/PersistentStore -B build/PersistentStore -DCMAKE_INSTALL_PREFIX="install" -DCMAKE_CXX_FLAGS="-Wall -Werror" -DPLUGIN_PERSISTENTSTORE_PATH="/tmp/persistentstore/l2test/test" -DPLUGIN_PERSISTENTSTORE_WITH_ACCOUNT_SCOPE=true -DPLUGIN_PERSISTENTSTORE_MODE=Local -DPLUGIN_PERSISTENTSTORE_URI=ss.eu.prod.developer.comcast.com:443
cmake --build build/PersistentStore --target install
# Usage:
Expand Down
4 changes: 4 additions & 0 deletions PersistentStore/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.15] - 2024-07-15
### Fixed
- Update secure store endpoints, no default.

## [1.0.14] - 2024-06-14
### Fixed
- Spawn 1 process instead of 2
Expand Down
14 changes: 4 additions & 10 deletions PersistentStore/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,19 +18,13 @@
cmake_minimum_required(VERSION 3.14)

set(PLUGIN_NAME PersistentStore)
find_package(WPEFramework)
if (NOT WPEFramework_FOUND)
find_package(Thunder)
if (Thunder_FOUND)
add_compile_definitions(WITH_THUNDER_NAMESPACE)
endif ()
endif ()
find_package(WPEFramework NAMES WPEFramework Thunder)
set(MODULE_NAME ${NAMESPACE}${PLUGIN_NAME})

set(CMAKE_CXX_STANDARD 11)

set(PLUGIN_PERSISTENTSTORE_MODE "Local" CACHE STRING "Controls if the plugin should run in its own process, in process or remote")
set(PLUGIN_PERSISTENTSTORE_URI "ss.eu.prod.developer.comcast.com:443" CACHE STRING "Account scope endpoint")
set(PLUGIN_PERSISTENTSTORE_MODE "Off" CACHE STRING "Controls if the plugin should run in its own process, in process or remote")
set(PLUGIN_PERSISTENTSTORE_URI "" CACHE STRING "Account scope endpoint")
set(PLUGIN_PERSISTENTSTORE_PATH "/opt/secure/persistent/rdkservicestore" CACHE STRING "Path")
set(PLUGIN_PERSISTENTSTORE_LEGACYPATH "/opt/persistent/rdkservicestore" CACHE STRING "Previously used path")
set(PLUGIN_PERSISTENTSTORE_KEY "" CACHE STRING "Encryption key")
Expand All @@ -39,7 +33,7 @@ set(PLUGIN_PERSISTENTSTORE_MAXVALUE "3000" CACHE STRING "For single text data, i
set(PLUGIN_PERSISTENTSTORE_LIMIT "10000" CACHE STRING "Default for all text data in namespace, in bytes")
set(PLUGIN_PERSISTENTSTORE_TOKEN_COMMAND "" CACHE STRING "Shell command to get the service access token")
set(PLUGIN_PERSISTENTSTORE_STARTUPORDER "" CACHE STRING "To configure startup order of PersistentStore plugin")
set(PLUGIN_PERSISTENTSTORE_WITH_ACCOUNT_SCOPE true CACHE BOOL "Enable account scope")
set(PLUGIN_PERSISTENTSTORE_WITH_ACCOUNT_SCOPE false CACHE BOOL "Enable account scope")

add_library(${MODULE_NAME} SHARED
PersistentStore.cpp
Expand Down
32 changes: 14 additions & 18 deletions PersistentStore/PersistentStore.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,29 +25,25 @@

#define API_VERSION_NUMBER_MAJOR 1
#define API_VERSION_NUMBER_MINOR 0
#define API_VERSION_NUMBER_PATCH 14
#define API_VERSION_NUMBER_PATCH 15

namespace WPEFramework {

namespace {

#ifdef WITH_THUNDER_NAMESPACE
static Thunder::Plugin::Metadata<Plugin::PersistentStore> metadata(
#else
static Plugin::Metadata<Plugin::PersistentStore> metadata(
#endif
// Version (Major, Minor, Patch)
API_VERSION_NUMBER_MAJOR, API_VERSION_NUMBER_MINOR, API_VERSION_NUMBER_PATCH,
// Preconditions
{},
// Terminations
{},
// Controls
{});
}

namespace Plugin {

namespace {

static Metadata<PersistentStore> metadata(
// Version (Major, Minor, Patch)
API_VERSION_NUMBER_MAJOR, API_VERSION_NUMBER_MINOR, API_VERSION_NUMBER_PATCH,
// Preconditions
{},
// Terminations
{},
// Controls
{});
}

SERVICE_REGISTRATION(PersistentStore, API_VERSION_NUMBER_MAJOR, API_VERSION_NUMBER_MINOR, API_VERSION_NUMBER_PATCH);

const string PersistentStore::Initialize(PluginHost::IShell* service)
Expand Down
8 changes: 1 addition & 7 deletions PersistentStore/grpc/l0test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,7 @@ FetchContent_Declare(
FetchContent_MakeAvailable(googletest)
target_link_libraries(${PROJECT_NAME} PRIVATE gmock_main)

find_package(WPEFramework)
if (NOT WPEFramework_FOUND)
find_package(Thunder)
if (Thunder_FOUND)
add_compile_definitions(WITH_THUNDER_NAMESPACE)
endif ()
endif ()
find_package(WPEFramework NAMES WPEFramework Thunder)
find_package(${NAMESPACE}Plugins REQUIRED)
target_link_libraries(${PROJECT_NAME} PRIVATE ${NAMESPACE}Plugins::${NAMESPACE}Plugins)

Expand Down
8 changes: 1 addition & 7 deletions PersistentStore/l0test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,7 @@ FetchContent_Declare(
)
FetchContent_MakeAvailable(googletest)

find_package(WPEFramework)
if (NOT WPEFramework_FOUND)
find_package(Thunder)
if (Thunder_FOUND)
add_compile_definitions(WITH_THUNDER_NAMESPACE)
endif ()
endif ()
find_package(WPEFramework NAMES WPEFramework Thunder)
find_package(${NAMESPACE}Plugins REQUIRED)
find_package(${NAMESPACE}Definitions REQUIRED)

Expand Down
8 changes: 1 addition & 7 deletions PersistentStore/l1test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,7 @@ FetchContent_Declare(
)
FetchContent_MakeAvailable(googletest)

find_package(WPEFramework)
if (NOT WPEFramework_FOUND)
find_package(Thunder)
if (Thunder_FOUND)
add_compile_definitions(WITH_THUNDER_NAMESPACE)
endif ()
endif ()
find_package(WPEFramework NAMES WPEFramework Thunder)
find_package(${NAMESPACE}Plugins REQUIRED)
find_package(${NAMESPACE}Definitions REQUIRED)

Expand Down
8 changes: 1 addition & 7 deletions PersistentStore/sqlite/l1test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,7 @@ FetchContent_Declare(
)
FetchContent_MakeAvailable(googletest)

find_package(WPEFramework)
if (NOT WPEFramework_FOUND)
find_package(Thunder)
if (Thunder_FOUND)
add_compile_definitions(WITH_THUNDER_NAMESPACE)
endif ()
endif ()
find_package(WPEFramework NAMES WPEFramework Thunder)
find_package(${NAMESPACE}Plugins REQUIRED)

add_executable(${PROJECT_NAME}
Expand Down

0 comments on commit 547af1e

Please sign in to comment.