Skip to content

Commit b65f70b

Browse files
authored
Merge branch 'rdkcentral:sprint/24Q4' into sprint/24Q4
2 parents 613b14e + c821a16 commit b65f70b

23 files changed

+1369
-47
lines changed
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: L2-ContentProtection
2+
3+
on:
4+
push:
5+
paths:
6+
- ContentProtection/**
7+
- .github/workflows/*ContentProtection*.yml
8+
pull_request:
9+
paths:
10+
- ContentProtection/**
11+
- .github/workflows/*ContentProtection*.yml
12+
13+
jobs:
14+
build:
15+
runs-on: ubuntu-latest
16+
17+
steps:
18+
- uses: actions/checkout@v4
19+
with:
20+
path: ${{github.repository}}
21+
22+
- name: Install cmake
23+
run: |
24+
sudo apt update
25+
sudo apt install -y cmake
26+
27+
- name: Build Thunder
28+
working-directory: ${{github.workspace}}
29+
run: sh +x ${GITHUB_REPOSITORY}/.github/workflows/BuildThunder.sh
30+
31+
- name: Build
32+
working-directory: ${{github.workspace}}
33+
run: |
34+
cmake -S ${GITHUB_REPOSITORY}/ContentProtection -B build/ContentProtection -DCMAKE_INSTALL_PREFIX="install" -DCMAKE_CXX_FLAGS="-Wall -Werror"
35+
cmake --build build/ContentProtection --target install

Analytics/Analytics.json

Lines changed: 12 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"info": {
55
"title": "Analytics API",
66
"class": "Analytics",
7-
"description": "The `Analytics` plugin allows sending analytics events to dedicated backends."
7+
"description": "The `Analytics` plugin allows sending analytics events to dedicated backends. Currently the SIFT backend is supported."
88
},
99
"common": {
1010
"$ref": "../common/common.json"
@@ -49,17 +49,20 @@
4949
"example": 35000
5050
},
5151
"eventPayload":{
52-
"summary": "The payload of the event",
52+
"summary": "Custom payload of the event in JSON format. User defined colection of objects and keys. May be an empty object",
5353
"type": "object",
54-
"example": {
55-
"key1": "value1",
56-
"key2": "value2"
54+
"properties": {
55+
"keyOrObject": {
56+
"summary": "User defined custom key or object",
57+
"type": "string",
58+
"example": "value1"
59+
}
5760
}
5861
}
5962
},
6063
"methods": {
6164
"sendEvent":{
62-
"summary": "Send event",
65+
"summary": "Enqueue an event to be sent to the SIFT analytics backend",
6366
"params": {
6467
"type":"object",
6568
"properties": {
@@ -97,32 +100,9 @@
97100
]
98101
},
99102
"result": {
100-
"$ref": "#/common/result"
101-
}
102-
},
103-
"setSessionId" : {
104-
"summary": "Set the session ID for the analytics events",
105-
"params": {
106-
"type":"object",
107-
"properties": {
108-
"sessionId":{
109-
"summary": "Session ID",
110-
"type": "string",
111-
"example": "1234567890"
112-
}
113-
},
114-
"required": [
115-
"sessionId"
116-
]
117-
},
118-
"result": {
119-
"$ref": "#/common/result"
120-
}
121-
},
122-
"setTimeReady" : {
123-
"summary": "Let the analytics plugin know that the system time is ready and valid",
124-
"result": {
125-
"$ref": "#/common/result"
103+
"summary": "On success null will be returned",
104+
"type": "string",
105+
"example": "null"
126106
}
127107
}
128108
}

Analytics/AnalyticsPlugin.json

Lines changed: 119 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,120 @@
11
{
2-
"$schema": "https://raw.githubusercontent.com/rdkcentral/rdkservices/main/Tools/json_generator/schemas/plugin.schema.json",
3-
"info": {
4-
"title": "Analytics Plugin",
5-
"callsign": "org.rdk.Analytics",
6-
"locator": "libWPEFrameworkAnalytics.so",
7-
"status": "development",
8-
"description": "The `Analytics` plugin allows to send analytics events to dedicated backends."
9-
},
10-
"interface": {
11-
"$ref": "Analytics.json#"
12-
}
13-
}
2+
"$schema":"https://raw.githubusercontent.com/rdkcentral/rdkservices/main/Tools/json_generator/schemas/plugin.schema.json",
3+
"info":{
4+
"title":"Analytics Plugin",
5+
"callsign":"org.rdk.Analytics",
6+
"locator":"libWPEFrameworkAnalytics.so",
7+
"status":"development",
8+
"description":"The `Analytics` plugin allows to send analytics events to dedicated backends. Currently the SIFT backend is supported."
9+
},
10+
"configuration":{
11+
"type":"object",
12+
"properties":{
13+
"configuration":{
14+
"type":"object",
15+
"properties":{
16+
"deviceosname":{
17+
"description":"Device OS name",
18+
"type":"string"
19+
},
20+
"sift":{
21+
"type":"object",
22+
"properties":{
23+
"schema2":{
24+
"description":"If true, enables Sift 2.0 schema, otherwise uses Sift 1.0 schema",
25+
"type":"boolean"
26+
},
27+
"commonschema":{
28+
"description":"Sift schema common schema",
29+
"type":"string"
30+
},
31+
"env":{
32+
"description":"Sift schema environment",
33+
"type":"string"
34+
},
35+
"productname":{
36+
"description":"Sift schema product name",
37+
"type":"string"
38+
},
39+
"loggername":{
40+
"description":"Sift schema logger name",
41+
"type":"string"
42+
},
43+
"loggerversion":{
44+
"description":"Sift schema logger version",
45+
"type":"string"
46+
},
47+
"platformdefault":{
48+
"description":"Sift schema platform default value",
49+
"type":"string"
50+
},
51+
"maxrandomisationwindowtime":{
52+
"description":"Sift uploader max randomisation window time of posting queued events in seconds",
53+
"type":"number"
54+
},
55+
"maxeventsinpost":{
56+
"description":"Sift uploader max events in single post",
57+
"type":"number"
58+
},
59+
"maxretries":{
60+
"description":"Sift uploader max retries posting events",
61+
"type":"number"
62+
},
63+
"minretryperiod":{
64+
"description":"Sift uploader min retry period seconds",
65+
"type":"number"
66+
},
67+
"maxretryperiod":{
68+
"description":"Sift uploader max retry period seconds",
69+
"type":"number"
70+
},
71+
"exponentialperiodicfactor":{
72+
"description":"Sift uploader exponential periodic factor for retry delay",
73+
"type":"number"
74+
},
75+
"storepath":{
76+
"description":"Sift store path to persistent queue with events",
77+
"type":"number"
78+
},
79+
"eventslimit":{
80+
"description":"Sift store events limit",
81+
"type":"number"
82+
},
83+
"url":{
84+
"description":"URL to Sift server endpoint",
85+
"type":"string"
86+
}
87+
},
88+
"required":[
89+
"schema2",
90+
"commonschema",
91+
"productname",
92+
"loggername",
93+
"loggerversion",
94+
"platformdefault",
95+
"maxrandomisationwindowtime",
96+
"maxeventsinpost",
97+
"maxretries",
98+
"minretryperiod",
99+
"maxretryperiod",
100+
"exponentialperiodicfactor",
101+
"storepath",
102+
"eventslimit",
103+
"url"
104+
]
105+
}
106+
},
107+
"required":[
108+
"deviceosname",
109+
"sift"
110+
]
111+
}
112+
},
113+
"required":[
114+
"configuration"
115+
]
116+
},
117+
"interface":{
118+
"$ref":"Analytics.json#"
119+
}
120+
}

CMakeLists.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -417,6 +417,10 @@ if(PLUGIN_MIGRATIONPREPARER)
417417
add_subdirectory(MigrationPreparer)
418418
endif()
419419

420+
if(PLUGIN_CONTENTPROTECTION)
421+
add_subdirectory(ContentProtection)
422+
endif()
423+
420424
if(WPEFRAMEWORK_CREATE_IPKG_TARGETS)
421425
set(CPACK_GENERATOR "DEB")
422426
set(CPACK_DEB_COMPONENT_INSTALL ON)

ContentProtection/CHANGELOG.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Changelog
2+
3+
All notable changes to this RDK Service will be documented in this file.
4+
5+
* Each RDK Service has a CHANGELOG file that contains all changes done so far. When version is updated, add a entry in the CHANGELOG.md at the top with user friendly information on what was changed with the new version. Please don't mention JIRA tickets in CHANGELOG.
6+
7+
* Please Add entry in the CHANGELOG for each version change and indicate the type of change with these labels:
8+
* **Added** for new features.
9+
* **Changed** for changes in existing functionality.
10+
* **Deprecated** for soon-to-be removed features.
11+
* **Removed** for now removed features.
12+
* **Fixed** for any bug fixes.
13+
* **Security** in case of vulnerabilities.
14+
15+
* 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.
16+
17+
* For more details, refer to [versioning](https://github.com/rdkcentral/rdkservices#versioning) section under Main README.
18+
19+
## [1.0.0] - 2024-07-15
20+
### Added
21+
- Add CHANGELOG
22+
23+
### Change
24+
- Reset API version to 1.0.0
25+
- Change README to inform how to update changelog and API version

ContentProtection/CMakeLists.txt

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# If not stated otherwise in this file or this component's LICENSE file the
2+
# following copyright and licenses apply:
3+
#
4+
# Copyright 2022 RDK Management
5+
#
6+
# Licensed under the Apache License, Version 2.0 (the "License");
7+
# you may not use this file except in compliance with the License.
8+
# You may obtain a copy of the License at
9+
#
10+
# http://www.apache.org/licenses/LICENSE-2.0
11+
#
12+
# Unless required by applicable law or agreed to in writing, software
13+
# distributed under the License is distributed on an "AS IS" BASIS,
14+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
# See the License for the specific language governing permissions and
16+
# limitations under the License.
17+
18+
cmake_minimum_required(VERSION 3.14)
19+
20+
set(PLUGIN_NAME ContentProtection)
21+
find_package(WPEFramework NAMES WPEFramework Thunder)
22+
set(MODULE_NAME ${NAMESPACE}${PLUGIN_NAME})
23+
24+
set(CMAKE_CXX_STANDARD 11)
25+
26+
set(PLUGIN_CONTENTPROTECTION_STARTUPORDER "" CACHE STRING "To configure startup order of the plugin")
27+
set(PLUGIN_CONTENTPROTECTION_AUTOSTART false CACHE STRING "To automatically start the plugin")
28+
29+
add_library(${MODULE_NAME} SHARED
30+
ContentProtection.cpp
31+
Module.cpp
32+
)
33+
34+
find_package(${NAMESPACE}Plugins REQUIRED)
35+
find_package(${NAMESPACE}Definitions REQUIRED)
36+
target_link_libraries(${MODULE_NAME} PRIVATE
37+
${NAMESPACE}Plugins::${NAMESPACE}Plugins
38+
${NAMESPACE}Definitions::${NAMESPACE}Definitions
39+
)
40+
41+
install(TARGETS ${MODULE_NAME}
42+
DESTINATION lib/${STORAGE_DIRECTORY}/plugins)
43+
44+
write_config(${PLUGIN_NAME})
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
precondition = ["Platform"]
2+
callsign = "org.rdk.ContentProtection"
3+
autostart = "@PLUGIN_CONTENTPROTECTION_AUTOSTART@"
4+
startuporder = "@PLUGIN_CONTENTPROTECTION_STARTUPORDER@"
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
set(autostart ${PLUGIN_CONTENTPROTECTION_AUTOSTART})
2+
set(preconditions Platform)
3+
set(callsign "org.rdk.ContentProtection")
4+
5+
if(PLUGIN_CONTENTPROTECTION_STARTUPORDER)
6+
set (startuporder ${PLUGIN_CONTENTPROTECTION_STARTUPORDER})
7+
endif()

0 commit comments

Comments
 (0)