Skip to content

Commit 29ece49

Browse files
committed
Merge remote-tracking branch 'origin/develop' into feature/sdl_0269_new_vehicle_data_climateData
2 parents f71de8c + 16fab63 commit 29ece49

14 files changed

Lines changed: 1031 additions & 7 deletions
Lines changed: 116 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,116 @@
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+
* @typedef {Enum} DoorStatusType
38+
* @property {Object} _MAP
39+
*/
40+
class DoorStatusType extends Enum {
41+
/**
42+
* Constructor for DoorStatusType.
43+
* @class
44+
* @since SmartDeviceLink 7.1.0
45+
*/
46+
constructor () {
47+
super();
48+
}
49+
50+
/**
51+
* Get the enum value for CLOSED.
52+
* @returns {String} - The enum value.
53+
*/
54+
static get CLOSED () {
55+
return DoorStatusType._MAP.CLOSED;
56+
}
57+
58+
/**
59+
* Get the enum value for LOCKED.
60+
* @returns {String} - The enum value.
61+
*/
62+
static get LOCKED () {
63+
return DoorStatusType._MAP.LOCKED;
64+
}
65+
66+
/**
67+
* Get the enum value for AJAR.
68+
* @returns {String} - The enum value.
69+
*/
70+
static get AJAR () {
71+
return DoorStatusType._MAP.AJAR;
72+
}
73+
74+
/**
75+
* Get the enum value for REMOVED.
76+
* @returns {String} - The enum value.
77+
*/
78+
static get REMOVED () {
79+
return DoorStatusType._MAP.REMOVED;
80+
}
81+
82+
/**
83+
* Get the value for the given enum key
84+
* @param {*} key - A key to find in the map of the subclass
85+
* @returns {*} - Returns a value if found, or null if not found
86+
*/
87+
static valueForKey (key) {
88+
return DoorStatusType._valueForKey(key, DoorStatusType._MAP);
89+
}
90+
91+
/**
92+
* Get the key for the given enum value
93+
* @param {*} value - A primitive value to find the matching key for in the map of the subclass
94+
* @returns {*} - Returns a key if found, or null if not found
95+
*/
96+
static keyForValue (value) {
97+
return DoorStatusType._keyForValue(value, DoorStatusType._MAP);
98+
}
99+
100+
/**
101+
* Retrieve all enumerated values for this class
102+
* @returns {*} - Returns an array of values
103+
*/
104+
static values () {
105+
return Object.values(DoorStatusType._MAP);
106+
}
107+
}
108+
109+
DoorStatusType._MAP = Object.freeze({
110+
'CLOSED': 'CLOSED',
111+
'LOCKED': 'LOCKED',
112+
'AJAR': 'AJAR',
113+
'REMOVED': 'REMOVED',
114+
});
115+
116+
export { DoorStatusType };
Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
/* eslint-disable camelcase */
2+
/*
3+
* Copyright (c) 2021, 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+
* @typedef {Enum} SeekIndicatorType
38+
* @property {Object} _MAP
39+
*/
40+
class SeekIndicatorType extends Enum {
41+
/**
42+
* Constructor for SeekIndicatorType.
43+
* @class
44+
* @since SmartDeviceLink 7.1.0
45+
*/
46+
constructor () {
47+
super();
48+
}
49+
50+
/**
51+
* Get the enum value for TRACK.
52+
* @returns {String} - The enum value.
53+
*/
54+
static get TRACK () {
55+
return SeekIndicatorType._MAP.TRACK;
56+
}
57+
58+
/**
59+
* Get the enum value for TIME.
60+
* @returns {String} - The enum value.
61+
*/
62+
static get TIME () {
63+
return SeekIndicatorType._MAP.TIME;
64+
}
65+
66+
/**
67+
* Get the value for the given enum key
68+
* @param {*} key - A key to find in the map of the subclass
69+
* @returns {*} - Returns a value if found, or null if not found
70+
*/
71+
static valueForKey (key) {
72+
return SeekIndicatorType._valueForKey(key, SeekIndicatorType._MAP);
73+
}
74+
75+
/**
76+
* Get the key for the given enum value
77+
* @param {*} value - A primitive value to find the matching key for in the map of the subclass
78+
* @returns {*} - Returns a key if found, or null if not found
79+
*/
80+
static keyForValue (value) {
81+
return SeekIndicatorType._keyForValue(value, SeekIndicatorType._MAP);
82+
}
83+
84+
/**
85+
* Retrieve all enumerated values for this class
86+
* @returns {*} - Returns an array of values
87+
*/
88+
static values () {
89+
return Object.values(SeekIndicatorType._MAP);
90+
}
91+
}
92+
93+
SeekIndicatorType._MAP = Object.freeze({
94+
'TRACK': 'TRACK',
95+
'TIME': 'TIME',
96+
});
97+
98+
export { SeekIndicatorType };

lib/js/src/rpc/messages/SetMediaClockTimer.js

