Skip to content

Commit cb10518

Browse files
committed
Add generated files and update the library and example apps
1 parent 59df96a commit cb10518

367 files changed

Lines changed: 74099 additions & 9074 deletions

File tree

Some content is hidden

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

.gitmodules

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
[submodule "lib/rpc_spec"]
22
path = lib/rpc_spec
3-
url = git@github.com:vladmu/rpc_spec.git
3+
url = https://github.com/smartdevicelink/rpc_spec.git
44
branch = master

examples/js/hello-sdl/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@
8989
}
9090

9191
async _onHmiStatusListener (onHmiStatus) {
92-
const hmiLevel = onHmiStatus.getHMILevel();
92+
const hmiLevel = onHmiStatus.getHmiLevel();
9393

9494
// wait for the FULL state for more functionality
9595
if (hmiLevel === SDL.rpc.enums.HMILevel.HMI_FULL) {

examples/node/hello-sdl/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ class HelloSdl {
8989
}
9090

9191
async _onHmiStatusListener (onHmiStatus) {
92-
const hmiLevel = onHmiStatus.getHMILevel();
92+
const hmiLevel = onHmiStatus.getHmiLevel();
9393

9494
// wait for the FULL state for more functionality
9595
if (hmiLevel === SDL.rpc.enums.HMILevel.HMI_FULL) {

lib/js/app.js

Lines changed: 576 additions & 2 deletions
Large diffs are not rendered by default.

lib/js/dist/SDL.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/js/src/manager/lifecycle/LifecycleManager.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ class LifecycleManager {
230230
.setAppName(this._appConfig.getAppName())
231231
.setFullAppId(this._appConfig.getAppId())
232232
.setNgnMediaScreenAppName(this._appConfig.getShortAppName())
233-
.setAppHmiType(this._appConfig.getAppTypes())
233+
.setAppHMIType(this._appConfig.getAppTypes())
234234
.setLanguageDesired(this._appConfig.getLanguageDesired())
235235
.setHmiDisplayLanguageDesired(this._appConfig.getHmiDisplayLanguageDesired())
236236
.setIsMediaApplication(this._appConfig.isMediaApp())
@@ -259,11 +259,11 @@ class LifecycleManager {
259259
break;
260260
case FunctionID.OnHMIStatus: {
261261
// send a single onProxyConnected, when we go from a null HMI level to a defined HMI level
262-
const shouldInit = rpcMessage.getHMILevel() !== null
263-
&& rpcMessage.getHMILevel() !== undefined
262+
const shouldInit = rpcMessage.getHmiLevel() !== null
263+
&& rpcMessage.getHmiLevel() !== undefined
264264
&& this._currentHMIStatus === null;
265265

266-
this._currentHMIStatus = rpcMessage.getHMILevel();
266+
this._currentHMIStatus = rpcMessage.getHmiLevel();
267267

268268
if (this._lifecycleListener !== null && this._lifecycleListener !== undefined && shouldInit) {
269269
this._lifecycleListener.onProxyConnected(this);

lib/js/src/rpc/RpcCreator.js

Lines changed: 654 additions & 28 deletions
Large diffs are not rendered by default.
Lines changed: 135 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,135 @@
1+
/* eslint-disable camelcase */
2+
/*
3+
* Copyright (c) 2020, SmartDeviceLink Consortium, Inc.
4+
* All rights reserved.
5+
*
6+
* Redistribution and use in source and binary forms, with or without
7+
* modification, are permitted provided that the following conditions are met:
8+
*
9+
* Redistributions of source code must retain the above copyright notice, this
10+
* list of conditions and the following disclaimer.
11+
*
12+
* Redistributions in binary form must reproduce the above copyright notice,
13+
* this list of conditions and the following
14+
* disclaimer in the documentation and/or other materials provided with the
15+
* distribution.
16+
*
17+
* Neither the name of the SmartDeviceLink Consortium Inc. nor the names of
18+
* its contributors may be used to endorse or promote products derived
19+
* from this software without specific prior written permission.
20+
*
21+
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
22+
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
23+
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
24+
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
25+
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
26+
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
27+
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
28+
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
29+
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
30+
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
31+
* POSSIBILITY OF SUCH DAMAGE.
32+
*/
33+
34+
import { Enum } from '../../util/Enum.js';
35+
36+
/**
37+
* Reflects the status of the ambient light sensor.
38+
* @typedef {Enum} AmbientLightStatus
39+
* @property {Object} _MAP
40+
*/
41+
class AmbientLightStatus extends Enum {
42+
/**
43+
* @constructor
44+
*/
45+
constructor () {
46+
super();
47+
}
48+
49+
/**
50+
* @return {String}
51+
*/
52+
static get NIGHT () {
53+
return AmbientLightStatus._MAP.NIGHT;
54+
}
55+
56+
/**
57+
* @return {String}
58+
*/
59+
static get TWILIGHT_1 () {
60+
return AmbientLightStatus._MAP.TWILIGHT_1;
61+
}
62+
63+
/**
64+
* @return {String}
65+
*/
66+
static get TWILIGHT_2 () {
67+
return AmbientLightStatus._MAP.TWILIGHT_2;
68+
}
69+
70+
/**
71+
* @return {String}
72+
*/
73+
static get TWILIGHT_3 () {
74+
return AmbientLightStatus._MAP.TWILIGHT_3;
75+
}
76+
77+
/**
78+
* @return {String}
79+
*/
80+
static get TWILIGHT_4 () {
81+
return AmbientLightStatus._MAP.TWILIGHT_4;
82+
}
83+
84+
/**
85+
* @return {String}
86+
*/
87+
static get DAY () {
88+
return AmbientLightStatus._MAP.DAY;
89+
}
90+
91+
/**
92+
* @return {String}
93+
*/
94+
static get ALS_UNKNOWN () {
95+
return AmbientLightStatus._MAP.ALS_UNKNOWN;
96+
}
97+
98+
/**
99+
* @return {String}
100+
*/
101+
static get INVALID () {
102+
return AmbientLightStatus._MAP.INVALID;
103+
}
104+
105+
/**
106+
* Get the value for the given enum key
107+
* @param key - A key to find in the map of the subclass
108+
* @return {*} - Returns a value if found, or null if not found
109+
*/
110+
static valueForKey (key) {
111+
return AmbientLightStatus._valueForKey(key, AmbientLightStatus._MAP);
112+
}
113+
114+
/**
115+
* Get the key for the given enum value
116+
* @param value - A primitive value to find the matching key for in the map of the subclass
117+
* @return {*} - Returns a key if found, or null if not found
118+
*/
119+
static keyForValue (value) {
120+
return AmbientLightStatus._keyForValue(value, AmbientLightStatus._MAP);
121+
}
122+
}
123+
124+
AmbientLightStatus._MAP = Object.freeze({
125+
'NIGHT': 'NIGHT',
126+
'TWILIGHT_1': 'TWILIGHT_1',
127+
'TWILIGHT_2': 'TWILIGHT_2',
128+
'TWILIGHT_3': 'TWILIGHT_3',
129+
'TWILIGHT_4': 'TWILIGHT_4',
130+
'DAY': 'DAY',
131+
'ALS_UNKNOWN': 'UNKNOWN',
132+
'INVALID': 'INVALID',
133+
});
134+
135+
export { AmbientLightStatus };

lib/js/src/rpc/enums/AppHMIType.js

Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1+
/* eslint-disable camelcase */
12
/*
2-
* Copyright (c) 2019, Livio, Inc.
3+
* Copyright (c) 2020, SmartDeviceLink Consortium, Inc.
34
* All rights reserved.
45
*
56
* Redistribution and use in source and binary forms, with or without
@@ -13,9 +14,9 @@
1314
* disclaimer in the documentation and/or other materials provided with the
1415
* distribution.
1516
*
16-
* Neither the name of the Livio Inc. nor the names of its contributors
17-
* may be used to endorse or promote products derived from this software
18-
* without specific prior written permission.
17+
* Neither the name of the SmartDeviceLink Consortium Inc. nor the names of
18+
* its contributors may be used to endorse or promote products derived
19+
* from this software without specific prior written permission.
1920
*
2021
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
2122
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
@@ -33,10 +34,14 @@
3334
import { Enum } from '../../util/Enum.js';
3435

3536
/**
37+
* Enumeration listing possible app types.
3638
* @typedef {Enum} AppHMIType
3739
* @property {Object} _MAP
3840
*/
3941
class AppHMIType extends Enum {
42+
/**
43+
* @constructor
44+
*/
4045
constructor () {
4146
super();
4247
}
@@ -126,19 +131,19 @@ class AppHMIType extends Enum {
126131
}
127132

128133
/**
129-
* Get the value for the given enum key
130-
* @param value - A key to find in the map of the subclass
131-
* @return {*} - Returns a value if found, or null if not found
132-
*/
134+
* Get the value for the given enum key
135+
* @param key - A key to find in the map of the subclass
136+
* @return {*} - Returns a value if found, or null if not found
137+
*/
133138
static valueForKey (key) {
134139
return AppHMIType._valueForKey(key, AppHMIType._MAP);
135140
}
136141

137142
/**
138-
* Get the key for the given enum value
139-
* @param value - A primitive value to find the matching key for in the map of the subclass
140-
* @return {*} - Returns a key if found, or null if not found
141-
*/
143+
* Get the key for the given enum value
144+
* @param value - A primitive value to find the matching key for in the map of the subclass
145+
* @return {*} - Returns a key if found, or null if not found
146+
*/
142147
static keyForValue (value) {
143148
return AppHMIType._keyForValue(value, AppHMIType._MAP);
144149
}

0 commit comments

Comments
 (0)