Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release/1.3.0 #428

Merged
merged 226 commits into from
Apr 14, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
226 commits
Select commit Hold shift + click to select a range
51e0c98
Update RPCs from the related `rpc_spec`
vladmu Aug 10, 2020
d146ee3
Add unit tests
vladmu Aug 18, 2020
4b6e186
Apply suggestions from code review
vladmu Aug 20, 2020
48322f8
Merge branch 'develop' into feature/0296_possibility_to_update_video_…
vladmu Nov 2, 2020
a507078
Merge pull request #342 from smartdevicelink/master
renonick87 Nov 5, 2020
f99340c
Fix failing generator unit tests
renonick87 Nov 6, 2020
3f035dc
Merge pull request #343 from smartdevicelink/bugfix/generator_tests
renonick87 Nov 12, 2020
a74af69
feature/sdl_0269_new_vehicle_data_climateData
vladmu Nov 18, 2020
8be4eaf
[SDL-0262] New vehicle data SeatOccupancy
ymalovanyi Nov 13, 2020
1c88f25
update generator based on c++ keywords changes
renonick87 Nov 20, 2020
edf43e8
Add GENERAL_SEAT_STATUS_LIST and JSON_SEATSTATUS_LIST arrays in tests
ymalovanyi Nov 23, 2020
d1e6617
Review fixes
vladmu Nov 25, 2020
3881d93
Review fixes
vladmu Nov 25, 2020
916636e
Merge pull request #352 from smartdevicelink/feature/generator_c++_ke…
renonick87 Nov 30, 2020
3e2b9c7
[SDL-0255] Enhance BodyInformation vehicle data
ymalovanyi Nov 25, 2020
5b1ca71
Add countRate to SetMediaClockTimer
crokita Dec 4, 2020
9110be9
Add new API to SetMediaClockTimer
crokita Dec 4, 2020
d70074f
Implementing SDL 0274: Add preferred FPS to VideoStreamingCapability.
shiniwat Dec 8, 2020
1d97a2d
Added preferredFPS to ideoStreamingParametersTest.
shiniwat Dec 8, 2020
f4a889b
Refactor to use queues and create unit tests
crokita Dec 10, 2020
191ab56
Add RPC changes
crokita Dec 11, 2020
667107c
Merge pull request #364 from smartdevicelink/master
crokita Dec 11, 2020
60443a4
[SDL-0238] Keyboard Enhancements
ymalovanyi Dec 14, 2020
1504e63
implement Alert Manager
renonick87 Dec 14, 2020
e0229e5
missed test file
renonick87 Dec 14, 2020
9f8ba10
Merge remote-tracking branch 'origin/develop' into feature/sdl_0269_n…
vladmu Dec 15, 2020
ddca25e
Make managers aware of artwork overwrite property
crokita Dec 15, 2020
a44841c
Flip ordering of tests
crokita Dec 15, 2020
9e412cd
Update timeout to be 5 seconds for longer tests
crokita Dec 15, 2020
406ae01
Merge pull request #359 from smartdevicelink/feature/voice-command-ma…
crokita Dec 15, 2020
5bfa293
Apply suggestions from code review
crokita Dec 16, 2020
cf0eed9
Update lib/js/src/manager/screen/_SoftButtonManagerBase.js
crokita Dec 16, 2020
d938adc
Merge pull request #368 from smartdevicelink/bugfix/sdl-artwork-overw…
crokita Dec 16, 2020
8e42fc4
Update alert manager to include tests and fix based on tests
renonick87 Dec 22, 2020
cf6edec
Bring up to date with develop
renonick87 Dec 22, 2020
e9c6269
Update unit tests and fix bugs based on tests
renonick87 Dec 23, 2020
39dd39a
Add JS docs for new classes
renonick87 Dec 23, 2020
3d11593
Fix import paths
renonick87 Dec 23, 2020
df07f27
Merge remote-tracking branch 'origin/develop' into feature/0296_possi…
vladmu Dec 30, 2020
329c272
Update related RPC classes with the latest rpc_spec changes
vladmu Dec 30, 2020
abcc4e9
Update FunctionID.js
vladmu Dec 30, 2020
5b14e62
Adjust obsolete unit tests
vladmu Dec 30, 2020
e7a88a7
Adjust obsolete unit tests
vladmu Dec 30, 2020
d98c3c1
Run RPC generator for Main Menu UI Updates
renonick87 Jan 5, 2021
886a0cf
Update PR based on feedback
renonick87 Jan 12, 2021
0c68654
Fix import
renonick87 Jan 12, 2021
a9e21f0
Warn if alert soft button has multiple states
renonick87 Jan 12, 2021
4c89fb8
Rename params for alignment and add window capability setter
renonick87 Jan 12, 2021
706b39f
Decrease softbutton max id value so developers have a range considere…
renonick87 Jan 12, 2021
5049f6e
Fix typo
renonick87 Jan 12, 2021
9b84999
Update window capabilities for pending operation
renonick87 Jan 12, 2021
8c54b07
Throw Error when alert soft buttons have multiple states
renonick87 Jan 12, 2021
67ae31e
rename createAlert to alertRpc and remove cancel check when sending a…
renonick87 Jan 12, 2021
e973da6
remove unnecessary getter
renonick87 Jan 12, 2021
fbb7a24
Remove comment
renonick87 Jan 12, 2021
cae2aec
Fix typo
renonick87 Jan 12, 2021
fa1c7de
Update rpc_spec, .gitmodules, some JSs in accordance with code review…
shiniwat Jan 13, 2021
51b40ab
Merge pull request #351 from LuxoftSDL/feature/SDL-0262-New-vehicle-d…
renonick87 Jan 13, 2021
226d1f3
Do not import a file that leads to the same file
crokita Jan 13, 2021
0496013
0293 oem exclusive app support
vladmu Jan 13, 2021
819e366
Restored .gitmodules as per review request at https://github.com/smar…
shiniwat Jan 14, 2021
98a9236
Merge remote-tracking branch 'origin/develop' into feature/0296_possi…
vladmu Jan 14, 2021
089b00c
Move audio files and tts prompts to single array to keep the order th…
renonick87 Jan 14, 2021
e81d211
Merge pull request #373 from smartdevicelink/bugfix/generator-recursi…
crokita Jan 14, 2021
bea495e
Merge remote-tracking branch 'origin/develop' into feature/SDL-0255-E…
vladmu Jan 15, 2021
595216c
Update RPC version to 7.1.0
crokita Jan 19, 2021
70e1bdf
Merge pull request #376 from smartdevicelink/feature/rpc-7.1.0
crokita Jan 19, 2021
bc813d7
Merge branch 'develop' of https://github.com/smartdevicelink/sdl_java…
crokita Jan 20, 2021
d4bcdec
Add missing RPC files
crokita Jan 20, 2021
90e6a21
Include missing deprecation tags
crokita Jan 21, 2021
df31fcf
Fix RAI appInfo since attribute
crokita Jan 21, 2021
698339a
Deprecate SyncPData functions
crokita Jan 21, 2021
4f59e13
Align getter and setter rules in generator
crokita Jan 21, 2021
c0f1b38
Merge remote-tracking branch 'origin/develop' into feature/0293_oem_e…
vladmu Jan 22, 2021
0497c80
* reverted system[Hardware|Software]Version parameters in onVehicleTy…
vladmu Jan 22, 2021
a2d7ab1
minor fixes
vladmu Jan 22, 2021
af981f8
Update tests for LifecycleManagerTests.js
ymalovanyi Jan 22, 2021
d291ca9
Merge pull request #377 from smartdevicelink/bugfix/deprecate_show_me…
crokita Jan 25, 2021
e619906
Merge pull request #378 from smartdevicelink/bugfix/rai_appinfo_since
crokita Jan 25, 2021
0839311
Merge pull request #379 from smartdevicelink/bugfix/deprecate_syncpda…
crokita Jan 25, 2021
bd6e77f
Merge pull request #381 from smartdevicelink/bugfix/getter-setter-dep…
crokita Jan 25, 2021
02c0410
Merge pull request #355 from smartdevicelink/feature/0244-setmediaclo…
crokita Jan 25, 2021
f683c5c
Merge remote-tracking branch 'origin/develop' into feature/sdl_0269_n…
vladmu Jan 26, 2021
f3c57cb
regenerated RPCs
vladmu Jan 26, 2021
f71de8c
review fixes
vladmu Jan 26, 2021
0c79267
Merge pull request #354 from LuxoftSDL/feature/SDL-0255-Enhance-BodyI…
renonick87 Jan 26, 2021
ea6b478
Resolve merge conflicts
crokita Jan 27, 2021
16fab63
Merge pull request #356 from smartdevicelink/feature/0198-media-skip-…
crokita Jan 27, 2021
3272bc2
Update PR based on feedback
renonick87 Jan 28, 2021
8a3f539
Update unit tests based on revisions
renonick87 Jan 28, 2021
3eb673c
Make getAudioData method private to align with Java Suite
renonick87 Jan 28, 2021
5cb6759
Make getAudioFiles private to align with Java Suite and return getAud…
renonick87 Jan 28, 2021
7eb8aea
Implement revisions
crokita Jan 28, 2021
8f4069d
Fix linter warnings
ymalovanyi Jan 28, 2021
4d8a427
Make AlertCompletionListener public
renonick87 Jan 28, 2021
e79fe4c
Fix JSDoc comment
renonick87 Jan 28, 2021
67621e0
Fix references to getAudioFiles method not being private
renonick87 Jan 28, 2021
f855ca4
[SDL-0293] New revision adjustments
BogMW Jan 29, 2021
76c5350
[SDL-0293] - minor fix
vladmu Jan 29, 2021
29ece49
Merge remote-tracking branch 'origin/develop' into feature/sdl_0269_n…
BogMW Feb 1, 2021
dd37461
Feature/choice set manager (#371)
crokita Feb 2, 2021
048708c
Fix linter issues
crokita Feb 2, 2021
7b93ec1
Include MenuParams updates
renonick87 Feb 2, 2021
423c810
Merge pull request #384 from smartdevicelink/bugfix/resolve-linter-is…
crokita Feb 2, 2021
f8c6691
Merge pull request #357 from shiniwat/feature/issue-115
crokita Feb 4, 2021
7a318da
Update based on review feedback
renonick87 Feb 8, 2021
a203d1e
[SDL-0238] Keyboard Enhancements - updates according to the latest pr…
BogMW Feb 8, 2021
7be012e
Merge branch 'develop' into feature/alert-manager
renonick87 Feb 8, 2021
3943b3b
Merge remote-tracking branch 'origin/develop' into feature/SDL-0238-K…
BogMW Feb 8, 2021
12e783c
Broaden choice uniqueness
crokita Feb 9, 2021
e8316c2
Merge remote-tracking branch 'origin/develop' into feature/sdl_0269_n…
BogMW Feb 10, 2021
76f054e
Merge pull request #350 from LuxoftSDL/feature/sdl_0269_new_vehicle_d…
renonick87 Feb 10, 2021
cccb753
Merge remote-tracking branch 'origin/develop' into feature/0293_oem_e…
vladmu Feb 10, 2021
8317fb6
Alignment with Java suite implementation
vladmu Feb 10, 2021
1e0e6be
Merge pull request #363 from smartdevicelink/feature/0305-homogenize-…
crokita Feb 11, 2021
dcaf681
Update lib/js/src/manager/screen/utils/_PresentAlertOperation.js
renonick87 Feb 11, 2021
6b7aa42
Alignment with java, and fix cell duplicate issue
crokita Feb 11, 2021
59ac61a
Merge remote-tracking branch 'origin/develop' into feature/0293_oem_e…
vladmu Feb 12, 2021
b874414
Alignment with Java suite implementation
vladmu Feb 12, 2021
a0a9ed0
Alignment with Java suite implementation - fixes
vladmu Feb 12, 2021
4e4fb01
Merge remote-tracking branch 'origin/develop' into feature/0296_possi…
BogMW Feb 12, 2021
66edef5
Review changes
vladmu Feb 17, 2021
6161187
[0238] Fix comments
BogMW Feb 17, 2021
150527a
Merge remote-tracking branch 'origin/develop' into feature/SDL-0238-K…
BogMW Feb 17, 2021
7772f64
[0238] Replace absolute import with relative
BogMW Feb 17, 2021
9c89f78
Review changes
vladmu Feb 17, 2021
306acb5
Review changes
vladmu Feb 17, 2021
2ad2f5c
Review changes
vladmu Feb 17, 2021
5abc1c9
Update manager cancel id range
renonick87 Feb 17, 2021
786a4fc
AlertOperation checking wrong audio property and check that file is u…
renonick87 Feb 17, 2021
cc0b9f2
Alignment with Java suite implementation - fixes
vladmu Feb 18, 2021
523c52e
Align assemble alert text methods
renonick87 Feb 18, 2021
145e6af
Align uploading alert audio with iOS
renonick87 Feb 18, 2021
ffeeddc
Add softbutton limit and align image uploads
renonick87 Feb 18, 2021
8f7ea62
Align alert cancel logic
renonick87 Feb 18, 2021
bc24d39
Remove alert operation setter for window capability
renonick87 Feb 18, 2021
6db6cdb
nextCancelId is package private and update unit tests
renonick87 Feb 18, 2021
d40634f
Fix audiodata to not be null and fix check in presentAlertOperation
renonick87 Feb 18, 2021
cf2f55f
Update alert view unit tests
renonick87 Feb 18, 2021
8374ef9
Fix audio check
renonick87 Feb 18, 2021
15e9c97
Added unit tests
vladmu Feb 18, 2021
0d3ee5d
Align lifecycleManager getter for permissionManager
renonick87 Feb 19, 2021
4403961
Fix docs and unit tests
renonick87 Feb 19, 2021
7a19502
Update unit test
renonick87 Feb 19, 2021
a44b2bc
Fix constructor comment
renonick87 Feb 22, 2021
9f90731
Merge pull request #370 from smartdevicelink/feature/main_menu_ui_upd…
renonick87 Feb 22, 2021
ca29ed7
Merge branch 'feature/SDL-0238-Keyboard-Enhancements' of https://gith…
renonick87 Feb 22, 2021
21771bb
[0238] Apply comments
Feb 23, 2021
1f60fb4
Update PR based on feedback
renonick87 Feb 23, 2021
171830e
Add returns descriptor to docs
renonick87 Feb 23, 2021
ab05e85
Include lint validation as a requirement in the PR template
renonick87 Feb 24, 2021
0614b27
Fix SdlProtocolBase setting wrong protocol version
renonick87 Feb 24, 2021
38969fe
Merge pull request #366 from LuxoftSDL/feature/SDL-0238-Keyboard-Enha…
renonick87 Feb 24, 2021
d379570
Merge remote-tracking branch 'origin/develop' into feature/0296_possi…
BogMW Feb 25, 2021
9786a14
Merge pull request #386 from smartdevicelink/feature/include-linter-p…
crokita Feb 25, 2021
286047a
remove console log
renonick87 Feb 26, 2021
95f26f1
Merge branch 'feature/0293_oem_exclusive_app_support' of https://gith…
renonick87 Feb 26, 2021
cf5d507
PR alignment with mobile libraries
crokita Feb 26, 2021
264e4a7
Fix merge conflicts
crokita Feb 26, 2021
20083b3
Add documentation to ChoiceSet
crokita Feb 26, 2021
4896b3e
Update AlertManager to stop tracking SoftButtons when their respectiv…
renonick87 Mar 2, 2021
2c9f9e2
Merge pull request #374 from LuxoftSDL/feature/0293_oem_exclusive_app…
renonick87 Mar 2, 2021
1386ef9
Merge branch 'develop' into feature/alert-manager
renonick87 Mar 2, 2021
6b4551d
Fix unit test and issue found by linter
renonick87 Mar 2, 2021
99ab39a
Fix unit test
renonick87 Mar 2, 2021
1e9ca69
Merge pull request #388 from smartdevicelink/bugfix/wrong-protocol-ve…
renonick87 Mar 2, 2021
cb0963b
Perform null checks for setting image and text fields
crokita Mar 2, 2021
e060b96
Merge pull request #390 from smartdevicelink/bugfix/scm-passing-null
crokita Mar 3, 2021
ceed53a
Update RpcStruct._validateType to not throw error on a null value bei…
renonick87 Mar 3, 2021
5eab0c9
Add CRC checksums to the file manager
crokita Mar 3, 2021
38bdf60
Add unit tests
crokita Mar 4, 2021
30dd1f2
Merge pull request #382 from smartdevicelink/feature/0180-choice-uniq…
crokita Mar 4, 2021
5ba7373
Update based on feedback
renonick87 Mar 4, 2021
ec4bf9a
Merge pull request #393 from smartdevicelink/bugfix/validate_type_null
renonick87 Mar 4, 2021
70065ba
RPC version check before setting crc
crokita Mar 4, 2021
0b9ff50
Fix issues with SoftButtonObject equals method
renonick87 Mar 4, 2021
b1be2a7
Merge branch 'develop' into feature/alert-manager
renonick87 Mar 5, 2021
0899941
Merge pull request #394 from smartdevicelink/feature/add-crc-to-files
crokita Mar 5, 2021
c9e17bf
Fix initalize typos
renonick87 Mar 5, 2021
c84d50c
Merge pull request #369 from smartdevicelink/feature/alert-manager
renonick87 Mar 5, 2021
88907de
Merge pull request #395 from smartdevicelink/bugfix/initalize-typo
renonick87 Mar 5, 2021
ead31de
Fix setting choice set timeouts
crokita Mar 8, 2021
88dd3a5
Merge pull request #302 from LuxoftSDL/feature/0296_possibility_to_up…
crokita Mar 9, 2021
4c6244a
Fix auxillary typo in StaticIconName
renonick87 Mar 9, 2021
94eef89
Bump elliptic from 6.5.3 to 6.5.4
dependabot[bot] Mar 9, 2021
2084b65
Merge pull request #399 from smartdevicelink/bugfix/auxillary-typo
renonick87 Mar 12, 2021
1f6a3b7
Align alertview alerts with choiceset alerts
crokita Mar 12, 2021
114b364
Align alertview alerts with choiceset alerts
crokita Mar 12, 2021
698e7d4
Merge pull request #397 from smartdevicelink/bugfix/choice-set-timeouts
crokita Mar 12, 2021
f67cfd6
Run the RPC generator to include all updates for v1.3
renonick87 Mar 15, 2021
29f5ac3
Update Example apps for 1.3
renonick87 Mar 22, 2021
43f6941
Merge pull request #401 from smartdevicelink/feature/1.3-run-generator
renonick87 Mar 22, 2021
cfa0cec
Fix positioning of return statement in PermissionManager
crokita Mar 22, 2021
4c30aa3
Fix logic for when multiple HMI_FULL notifications are sent after eac…
renonick87 Mar 22, 2021
7881a6b
Fix example code block not being wrapped in promise
renonick87 Mar 22, 2021
698bdd5
ScreenManager must consider currently presenting buttons from other s…
renonick87 Mar 22, 2021
30d0fc9
Fix check for supported audio files in AlertManager
crokita Mar 22, 2021
aa2c5fd
Fix unit test
renonick87 Mar 22, 2021
2ea3fbe
Remove unnecessary log
renonick87 Mar 22, 2021
7d050b6
Merge pull request #402 from smartdevicelink/feature/1.3-example-updates
renonick87 Mar 23, 2021
8978435
Merge pull request #404 from smartdevicelink/bugfix/permission-filter…
crokita Mar 23, 2021
02795c7
Merge pull request #408 from smartdevicelink/bugfix/present-alert-no-…
crokita Mar 23, 2021
43c1c89
Update package version
crokita Mar 23, 2021
3ab9000
Clone the set of button IDs so other sub-manager lists are not updated
renonick87 Mar 23, 2021
b228fd6
Perform null checks for choice set selection listener in manager
crokita Mar 23, 2021
ed319ed
Merge pull request #407 from smartdevicelink/bugfix/overlapping_butto…
renonick87 Mar 24, 2021
3724313
Merge pull request #412 from smartdevicelink/bugfix/choicesetmanager-…
crokita Mar 25, 2021
001fbef
Merge pull request #409 from smartdevicelink/bugfix/update-version-1.3.0
crokita Mar 25, 2021
666dbc7
Filter out VoiceCommands that have a duplicate string
renonick87 Mar 25, 2021
7650635
Fix AlertManager to limit Alerts to 4 soft buttons and trim the list …
renonick87 Mar 25, 2021
1b4eae9
Blank artwork should be persistent
renonick87 Mar 26, 2021
ade0742
Merge pull request #418 from smartdevicelink/bugfix/persistent-blank-…
renonick87 Mar 26, 2021
3b44247
Merge pull request #414 from smartdevicelink/bugfix/duplicate_voice_c…
renonick87 Mar 26, 2021
5f780b7
Merge pull request #416 from smartdevicelink/bugfix/alert_buttons_limit
renonick87 Mar 26, 2021
bc660a0
Update KeyboardListener for alignment
renonick87 Mar 29, 2021
2526720
Fix KeyboardListener setter
renonick87 Mar 29, 2021
650ca6e
Fix docs and constructor
renonick87 Mar 29, 2021
7a2581a
Merge pull request #420 from smartdevicelink/bugfix/align-keyboard-li…
renonick87 Mar 30, 2021
ae28578
Bump y18n from 4.0.0 to 4.0.1
dependabot[bot] Mar 31, 2021
e41d6c9
Fix the case where the permission manager would clone old permissions…
renonick87 Apr 6, 2021
6ccef5b
Missing semicolon
renonick87 Apr 6, 2021
78802ac
Fix permissions mapping to use correct syntax
renonick87 Apr 7, 2021
dc73315
remove console log
renonick87 Apr 7, 2021
902e972
Merge pull request #423 from smartdevicelink/bugfix/cloning-old-permi…
renonick87 Apr 7, 2021
0c958e1
Merge pull request #400 from smartdevicelink/dependabot/npm_and_yarn/…
crokita Apr 8, 2021
ba1e898
Merge pull request #421 from smartdevicelink/dependabot/npm_and_yarn/…
crokita Apr 8, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
1 change: 1 addition & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ This PR makes **[no / minor / major]** API changes.

### Testing Plan
- [ ] I have verified that I have not introduced new warnings in this PR (or explain why below)
- [ ] I have verified that this PR passes lint validation
- [ ] I have run the unit tests with this PR
- [ ] I have tested this PR against Core and verified behavior (if applicable, if not applicable, explain why below).

Expand Down
56 changes: 52 additions & 4 deletions examples/js/hello-sdl/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -133,9 +133,14 @@
this._logPermissions();

// wait for the FULL state for more functionality
if (hmiLevel === SDL.rpc.enums.HMILevel.HMI_FULL) {
const prevHmiFull = this._prevHmiLevel !== SDL.rpc.enums.HMILevel.HMI_FULL
this._prevHmiLevel = hmiLevel;
if (hmiLevel === SDL.rpc.enums.HMILevel.HMI_FULL && prevHmiFull) {
const screenManager = this._sdlManager.getScreenManager();
const isRpcAllowed = (rpc) => {
if (!this._permissionManager) {
this._permissionManager = this._sdlManager.getPermissionManager();
}
return this._permissionManager &&
this._permissionManager.isRpcAllowed(rpc);
};
Expand Down Expand Up @@ -167,6 +172,25 @@
this._isButtonSubscriptionRequested = true;
}

const choices = [
new SDL.manager.screen.choiceset.ChoiceCell('First Choice Cell'),
new SDL.manager.screen.choiceset.ChoiceCell('Second Choice Cell'),
];
await screenManager.preloadChoices(choices);

await new Promise((resolve) => {
const choiceSet = new SDL.manager.screen.choiceset.ChoiceSet('choice', screenManager.getPreloadedChoices(), new SDL.manager.screen.choiceset.ChoiceSetSelectionListener()
.setOnChoiceSelected((choiceCell, triggerSource, rowIndex) => {
console.log(choiceCell, triggerSource, rowIndex);
resolve();
})
.setOnError((error) => {
resolve();
}));

screenManager.presentChoiceSet(choiceSet);
});

const art1 = new SDL.manager.file.filetypes.SdlArtwork('logo', SDL.rpc.enums.FileType.GRAPHIC_PNG)
.setFilePath(this._filePath);

Expand Down Expand Up @@ -206,10 +230,34 @@
await this._sleep();
}

// tear down the app
await this._sdlManager.sendRpcResolve(new SDL.rpc.messages.UnregisterAppInterface());
const alertState = new SDL.manager.screen.utils.SoftButtonState('EXIT', 'exit app', null);
const alertState2 = new SDL.manager.screen.utils.SoftButtonState('DISMISS', 'dismiss alert', null);

const alertView = new SDL.manager.screen.utils.AlertView()
.setText('Exit the Application?')
.setTimeout(3000)
.setSoftButtons([
new SDL.manager.screen.utils.SoftButtonObject('Exit', [alertState], 'EXIT', async (id, rpc) => {
if (rpc instanceof SDL.rpc.messages.OnButtonPress) {
// tear down the app
await this._sdlManager.sendRpcResolve(new SDL.rpc.messages.UnregisterAppInterface());

this._sdlManager.dispose();
}
}),
new SDL.manager.screen.utils.SoftButtonObject('Dismiss', [alertState2], 'DISMISS', (id, rpc) => {
if (rpc instanceof SDL.rpc.messages.OnButtonPress) {
console.log('Alert button pressed!');
}
}),
]);

const alertCompletionListener = new SDL.manager.screen.utils.AlertCompletionListener()
.setOnComplete((success, tryAgainTime) => {
console.log(`Alert presented ${(success) ? 'successfully' : 'unsuccessfully'}`);
});

this._sdlManager.dispose();
screenManager.presentAlert(alertView, alertCompletionListener);
}
}

