Skip to content

Commit 6df1f18

Browse files
authored
feat: Firebolt Client for RDK-8 (#10)
A subset of APIs that have been agreed upon so far.
2 parents 8bf8d67 + 2f3000a commit 6df1f18

File tree

97 files changed

+5426
-6000
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

97 files changed

+5426
-6000
lines changed

.clang-format

Lines changed: 186 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,186 @@
1+
# vim: ft=yaml
2+
Language: Cpp
3+
# BasedOnStyle: LLVM
4+
AccessModifierOffset: -4
5+
AlignAfterOpenBracket: Align
6+
AlignConsecutiveMacros:
7+
Enabled: false
8+
AcrossEmptyLines: false
9+
AcrossComments: false
10+
AlignCompound: false
11+
AlignFunctionPointers: false
12+
PadOperators: true
13+
AlignConsecutiveAssignments:
14+
Enabled: false
15+
AcrossEmptyLines: false
16+
AcrossComments: false
17+
AlignCompound: false
18+
AlignFunctionPointers: false
19+
PadOperators: true
20+
AlignConsecutiveBitFields:
21+
Enabled: false
22+
AcrossEmptyLines: false
23+
AcrossComments: false
24+
AlignCompound: false
25+
AlignFunctionPointers: false
26+
PadOperators: true
27+
AlignConsecutiveDeclarations:
28+
Enabled: false
29+
AcrossEmptyLines: false
30+
AcrossComments: false
31+
AlignCompound: false
32+
AlignFunctionPointers: false
33+
PadOperators: true
34+
AlignEscapedNewlines: Right
35+
AlignOperands: Align
36+
AlignTrailingComments: true
37+
AllowAllArgumentsOnNextLine: true
38+
AllowAllConstructorInitializersOnNextLine: true
39+
AllowAllParametersOfDeclarationOnNextLine: true
40+
AllowShortEnumsOnASingleLine: true
41+
AllowShortBlocksOnASingleLine: Never
42+
AllowShortCaseLabelsOnASingleLine: false
43+
AllowShortFunctionsOnASingleLine: Inline
44+
AllowShortLambdasOnASingleLine: All
45+
AllowShortIfStatementsOnASingleLine: Never
46+
AllowShortLoopsOnASingleLine: false
47+
AlwaysBreakAfterDefinitionReturnType: None
48+
AlwaysBreakAfterReturnType: None
49+
AlwaysBreakBeforeMultilineStrings: false
50+
AlwaysBreakTemplateDeclarations: MultiLine
51+
AttributeMacros:
52+
- __capability
53+
BinPackArguments: true
54+
BinPackParameters: true
55+
BitFieldColonSpacing: Both
56+
BraceWrapping:
57+
AfterCaseLabel: false
58+
AfterClass: false
59+
AfterControlStatement: Never
60+
AfterEnum: false
61+
AfterFunction: false
62+
AfterNamespace: false
63+
AfterObjCDeclaration: false
64+
AfterStruct: false
65+
AfterUnion: false
66+
AfterExternBlock: false
67+
BeforeCatch: false
68+
BeforeElse: false
69+
BeforeLambdaBody: false
70+
BeforeWhile: false
71+
IndentBraces: false
72+
SplitEmptyFunction: true
73+
SplitEmptyRecord: true
74+
SplitEmptyNamespace: true
75+
BreakBeforeBinaryOperators: None
76+
BreakBeforeConceptDeclarations: true
77+
BreakBeforeBraces: Allman
78+
BreakBeforeInheritanceComma: false
79+
BreakInheritanceList: BeforeColon
80+
BreakBeforeTernaryOperators: true
81+
BreakConstructorInitializersBeforeComma: false
82+
BreakConstructorInitializers: BeforeColon
83+
BreakAfterJavaFieldAnnotations: false
84+
BreakStringLiterals: true
85+
ColumnLimit: 120
86+
CommentPragmas: "^ IWYU pragma:"
87+
CompactNamespaces: false
88+
ConstructorInitializerAllOnOneLineOrOnePerLine: false
89+
ConstructorInitializerIndentWidth: 4
90+
ContinuationIndentWidth: 4
91+
Cpp11BracedListStyle: true
92+
DeriveLineEnding: true
93+
DerivePointerAlignment: false
94+
DisableFormat: false
95+
EmptyLineBeforeAccessModifier: LogicalBlock
96+
ExperimentalAutoDetectBinPacking: false
97+
FixNamespaceComments: true
98+
ForEachMacros:
99+
- foreach
100+
- Q_FOREACH
101+
- BOOST_FOREACH
102+
IncludeBlocks: Preserve
103+
IncludeCategories:
104+
- Regex: ^"(llvm|llvm-c|clang|clang-c)/
105+
Priority: 2
106+
SortPriority: 0
107+
CaseSensitive: false
108+
- Regex: ^(<|"(gtest|gmock|isl|json)/)
109+
Priority: 3
110+
SortPriority: 0
111+
CaseSensitive: false
112+
- Regex: .*
113+
Priority: 1
114+
SortPriority: 0
115+
CaseSensitive: false
116+
IncludeIsMainRegex: (Test)?$
117+
IncludeIsMainSourceRegex: ""
118+
IndentCaseLabels: false
119+
IndentCaseBlocks: false
120+
IndentGotoLabels: true
121+
IndentPPDirectives: None
122+
IndentExternBlock: AfterExternBlock
123+
IndentRequires: false
124+
IndentWidth: 4
125+
IndentWrappedFunctionNames: false
126+
InsertNewlineAtEOF: false
127+
InsertTrailingCommas: None
128+
JavaScriptQuotes: Leave
129+
JavaScriptWrapImports: true
130+
KeepEmptyLinesAtTheStartOfBlocks: true
131+
MacroBlockBegin: ""
132+
MacroBlockEnd: ""
133+
MaxEmptyLinesToKeep: 1
134+
NamespaceIndentation: None
135+
PackConstructorInitializers: Never
136+
PenaltyBreakAssignment: 20
137+
PenaltyBreakBeforeFirstCallParameter: 1000
138+
PenaltyBreakComment: 200
139+
PenaltyBreakFirstLessLess: 125
140+
PenaltyBreakString: 1000
141+
PenaltyBreakTemplateDeclaration: 10
142+
PenaltyExcessCharacter: 10
143+
PenaltyReturnTypeOnItsOwnLine: 60
144+
PenaltyIndentedWhitespace: 0
145+
PointerAlignment: Left
146+
QualifierAlignment: Left
147+
ReflowComments: true
148+
SortIncludes: CaseSensitive
149+
SortJavaStaticImport: Before
150+
SortUsingDeclarations: true
151+
SpaceAfterCStyleCast: false
152+
SpaceAfterLogicalNot: false
153+
SpaceAfterTemplateKeyword: true
154+
SpaceBeforeAssignmentOperators: true
155+
SpaceBeforeCaseColon: false
156+
SpaceBeforeCpp11BracedList: false
157+
SpaceBeforeCtorInitializerColon: true
158+
SpaceBeforeInheritanceColon: true
159+
SpaceBeforeParens: ControlStatements
160+
SpaceAroundPointerQualifiers: Default
161+
SpaceBeforeRangeBasedForLoopColon: true
162+
SpaceInEmptyBlock: false
163+
SpaceInEmptyParentheses: false
164+
SpacesBeforeTrailingComments: 1
165+
SpacesInAngles: false
166+
SpacesInConditionalStatement: false
167+
SpacesInContainerLiterals: true
168+
SpacesInCStyleCastParentheses: false
169+
SpacesInParentheses: false
170+
SpacesInSquareBrackets: false
171+
SpaceBeforeSquareBrackets: false
172+
StatementAttributeLikeMacros:
173+
- Q_EMIT
174+
Standard: c++17
175+
StatementMacros:
176+
- Q_UNUSED
177+
- QT_REQUIRE_VERSION
178+
TabWidth: 8
179+
UseCRLF: false
180+
UseTab: Never
181+
WhitespaceSensitiveMacros:
182+
- STRINGIZE
183+
- PP_STRINGIZE
184+
- BOOST_PP_STRINGIZE
185+
- NS_SWIFT_NAME
186+
- CF_SWIFT_NAME

.github/Dockerfile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ RUN mkdir -p /deps
2727
ARG DEPS_GOOGLETEST_V="1.15.2"
2828
RUN cd /deps \
2929
&& dir="googletest-${DEPS_GOOGLETEST_V}" \
30-
&& curl -sL https://github.com/google/googletest/releases/download/v${DEPS_GOOGLETEST_V}/$dir.tar.gz | tar xzf - \
30+
&& i=0 && while ! curl -sL https://github.com/google/googletest/releases/download/v${DEPS_GOOGLETEST_V}/$dir.tar.gz | tar xzf -; do test "$i" -eq 5 && exit 1; i=$((i+1)); sleep 1; done \
3131
&& cmake -B "build/$dir" \
3232
-DCMAKE_BUILD_TYPE=Release \
3333
-DBUILD_SHARED_LIBS=ON \
@@ -50,7 +50,7 @@ RUN cd /deps \
5050
ARG DEPS_JSON_SCHEMA_VALIDATOR_V="2.3.0"
5151
RUN cd /deps \
5252
&& dir="json-schema-validator-${DEPS_JSON_SCHEMA_VALIDATOR_V}" \
53-
&& curl -sL https://github.com/pboettch/json-schema-validator/archive/refs/tags/${DEPS_JSON_SCHEMA_VALIDATOR_V}.tar.gz | tar xzf - \
53+
&& i=0 && while ! curl -sL https://github.com/pboettch/json-schema-validator/archive/refs/tags/${DEPS_JSON_SCHEMA_VALIDATOR_V}.tar.gz | tar xzf - ; do test "$i" -eq 5 && exit 1; i=$((i+1)); sleep 1; done \
5454
&& cmake -B "build/$dir" \
5555
-DCMAKE_BUILD_TYPE=Release \
5656
-DBUILD_SHARED_LIBS=ON \
@@ -63,7 +63,7 @@ RUN cd /deps \
6363
ARG DEPS_WEBSOCKETPP_V="0.8.2"
6464
RUN cd /deps \
6565
&& dir="websocketpp-${DEPS_WEBSOCKETPP_V}" \
66-
&& curl -sL https://github.com/zaphoyd/websocketpp/archive/refs/tags/${DEPS_WEBSOCKETPP_V}.tar.gz | tar xzf - \
66+
&& i=0 && while ! curl -sL https://github.com/zaphoyd/websocketpp/archive/refs/tags/${DEPS_WEBSOCKETPP_V}.tar.gz | tar xzf - ; do test "$i" -eq 5 && exit 1; i=$((i+1)); sleep 1; done \
6767
&& cmake -B "build/$dir" \
6868
-DCMAKE_BUILD_TYPE=Release \
6969
-DBUILD_SHARED_LIBS=ON \
@@ -83,7 +83,7 @@ RUN pip install --break-system-packages gcovr
8383
ARG DEPS_TRANSPORT_V
8484
RUN cd /deps \
8585
&& dir="firebolt-native-transport-${DEPS_TRANSPORT_V}" \
86-
&& curl -sL https://github.com/rdkcentral/firebolt-native-transport/releases/download/v${DEPS_TRANSPORT_V}/firebolt-native-transport-${DEPS_TRANSPORT_V}.tar.gz | tar xzf - \
86+
&& i=0 && while ! curl -sL https://github.com/rdkcentral/firebolt-native-transport/releases/download/v${DEPS_TRANSPORT_V}/firebolt-native-transport-${DEPS_TRANSPORT_V}.tar.gz | tar xzf - ; do test "$i" -eq 5 && exit 1; i=$((i+1)); sleep 1; done \
8787
&& cmake -B "build/$dir" \
8888
-DCMAKE_BUILD_TYPE=Release \
8989
-DBUILD_SHARED_LIBS=ON \

.github/workflows/ci.yml

Lines changed: 26 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@ name: CI (c++) Build and Test
22

33
on:
44
workflow_dispatch:
5-
# push:
6-
# branches: [ main, next ]
7-
# pull_request:
8-
# branches: [ main, next ]
5+
push:
6+
branches: [ main, next ]
7+
pull_request:
8+
branches: [ main, next ]
99

1010
defaults:
1111
run:
@@ -48,7 +48,7 @@ jobs:
4848

4949
- name: Get Transport Version for Build-Arg
5050
id: transport_version
51-
run: echo "version=$(cat ${{ github.workspace }}/src/cpp/.transport.version)" >> $GITHUB_OUTPUT
51+
run: echo "version=$(cat ${{ github.workspace }}/.transport.version)" >> $GITHUB_OUTPUT
5252

5353
- name: Build and push Docker image
5454
uses: docker/build-push-action@v5
@@ -84,8 +84,8 @@ jobs:
8484
run: |
8585
docker run --rm --user "$(id -u):$(id -g)" -v ${{ github.workspace }}:/workspace ${{ needs.build_docker.outputs.image_tag }} \
8686
bash -c " \
87-
cd ./src/cpp \
88-
&& git ls-files -- '*.cpp' '*.h' | xargs clang-format --dry-run --Werror \
87+
set -e \
88+
&& git ls-files -- '*.cpp' '*.h' | xargs clang-format --dry-run --Werror \
8989
"
9090
9191
build_project:
@@ -117,7 +117,7 @@ jobs:
117117
run: |
118118
docker run --rm --user "$(id -u):$(id -g)" -v ${{ github.workspace }}:/workspace ${{ needs.build_docker.outputs.image_tag }} \
119119
bash -c " \
120-
cd src/cpp \
120+
set -e \
121121
&& cmake -B build -S . \
122122
-DCMAKE_BUILD_TYPE=Debug \
123123
-DENABLE_TESTS=ON \
@@ -127,13 +127,16 @@ jobs:
127127
- name: Build Project
128128
run: |
129129
docker run --rm --user "$(id -u):$(id -g)" -v ${{ github.workspace }}:/workspace ${{ needs.build_docker.outputs.image_tag }} \
130-
bash -c "cmake --build src/cpp/build --parallel"
130+
bash -c " \
131+
set -e \
132+
&& cmake --build build --parallel \
133+
"
131134
132135
- name: Upload build directory
133136
uses: actions/upload-artifact@v4
134137
with:
135138
name: build-dir
136-
path: ${{ github.workspace }}/src/cpp/build
139+
path: ${{ github.workspace }}/build
137140

138141
unit_tests:
139142
permissions:
@@ -156,20 +159,23 @@ jobs:
156159
uses: actions/download-artifact@v4
157160
with:
158161
name: build-dir
159-
path: ${{ github.workspace }}/src/cpp/build
162+
path: ${{ github.workspace }}/build
160163

161164
- name: Run Unit Tests
162165
run: |
163-
chmod +x ${{ github.workspace }}/src/cpp/build/test/FireboltClientUnitTests
166+
chmod +x ${{ github.workspace }}/build/test/FireboltClientUnitTests
164167
docker run --rm --user "$(id -u):$(id -g)" -v ${{ github.workspace }}:/workspace ${{ needs.build_docker.outputs.image_tag }} \
165-
bash -c "ctest --test-dir src/cpp/build/test"
168+
bash -c " \
169+
set -e \
170+
&& ctest --test-dir build/test \
171+
"
166172
167173
- name: Generate Coverage Report
168174
run: |
169175
docker run --rm --user "$(id -u):$(id -g)" -v ${{ github.workspace }}:/workspace ${{ needs.build_docker.outputs.image_tag }} \
170176
bash -c " \
171177
set -e \
172-
&& cd src/cpp/build \
178+
&& cd build \
173179
&& mkdir -p coverage \
174180
&& gcovr -r .. \
175181
--exclude '.*/test/.*\.h' \
@@ -184,12 +190,12 @@ jobs:
184190
uses: actions/upload-artifact@v4
185191
with:
186192
name: coverage-report
187-
path: ${{ github.workspace }}/src/cpp/build/coverage/
193+
path: ${{ github.workspace }}/build/coverage/
188194

189195
- name: Code Coverage Summary Report
190196
uses: irongut/CodeCoverageSummary@v1.3.0
191197
with:
192-
filename: src/cpp/build/coverage.cobertura.xml
198+
filename: build/coverage.cobertura.xml
193199
badge: true
194200
hide_complexity: true
195201
format: markdown
@@ -221,7 +227,7 @@ jobs:
221227
uses: actions/download-artifact@v4
222228
with:
223229
name: build-dir
224-
path: ${{ github.workspace }}/src/cpp/build
230+
path: ${{ github.workspace }}/build
225231

226232
- name: Setup Mock-Firebolt
227233
id: setup-mock
@@ -235,11 +241,11 @@ jobs:
235241

236242
- name: Run Component Tests
237243
run: |
238-
chmod +x ${{ github.workspace }}/src/cpp/build/test/FireboltClientComponentTests
244+
chmod +x ${{ github.workspace }}/build/test/FireboltClientComponentTests
239245
docker run --rm --user "$(id -u):$(id -g)" -v ${{ github.workspace }}:/workspace -v ${{ env.MOCK_PATH }}:/mock ${{ needs.build_docker.outputs.image_tag }} \
240246
./.github/scripts/run-component-tests.sh \
241247
--mock /mock \
242248
--config /workspace/.github/mock-firebolt/config.json \
243-
--openrpc /workspace/src/cpp/firebolt-open-rpc.json \
249+
--openrpc /workspace/firebolt-open-rpc.json \
244250
--app-openrpc /workspace/.github/openrpc/firebolt-app-open-rpc.json \
245-
--test-exe /workspace/src/cpp/build/test/FireboltClientComponentTests
251+
--test-exe /workspace/build/test/FireboltClientComponentTests

.transport.version

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
1.0.0-next.23

CHANGELOG.md

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,22 @@
1+
# 0.2.0 (https://github.com/rdkcentral/firebolt-cpp-client/compare/v0.1.0...v0.2.0) (2025-12-16)
2+
3+
### Features
4+
5+
* Accessibility API
6+
* Advertising API
7+
* Device API
8+
* Display API
9+
* Lifecycle 2.0 API
10+
* Localization API
11+
* Presentation API
12+
* Stats API
13+
* Remove not agreed APIs
14+
* Thunder removal
15+
* Change initialization of the transport
16+
* Transport v1.0.0-next.23
17+
118
# 0.1.0 (https://github.com/rdkcentral/firebolt-cpp-client/compare/v0.0.1...v0.1.0) (2025-12-16)
219

320
### Features
421

5-
* Firebolt C++ Client ([b449c20](https://github.com/rdkcentral/firebolt-cpp-client/commit/b449c20b7b08f1652a91bd4042588d39906f20f5))
6-
* Adapt Client to changes in the Transport Layer ([d932cd9](https://github.com/rdkcentral/firebolt-cpp-client/commit/d932cd9aca81cc0fd3cb7bb74edae0c4de182901))
7-
* Support for event handling in demo app ([f1ba222](https://github.com/rdkcentral/firebolt-cpp-client/commit/f1ba222275801279c622f2c2fc56a80c66d15584))
22+
* Firebolt C++ Client

0 commit comments

Comments
 (0)