diff --git a/proposals/0293-vehicle-type-filter.md b/proposals/0293-vehicle-type-filter.md index d4adc6723e..a111cc8437 100644 --- a/proposals/0293-vehicle-type-filter.md +++ b/proposals/0293-vehicle-type-filter.md @@ -1,9 +1,9 @@ # Enable OEM exclusive apps support * Proposal: [SDL-0293](0293-vehicle-type-filter.md) -* Author: [Ashwin Karemore](https://github.com/ashwink11) +* Author: [Ashwin Karemore](https://github.com/ashwink11) and [Iryna Lytvynenko](https://github.com/LitvinenkoIra) * Status: **Accepted with Revisions** -* Impacted Platforms: [Core / iOS / Java Suite / Protocol / JavaScript Suite] +* Impacted Platforms: [Core / iOS / Java Suite / Protocol / JavaScript Suite / HMI / RPC] ## Introduction @@ -67,6 +67,40 @@ The BSON payload of this message will have the following info. |systemSoftwareVersion|String| Vehicle system software version | |systemHardwareVersion|String| Vehicle system hardware version | +### MOBILE_API Changes + +#### Addition of "RegisterAppInterface" function + +```xml + + : + + Specifies the vehicle's type. See VehicleType. + + + + + + The software version of the system that implements the SmartDeviceLink core. + + + + + +``` +### HMI_API Changes + +#### Addition of "GetSystemInfo" function + +```xml + + : + + The hardware version of the system + + +``` + ### iOS, JavaScript Suite, and Java Suite App Library Changes The libraries will need to implement the above-mentioned protocol changes. In addition to implementing a protocol message, it will need the additional implementation to propagate vehicle type info to the application layer. @@ -79,36 +113,74 @@ The libraries will need to implement the above-mentioned protocol changes. In ad In JavaScript Suite App Library: ```javascript - /** + class SystemInfo { + + /** + * Initializes an instance of SystemInfo. + * @class + * @param {VehicleType} vehicleType + * @param {String} systemSoftwareVersion + * @param {String} systemHardwareVersion + */ + constructor (vehicleType = null, systemSoftwareVersion = null, systemHardwareVersion = null) { + this._vehicleType = vehicleType; + this._systemSoftwareVersion = systemSoftwareVersion; + this._systemHardwareVersion = systemHardwareVersion; + } + + setVehicleType(vehicleType) {} + getVehicleType() {} + + setSystemSoftwareVersion(SystemSoftwareVersion) {} + getSystemSoftwareVersion() {} + + setSystemHardwareVersion(SystemHardwareVersion) {} + getSystemHardwareVersion() {} + } + + /** * A way to determine if this SDL session should continue to be active while - * connected to the determined vehicle type. - * @param {SdlManager} sdlManager - A reference to an SdlManager instance. - * @param {VehicleType} vehicleType - the type of vehicle that this session is currently active on. + * connected to the determined system information of the vehicle. + * @param {SystemInfo} systemInfo - the system information of the vehicle that this session is currently active on. * @returns {Boolean} Return true if this session should continue, false if the session should end */ - onVehicleTypeReceived (sdlManager, vehicleType) {} + onSystemInfoReceived (systemInfo) {} ``` In iOS App Library: ```objective-c + @interface SDLSystemInfo + + @property (strong, nonatomic, readonly) SDLVehicleType *vehicleType; + @property (strong, nonatomic, readonly) NSString *systemSoftwareVersion; + @property (strong, nonatomic, readonly) NSString *systemHardwareVersion; + + @end + /** * A way to determine if this SDL session should continue to be active while - * connected to the determined vehicle type. - * @param {SDLVehicleType} vehicleType - the type of vehicle that this session is currently active on. + * connected to the determined system information of the vehicle. + * @param {SDLSystemInfo} systemInfo - the system information of the vehicle that this session is currently active on. * @returns {BOOL}Return true if this session should continue, false if the session should end */ - - (BOOL)didReceiveVehicleType:(SDLVehicleType *)type ; + - (BOOL)didReceiveSystemInfo:(SDLSystemInfo *)systemInfo; ``` In Java SE and Java EE App Libraries: ```java + class SystemInfo { + VehicleType vehicleType + String systemSoftwareVersion, + String systemHardwareVersion + } + /** * A way to determine if this SDL session should continue to be active while - * connected to the determined vehicle type. - * @param {VehicleType} vehicleType - the type of vehicle that this session is currently active on. + * connected to the determined system information of the vehicle. + * @param {SystemInfo} systemInfo - the system information of the vehicle that this session is currently active on. * @returns {boolean}Return true if this session should continue, false if the session should end */ - boolean onVehicleTypeReceived(VehicleType type); + boolean onSystemInfoReceived(SystemInfo systemInfo); ``` #### Android App Library Changes