Expand Down
56 changes: 52 additions & 4 deletions examples/node/hello-sdl-tcp/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -128,9 +128,14 @@ class AppClient {
this._logPermissions();

// wait for the FULL state for more functionality
if (hmiLevel === SDL.rpc.enums.HMILevel.HMI_FULL) {
const prevHmiFull = this._prevHmiLevel !== SDL.rpc.enums.HMILevel.HMI_FULL;
this._prevHmiLevel = hmiLevel;
if (hmiLevel === SDL.rpc.enums.HMILevel.HMI_FULL && prevHmiFull) {
const screenManager = this._sdlManager.getScreenManager();
const isRpcAllowed = (rpc) => {
if (!this._permissionManager) {
this._permissionManager = this._sdlManager.getPermissionManager();
}
return this._permissionManager &&
this._permissionManager.isRpcAllowed(rpc);
};
Expand Down Expand Up @@ -162,6 +167,25 @@ class AppClient {
this._isButtonSubscriptionRequested = true;
}

const choices = [
new SDL.manager.screen.choiceset.ChoiceCell('First Choice Cell'),
new SDL.manager.screen.choiceset.ChoiceCell('Second Choice Cell'),
];
await screenManager.preloadChoices(choices);

await new Promise ((resolve) => {
const choiceSet = new SDL.manager.screen.choiceset.ChoiceSet('choice', choices, new SDL.manager.screen.choiceset.ChoiceSetSelectionListener()
.setOnChoiceSelected((choiceCell, triggerSource, rowIndex) => {
console.log(choiceCell, triggerSource, rowIndex);
resolve();
})
.setOnError((error) => {
resolve();
}));

screenManager.presentChoiceSet(choiceSet);
});

const art1 = new SDL.manager.file.filetypes.SdlArtwork('logo', SDL.rpc.enums.FileType.GRAPHIC_PNG)
.setFilePath(this._filePath);

Expand Down Expand Up @@ -201,10 +225,34 @@ class AppClient {
await this._sleep();
}

// tear down the app
await this._sdlManager.sendRpcResolve(new SDL.rpc.messages.UnregisterAppInterface());
const alertState = new SDL.manager.screen.utils.SoftButtonState('EXIT', 'exit app', null);
const alertState2 = new SDL.manager.screen.utils.SoftButtonState('DISMISS', 'dismiss alert', null);

const alertView = new SDL.manager.screen.utils.AlertView()
.setText('Exit the Application?')
.setTimeout(3000)
.setSoftButtons([
new SDL.manager.screen.utils.SoftButtonObject('Exit', [alertState], 'EXIT', async (id, rpc) => {
if (rpc instanceof SDL.rpc.messages.OnButtonPress) {
// tear down the app
await this._sdlManager.sendRpcResolve(new SDL.rpc.messages.UnregisterAppInterface());

this._sdlManager.dispose();
}
}),
new SDL.manager.screen.utils.SoftButtonObject('Dismiss', [alertState2], 'DISMISS', (id, rpc) => {
if (rpc instanceof SDL.rpc.messages.OnButtonPress) {
console.log('Alert button pressed!');
}
}),
]);

const alertCompletionListener = new SDL.manager.screen.utils.AlertCompletionListener()
.setOnComplete((success, tryAgainTime) => {
console.log(`Alert presented ${(success) ? 'successfully' : 'unsuccessfully'}`);
});

this._sdlManager.dispose();
screenManager.presentAlert(alertView, alertCompletionListener);
}
}

Expand Down
55 changes: 54 additions & 1 deletion examples/node/hello-sdl/AppClient.js
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,9 @@ class AppClient {
this._logPermissions();

// wait for the FULL state for more functionality
if (hmiLevel === SDL.rpc.enums.HMILevel.HMI_FULL) {
const prevHmiFull = this._prevHmiLevel !== SDL.rpc.enums.HMILevel.HMI_FULL;
this._prevHmiLevel = hmiLevel;
if (hmiLevel === SDL.rpc.enums.HMILevel.HMI_FULL && prevHmiFull) {
this._hmiFull = true;
this._checkReadyState();
}
Expand All @@ -125,6 +127,9 @@ class AppClient {
if (this._managersReady && this._hmiFull) {
const screenManager = this._sdlManager.getScreenManager();
const isRpcAllowed = (rpc) => {
if (!this._permissionManager) {
this._permissionManager = this._sdlManager.getPermissionManager();
}
return this._permissionManager &&
this._permissionManager.isRpcAllowed(rpc);
};
Expand Down Expand Up @@ -180,6 +185,25 @@ class AppClient {
screenManager.changeLayout(new SDL.rpc.structs.TemplateConfiguration()
.setTemplate(SDL.rpc.enums.PredefinedLayout.NON_MEDIA));

const choices = [
new SDL.manager.screen.choiceset.ChoiceCell('First Choice Cell'),
new SDL.manager.screen.choiceset.ChoiceCell('Second Choice Cell'),
];
await screenManager.preloadChoices(choices);

await new Promise ((resolve) => {
const choiceSet = new SDL.manager.screen.choiceset.ChoiceSet('choice', choices, new SDL.manager.screen.choiceset.ChoiceSetSelectionListener()
.setOnChoiceSelected((choiceCell, triggerSource, rowIndex) => {
console.log(choiceCell, triggerSource, rowIndex);
resolve();
})
.setOnError((error) => {
resolve();
}));

screenManager.presentChoiceSet(choiceSet);
});

const art1 = new SDL.manager.file.filetypes.SdlArtwork('logo', SDL.rpc.enums.FileType.GRAPHIC_PNG)
.setFilePath(this._filePath);

Expand Down Expand Up @@ -209,6 +233,35 @@ class AppClient {
await this._sleep(2000);
softButtonObjects[0].transitionToNextState();
await this._sleep(2000);

const alertState = new SDL.manager.screen.utils.SoftButtonState('EXIT', 'exit app', null);
const alertState2 = new SDL.manager.screen.utils.SoftButtonState('DISMISS', 'dismiss alert', null);

const alertView = new SDL.manager.screen.utils.AlertView()
.setText('Exit the Application?')
.setTimeout(3000)
.setSoftButtons([
new SDL.manager.screen.utils.SoftButtonObject('Exit', [alertState], 'EXIT', async (id, rpc) => {
if (rpc instanceof SDL.rpc.messages.OnButtonPress) {
// tear down the app
await this._sdlManager.sendRpcResolve(new SDL.rpc.messages.UnregisterAppInterface());

this._sdlManager.dispose();
}
}),
new SDL.manager.screen.utils.SoftButtonObject('Dismiss', [alertState2], 'DISMISS', (id, rpc) => {
if (rpc instanceof SDL.rpc.messages.OnButtonPress) {
console.log('Alert button pressed!');
}
}),
]);

const alertCompletionListener = new SDL.manager.screen.utils.AlertCompletionListener()
.setOnComplete((success, tryAgainTime) => {
console.log(`Alert presented ${(success) ? 'successfully' : 'unsuccessfully'}`);
});

screenManager.presentAlert(alertView, alertCompletionListener);
}
}

Expand Down
40 changes: 24 additions & 16 deletions examples/webengine/hello-sdl/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -358,25 +358,33 @@
});

document.getElementById("alertButton").addEventListener("click", function(){
const alert = new SDL.rpc.messages.Alert();
alert.setAlertText1("Test Alert")
.setDuration(5000);

const btn1 = new SDL.rpc.structs.SoftButton();
btn1.setSystemAction(SDL.rpc.enums.SystemAction.DEFAULT_ACTION)
.setType(SDL.rpc.enums.SoftButtonType.SBT_TEXT)
.setText("ReRoute")
.setSoftButtonID(5502);
const alertView = new SDL.manager.screen.utils.AlertView();
alertView.setText("Test Alert")
.setTimeout(5000);

const alertState = new SDL.manager.screen.utils.SoftButtonState('REROUTE', 'reroute', null)
.setSystemAction(SDL.rpc.enums.SystemAction.DEFAULT_ACTION);
const btn1 = new SDL.manager.screen.utils.SoftButtonObject('ReRoute', [alertState], 'REROUTE', async (id, rpc) => {
if (rpc instanceof SDL.rpc.messages.OnButtonPress) {
// Handle OnButtonPress
}
});

const btn2 = new SDL.rpc.structs.SoftButton();
btn2.setSystemAction(SDL.rpc.enums.SystemAction.DEFAULT_ACTION)
.setType(SDL.rpc.enums.SoftButtonType.SBT_TEXT)
.setText("Close")
.setSoftButtonID(5503);
const alertState2 = new SDL.manager.screen.utils.SoftButtonState('CLOSE', 'close', null)
.setSystemAction(SDL.rpc.enums.SystemAction.DEFAULT_ACTION);
const btn2 = new SDL.manager.screen.utils.SoftButtonObject('Close', [alertState2], 'CLOSE', async (id, rpc) => {
if (rpc instanceof SDL.rpc.messages.OnButtonPress) {
// Handle OnButtonPress
}
});

alert.setSoftButtons([btn1, btn2])
alertView.setSoftButtons([btn1, btn2])

app.sendRpcRequest(alert);
const alertCompletionListener = new SDL.manager.screen.utils.AlertCompletionListener()
.setOnComplete((success, tryAgainTime) => {
// Handle Alert presented
})
app._sdlManager.getScreenManager().presentAlert(alertView, alertCompletionListener);
});

document.getElementById("unregButton").addEventListener("click", async function(){
Expand Down
3 changes: 3 additions & 0 deletions generator/mapping.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,9 @@
"key": "KEY_LEVEL_SPAN"
}
}
},
"TemplateConfiguration": {
"script": "templates/scripts/TemplateConfiguration.js"
}
},
"functions": {
Expand Down
11 changes: 6 additions & 5 deletions generator/templates/base_struct_function.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{% extends 'base_template.js' %}

{% block typedef %}
{%- if description is defined or deprecated is defined %}
{%- if description is defined or deprecated is defined and deprecated is not none %}
/**
{% if description is defined -%}
{% for d in description -%}
Expand All @@ -10,15 +10,15 @@
{% else -%}
* Struct description not available.
{% endif -%}
{% if deprecated is defined -%}
{% if deprecated is defined and deprecated is not none -%}
* @deprecated
{% endif -%}
*/
{%- endif %}
{%- endblock %}
{% block body %}
/**
* Initalizes an instance of {{name}}.
* Initializes an instance of {{name}}.
* @class
* @param {object} parameters - An object map of parameters.
{%- if since is defined and since is not none %}
Expand Down Expand Up @@ -76,8 +76,9 @@

/**
* Get the {{method.method_title}}
{% if deprecated is defined -%}
* @deprecated
{% if method.deprecated is defined and method.deprecated is not none -%}
* @since SmartDeviceLink {{method.history[0].since}}
* @deprecated in SmartDeviceLink {{method.since}}
{% endif -%}
* @returns {{'%s%s%s'|format('{', method.type, '}')}} - the {{method.key}} value
*/
Expand Down
2 changes: 2 additions & 0 deletions generator/templates/base_template.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,9 @@
*/
{% block imports -%}
{% for _import in imports|sort %}
{%- if _import.what != name %}
import {{'%s %s %s'|format('{', _import.what, '}')}} from '{{_import.wherefrom}}';
{%- endif -%}
{%- endfor %}
{% endblock -%}
{% block typedef -%}{%- endblock %}
Expand Down
24 changes: 24 additions & 0 deletions generator/templates/scripts/TemplateConfiguration.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
// ------ Not part of the RPC spec itself -----

/**
* Set the Template
* @deprecated Use setTemplateParam instead
* @param {String} template - Predefined or dynamically created window template. Currently only predefined window template layouts are defined. - The desired Template.
* {'string_min_length': 1, 'string_max_length': 500}
* @returns {TemplateConfiguration} - The class instance for method chaining.
*/
setTemplate (template) {
this.setParameter(TemplateConfiguration.KEY_TEMPLATE, template);
return this;
}

/**
* Get the Template
* @deprecated Use getTemplateParam instead
* @returns {String} - the KEY_TEMPLATE value
*/
getTemplate () {
return this.getParameter(TemplateConfiguration.KEY_TEMPLATE);
}

// ----------------- END -----------------------
3 changes: 2 additions & 1 deletion generator/test/runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ def main():
suite.addTests(TestLoader().loadTestsFromTestCase(CodeFormatAndQuality))

runner = TextTestRunner(verbosity=2)
runner.run(suite)
ret = not runner.run(suite).wasSuccessful()
sys.exit(ret)


if __name__ == '__main__':
Expand Down
Loading