diff --git a/.github/workflows/L2-PersistentStore.yml b/.github/workflows/L2-PersistentStore.yml index 6dc09ba171..73b1b41762 100644 --- a/.github/workflows/L2-PersistentStore.yml +++ b/.github/workflows/L2-PersistentStore.yml @@ -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: diff --git a/PersistentStore/CMakeLists.txt b/PersistentStore/CMakeLists.txt index 429bec4f2a..3a19f4c1fb 100644 --- a/PersistentStore/CMakeLists.txt +++ b/PersistentStore/CMakeLists.txt @@ -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") @@ -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 diff --git a/PersistentStore/PersistentStore.cpp b/PersistentStore/PersistentStore.cpp index 9a67d6f437..f508217482 100644 --- a/PersistentStore/PersistentStore.cpp +++ b/PersistentStore/PersistentStore.cpp @@ -29,25 +29,21 @@ namespace WPEFramework { -namespace { - -#ifdef WITH_THUNDER_NAMESPACE - static Thunder::Plugin::Metadata metadata( -#else - static Plugin::Metadata 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 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) diff --git a/PersistentStore/grpc/l0test/CMakeLists.txt b/PersistentStore/grpc/l0test/CMakeLists.txt index 520fb656df..bbfa97c27c 100644 --- a/PersistentStore/grpc/l0test/CMakeLists.txt +++ b/PersistentStore/grpc/l0test/CMakeLists.txt @@ -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) diff --git a/PersistentStore/l0test/CMakeLists.txt b/PersistentStore/l0test/CMakeLists.txt index 8a7675f16d..0d930a75c7 100644 --- a/PersistentStore/l0test/CMakeLists.txt +++ b/PersistentStore/l0test/CMakeLists.txt @@ -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) diff --git a/PersistentStore/l1test/CMakeLists.txt b/PersistentStore/l1test/CMakeLists.txt index 13edcf8f87..456dc98abc 100644 --- a/PersistentStore/l1test/CMakeLists.txt +++ b/PersistentStore/l1test/CMakeLists.txt @@ -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) diff --git a/PersistentStore/sqlite/l1test/CMakeLists.txt b/PersistentStore/sqlite/l1test/CMakeLists.txt index b69de898b7..bec8ff220e 100644 --- a/PersistentStore/sqlite/l1test/CMakeLists.txt +++ b/PersistentStore/sqlite/l1test/CMakeLists.txt @@ -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}