Lines changed: 45 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/* eslint-disable camelcase */
22
/*
3-
* Copyright (c) 2020, SmartDeviceLink Consortium, Inc.
3+
* Copyright (c) 2021, SmartDeviceLink Consortium, Inc.
44
* All rights reserved.
55
*
66
* Redistribution and use in source and binary forms, with or without
@@ -34,6 +34,7 @@
3434
import { AudioStreamingIndicator } from '../enums/AudioStreamingIndicator.js';
3535
import { FunctionID } from '../enums/FunctionID.js';
3636
import { RpcRequest } from '../RpcRequest.js';
37+
import { SeekStreamingIndicator } from '../structs/SeekStreamingIndicator.js';
3738
import { StartTime } from '../structs/StartTime.js';
3839
import { UpdateMode } from '../enums/UpdateMode.js';
3940

@@ -130,11 +131,51 @@ class SetMediaClockTimer extends RpcRequest {
130131
return this.getObject(AudioStreamingIndicator, SetMediaClockTimer.KEY_AUDIO_STREAMING_INDICATOR);
131132
}
132133

134+
/**
135+
* Set the ForwardSeekIndicator
136+
* @since SmartDeviceLink 7.1.0
137+
* @param {SeekStreamingIndicator} indicator - Used to control the forward seek button to either skip forward a set amount of time or to the next track. - The desired ForwardSeekIndicator.
138+
* @returns {SetMediaClockTimer} - The class instance for method chaining.
139+
*/
140+
setForwardSeekIndicator (indicator) {
141+
this._validateType(SeekStreamingIndicator, indicator);
142+
this.setParameter(SetMediaClockTimer.KEY_FORWARD_SEEK_INDICATOR, indicator);
143+
return this;
144+
}
145+
146+
/**
147+
* Get the ForwardSeekIndicator
148+
* @returns {SeekStreamingIndicator} - the KEY_FORWARD_SEEK_INDICATOR value
149+
*/
150+
getForwardSeekIndicator () {
151+
return this.getObject(SeekStreamingIndicator, SetMediaClockTimer.KEY_FORWARD_SEEK_INDICATOR);
152+
}
153+
154+
/**
155+
* Set the BackSeekIndicator
156+
* @since SmartDeviceLink 7.1.0
157+
* @param {SeekStreamingIndicator} indicator - Used to control the back seek button to either skip back a set amount of time or to the previous track. - The desired BackSeekIndicator.
158+
* @returns {SetMediaClockTimer} - The class instance for method chaining.
159+
*/
160+
setBackSeekIndicator (indicator) {
161+
this._validateType(SeekStreamingIndicator, indicator);
162+
this.setParameter(SetMediaClockTimer.KEY_BACK_SEEK_INDICATOR, indicator);
163+
return this;
164+
}
165+
166+
/**
167+
* Get the BackSeekIndicator
168+
* @returns {SeekStreamingIndicator} - the KEY_BACK_SEEK_INDICATOR value
169+
*/
170+
getBackSeekIndicator () {
171+
return this.getObject(SeekStreamingIndicator, SetMediaClockTimer.KEY_BACK_SEEK_INDICATOR);
172+
}
173+
133174
/**
134175
* Set the CountRate
135176
* @since SmartDeviceLink 7.1.0
136177
* @param {Number} rate - The value of this parameter is the amount that the media clock timer will advance per 1.0 seconds of real time. Values less than 1.0 will therefore advance the timer slower than real-time, while values greater than 1.0 will advance the timer faster than real-time. e.g. If this parameter is set to `0.5`, the timer will advance one second per two seconds real-time, or at 50% speed. If this parameter is set to `2.0`, the timer will advance two seconds per one second real-time, or at 200% speed. - The desired CountRate.
137-
* {'num_min_value': 0.1, 'num_max_value': 100.0}
178+
* {'default_value': 1.0, 'num_min_value': 0.1, 'num_max_value': 100.0}
138179
* @returns {SetMediaClockTimer} - The class instance for method chaining.
139180
*/
140181
setCountRate (rate) {
@@ -155,6 +196,8 @@ SetMediaClockTimer.KEY_START_TIME = 'startTime';
155196
SetMediaClockTimer.KEY_END_TIME = 'endTime';
156197
SetMediaClockTimer.KEY_UPDATE_MODE = 'updateMode';
157198
SetMediaClockTimer.KEY_AUDIO_STREAMING_INDICATOR = 'audioStreamingIndicator';
199+
SetMediaClockTimer.KEY_FORWARD_SEEK_INDICATOR = 'forwardSeekIndicator';
200+
SetMediaClockTimer.KEY_BACK_SEEK_INDICATOR = 'backSeekIndicator';
158201
SetMediaClockTimer.KEY_COUNT_RATE = 'countRate';
159202

160203
export { SetMediaClockTimer };

0 commit comments

Comments
 (0)