summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Example Apps/Example ObjC/AlertManager.h24
-rw-r--r--Example Apps/Example ObjC/AlertManager.m43
-rw-r--r--Example Apps/Example ObjC/AudioManager.m5
-rw-r--r--Example Apps/Example ObjC/ButtonManager.h2
-rw-r--r--Example Apps/Example ObjC/ButtonManager.m94
-rw-r--r--Example Apps/Example ObjC/MenuManager.m26
-rw-r--r--Example Apps/Example ObjC/VehicleDataManager.m26
-rw-r--r--Example Apps/Example Swift/AlertManager.swift60
-rw-r--r--Example Apps/Example Swift/AudioManager.swift9
-rw-r--r--Example Apps/Example Swift/ButtonManager.swift107
-rw-r--r--Example Apps/Example Swift/MenuManager.swift28
-rw-r--r--Example Apps/Example Swift/ProxyManager.swift2
-rw-r--r--Example Apps/Example Swift/VehicleDataManager.swift14
-rw-r--r--Example Apps/Shared/AppConstants.h32
-rw-r--r--Example Apps/Shared/AppConstants.m34
-rw-r--r--SmartDeviceLink-iOS.podspec12
-rw-r--r--SmartDeviceLink-iOS.xcodeproj/project.pbxproj152
-rw-r--r--SmartDeviceLink.podspec12
-rw-r--r--SmartDeviceLink/SDLAddSubMenu.h65
-rw-r--r--SmartDeviceLink/SDLAddSubMenu.m66
-rw-r--r--SmartDeviceLink/SDLCancelInteraction.h55
-rw-r--r--SmartDeviceLink/SDLCancelInteraction.m46
-rw-r--r--SmartDeviceLink/SDLCapacityUnit.h48
-rw-r--r--SmartDeviceLink/SDLCapacityUnit.m37
-rw-r--r--SmartDeviceLink/SDLCharacterSet.h89
-rw-r--r--SmartDeviceLink/SDLCharacterSet.m53
-rw-r--r--SmartDeviceLink/SDLChoiceSetManager.m33
-rw-r--r--SmartDeviceLink/SDLDeleteSubMenu.m4
-rw-r--r--SmartDeviceLink/SDLDriverDistractionCapability.h63
-rw-r--r--SmartDeviceLink/SDLDriverDistractionCapability.m69
-rw-r--r--SmartDeviceLink/SDLDynamicUpdateCapabilities.h63
-rw-r--r--SmartDeviceLink/SDLDynamicUpdateCapabilities.m71
-rw-r--r--SmartDeviceLink/SDLFuelRange.h37
-rw-r--r--SmartDeviceLink/SDLFuelRange.m49
-rw-r--r--SmartDeviceLink/SDLFunctionID.m4
-rw-r--r--SmartDeviceLink/SDLGearStatus.h71
-rw-r--r--SmartDeviceLink/SDLGearStatus.m83
-rw-r--r--SmartDeviceLink/SDLGetFile.m4
-rw-r--r--SmartDeviceLink/SDLGetVehicleData.h75
-rw-r--r--SmartDeviceLink/SDLGetVehicleData.m126
-rw-r--r--SmartDeviceLink/SDLGetVehicleDataResponse.h76
-rw-r--r--SmartDeviceLink/SDLGetVehicleDataResponse.m70
-rw-r--r--SmartDeviceLink/SDLGlobals.h5
-rw-r--r--SmartDeviceLink/SDLGlobals.m11
-rw-r--r--SmartDeviceLink/SDLHMICapabilities.h54
-rw-r--r--SmartDeviceLink/SDLHMICapabilities.m58
-rw-r--r--SmartDeviceLink/SDLImageFieldName.h49
-rw-r--r--SmartDeviceLink/SDLImageFieldName.m35
-rw-r--r--SmartDeviceLink/SDLLifecycleManager.m29
-rw-r--r--SmartDeviceLink/SDLLifecycleProtocolHandler.m5
-rw-r--r--SmartDeviceLink/SDLMenuManager.m2
-rw-r--r--SmartDeviceLink/SDLMenuParams.m4
-rw-r--r--SmartDeviceLink/SDLNotificationConstants.h18
-rw-r--r--SmartDeviceLink/SDLNotificationConstants.m6
-rw-r--r--SmartDeviceLink/SDLOnSubtleAlertPressed.h46
-rw-r--r--SmartDeviceLink/SDLOnSubtleAlertPressed.m56
-rw-r--r--SmartDeviceLink/SDLOnUpdateFile.h58
-rw-r--r--SmartDeviceLink/SDLOnUpdateFile.m74
-rw-r--r--SmartDeviceLink/SDLOnUpdateSubMenu.h70
-rw-r--r--SmartDeviceLink/SDLOnUpdateSubMenu.m91
-rw-r--r--SmartDeviceLink/SDLOnVehicleData.h74
-rw-r--r--SmartDeviceLink/SDLOnVehicleData.m70
-rw-r--r--SmartDeviceLink/SDLPRNDL.h12
-rw-r--r--SmartDeviceLink/SDLPRNDL.m2
-rw-r--r--SmartDeviceLink/SDLRPCFunctionNames.h12
-rw-r--r--SmartDeviceLink/SDLRPCFunctionNames.m4
-rw-r--r--SmartDeviceLink/SDLRPCParameterNames.h59
-rw-r--r--SmartDeviceLink/SDLRPCParameterNames.m59
-rw-r--r--SmartDeviceLink/SDLResponseDispatcher.m24
-rw-r--r--SmartDeviceLink/SDLShowAppMenu.m4
-rw-r--r--SmartDeviceLink/SDLSubscribeButtonManager.m21
-rw-r--r--SmartDeviceLink/SDLSubscribeVehicleData.h78
-rw-r--r--SmartDeviceLink/SDLSubscribeVehicleData.m124
-rw-r--r--SmartDeviceLink/SDLSubscribeVehicleDataResponse.h74
-rw-r--r--SmartDeviceLink/SDLSubscribeVehicleDataResponse.m67
-rw-r--r--SmartDeviceLink/SDLSubtleAlert.h103
-rw-r--r--SmartDeviceLink/SDLSubtleAlert.m130
-rw-r--r--SmartDeviceLink/SDLSubtleAlertResponse.h56
-rw-r--r--SmartDeviceLink/SDLSubtleAlertResponse.m73
-rwxr-xr-xSmartDeviceLink/SDLSystemCapability.h57
-rwxr-xr-xSmartDeviceLink/SDLSystemCapability.m67
-rw-r--r--SmartDeviceLink/SDLSystemCapabilityManager.h27
-rw-r--r--SmartDeviceLink/SDLSystemCapabilityManager.m45
-rwxr-xr-xSmartDeviceLink/SDLSystemCapabilityType.h43
-rwxr-xr-xSmartDeviceLink/SDLSystemCapabilityType.m1
-rw-r--r--SmartDeviceLink/SDLSystemRequest.m4
-rw-r--r--SmartDeviceLink/SDLTextField+ScreenManagerExtensions.m2
-rw-r--r--SmartDeviceLink/SDLTextField.h6
-rw-r--r--SmartDeviceLink/SDLTextFieldName.h55
-rw-r--r--SmartDeviceLink/SDLTextFieldName.m37
-rw-r--r--SmartDeviceLink/SDLTransmissionType.h80
-rw-r--r--SmartDeviceLink/SDLTransmissionType.m42
-rw-r--r--SmartDeviceLink/SDLUnsubscribeVehicleData.h78
-rw-r--r--SmartDeviceLink/SDLUnsubscribeVehicleData.m123
-rw-r--r--SmartDeviceLink/SDLUnsubscribeVehicleDataResponse.h72
-rw-r--r--SmartDeviceLink/SDLUnsubscribeVehicleDataResponse.m68
-rw-r--r--SmartDeviceLink/SDLVehicleDataType.h25
-rw-r--r--SmartDeviceLink/SDLVehicleDataType.m50
-rw-r--r--SmartDeviceLink/SDLWindowCapability.h66
-rw-r--r--SmartDeviceLink/SDLWindowCapability.m67
-rw-r--r--SmartDeviceLink/SDLWindowState.h65
-rw-r--r--SmartDeviceLink/SDLWindowState.m71
-rw-r--r--SmartDeviceLink/SDLWindowStatus.h70
-rw-r--r--SmartDeviceLink/SDLWindowStatus.m73
-rw-r--r--SmartDeviceLink/SmartDeviceLink.h55
-rw-r--r--SmartDeviceLinkTests/DevAPISpecs/SDLChoiceSetManagerSpec.m2
-rw-r--r--SmartDeviceLinkTests/ProtocolSpecs/SDLFunctionIDSpec.m2
-rw-r--r--SmartDeviceLinkTests/RPCSpecs/EnumSpecs/SDLCapacityUnitSpec.m21
-rw-r--r--SmartDeviceLinkTests/RPCSpecs/EnumSpecs/SDLCharacterSetSpec.m6
-rw-r--r--SmartDeviceLinkTests/RPCSpecs/EnumSpecs/SDLImageFieldNameSpec.m2
-rw-r--r--SmartDeviceLinkTests/RPCSpecs/EnumSpecs/SDLPRNDLSpec.m6
-rwxr-xr-xSmartDeviceLinkTests/RPCSpecs/EnumSpecs/SDLSystemCapabilityTypeSpec.m3
-rw-r--r--SmartDeviceLinkTests/RPCSpecs/EnumSpecs/SDLTextFieldNameSpec.m3
-rw-r--r--SmartDeviceLinkTests/RPCSpecs/EnumSpecs/SDLTransmissionTypeSpec.m25
-rw-r--r--SmartDeviceLinkTests/RPCSpecs/EnumSpecs/SDLVehicleDataTypeSpec.m61
-rw-r--r--SmartDeviceLinkTests/RPCSpecs/NotificationSpecs/SDLOnSubtleAlertPressedSpec.m29
-rw-r--r--SmartDeviceLinkTests/RPCSpecs/NotificationSpecs/SDLOnUpdateFileSpec.m74
-rw-r--r--SmartDeviceLinkTests/RPCSpecs/NotificationSpecs/SDLOnUpdateSubMenuSpec.m88
-rw-r--r--SmartDeviceLinkTests/RPCSpecs/NotificationSpecs/SDLOnVehicleDataSpec.m499
-rw-r--r--SmartDeviceLinkTests/RPCSpecs/RequestSpecs/SDLAddSubMenuSpec.m45
-rw-r--r--SmartDeviceLinkTests/RPCSpecs/RequestSpecs/SDLCancelInteractionSpec.m14
-rwxr-xr-xSmartDeviceLinkTests/RPCSpecs/RequestSpecs/SDLDeleteSubMenuSpec.m2
-rw-r--r--SmartDeviceLinkTests/RPCSpecs/RequestSpecs/SDLGetFileSpec.m2
-rw-r--r--SmartDeviceLinkTests/RPCSpecs/RequestSpecs/SDLGetVehicleDataSpec.m605
-rw-r--r--SmartDeviceLinkTests/RPCSpecs/RequestSpecs/SDLRegisterAppInterfaceSpec.m6
-rw-r--r--SmartDeviceLinkTests/RPCSpecs/RequestSpecs/SDLShowAppMenuSpec.m2
-rw-r--r--SmartDeviceLinkTests/RPCSpecs/RequestSpecs/SDLSubscribeVehicleDataSpec.m563
-rw-r--r--SmartDeviceLinkTests/RPCSpecs/RequestSpecs/SDLSubtleAlertSpec.m107
-rw-r--r--SmartDeviceLinkTests/RPCSpecs/RequestSpecs/SDLSystemRequestSpec.m2
-rw-r--r--SmartDeviceLinkTests/RPCSpecs/RequestSpecs/SDLUnsubscribeVehicleDataSpec.m587
-rw-r--r--SmartDeviceLinkTests/RPCSpecs/ResponseSpecs/SDLGetVehicleDataResponseSpec.m488
-rw-r--r--SmartDeviceLinkTests/RPCSpecs/ResponseSpecs/SDLSubscribeVehicleDataResponseSpec.m356
-rw-r--r--SmartDeviceLinkTests/RPCSpecs/ResponseSpecs/SDLSubtleAlertResponseSpec.m54
-rw-r--r--SmartDeviceLinkTests/RPCSpecs/ResponseSpecs/SDLUnsubscribeVehicleDataResponseSpec.m401
-rw-r--r--SmartDeviceLinkTests/RPCSpecs/StructSpecs/SDLDriverDistractionCapabilitySpec.m60
-rw-r--r--SmartDeviceLinkTests/RPCSpecs/StructSpecs/SDLDynamicUpdateCapabilitiesSpec.m75
-rw-r--r--SmartDeviceLinkTests/RPCSpecs/StructSpecs/SDLFuelRangeSpec.m76
-rw-r--r--SmartDeviceLinkTests/RPCSpecs/StructSpecs/SDLGearStatusSpec.m48
-rw-r--r--SmartDeviceLinkTests/RPCSpecs/StructSpecs/SDLHMICapabilitiesSpec.m69
-rw-r--r--SmartDeviceLinkTests/RPCSpecs/StructSpecs/SDLMenuParamsSpec.m4
-rwxr-xr-xSmartDeviceLinkTests/RPCSpecs/StructSpecs/SDLSystemCapabilitySpec.m45
-rw-r--r--SmartDeviceLinkTests/RPCSpecs/StructSpecs/SDLTextFieldSpec.m2
-rw-r--r--SmartDeviceLinkTests/RPCSpecs/StructSpecs/SDLWindowCapabilitySpec.m84
-rw-r--r--SmartDeviceLinkTests/RPCSpecs/StructSpecs/SDLWindowStateSpec.m50
-rw-r--r--SmartDeviceLinkTests/RPCSpecs/StructSpecs/SDLWindowStatusSpec.m56
-rw-r--r--SmartDeviceLinkTests/SDLSystemCapabilityManagerSpec.m5
-rw-r--r--SmartDeviceLink_Example/SubscribeButtonManager.m3
-rw-r--r--SmartDeviceLink_Example/SubscribeButtonManager.swift7
-rw-r--r--generator/templates/base_struct_function.m.jinja22
-rw-r--r--generator/transformers/common_producer.py64
150 files changed, 7656 insertions, 2154 deletions
diff --git a/Example Apps/Example ObjC/AlertManager.h b/Example Apps/Example ObjC/AlertManager.h
index 10508261a..d7b42b655 100644
--- a/Example Apps/Example ObjC/AlertManager.h
+++ b/Example Apps/Example ObjC/AlertManager.h
@@ -9,20 +9,26 @@
#import <Foundation/Foundation.h>
@class SDLAlert;
+@class SDLManager;
+@class SDLSubtleAlert;
NS_ASSUME_NONNULL_BEGIN
@interface AlertManager : NSObject
-/**
- Creates an alert with up to two lines of text, an image, and a close button that will dismiss the alert when tapped.
-
- @param textField1 The first line of the message to display in the alert
- @param textField2 The second line of the message to display in the alert
- @param iconName An image to show in the alert.
- @return An SDLAlert object
- */
-+ (SDLAlert *)alertWithMessageAndCloseButton:(NSString *)textField1 textField2:(nullable NSString *)textField2 iconName:(nullable NSString *)iconName;
+/// Sends an alert with up to two lines of text, an image, and a close button that will dismiss the alert when tapped.
+/// @param imageName The name of the image to upload
+/// @param textField1 The first line of text in the alert
+/// @param textField2 The second line of text in the alert
+/// @param sdlManager The SDLManager
++ (void)sendAlertWithManager:(SDLManager *)sdlManager image:(nullable NSString *)imageName textField1:(NSString *)textField1 textField2:(nullable NSString *)textField2;
+
+/// Sends a subtle alert with up to two lines of text, and an image.
+/// @param imageName The name of the image to upload
+/// @param textField1 The first line of text in the alert
+/// @param textField2 The second line of text in the alert
+/// @param sdlManager The SDLManager
++ (void)sendSubtleAlertWithManager:(SDLManager *)sdlManager image:(nullable NSString *)imageName textField1:(NSString *)textField1 textField2:(nullable NSString *)textField2;
@end
diff --git a/Example Apps/Example ObjC/AlertManager.m b/Example Apps/Example ObjC/AlertManager.m
index 3efbba544..9ee13fcdd 100644
--- a/Example Apps/Example ObjC/AlertManager.m
+++ b/Example Apps/Example ObjC/AlertManager.m
@@ -14,12 +14,47 @@ NS_ASSUME_NONNULL_BEGIN
@implementation AlertManager
-+ (SDLSoftButton *)sdlex_okSoftButton {
- return [[SDLSoftButton alloc] initWithType:SDLSoftButtonTypeText text:AlertOKButtonText image:nil highlighted:YES buttonId:1 systemAction:nil handler:nil];
++ (void)sendAlertWithManager:(SDLManager *)sdlManager image:(nullable NSString *)imageName textField1:(NSString *)textField1 textField2:(nullable NSString *)textField2 {
+ SDLSoftButton *okSoftButton = [[SDLSoftButton alloc] initWithType:SDLSoftButtonTypeText text:AlertOKButtonText image:nil highlighted:YES buttonId:1 systemAction:nil handler:nil];
+ SDLAlert *alert = [[SDLAlert alloc] initWithAlertText1:textField1 alertText2:textField2 alertText3:nil softButtons:@[okSoftButton] playTone:YES ttsChunks:nil duration:5000 progressIndicator:NO alertIcon:nil cancelID:0];
+
+ if (imageName == nil) {
+ [sdlManager sendRequest:alert];
+ } else {
+ [self sdlex_sendImageWithName:imageName sdlManager:sdlManager completionHandler:^(BOOL success, NSString * _Nullable artworkName) {
+ if (success) {
+ alert.alertIcon = [[SDLImage alloc] initWithName:artworkName isTemplate:YES];
+ }
+ [sdlManager sendRequest:alert];
+ }];
+ }
}
-+ (SDLAlert *)alertWithMessageAndCloseButton:(NSString *)textField1 textField2:(nullable NSString *)textField2 iconName:(nullable NSString *)iconName {
- return [[SDLAlert alloc] initWithAlertText1:textField1 alertText2:textField2 alertText3:nil softButtons:@[[self.class sdlex_okSoftButton]] playTone:YES ttsChunks:nil duration:5000 progressIndicator:NO alertIcon:((iconName != nil) ? [[SDLImage alloc] initWithName:iconName isTemplate:YES] : nil) cancelID:0];
++ (void)sendSubtleAlertWithManager:(SDLManager *)sdlManager image:(nullable NSString *)imageName textField1:(NSString *)textField1 textField2:(nullable NSString *)textField2 {
+ SDLSubtleAlert *subtleAlert = [[SDLSubtleAlert alloc] initWithAlertText1:textField1 alertText2:textField2 alertIcon:nil ttsChunks:nil duration:nil softButtons:nil cancelID:0];
+
+ if (imageName == nil) {
+ [sdlManager sendRequest:subtleAlert];
+ } else {
+ [self sdlex_sendImageWithName:imageName sdlManager:sdlManager completionHandler:^(BOOL success, NSString * _Nullable artworkName) {
+ if (success) {
+ subtleAlert.alertIcon = [[SDLImage alloc] initWithName:artworkName isTemplate:YES];
+ }
+ [sdlManager sendRequest:subtleAlert];
+ }];
+ }
+}
+
+/// Helper method for uploading an image before it is shown in an alert
+/// @param imageName The name of the image to upload
+/// @param sdlManager The SDLManager
+/// @param completionHandler Handler called when the artwork has finished uploading with the success of the upload and the name of the uploaded image.
++ (void)sdlex_sendImageWithName:(NSString *)imageName sdlManager:(SDLManager *)sdlManager completionHandler:(void (^)(BOOL success, NSString * _Nonnull artworkName))completionHandler {
+ SDLArtwork *artwork = [SDLArtwork artworkWithImage:[[UIImage imageNamed:imageName] imageWithRenderingMode:UIImageRenderingModeAlwaysTemplate] asImageFormat:SDLArtworkImageFormatPNG];
+
+ [sdlManager.fileManager uploadArtwork:artwork completionHandler:^(BOOL success, NSString * _Nonnull artworkName, NSUInteger bytesAvailable, NSError * _Nullable error) {
+ return completionHandler(success, artworkName);
+ }];
}
@end
diff --git a/Example Apps/Example ObjC/AudioManager.m b/Example Apps/Example ObjC/AudioManager.m
index cd6ec4ecf..dc1c77e41 100644
--- a/Example Apps/Example ObjC/AudioManager.m
+++ b/Example Apps/Example ObjC/AudioManager.m
@@ -7,6 +7,7 @@
//
#import "AlertManager.h"
+#import "AppConstants.h"
#import "AudioManager.h"
#import <AVFoundation/AVFoundation.h>
#import "SDLLogMacros.h"
@@ -86,7 +87,7 @@ NS_ASSUME_NONNULL_BEGIN
- (void)startRecording {
if (self.speechRecognitionAuthState != SpeechRecognitionAuthStateAuthorized) {
SDLLogW(@"This app does not have permission to access the Speech Recognition API");
- [self.sdlManager sendRequest:[AlertManager alertWithMessageAndCloseButton:@"You must give this app permission to access Speech Recognition" textField2:nil iconName:nil]];
+ [AlertManager sendAlertWithManager:self.sdlManager image:nil textField1:AlertSpeechPermissionsWarningText textField2:nil];
return;
}
@@ -155,7 +156,7 @@ NS_ASSUME_NONNULL_BEGIN
// The `PerformAudioPassThru` timed out or the "Done" button was pressed in the pop-up.
SDLLogD(@"Audio Pass Thru ended successfully");
NSString *alertMessage = [NSString stringWithFormat:@"You said: %@", weakSelf.speechTranscription.length == 0 ? @"No speech detected" : weakSelf.speechTranscription];
- [weakSelf.sdlManager sendRequest:[AlertManager alertWithMessageAndCloseButton:alertMessage textField2:nil iconName:nil]];
+ [AlertManager sendAlertWithManager:weakSelf.sdlManager image:nil textField1:alertMessage textField2:nil];
} else if ([resultCode isEqualToEnum:SDLResultAborted]) {
// The "Cancel" button was pressed in the pop-up. Ignore this audio pass thru.
SDLLogD(@"Audio recording canceled");
diff --git a/Example Apps/Example ObjC/ButtonManager.h b/Example Apps/Example ObjC/ButtonManager.h
index 867f50c7c..256ea8ee4 100644
--- a/Example Apps/Example ObjC/ButtonManager.h
+++ b/Example Apps/Example ObjC/ButtonManager.h
@@ -18,12 +18,12 @@ typedef void(^RefreshUIHandler)(void);
@interface ButtonManager : NSObject
@property (assign, nonatomic, getter=isTextEnabled, readonly) BOOL textEnabled;
-@property (assign, nonatomic, getter=isHexagonEnabled, readonly) BOOL toggleEnabled;
@property (assign, nonatomic, getter=areImagesEnabled, readonly) BOOL imagesEnabled;
- (instancetype)init NS_UNAVAILABLE;
- (instancetype)initWithManager:(SDLManager *)manager refreshUIHandler:(RefreshUIHandler)refreshUIHandler;
+/// An array of all the soft buttons
- (NSArray<SDLSoftButtonObject *> *)allScreenSoftButtons;
@end
diff --git a/Example Apps/Example ObjC/ButtonManager.m b/Example Apps/Example ObjC/ButtonManager.m
index 1809249db..4ca86be0a 100644
--- a/Example Apps/Example ObjC/ButtonManager.m
+++ b/Example Apps/Example ObjC/ButtonManager.m
@@ -19,7 +19,6 @@ NS_ASSUME_NONNULL_BEGIN
@property (strong, nonatomic) SDLManager *sdlManager;
@property (assign, nonatomic, getter=isTextEnabled, readwrite) BOOL textEnabled;
-@property (assign, nonatomic, getter=isHexagonEnabled, readwrite) BOOL toggleEnabled;
@property (assign, nonatomic, getter=areImagesEnabled, readwrite) BOOL imagesEnabled;
@end
@@ -37,7 +36,6 @@ NS_ASSUME_NONNULL_BEGIN
_textEnabled = YES;
_imagesEnabled = YES;
- _toggleEnabled = YES;
return self;
}
@@ -52,61 +50,73 @@ NS_ASSUME_NONNULL_BEGIN
- (void)setImagesEnabled:(BOOL)imagesEnabled {
_imagesEnabled = imagesEnabled;
-
- SDLSoftButtonObject *object = [self.sdlManager.screenManager softButtonObjectNamed:AlertSoftButton];
- [object transitionToNextState];
-
if (self.refreshUIHandler == nil) { return; }
self.refreshUIHandler();
}
-- (void)setToggleEnabled:(BOOL)toggleEnabled {
- _toggleEnabled = toggleEnabled;
- SDLSoftButtonObject *object = [self.sdlManager.screenManager softButtonObjectNamed:ToggleSoftButton];
- [object transitionToStateNamed:(toggleEnabled ? ToggleSoftButtonImageOnState : ToggleSoftButtonImageOffState)];
+#pragma mark - Getters
+
+- (BOOL)sdlex_isSubtleAlertAllowed {
+ return [self.sdlManager.permissionManager isRPCNameAllowed:SDLRPCFunctionNameSubtleAlert];
+}
+
+- (BOOL)sdlex_isAlertAllowed {
+ return [self.sdlManager.permissionManager isRPCNameAllowed:SDLRPCFunctionNameAlert];
}
#pragma mark - Custom Soft Buttons
- (NSArray<SDLSoftButtonObject *> *)allScreenSoftButtons {
- return @[[self sdlex_softButtonAlertWithManager:self.sdlManager], [self sdlex_softButtonToggleWithManager:self.sdlManager], [self sdlex_softButtonTextVisibleWithManager:self.sdlManager], [self sdlex_softButtonImagesVisibleWithManager:self.sdlManager]];
+ return @[[self sdlex_softButtonAlert], [self sdlex_softButtonSubtleAlert], [self sdlex_softButtonTextVisible], [self sdlex_softButtonImagesVisible]];
}
-- (SDLSoftButtonObject *)sdlex_softButtonAlertWithManager:(SDLManager *)manager {
- SDLSoftButtonState *alertImageAndTextState = [[SDLSoftButtonState alloc] initWithStateName:AlertSoftButtonImageState text:AlertSoftButtonText artwork:[SDLArtwork artworkWithImage:[[UIImage imageNamed:CarBWIconImageName] imageWithRenderingMode:UIImageRenderingModeAlwaysTemplate] name:CarBWIconImageName asImageFormat:SDLArtworkImageFormatPNG]];
- SDLSoftButtonState *alertTextState = [[SDLSoftButtonState alloc] initWithStateName:AlertSoftButtonTextState text:AlertSoftButtonText image:nil];
+/// Returns a soft button that shows an alert when tapped.
+/// @returns A SDLSoftButtonObject object
+- (SDLSoftButtonObject *)sdlex_softButtonAlert {
+ SDLSoftButtonState *imageAndTextState = [[SDLSoftButtonState alloc] initWithStateName:AlertSoftButtonImageAndTextState text:AlertSoftButtonText artwork:[SDLArtwork artworkWithImage:[[UIImage imageNamed:AlertBWIconName] imageWithRenderingMode:UIImageRenderingModeAlwaysTemplate] asImageFormat:SDLArtworkImageFormatPNG]];
+ SDLSoftButtonState *textState = [[SDLSoftButtonState alloc] initWithStateName:AlertSoftButtonTextState text:AlertSoftButtonText image:nil];
__weak typeof(self) weakself = self;
- SDLSoftButtonObject *alertSoftButton = [[SDLSoftButtonObject alloc] initWithName:AlertSoftButton states:@[alertImageAndTextState, alertTextState] initialStateName:alertImageAndTextState.name handler:^(SDLOnButtonPress * _Nullable buttonPress, SDLOnButtonEvent * _Nullable buttonEvent) {
+ SDLSoftButtonObject *alertSoftButton = [[SDLSoftButtonObject alloc] initWithName:AlertSoftButton states:@[imageAndTextState, textState] initialStateName:imageAndTextState.name handler:^(SDLOnButtonPress * _Nullable buttonPress, SDLOnButtonEvent * _Nullable buttonEvent) {
if (buttonPress == nil) { return; }
- [weakself.sdlManager.fileManager uploadArtwork:[SDLArtwork artworkWithImage:[UIImage imageNamed:CarBWIconImageName] asImageFormat:SDLArtworkImageFormatPNG] completionHandler:^(BOOL success, NSString * _Nonnull artworkName, NSUInteger bytesAvailable, NSError * _Nullable error) {
- [weakself.sdlManager sendRequest:[AlertManager alertWithMessageAndCloseButton:@"You pushed the soft button!" textField2:nil iconName:artworkName] withResponseHandler:^(__kindof SDLRPCRequest * _Nullable request, __kindof SDLRPCResponse * _Nullable response, NSError * _Nullable error) {
- NSLog(@"ALERT req: %@, res: %@, err: %@", request, response, error);
- }];
- }];
-
- SDLLogD(@"Star icon soft button press fired");
+ if (self.sdlex_isAlertAllowed) {
+ [AlertManager sendAlertWithManager:weakself.sdlManager image:CarBWIconImageName textField1:AlertMessageText textField2:nil];
+ } else if (self.sdlex_isSubtleAlertAllowed) {
+ [AlertManager sendSubtleAlertWithManager:weakself.sdlManager image:CarBWIconImageName textField1:AlertMessageText textField2:nil];
+ } else {
+ SDLLogW(@"The module does not support the Alert request or the Subtle Alert request");
+ }
}];
return alertSoftButton;
}
-- (SDLSoftButtonObject *)sdlex_softButtonToggleWithManager:(SDLManager *)manager {
- SDLSoftButtonState *toggleImageOnState = [[SDLSoftButtonState alloc] initWithStateName:ToggleSoftButtonImageOnState text:nil image:[[UIImage imageNamed:ToggleOnBWIconName] imageWithRenderingMode:UIImageRenderingModeAlwaysTemplate]];
- SDLSoftButtonState *toggleImageOffState = [[SDLSoftButtonState alloc] initWithStateName:ToggleSoftButtonImageOffState text:nil image:[[UIImage imageNamed:ToggleOffBWIconName] imageWithRenderingMode:UIImageRenderingModeAlwaysTemplate]];
+/// Returns a soft button that shows a subtle alert when tapped. If the subtle alert is not supported, then a regular alert is shown.
+/// @returns A SDLSoftButtonObject object
+- (SDLSoftButtonObject *)sdlex_softButtonSubtleAlert {
+ SDLSoftButtonState *imageAndTextState = [[SDLSoftButtonState alloc] initWithStateName:SubtleAlertSoftButtonImageAndTextState text:SubtleAlertSoftButtonText artwork:[SDLArtwork artworkWithImage:[[UIImage imageNamed:BatteryFullBWIconName] imageWithRenderingMode:UIImageRenderingModeAlwaysTemplate] asImageFormat:SDLArtworkImageFormatPNG]];
+ SDLSoftButtonState *textState = [[SDLSoftButtonState alloc] initWithStateName:SubtleAlertSoftButtonTextState text:SubtleAlertSoftButtonText image:nil];
__weak typeof(self) weakself = self;
- SDLSoftButtonObject *toggleButton = [[SDLSoftButtonObject alloc] initWithName:ToggleSoftButton states:@[toggleImageOnState, toggleImageOffState] initialStateName:toggleImageOnState.name handler:^(SDLOnButtonPress * _Nullable buttonPress, SDLOnButtonEvent * _Nullable buttonEvent) {
+ SDLSoftButtonObject *subtleAlertSoftButton = [[SDLSoftButtonObject alloc] initWithName:SubtleAlertSoftButton states:@[imageAndTextState, textState] initialStateName:imageAndTextState.name handler:^(SDLOnButtonPress * _Nullable buttonPress, SDLOnButtonEvent * _Nullable buttonEvent) {
if (buttonPress == nil) { return; }
- weakself.toggleEnabled = !weakself.toggleEnabled;
- SDLLogD(@"Toggle icon button press fired %d", self.toggleEnabled);
+
+ if (self.sdlex_isSubtleAlertAllowed) {
+ [AlertManager sendSubtleAlertWithManager:weakself.sdlManager image:BatteryEmptyBWIconName textField1:SubtleAlertHeaderText textField2:SubtleAlertSubheaderText];
+ } else if (self.sdlex_isAlertAllowed) {
+ [AlertManager sendAlertWithManager:weakself.sdlManager image:BatteryEmptyBWIconName textField1:SubtleAlertHeaderText textField2:SubtleAlertSubheaderText];
+ } else {
+ SDLLogW(@"The module does not support the Alert request or the Subtle Alert request");
+ }
}];
- return toggleButton;
+ return subtleAlertSoftButton;
}
-- (SDLSoftButtonObject *)sdlex_softButtonTextVisibleWithManager:(SDLManager *)manager {
+/// Returns a soft button that toggles the textfield visibility state.
+/// @returns A SDLSoftButtonObject object
+- (SDLSoftButtonObject *)sdlex_softButtonTextVisible {
SDLSoftButtonState *textOnState = [[SDLSoftButtonState alloc] initWithStateName:TextVisibleSoftButtonTextOnState text:TextVisibleSoftButtonTextOnText image:nil];
SDLSoftButtonState *textOffState = [[SDLSoftButtonState alloc] initWithStateName:TextVisibleSoftButtonTextOffState text:TextVisibleSoftButtonTextOffText image:nil];
@@ -115,34 +125,34 @@ NS_ASSUME_NONNULL_BEGIN
if (buttonPress == nil) { return; }
weakself.textEnabled = !weakself.textEnabled;
- SDLSoftButtonObject *object = [weakself.sdlManager.screenManager softButtonObjectNamed:TextVisibleSoftButton];
- [object transitionToNextState];
- SDLLogD(@"Text visibility soft button press fired %d", weakself.textEnabled);
+ SDLSoftButtonObject *textVisibleSoftButton = [weakself.sdlManager.screenManager softButtonObjectNamed:TextVisibleSoftButton];
+ [textVisibleSoftButton transitionToNextState];
}];
return textButton;
}
-- (SDLSoftButtonObject *)sdlex_softButtonImagesVisibleWithManager:(SDLManager *)manager {
+/// Returns a soft button that toggles the image visibility state.
+/// @returns A SDLSoftButtonObject object
+- (SDLSoftButtonObject *)sdlex_softButtonImagesVisible {
SDLSoftButtonState *imagesOnState = [[SDLSoftButtonState alloc] initWithStateName:ImagesVisibleSoftButtonImageOnState text:ImagesVisibleSoftButtonImageOnText image:nil];
SDLSoftButtonState *imagesOffState = [[SDLSoftButtonState alloc] initWithStateName:ImagesVisibleSoftButtonImageOffState text:ImagesVisibleSoftButtonImageOffText image:nil];
__weak typeof(self) weakself = self;
SDLSoftButtonObject *imagesButton = [[SDLSoftButtonObject alloc] initWithName:ImagesVisibleSoftButton states:@[imagesOnState, imagesOffState] initialStateName:imagesOnState.name handler:^(SDLOnButtonPress * _Nullable buttonPress, SDLOnButtonEvent * _Nullable buttonEvent) {
- if (buttonPress == nil) {
- return;
- }
+ if (buttonPress == nil) { return; }
weakself.imagesEnabled = !weakself.imagesEnabled;
- SDLSoftButtonObject *object = [weakself.sdlManager.screenManager softButtonObjectNamed:ImagesVisibleSoftButton];
- [object transitionToNextState];
+ SDLSoftButtonObject *imagesVisibleSoftButton = [weakself.sdlManager.screenManager softButtonObjectNamed:ImagesVisibleSoftButton];
+ [imagesVisibleSoftButton transitionToNextState];
- SDLSoftButtonObject *textButton = [weakself.sdlManager.screenManager softButtonObjectNamed:TextVisibleSoftButton];
- [textButton transitionToNextState];
+ SDLSoftButtonObject *alertSoftButton = [weakself.sdlManager.screenManager softButtonObjectNamed:AlertSoftButton];
+ [alertSoftButton transitionToNextState];
- SDLLogD(@"Image visibility soft button press fired %d", weakself.imagesEnabled);
+ SDLSoftButtonObject *subtleAlertSoftButton = [weakself.sdlManager.screenManager softButtonObjectNamed:SubtleAlertSoftButton];
+ [subtleAlertSoftButton transitionToNextState];
}];
return imagesButton;
diff --git a/Example Apps/Example ObjC/MenuManager.m b/Example Apps/Example ObjC/MenuManager.m
index 00a05b377..7d572a658 100644
--- a/Example Apps/Example ObjC/MenuManager.m
+++ b/Example Apps/Example ObjC/MenuManager.m
@@ -62,7 +62,7 @@ NS_ASSUME_NONNULL_BEGIN
}
+ (NSArray<NSString *> *)sdlex_allVehicleDataTypes {
- return @[ACAccelerationPedalPositionMenuName, ACAirbagStatusMenuName, ACBeltStatusMenuName, ACBodyInformationMenuName, ACClusterModeStatusMenuName, ACDeviceStatusMenuName, ACDriverBrakingMenuName, ACECallInfoMenuName, ACElectronicParkBrakeStatus, ACEmergencyEventMenuName, ACEngineOilLifeMenuName, ACEngineTorqueMenuName, ACExternalTemperatureMenuName, ACFuelLevelMenuName, ACFuelLevelStateMenuName, ACFuelRangeMenuName, ACGPSMenuName, ACHeadLampStatusMenuName, ACInstantFuelConsumptionMenuName, ACMyKeyMenuName, ACOdometerMenuName, ACPRNDLMenuName, ACRPMMenuName, ACSpeedMenuName, ACSteeringWheelAngleMenuName, ACTirePressureMenuName, ACTurnSignalMenuName, ACVINMenuName, ACWiperStatusMenuName];
+ return @[ACAccelerationPedalPositionMenuName, ACAirbagStatusMenuName, ACBeltStatusMenuName, ACBodyInformationMenuName, ACClusterModeStatusMenuName, ACDeviceStatusMenuName, ACDriverBrakingMenuName, ACECallInfoMenuName, ACElectronicParkBrakeStatus, ACEmergencyEventMenuName, ACEngineOilLifeMenuName, ACEngineTorqueMenuName, ACExternalTemperatureMenuName, ACFuelLevelMenuName, ACFuelLevelStateMenuName, ACFuelRangeMenuName, ACGearStatusMenuName, ACGPSMenuName, ACHeadLampStatusMenuName, ACInstantFuelConsumptionMenuName, ACMyKeyMenuName, ACOdometerMenuName, ACPRNDLMenuName, ACRPMMenuName, ACSpeedMenuName, ACSteeringWheelAngleMenuName, ACTirePressureMenuName, ACTurnSignalMenuName, ACVINMenuName, ACWiperStatusMenuName];
}
+ (SDLMenuCell *)sdlex_menuCellShowPerformInteractionWithManager:(SDLManager *)manager performManager:(PerformInteractionManager *)performManager {
@@ -81,7 +81,7 @@ NS_ASSUME_NONNULL_BEGIN
+ (SDLMenuCell *)sdlex_menuCellDialNumberWithManager:(SDLManager *)manager {
return [[SDLMenuCell alloc] initWithTitle:ACDialPhoneNumberMenuName icon:[SDLArtwork artworkWithImage:[[UIImage imageNamed:PhoneBWIconImageName] imageWithRenderingMode:UIImageRenderingModeAlwaysTemplate] asImageFormat:SDLArtworkImageFormatPNG] voiceCommands:@[ACDialPhoneNumberMenuName] handler:^(SDLTriggerSource _Nonnull triggerSource) {
if (![RPCPermissionsManager isDialNumberRPCAllowedWithManager:manager]) {
- [manager sendRequest:[AlertManager alertWithMessageAndCloseButton:@"This app does not have the required permissions to dial a number" textField2:nil iconName:nil]];
+ [AlertManager sendAlertWithManager:manager image:nil textField1:AlertDialNumberPermissionsWarningText textField2:nil];
return;
}
@@ -100,7 +100,7 @@ NS_ASSUME_NONNULL_BEGIN
SDLSetDisplayLayout* display = [[SDLSetDisplayLayout alloc] initWithPredefinedLayout:SDLPredefinedLayoutNonMedia];
[manager sendRequest:display withResponseHandler:^(SDLRPCRequest *request, SDLRPCResponse *response, NSError *error) {
if (!response.success) {
- [manager sendRequest:[AlertManager alertWithMessageAndCloseButton:errorMessage textField2:nil iconName:nil]];
+ [AlertManager sendAlertWithManager:manager image:nil textField1:errorMessage textField2:nil];
}
}];
}];
@@ -111,7 +111,7 @@ NS_ASSUME_NONNULL_BEGIN
SDLSetDisplayLayout* display = [[SDLSetDisplayLayout alloc] initWithPredefinedLayout:SDLPredefinedLayoutGraphicWithText];
[manager sendRequest:display withResponseHandler:^(SDLRPCRequest *request, SDLRPCResponse *response, NSError *error) {
if (!response.success) {
- [manager sendRequest:[AlertManager alertWithMessageAndCloseButton:errorMessage textField2:nil iconName:nil]];
+ [AlertManager sendAlertWithManager:manager image:nil textField1:errorMessage textField2:nil];
}
}];
}];
@@ -124,7 +124,7 @@ NS_ASSUME_NONNULL_BEGIN
NSMutableArray *submenuItems = [NSMutableArray array];
for (int i = 0; i < 75; i++) {
SDLMenuCell *cell = [[SDLMenuCell alloc] initWithTitle:[NSString stringWithFormat:@"%@ %i", ACSubmenuItemMenuName, i] icon:[SDLArtwork artworkWithImage:[[UIImage imageNamed:MenuBWIconImageName] imageWithRenderingMode:UIImageRenderingModeAlwaysTemplate] asImageFormat:SDLArtworkImageFormatPNG] voiceCommands:nil handler:^(SDLTriggerSource _Nonnull triggerSource) {
- [manager sendRequest:[AlertManager alertWithMessageAndCloseButton:[NSString stringWithFormat:@"You selected %@ %i", ACSubmenuItemMenuName, i] textField2:nil iconName:nil]];
+ [AlertManager sendAlertWithManager:manager image:nil textField1:[NSString stringWithFormat:@"You selected %@ %i", ACSubmenuItemMenuName, i] textField2:nil];
}];
[submenuItems addObject:cell];
}
@@ -138,11 +138,11 @@ NS_ASSUME_NONNULL_BEGIN
[manager sendRequest:sliderRPC withResponseHandler:^(__kindof SDLRPCRequest * _Nullable request, __kindof SDLRPCResponse * _Nullable response, NSError * _Nullable error) {
if(![response.resultCode isEqualToEnum:SDLResultSuccess]) {
if ([response.resultCode isEqualToEnum:SDLResultTimedOut]) {
- [manager sendRequest:[AlertManager alertWithMessageAndCloseButton:@"Slider timed out" textField2:nil iconName:nil]];
+ [AlertManager sendAlertWithManager:manager image:nil textField1:AlertSliderTimedOutWarningText textField2:nil];
} else if ([response.resultCode isEqualToEnum:SDLResultAborted]) {
- [manager sendRequest:[AlertManager alertWithMessageAndCloseButton:@"Slider cancelled" textField2:nil iconName:nil]];
+ [AlertManager sendAlertWithManager:manager image:nil textField1:AlertSliderCancelledWarningText textField2:nil];
} else {
- [manager sendRequest:[AlertManager alertWithMessageAndCloseButton:@"Slider could not be displayed" textField2:nil iconName:nil]];
+ [AlertManager sendAlertWithManager:manager image:nil textField1:AlertSliderGeneralWarningText textField2:nil];
}
}
}];
@@ -155,11 +155,11 @@ NS_ASSUME_NONNULL_BEGIN
[manager sendRequest:messageRPC withResponseHandler:^(__kindof SDLRPCRequest * _Nullable request, __kindof SDLRPCResponse * _Nullable response, NSError * _Nullable error) {
if(![response.resultCode isEqualToEnum:SDLResultSuccess]) {
if ([response.resultCode isEqualToEnum:SDLResultTimedOut]) {
- [manager sendRequest:[AlertManager alertWithMessageAndCloseButton:@"Scrollable Message timed out" textField2:nil iconName:nil]];
+ [AlertManager sendAlertWithManager:manager image:nil textField1:AlertScrollableMessageTimedOutWarningText textField2:nil];
} else if ([response.resultCode isEqualToEnum:SDLResultAborted]) {
- [manager sendRequest:[AlertManager alertWithMessageAndCloseButton:@"Scrollable Message cancelled" textField2:nil iconName:nil]];
+ [AlertManager sendAlertWithManager:manager image:nil textField1:AlertScrollableMessageCancelledWarningText textField2:nil];
} else {
- [manager sendRequest:[AlertManager alertWithMessageAndCloseButton:@"Scrollable Message could not be displayed" textField2:nil iconName:nil]];
+ [AlertManager sendAlertWithManager:manager image:nil textField1:AlertScrollableMessageGeneralWarningText textField2:nil];
}
}
}];
@@ -170,13 +170,13 @@ NS_ASSUME_NONNULL_BEGIN
+ (SDLVoiceCommand *)sdlex_voiceCommandStartWithManager:(SDLManager *)manager {
return [[SDLVoiceCommand alloc] initWithVoiceCommands:@[VCStop] handler:^{
- [manager sendRequest:[AlertManager alertWithMessageAndCloseButton:[NSString stringWithFormat:@"%@ voice command selected!", VCStop] textField2:nil iconName:nil]];
+ [AlertManager sendAlertWithManager:manager image:nil textField1:[NSString stringWithFormat:@"%@ voice command selected!", VCStop] textField2:nil];
}];
}
+ (SDLVoiceCommand *)sdlex_voiceCommandStopWithManager:(SDLManager *)manager {
return [[SDLVoiceCommand alloc] initWithVoiceCommands:@[VCStart] handler:^{
- [manager sendRequest:[AlertManager alertWithMessageAndCloseButton:[NSString stringWithFormat:@"%@ voice command selected!", VCStart] textField2:nil iconName:nil]];
+ [AlertManager sendAlertWithManager:manager image:nil textField1:[NSString stringWithFormat:@"%@ voice command selected!", VCStart] textField2:nil];
}];
}
diff --git a/Example Apps/Example ObjC/VehicleDataManager.m b/Example Apps/Example ObjC/VehicleDataManager.m
index 5c2d3bac2..e7a8b0079 100644
--- a/Example Apps/Example ObjC/VehicleDataManager.m
+++ b/Example Apps/Example ObjC/VehicleDataManager.m
@@ -138,20 +138,23 @@ NS_ASSUME_NONNULL_BEGIN
+ (void)getAllVehicleDataWithManager:(SDLManager *)manager triggerSource:(SDLTriggerSource)triggerSource vehicleDataType:(NSString *)vehicleDataType {
SDLLogD(@"Checking if app has permission to access vehicle data...");
if (![manager.permissionManager isRPCNameAllowed:SDLRPCFunctionNameGetVehicleData]) {
- [manager sendRequest:[AlertManager alertWithMessageAndCloseButton:@"This app does not have the required permissions to access vehicle data" textField2:nil iconName:nil]];
+ [AlertManager sendAlertWithManager:manager image:nil textField1:AlertVehicleDataPermissionsWarningText textField2:nil];
return;
}
SDLLogD(@"App has permission to access vehicle data. Requesting vehicle data...");
+ SDLGetVehicleData *getAllVehicleData = [[SDLGetVehicleData alloc] initWithGps:@YES speed:@YES rpm:@YES instantFuelConsumption:@YES fuelRange:@YES externalTemperature:@YES turnSignal:@YES vin:@YES gearStatus:@YES tirePressure:@YES odometer:@YES beltStatus:@YES bodyInformation:@YES deviceStatus:@YES driverBraking:@YES wiperStatus:@YES headLampStatus:@YES engineTorque:@YES accPedalPosition:@YES steeringWheelAngle:@YES engineOilLife:@YES electronicParkBrakeStatus:@YES cloudAppVehicleID:@YES eCallInfo:@YES airbagStatus:@YES emergencyEvent:@YES clusterModeStatus:@YES myKey:@YES handsOffSteering:@YES windowStatus:@YES];
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
- SDLGetVehicleData *getAllVehicleData = [[SDLGetVehicleData alloc] initWithAccelerationPedalPosition:YES airbagStatus:YES beltStatus:YES bodyInformation:YES clusterModeStatus:YES deviceStatus:YES driverBraking:YES eCallInfo:YES electronicParkBrakeStatus:YES emergencyEvent:YES engineOilLife:YES engineTorque:YES externalTemperature:YES fuelLevel:YES fuelLevelState:YES fuelRange:YES gps:YES headLampStatus:YES instantFuelConsumption:YES myKey:YES odometer:YES prndl:YES rpm:YES speed:YES steeringWheelAngle:YES tirePressure:YES turnSignal:YES vin:YES wiperStatus:YES];
+ getAllVehicleData.fuelLevel = @YES;
+ getAllVehicleData.fuelLevel_State = @YES;
+ getAllVehicleData.prndl = @YES;
#pragma clang diagnostic pop
[manager sendRequest:getAllVehicleData withResponseHandler:^(__kindof SDLRPCRequest * _Nullable request, __kindof SDLRPCResponse * _Nullable response, NSError * _Nullable error) {
if (error || ![response isKindOfClass:SDLGetVehicleDataResponse.class]) {
- [manager sendRequest:[AlertManager alertWithMessageAndCloseButton:@"Something went wrong while getting vehicle data" textField2:nil iconName:nil]];
+ [AlertManager sendAlertWithManager:manager image:nil textField1:AlertVehicleDataGeneralWarningText textField2:nil];
return;
}
@@ -181,7 +184,7 @@ NS_ASSUME_NONNULL_BEGIN
alertMessage = [TextValidator validateText:alertMessage length:200];
if ([triggerSource isEqualToEnum:SDLTriggerSourceMenu]) {
- [manager sendRequest:[AlertManager alertWithMessageAndCloseButton:alertTitle textField2:alertMessage iconName:nil]];
+ [AlertManager sendAlertWithManager:manager image:nil textField1:alertTitle textField2:alertMessage];
} else {
NSString *spokenAlert = alertMessage ?: alertTitle;
[manager sendRequest:[[SDLSpeak alloc] initWithTTS:spokenAlert]];
@@ -219,11 +222,19 @@ NS_ASSUME_NONNULL_BEGIN
} else if ([vehicleDataType isEqualToString:ACExternalTemperatureMenuName]) {
vehicleDataDescription = vehicleData.externalTemperature.description;
} else if ([vehicleDataType isEqualToString:ACFuelLevelMenuName]) {
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
vehicleDataDescription = vehicleData.fuelLevel.description;
+#pragma clang diagnostic pop
} else if ([vehicleDataType isEqualToString:ACFuelLevelStateMenuName]) {
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
vehicleDataDescription = vehicleData.fuelLevel_State.description;
+#pragma clang diagnostic pop
} else if ([vehicleDataType isEqualToString:ACFuelRangeMenuName]) {
vehicleDataDescription = vehicleData.fuelRange.description;
+ } else if ([vehicleDataType isEqualToString:ACGearStatusMenuName]) {
+ vehicleDataDescription = vehicleData.gearStatus.description;
} else if ([vehicleDataType isEqualToString:ACGPSMenuName]) {
vehicleDataDescription = vehicleData.gps.description;
} else if ([vehicleDataType isEqualToString:ACHeadLampStatusMenuName]) {
@@ -235,7 +246,10 @@ NS_ASSUME_NONNULL_BEGIN
} else if ([vehicleDataType isEqualToString:ACOdometerMenuName]) {
vehicleDataDescription = vehicleData.odometer.description;
} else if ([vehicleDataType isEqualToString:ACPRNDLMenuName]) {
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
vehicleDataDescription = vehicleData.prndl.description;
+#pragma clang diagnostic pop
} else if ([vehicleDataType isEqualToString:ACSpeedMenuName]) {
vehicleDataDescription = vehicleData.speed.description;
} else if ([vehicleDataType isEqualToString:ACSteeringWheelAngleMenuName]) {
@@ -263,7 +277,7 @@ NS_ASSUME_NONNULL_BEGIN
SDLLogD(@"Checking phone call capability");
[manager.systemCapabilityManager updateCapabilityType:SDLSystemCapabilityTypePhoneCall completionHandler:^(NSError * _Nullable error, SDLSystemCapabilityManager * _Nonnull systemCapabilityManager) {
if (!systemCapabilityManager.phoneCapability) {
- [manager sendRequest:[AlertManager alertWithMessageAndCloseButton:@"The head unit does not support the phone call capability" textField2:nil iconName:nil]];
+ [AlertManager sendAlertWithManager:manager image:nil textField1:AlertDialNumberPermissionsWarningText textField2:nil];
return;
}
@@ -271,7 +285,7 @@ NS_ASSUME_NONNULL_BEGIN
SDLLogD(@"Dialing phone number %@", phoneNumber);
[self sdlex_dialPhoneNumber:phoneNumber manager:manager];
} else {
- [manager sendRequest:[AlertManager alertWithMessageAndCloseButton:@"The dial number feature is unavailable for this head unit" textField2:nil iconName:nil]];
+ [AlertManager sendAlertWithManager:manager image:nil textField1:AlertDialNumberUnavailableWarningText textField2:nil];
}
}];
}
diff --git a/Example Apps/Example Swift/AlertManager.swift b/Example Apps/Example Swift/AlertManager.swift
index 718210777..9e37dd1c5 100644
--- a/Example Apps/Example Swift/AlertManager.swift
+++ b/Example Apps/Example Swift/AlertManager.swift
@@ -10,18 +10,58 @@ import Foundation
import SmartDeviceLink
class AlertManager {
- private class var okSoftButton: SDLSoftButton {
- return SDLSoftButton(type: .text, text: AlertOKButtonText, image: nil, highlighted: true, buttonId: 1, systemAction: nil, handler: nil)
+ /// Sends an alert with up to two lines of text, an image, and a close button that will dismiss the alert when tapped.
+ /// - Parameters:
+ /// - imageName: The name of the image to upload
+ /// - textField1: The first line of text in the alert
+ /// - textField2: The second line of text in the alert
+ /// - sdlManager: The SDLManager
+ class func sendAlert(imageName: String? = nil, textField1: String, textField2: String? = nil, sdlManager: SDLManager) {
+ let okSoftButton = SDLSoftButton(type: .text, text: AlertOKButtonText, image: nil, highlighted: true, buttonId: 1, systemAction: nil, handler: nil)
+ let alert = SDLAlert(alertText1: textField1, alertText2: textField2, alertText3: nil, softButtons: [okSoftButton], playTone: true, ttsChunks: nil, duration: 5000, progressIndicator: false, alertIcon: nil, cancelID: 0)
+
+ if let imageName = imageName {
+ sendImage(imageName, sdlManager: sdlManager) { (success, artworkName) in
+ if success {
+ alert.alertIcon = SDLImage(name: artworkName, isTemplate: true)
+ }
+ sdlManager.send(alert)
+ }
+ } else {
+ sdlManager.send(alert)
+ }
+ }
+
+ /// Sends a subtle alert with up to two lines of text, and an image.
+ /// - Parameters:
+ /// - imageName: The name of the image to upload
+ /// - textField1: The first line of text in the alert
+ /// - textField2: The second line of text in the alert
+ /// - sdlManager: The SDLManager
+ class func sendSubtleAlert(imageName: String? = nil, textField1: String, textField2: String? = nil, sdlManager: SDLManager) {
+ let subtleAlert = SDLSubtleAlert(alertText1: textField1, alertText2: textField2, alertIcon: nil, ttsChunks: nil, duration: nil, softButtons: nil, cancelID: NSNumber(0))
+
+ if let imageName = imageName {
+ sendImage(imageName, sdlManager: sdlManager) { (success, artworkName) in
+ if success {
+ subtleAlert.alertIcon = SDLImage(name: artworkName, isTemplate: true)
+ }
+ sdlManager.send(subtleAlert)
+ }
+ } else {
+ sdlManager.send(subtleAlert)
+ }
}
- /// Creates an alert with up to two lines of text, an image, and a close button that will dismiss the alert when tapped.
- ///
+ /// Helper method for uploading an image before it is shown in an alert
/// - Parameters:
- /// - textField1: The first line of a message to display in the alert
- /// - textField2: The second line of a message to display in the alert
- /// - iconName: The name of the uploaded icon artwork
- /// - Returns: An SDLAlert object
- class func alertWithMessageAndCloseButton(_ textField1: String, textField2: String? = nil, iconName: String? = nil) -> SDLAlert {
- return SDLAlert(alertText1: textField1, alertText2: textField2, alertText3: nil, softButtons: [okSoftButton], playTone: true, ttsChunks: nil, duration: 5000, progressIndicator: false, alertIcon: (iconName != nil) ? SDLImage(name: iconName!, isTemplate: true) : nil, cancelID: 0)
+ /// - imageName: The name of the image to upload
+ /// - sdlManager: The SDLManager
+ /// - completionHandler: Handler called when the artwork has finished uploading with the success of the upload and the name of the uploaded image.
+ private class func sendImage(_ imageName: String, sdlManager: SDLManager, completionHandler: @escaping ((_ success: Bool, _ artwork: String) -> ())) {
+ let artwork = SDLArtwork(image: UIImage(named: imageName)!.withRenderingMode(.alwaysTemplate), persistent: false, as: .PNG)
+ sdlManager.fileManager.upload(artwork: artwork) { (success, artworkName, bytesAvailable, error) in
+ return completionHandler(success, artworkName)
+ }
}
}
diff --git a/Example Apps/Example Swift/AudioManager.swift b/Example Apps/Example Swift/AudioManager.swift
index 6ea7e8813..cfbc4538f 100644
--- a/Example Apps/Example Swift/AudioManager.swift
+++ b/Example Apps/Example Swift/AudioManager.swift
@@ -60,7 +60,7 @@ class AudioManager: NSObject {
func startRecording() {
guard speechRecognitionAuthState == .authorized else {
SDLLog.w("This app does not have permission to access the Speech Recognition API")
- sdlManager.send(AlertManager.alertWithMessageAndCloseButton("You must give this app permission to access Speech Recognition"))
+ AlertManager.sendAlert(textField1: AlertSpeechPermissionsWarningText, sdlManager: sdlManager)
return
}
@@ -106,20 +106,19 @@ private extension AudioManager {
/// Called when `PerformAudioPassThru` request times out or when a `EndAudioPassThru` request is sent
var audioPassThruEndedHandler: SDLResponseHandler? {
return { [weak self] (request, response, error) in
- guard let response = response else { return }
+ guard let self = self, let response = response else { return }
switch response.resultCode {
case .success: // The `PerformAudioPassThru` timed out or the "Done" button was pressed in the pop-up.
SDLLog.d("Audio Pass Thru ended successfully")
- guard let speechTranscription = self?.speechTranscription else { return }
- self?.sdlManager.send(AlertManager.alertWithMessageAndCloseButton("You said: \(speechTranscription.isEmpty ? "No speech detected" : speechTranscription)"))
+ AlertManager.sendAlert(textField1: "You said: \(self.speechTranscription.isEmpty ? "No speech detected" : self.speechTranscription)", sdlManager: self.sdlManager)
case .aborted: // The "Cancel" button was pressed in the pop-up. Ignore this audio pass thru.
SDLLog.d("Audio recording canceled")
default:
SDLLog.d("Audio recording not successful: \(response.resultCode)")
}
- self?.stopSpeechRecognitionTask()
+ self.stopSpeechRecognitionTask()
}
}
diff --git a/Example Apps/Example Swift/ButtonManager.swift b/Example Apps/Example Swift/ButtonManager.swift
index e0953accc..02d3f7962 100644
--- a/Example Apps/Example Swift/ButtonManager.swift
+++ b/Example Apps/Example Swift/ButtonManager.swift
@@ -16,7 +16,7 @@ class ButtonManager: NSObject {
fileprivate let sdlManager: SDLManager!
fileprivate var refreshUIHandler: RefreshUIHandler?
- /// SDL UI textfields are visible if true; hidden if false
+ /// Textfields are visible if true; hidden if false
public fileprivate(set) var textEnabled: Bool {
didSet {
guard let refreshUIHandler = refreshUIHandler else { return }
@@ -24,20 +24,20 @@ class ButtonManager: NSObject {
}
}
- /// SDL UI images are visible if true; hidden if false
+ /// UI images are visible if true; hidden if false
public fileprivate(set) var imagesEnabled: Bool {
didSet {
- guard let refreshUIHandler = refreshUIHandler, let alertSoftButton = sdlManager.screenManager.softButtonObjectNamed(AlertSoftButton) else { return }
- alertSoftButton.transitionToNextState()
+ guard let refreshUIHandler = refreshUIHandler else { return }
refreshUIHandler()
}
}
- /// Keeps track of the toggle soft button current state. The image or text changes when the button is selected
- fileprivate var toggleEnabled: Bool {
- didSet {
- guard let hexagonSoftButton = sdlManager.screenManager.softButtonObjectNamed(ToggleSoftButton), hexagonSoftButton.transition(toState: toggleEnabled ? ToggleSoftButtonImageOnState : ToggleSoftButtonImageOffState) else { return }
- }
+ private var isSubtleAlertAllowed: Bool {
+ return sdlManager.permissionManager.isRPCNameAllowed(.subtleAlert)
+ }
+
+ private var isAlertAllowed: Bool {
+ return sdlManager.permissionManager.isRPCNameAllowed(.alert)
}
init(sdlManager: SDLManager, updateScreenHandler: RefreshUIHandler? = nil) {
@@ -45,54 +45,56 @@ class ButtonManager: NSObject {
self.refreshUIHandler = updateScreenHandler
textEnabled = true
imagesEnabled = true
- toggleEnabled = true
- super.init()
}
- /// Creates and returns an array of all soft buttons for the UI
+ /// An array of all the soft buttons
///
/// - Parameter manager: The SDL Manager
/// - Returns: An array of all soft buttons for the UI
- func allScreenSoftButtons(with manager: SDLManager) -> [SDLSoftButtonObject] {
- return [softButtonAlert(with: manager), softButtonToggle(), softButtonTextVisible(), softButtonImagesVisible()]
+ func allScreenSoftButtons() -> [SDLSoftButtonObject] {
+ return [softButtonAlert, softButtonSubtleAlert, softButtonTextVisible, softButtonImagesVisible]
}
}
// MARK: - Custom Soft Buttons
-private extension ButtonManager {
+extension ButtonManager {
/// Returns a soft button that shows an alert when tapped.
- ///
- /// - Parameter manager: The SDL Manager for showing the alert
- /// - Returns: A soft button
- func softButtonAlert(with manager: SDLManager) -> SDLSoftButtonObject {
- let imageSoftButtonState = SDLSoftButtonState(stateName: AlertSoftButtonImageState, text: nil, image: UIImage(named: AlertBWIconName)?.withRenderingMode(.alwaysTemplate))
- let textSoftButtonState = SDLSoftButtonState(stateName: AlertSoftButtonTextState, text: AlertSoftButtonText, image: nil)
- return SDLSoftButtonObject(name: AlertSoftButton, states: [imageSoftButtonState, textSoftButtonState], initialStateName: imageSoftButtonState.name) { (buttonPress, buttonEvent) in
- guard buttonPress != nil else { return }
- manager.fileManager.upload(artwork: SDLArtwork(image: UIImage(named: CarBWIconImageName)!, persistent: false, as: .PNG), completionHandler: { (success, artworkName, bytesAvailable, err) in
- let alert = AlertManager.alertWithMessageAndCloseButton("You pressed the button!", iconName: artworkName)
- manager.send(alert)
- })
+ private var softButtonAlert: SDLSoftButtonObject {
+ let imageAndTextState = SDLSoftButtonState(stateName: AlertSoftButtonImageAndTextState, text: AlertSoftButtonText, image: UIImage(named: AlertBWIconName)?.withRenderingMode(.alwaysTemplate))
+ let textState = SDLSoftButtonState(stateName: AlertSoftButtonTextState, text: AlertSoftButtonText, image: nil)
+ return SDLSoftButtonObject(name: AlertSoftButton, states: [imageAndTextState, textState], initialStateName: imageAndTextState.name) { [weak self] (buttonPress, buttonEvent) in
+ guard let self = self, buttonPress != nil else { return }
+
+ if (self.isAlertAllowed) {
+ AlertManager.sendAlert(imageName: CarBWIconImageName, textField1: AlertMessageText, sdlManager: self.sdlManager)
+ } else if (self.isSubtleAlertAllowed) {
+ AlertManager.sendSubtleAlert(imageName: CarBWIconImageName, textField1: AlertMessageText, sdlManager: self.sdlManager)
+ } else {
+ SDLLog.w("The module does not support the Alert request or the Subtle Alert request")
+ }
}
}
- /// Returns a soft button that toggles between two states: on and off. If images are currently visible, the button image toggles; if images aren't visible, the button text toggles.
- ///
- /// - Returns: A soft button
- func softButtonToggle() -> SDLSoftButtonObject {
- let imageOnState = SDLSoftButtonState(stateName: ToggleSoftButtonImageOnState, text: nil, image: UIImage(named: ToggleOnBWIconName)?.withRenderingMode(.alwaysTemplate))
- let imageOffState = SDLSoftButtonState(stateName: ToggleSoftButtonImageOffState, text: nil, image: UIImage(named: ToggleOffBWIconName)?.withRenderingMode(.alwaysTemplate))
- return SDLSoftButtonObject(name: ToggleSoftButton, states: [imageOnState, imageOffState], initialStateName: imageOnState.name) { [unowned self] (buttonPress, buttonEvent) in
- guard buttonPress != nil else { return }
- self.toggleEnabled = !self.toggleEnabled
+ /// Returns a soft button that shows a subtle alert when tapped. If the subtle alert is not supported, then a regular alert is shown.
+ private var softButtonSubtleAlert: SDLSoftButtonObject {
+ let imageAndTextState = SDLSoftButtonState(stateName: SubtleAlertSoftButtonImageAndTextState, text: SubtleAlertSoftButtonText, image: UIImage(named: BatteryFullBWIconName)?.withRenderingMode(.alwaysTemplate))
+ let textState = SDLSoftButtonState(stateName: SubtleAlertSoftButtonTextState, text: SubtleAlertSoftButtonText, image: nil)
+ return SDLSoftButtonObject(name: SubtleAlertSoftButton, states: [imageAndTextState, textState], initialStateName: imageAndTextState.name) { [weak self] (buttonPress, buttonEvent) in
+ guard let self = self, buttonPress != nil else { return }
+
+ if (self.isSubtleAlertAllowed) {
+ AlertManager.sendSubtleAlert(imageName: BatteryEmptyBWIconName, textField1: SubtleAlertHeaderText, textField2: SubtleAlertSubheaderText, sdlManager: self.sdlManager)
+ } else if (self.isAlertAllowed) {
+ AlertManager.sendAlert(imageName: BatteryEmptyBWIconName, textField1: SubtleAlertHeaderText, textField2: SubtleAlertSubheaderText, sdlManager: self.sdlManager)
+ } else {
+ SDLLog.w("The module does not support the Alert request or the Subtle Alert request")
+ }
}
}
- /// Returns a soft button that toggles the textfield visibility state for the SDL UI. The button's text toggles based on the current text visibility.
- ///
- /// - Returns: A soft button
- func softButtonTextVisible() -> SDLSoftButtonObject {
+ /// Returns a soft button that toggles the textfield visibility state.
+ private var softButtonTextVisible: SDLSoftButtonObject {
let textVisibleState = SDLSoftButtonState(stateName: TextVisibleSoftButtonTextOnState, text: TextVisibleSoftButtonTextOnText, artwork: nil)
let textNotVisibleState = SDLSoftButtonState(stateName: TextVisibleSoftButtonTextOffState, text: TextVisibleSoftButtonTextOffText, image: nil)
return SDLSoftButtonObject(name: TextVisibleSoftButton, states: [textVisibleState, textNotVisibleState], initialStateName: textVisibleState.name) { [unowned self] (buttonPress, buttonEvent) in
@@ -105,19 +107,26 @@ private extension ButtonManager {
}
}
- /// Returns a soft button that toggles the image visibility state for the SDL UI. The button's text toggles based on the current image visibility.
- ///
- /// - Returns: A soft button
- func softButtonImagesVisible() -> SDLSoftButtonObject {
+ /// Returns a soft button that toggles the image visibility state.
+ private var softButtonImagesVisible: SDLSoftButtonObject {
let imagesVisibleState = SDLSoftButtonState(stateName: ImagesVisibleSoftButtonImageOnState, text: ImagesVisibleSoftButtonImageOnText, image: nil)
let imagesNotVisibleState = SDLSoftButtonState(stateName: ImagesVisibleSoftButtonImageOffState, text: ImagesVisibleSoftButtonImageOffText, image: nil)
- return SDLSoftButtonObject(name: ImagesVisibleSoftButton, states: [imagesVisibleState, imagesNotVisibleState], initialStateName: imagesVisibleState.name) { [unowned self] (buttonPress, buttonEvent) in
- guard buttonPress != nil else { return }
+ return SDLSoftButtonObject(name: ImagesVisibleSoftButton, states: [imagesVisibleState, imagesNotVisibleState], initialStateName: imagesVisibleState.name) { [weak self] (buttonPress, buttonEvent) in
+ guard let self = self, let sdlManager = self.sdlManager, buttonPress != nil else { return }
+
self.imagesEnabled = !self.imagesEnabled
- // Update the button state
- let softButton = self.sdlManager.screenManager.softButtonObjectNamed(ImagesVisibleSoftButton)
- softButton?.transitionToNextState()
+ if let imagesVisibleSoftButton = sdlManager.screenManager.softButtonObjectNamed(ImagesVisibleSoftButton) {
+ imagesVisibleSoftButton.transitionToNextState()
+ }
+
+ if let alertSoftButton = sdlManager.screenManager.softButtonObjectNamed(AlertSoftButton) {
+ alertSoftButton.transitionToNextState()
+ }
+
+ if let subtleAlertSoftButton = sdlManager.screenManager.softButtonObjectNamed(SubtleAlertSoftButton) {
+ subtleAlertSoftButton.transitionToNextState()
+ }
}
}
}
diff --git a/Example Apps/Example Swift/MenuManager.swift b/Example Apps/Example Swift/MenuManager.swift
index cdf478149..3981bc7fa 100644
--- a/Example Apps/Example Swift/MenuManager.swift
+++ b/Example Apps/Example Swift/MenuManager.swift
@@ -72,7 +72,7 @@ private extension MenuManager {
/// A list of all possible vehicle data types
static var allVehicleDataTypes: [String] {
- return [ACAccelerationPedalPositionMenuName, ACAirbagStatusMenuName, ACBeltStatusMenuName, ACBodyInformationMenuName, ACClusterModeStatusMenuName, ACDeviceStatusMenuName, ACDriverBrakingMenuName, ACECallInfoMenuName, ACElectronicParkBrakeStatus, ACEmergencyEventMenuName, ACEngineOilLifeMenuName, ACEngineTorqueMenuName, ACExternalTemperatureMenuName, ACFuelLevelMenuName, ACFuelLevelStateMenuName, ACFuelRangeMenuName, ACGPSMenuName, ACHeadLampStatusMenuName, ACInstantFuelConsumptionMenuName, ACMyKeyMenuName, ACOdometerMenuName, ACPRNDLMenuName, ACRPMMenuName, ACSpeedMenuName, ACSteeringWheelAngleMenuName, ACTirePressureMenuName, ACTurnSignalMenuName, ACVINMenuName, ACWiperStatusMenuName]
+ return [ACAccelerationPedalPositionMenuName, ACAirbagStatusMenuName, ACBeltStatusMenuName, ACBodyInformationMenuName, ACClusterModeStatusMenuName, ACDeviceStatusMenuName, ACDriverBrakingMenuName, ACECallInfoMenuName, ACElectronicParkBrakeStatus, ACEmergencyEventMenuName, ACEngineOilLifeMenuName, ACEngineTorqueMenuName, ACExternalTemperatureMenuName, ACFuelLevelMenuName, ACFuelLevelStateMenuName, ACFuelRangeMenuName, ACGearStatusMenuName, ACGPSMenuName, ACHeadLampStatusMenuName, ACInstantFuelConsumptionMenuName, ACMyKeyMenuName, ACOdometerMenuName, ACPRNDLMenuName, ACRPMMenuName, ACSpeedMenuName, ACSteeringWheelAngleMenuName, ACTirePressureMenuName, ACTurnSignalMenuName, ACVINMenuName, ACWiperStatusMenuName]
}
/// Menu item that shows a custom menu (i.e. a Perform Interaction Choice Set) when selected
@@ -98,7 +98,7 @@ private extension MenuManager {
}
return SDLMenuCell(title: ACRecordInCarMicrophoneAudioMenuName, icon: SDLArtwork(image: UIImage(named: SpeakBWIconImageName)!.withRenderingMode(.alwaysTemplate), persistent: true, as: .PNG), voiceCommands: [ACRecordInCarMicrophoneAudioMenuName], handler: { _ in
- manager.send(AlertManager.alertWithMessageAndCloseButton("Speech recognition feature only available on iOS 10+"))
+ AlertManager.sendAlert(textField1: "Speech recognition feature only available on iOS 10+", sdlManager: manager)
})
}
@@ -109,7 +109,7 @@ private extension MenuManager {
class func menuCellDialNumber(with manager: SDLManager) -> SDLMenuCell {
return SDLMenuCell(title: ACDialPhoneNumberMenuName, icon: SDLArtwork(image: UIImage(named: PhoneBWIconImageName)!.withRenderingMode(.alwaysTemplate), persistent: true, as: .PNG), voiceCommands: [ACDialPhoneNumberMenuName], handler: { _ in
guard RPCPermissionsManager.isDialNumberRPCAllowed(with: manager) else {
- manager.send(AlertManager.alertWithMessageAndCloseButton("This app does not have the required permissions to dial a number"))
+ AlertManager.sendAlert(textField1: AlertDialNumberPermissionsWarningText, sdlManager: manager)
return
}
@@ -133,7 +133,7 @@ private extension MenuManager {
let display = SDLSetDisplayLayout(predefinedLayout: .nonMedia)
manager.send(request: display) { (request, response, error) in
guard response?.success.boolValue == .some(true) else {
- manager.send(AlertManager.alertWithMessageAndCloseButton(errorMessage))
+ AlertManager.sendAlert(textField1: errorMessage, sdlManager: manager)
return
}
}
@@ -145,7 +145,7 @@ private extension MenuManager {
let display = SDLSetDisplayLayout(predefinedLayout: .graphicWithText)
manager.send(request: display) { (request, response, error) in
guard response?.success.boolValue == .some(true) else {
- manager.send(AlertManager.alertWithMessageAndCloseButton(errorMessage))
+ AlertManager.sendAlert(textField1: errorMessage, sdlManager: manager)
return
}
}
@@ -166,7 +166,7 @@ private extension MenuManager {
let message = "\(submenuTitle) selected!"
switch triggerSource {
case .menu:
- manager.send(AlertManager.alertWithMessageAndCloseButton(message))
+ AlertManager.sendAlert(textField1: message, sdlManager: manager)
case .voiceRecognition:
manager.send(SDLSpeak(tts: message))
default: break
@@ -184,11 +184,11 @@ private extension MenuManager {
guard let response = response else { return }
guard response.resultCode == .success else {
if response.resultCode == .timedOut {
- manager.send(AlertManager.alertWithMessageAndCloseButton("Slider timed out"))
+ AlertManager.sendAlert(textField1: AlertSliderTimedOutWarningText, sdlManager: manager)
} else if response.resultCode == .aborted {
- manager.send(AlertManager.alertWithMessageAndCloseButton("Slider cancelled"))
+ AlertManager.sendAlert(textField1: AlertSliderCancelledWarningText, sdlManager: manager)
} else {
- manager.send(AlertManager.alertWithMessageAndCloseButton("Slider could not be displayed"))
+ AlertManager.sendAlert(textField1: AlertSliderGeneralWarningText, sdlManager: manager)
}
return
}
@@ -203,11 +203,11 @@ private extension MenuManager {
guard let response = response else { return }
guard response.resultCode == .success else {
if response.resultCode == .timedOut {
- manager.send(AlertManager.alertWithMessageAndCloseButton("Scrollable Message timed out"))
+ AlertManager.sendAlert(textField1: AlertScrollableMessageTimedOutWarningText, sdlManager: manager)
} else if response.resultCode == .aborted {
- manager.send(AlertManager.alertWithMessageAndCloseButton("Scrollable Message cancelled"))
+ AlertManager.sendAlert(textField1: AlertScrollableMessageCancelledWarningText, sdlManager: manager)
} else {
- manager.send(AlertManager.alertWithMessageAndCloseButton("Scrollable Message could not be displayed"))
+ AlertManager.sendAlert(textField1: AlertScrollableMessageGeneralWarningText, sdlManager: manager)
}
return
}
@@ -225,7 +225,7 @@ private extension MenuManager {
/// - Returns: A SDLVoiceCommand object
class func voiceCommandStart(with manager: SDLManager) -> SDLVoiceCommand {
return SDLVoiceCommand(voiceCommands: [VCStart], handler: {
- manager.send(AlertManager.alertWithMessageAndCloseButton("\(VCStart) voice command selected!"))
+ AlertManager.sendAlert(textField1: "\(VCStart) voice command selected!", sdlManager: manager)
})
}
@@ -235,7 +235,7 @@ private extension MenuManager {
/// - Returns: A SDLVoiceCommand object
class func voiceCommandStop(with manager: SDLManager) -> SDLVoiceCommand {
return SDLVoiceCommand(voiceCommands: [VCStop], handler: {
- manager.send(AlertManager.alertWithMessageAndCloseButton("\(VCStop) voice command selected!"))
+ AlertManager.sendAlert(textField1: "\(VCStop) voice command selected!", sdlManager: manager)
})
}
}
diff --git a/Example Apps/Example Swift/ProxyManager.swift b/Example Apps/Example Swift/ProxyManager.swift
index fdad60360..ab6f656d9 100644
--- a/Example Apps/Example Swift/ProxyManager.swift
+++ b/Example Apps/Example Swift/ProxyManager.swift
@@ -255,7 +255,7 @@ private extension ProxyManager {
sdlManager.send(setDisplayLayout)
updateScreen()
- sdlManager.screenManager.softButtonObjects = buttonManager.allScreenSoftButtons(with: sdlManager)
+ sdlManager.screenManager.softButtonObjects = buttonManager.allScreenSoftButtons()
}
/// Update the UI's textfields, images and soft buttons
diff --git a/Example Apps/Example Swift/VehicleDataManager.swift b/Example Apps/Example Swift/VehicleDataManager.swift
index c0f6e59dc..3c83f2ff9 100644
--- a/Example Apps/Example Swift/VehicleDataManager.swift
+++ b/Example Apps/Example Swift/VehicleDataManager.swift
@@ -144,9 +144,7 @@ extension VehicleDataManager {
if triggerSource == .menu {
let title = !alertTitle.isEmpty ? alertTitle : "No Vehicle Data Available"
let detailMessage = !alertMessage.isEmpty ? alertMessage : nil
- let alert = AlertManager.alertWithMessageAndCloseButton(title,
- textField2: detailMessage)
- manager.send(alert)
+ AlertManager.sendAlert(textField1: title, textField2: detailMessage, sdlManager: manager)
} else {
let spokenAlert = !alertMessage.isEmpty ? alertMessage : alertTitle
manager.send(SDLSpeak(tts: spokenAlert))
@@ -233,8 +231,7 @@ extension VehicleDataManager {
SDLLog.d("Checking if app has permission to access vehicle data...")
guard manager.permissionManager.isRPCNameAllowed(SDLRPCFunctionName.getVehicleData) else {
- let alert = AlertManager.alertWithMessageAndCloseButton("This app does not have the required permissions to access vehicle data")
- manager.send(request: alert)
+ AlertManager.sendAlert(textField1: AlertVehicleDataPermissionsWarningText, sdlManager: manager)
return false
}
@@ -252,8 +249,7 @@ extension VehicleDataManager {
SDLLog.d("Checking if Core returned vehicle data")
guard response != nil, error == nil else {
- let alert = AlertManager.alertWithMessageAndCloseButton("Something went wrong while getting vehicle data")
- manager.send(request: alert)
+ AlertManager.sendAlert(textField1: AlertVehicleDataGeneralWarningText, sdlManager: manager)
return false
}
@@ -272,14 +268,14 @@ extension VehicleDataManager {
SDLLog.d("Checking phone call capability")
manager.systemCapabilityManager.updateCapabilityType(.phoneCall, completionHandler: { (error, systemCapabilityManager) in
guard let phoneCapability = systemCapabilityManager.phoneCapability else {
- manager.send(AlertManager.alertWithMessageAndCloseButton("The head unit does not support the phone call capability"))
+ AlertManager.sendAlert(textField1: AlertDialNumberPermissionsWarningText, sdlManager: manager)
return
}
if phoneCapability.dialNumberEnabled?.boolValue ?? false {
SDLLog.d("Dialing phone number \(phoneNumber)...")
dialPhoneNumber(phoneNumber, manager: manager)
} else {
- manager.send(AlertManager.alertWithMessageAndCloseButton("A phone call can not be made"))
+ AlertManager.sendAlert(textField1: AlertDialNumberUnavailableWarningText, sdlManager: manager)
}
})
}
diff --git a/Example Apps/Shared/AppConstants.h b/Example Apps/Shared/AppConstants.h
index 5fb4b25b0..b06009fa7 100644
--- a/Example Apps/Shared/AppConstants.h
+++ b/Example Apps/Shared/AppConstants.h
@@ -22,16 +22,13 @@ extern NSString * const SmartDeviceLinkText;
extern NSString * const ExampleAppText;
#pragma mark - SDL Soft Buttons
-extern NSString * const ToggleSoftButton;
-extern NSString * const ToggleSoftButtonImageOnState;
-extern NSString * const ToggleSoftButtonImageOffState;
-extern NSString * const ToggleSoftButtonTextOnState;
-extern NSString * const ToggleSoftButtonTextOffState;
-extern NSString * const ToggleSoftButtonTextTextOnText;
-extern NSString * const ToggleSoftButtonTextTextOffText;
+extern NSString * const SubtleAlertSoftButton;
+extern NSString * const SubtleAlertSoftButtonImageAndTextState;
+extern NSString * const SubtleAlertSoftButtonTextState;
+extern NSString * const SubtleAlertSoftButtonText;
extern NSString * const AlertSoftButton;
-extern NSString * const AlertSoftButtonImageState;
+extern NSString * const AlertSoftButtonImageAndTextState;
extern NSString * const AlertSoftButtonTextState;
extern NSString * const AlertSoftButtonText;
@@ -48,7 +45,21 @@ extern NSString * const ImagesVisibleSoftButtonImageOnText;
extern NSString * const ImagesVisibleSoftButtonImageOffText;
#pragma mark - Alert
+extern NSString * const AlertMessageText;
extern NSString * const AlertOKButtonText;
+extern NSString * const SubtleAlertHeaderText;
+extern NSString * const SubtleAlertSubheaderText;
+extern NSString * const AlertDialNumberPermissionsWarningText;
+extern NSString * const AlertDialNumberUnavailableWarningText;
+extern NSString * const AlertSliderTimedOutWarningText;
+extern NSString * const AlertSliderCancelledWarningText;
+extern NSString * const AlertSliderGeneralWarningText;
+extern NSString * const AlertScrollableMessageTimedOutWarningText;
+extern NSString * const AlertScrollableMessageCancelledWarningText;
+extern NSString * const AlertScrollableMessageGeneralWarningText;
+extern NSString * const AlertVehicleDataPermissionsWarningText;
+extern NSString * const AlertVehicleDataGeneralWarningText;
+extern NSString * const AlertSpeechPermissionsWarningText;
#pragma mark - SDL Text-To-Speech
extern NSString * const TTSGoodJob;
@@ -101,6 +112,7 @@ extern NSString * const ACExternalTemperatureMenuName;
extern NSString * const ACFuelLevelMenuName;
extern NSString * const ACFuelLevelStateMenuName;
extern NSString * const ACFuelRangeMenuName;
+extern NSString * const ACGearStatusMenuName;
extern NSString * const ACGPSMenuName;
extern NSString * const ACHeadLampStatusMenuName;
extern NSString * const ACInstantFuelConsumptionMenuName;
@@ -123,8 +135,8 @@ extern NSString * const MenuBWIconImageName;
extern NSString * const MicrophoneBWIconImageName;
extern NSString * const PhoneBWIconImageName;
extern NSString * const SpeakBWIconImageName;
-extern NSString * const ToggleOffBWIconName;
-extern NSString * const ToggleOnBWIconName;
+extern NSString * const BatteryEmptyBWIconName;
+extern NSString * const BatteryFullBWIconName;
#pragma mark - SDL App Name in Different Languages
extern NSString * const ExampleAppNameSpanish;
diff --git a/Example Apps/Shared/AppConstants.m b/Example Apps/Shared/AppConstants.m
index ffe4762d1..69447b16d 100644
--- a/Example Apps/Shared/AppConstants.m
+++ b/Example Apps/Shared/AppConstants.m
@@ -19,18 +19,15 @@ NSString * const SmartDeviceLinkText = @"SmartDeviceLink (SDL)";
NSString * const ExampleAppText = @"Example App";
#pragma mark - SDL Soft Buttons
-NSString * const ToggleSoftButton = @"ToggleSoftButton";
-NSString * const ToggleSoftButtonImageOnState = @"ToggleSoftButtonImageOnState";
-NSString * const ToggleSoftButtonImageOffState = @"ToggleSoftButtonImageOffState";
-NSString * const ToggleSoftButtonTextOnState = @"ToggleSoftButtonTextOnState";
-NSString * const ToggleSoftButtonTextOffState = @"ToggleSoftButtonTextOffState";
-NSString * const ToggleSoftButtonTextTextOnText = @"âž–";
-NSString * const ToggleSoftButtonTextTextOffText = @"âž•";
+NSString * const SubtleAlertSoftButton = @"SubtleAlertSoftButton";
+NSString * const SubtleAlertSoftButtonImageAndTextState = @"SubtleAlertSoftButtonImageAndTextState";
+NSString * const SubtleAlertSoftButtonTextState = @"SubtleAlertSoftButtonTextState";
+NSString * const SubtleAlertSoftButtonText = @"Check Battery";
NSString * const AlertSoftButton = @"AlertSoftButton";
-NSString * const AlertSoftButtonImageState = @"AlertSoftButtonImageState";
+NSString * const AlertSoftButtonImageAndTextState = @"AlertSoftButtonImageAndTextState";
NSString * const AlertSoftButtonTextState = @"AlertSoftButtonTextState";
-NSString * const AlertSoftButtonText = @"Tap Me";
+NSString * const AlertSoftButtonText = @"Show Alert";
NSString * const TextVisibleSoftButton = @"TextVisibleSoftButton";
NSString * const TextVisibleSoftButtonTextOnState = @"TextVisibleSoftButtonTextOnState";
@@ -45,7 +42,21 @@ NSString * const ImagesVisibleSoftButtonImageOnText = @"âž–Icons";
NSString * const ImagesVisibleSoftButtonImageOffText = @"âž•Icons";
#pragma mark - Alert
+NSString * const AlertMessageText = @"You pressed the button!";
NSString * const AlertOKButtonText = @"OK";
+NSString * const SubtleAlertHeaderText = @"Battery Level";
+NSString * const SubtleAlertSubheaderText = @"Almost empty";
+NSString * const AlertDialNumberPermissionsWarningText = @"This app does not have the required permissions to dial a number";
+NSString * const AlertDialNumberUnavailableWarningText = @"The dial number feature is unavailable for this head unit";
+NSString * const AlertSliderTimedOutWarningText = @"Slider timed out";
+NSString * const AlertSliderCancelledWarningText = @"Slider cancelled";
+NSString * const AlertSliderGeneralWarningText = @"Slider could not be displayed";
+NSString * const AlertScrollableMessageTimedOutWarningText = @"Scrollable Message timed out";
+NSString * const AlertScrollableMessageCancelledWarningText = @"Scrollable Message cancelled";
+NSString * const AlertScrollableMessageGeneralWarningText = @"Scrollable Message could not be displayed";
+NSString * const AlertVehicleDataPermissionsWarningText = @"This app does not have the required permissions to access vehicle data";
+NSString * const AlertVehicleDataGeneralWarningText = @"Something went wrong while getting vehicle data";
+NSString * const AlertSpeechPermissionsWarningText = @"You must give this app permission to access Speech Recognition";
#pragma mark - SDL Text-To-Speech
NSString * const TTSGoodJob = @"Good Job";
@@ -98,6 +109,7 @@ NSString * const ACExternalTemperatureMenuName = @"External Temperature";
NSString * const ACFuelLevelMenuName = @"Fuel Level";
NSString * const ACFuelLevelStateMenuName = @"Fuel Level State";
NSString * const ACFuelRangeMenuName = @"Fuel Range";
+NSString * const ACGearStatusMenuName = @"Gear Status";
NSString * const ACGPSMenuName = @"GPS";
NSString * const ACHeadLampStatusMenuName = @"Head Lamp Status";
NSString * const ACInstantFuelConsumptionMenuName = @"Instant Fuel Consumption";
@@ -120,8 +132,8 @@ NSString * const MenuBWIconImageName = @"choice_set";
NSString * const MicrophoneBWIconImageName = @"microphone";
NSString * const PhoneBWIconImageName = @"phone";
NSString * const SpeakBWIconImageName = @"speak";
-NSString * const ToggleOffBWIconName = @"toggle_off";
-NSString * const ToggleOnBWIconName = @"toggle_on";
+NSString * const BatteryEmptyBWIconName = @"toggle_off";
+NSString * const BatteryFullBWIconName = @"toggle_on";
#pragma mark - SDL App Name in Different Languages
NSString * const ExampleAppNameSpanish = @"SDL Aplicación de ejemplo";
diff --git a/SmartDeviceLink-iOS.podspec b/SmartDeviceLink-iOS.podspec
index a5a56f91c..ab29f5b45 100644
--- a/SmartDeviceLink-iOS.podspec
+++ b/SmartDeviceLink-iOS.podspec
@@ -57,6 +57,7 @@ s.public_header_files = [
'SmartDeviceLink/SDLButtonPressMode.h',
'SmartDeviceLink/SDLCancelInteraction.h',
'SmartDeviceLink/SDLCancelInteractionResponse.h',
+'SmartDeviceLink/SDLCapacityUnit.h',
'SmartDeviceLink/SDLCarModeStatus.h',
'SmartDeviceLink/SDLCarWindowViewController.h',
'SmartDeviceLink/SDLChangeRegistration.h',
@@ -107,7 +108,9 @@ s.public_header_files = [
'SmartDeviceLink/SDLDisplayMode.h',
'SmartDeviceLink/SDLDisplayType.h',
'SmartDeviceLink/SDLDistanceUnit.h',
+'SmartDeviceLink/SDLDriverDistractionCapability.h',
'SmartDeviceLink/SDLDriverDistractionState.h',
+'SmartDeviceLink/SDLDynamicUpdateCapabilities.h',
'SmartDeviceLink/SDLECallConfirmationStatus.h',
'SmartDeviceLink/SDLECallInfo.h',
'SmartDeviceLink/SDLElectronicParkBrakeStatus.h',
@@ -130,6 +133,7 @@ s.public_header_files = [
'SmartDeviceLink/SDLFuelRange.h',
'SmartDeviceLink/SDLFuelType.h',
'SmartDeviceLink/SDLFunctionID.h',
+'SmartDeviceLink/SDLGearStatus.h',
'SmartDeviceLink/SDLGenericResponse.h',
'SmartDeviceLink/SDLGetAppServiceData.h',
'SmartDeviceLink/SDLGetAppServiceDataResponse.h',
@@ -249,11 +253,14 @@ s.public_header_files = [
'SmartDeviceLink/SDLOnLockScreenStatus.h',
'SmartDeviceLink/SDLOnPermissionsChange.h',
'SmartDeviceLink/SDLOnRCStatus.h',
+'SmartDeviceLink/SDLOnSubtleAlertPressed.h',
'SmartDeviceLink/SDLOnSyncPData.h',
'SmartDeviceLink/SDLOnSystemCapabilityUpdated.h',
'SmartDeviceLink/SDLOnSystemRequest.h',
'SmartDeviceLink/SDLOnTBTClientState.h',
'SmartDeviceLink/SDLOnTouchEvent.h',
+'SmartDeviceLink/SDLOnUpdateFile.h',
+'SmartDeviceLink/SDLOnUpdateSubMenu.h',
'SmartDeviceLink/SDLOnVehicleData.h',
'SmartDeviceLink/SDLOnWayPointChange.h',
'SmartDeviceLink/SDLParameterPermissions.h',
@@ -375,6 +382,8 @@ s.public_header_files = [
'SmartDeviceLink/SDLSubscribeVehicleDataResponse.h',
'SmartDeviceLink/SDLSubscribeWaypoints.h',
'SmartDeviceLink/SDLSubscribeWaypointsResponse.h',
+'SmartDeviceLink/SDLSubtleAlert.h',
+'SmartDeviceLink/SDLSubtleAlertResponse.h',
'SmartDeviceLink/SDLSupportedSeat.h',
'SmartDeviceLink/SDLSyncMsgVersion.h',
'SmartDeviceLink/SDLMsgVersion.h',
@@ -404,6 +413,7 @@ s.public_header_files = [
'SmartDeviceLink/SDLTouchManagerDelegate.h',
'SmartDeviceLink/SDLTouchType.h',
'SmartDeviceLink/SDLTPMS.h',
+'SmartDeviceLink/SDLTransmissionType.h',
'SmartDeviceLink/SDLTriggerSource.h',
'SmartDeviceLink/SDLTTSChunk.h',
'SmartDeviceLink/SDLTurn.h',
@@ -447,6 +457,8 @@ s.public_header_files = [
'SmartDeviceLink/SDLWeatherServiceManifest.h',
'SmartDeviceLink/SDLWiperStatus.h',
'SmartDeviceLink/SDLWindowCapability.h',
+'SmartDeviceLink/SDLWindowState.h',
+'SmartDeviceLink/SDLWindowStatus.h',
'SmartDeviceLink/SDLWindowType.h',
'SmartDeviceLink/SDLWindowTypeCapabilities.h',
'SmartDeviceLink/SmartDeviceLink.h',
diff --git a/SmartDeviceLink-iOS.xcodeproj/project.pbxproj b/SmartDeviceLink-iOS.xcodeproj/project.pbxproj
index aade199e8..81f863b27 100644
--- a/SmartDeviceLink-iOS.xcodeproj/project.pbxproj
+++ b/SmartDeviceLink-iOS.xcodeproj/project.pbxproj
@@ -149,7 +149,6 @@
162E832C1A9BDE8B00906325 /* SDLDiagnosticMessageSpec.m in Sources */ = {isa = PBXBuildFile; fileRef = 162E82481A9BDE8A00906325 /* SDLDiagnosticMessageSpec.m */; };
162E832D1A9BDE8B00906325 /* SDLEncodedSyncPDataSpec.m in Sources */ = {isa = PBXBuildFile; fileRef = 162E82491A9BDE8A00906325 /* SDLEncodedSyncPDataSpec.m */; };
162E832E1A9BDE8B00906325 /* SDLEndAudioPassThruSpec.m in Sources */ = {isa = PBXBuildFile; fileRef = 162E824A1A9BDE8A00906325 /* SDLEndAudioPassThruSpec.m */; };
- 162E83301A9BDE8B00906325 /* SDLGetVehicleDataSpec.m in Sources */ = {isa = PBXBuildFile; fileRef = 162E824C1A9BDE8A00906325 /* SDLGetVehicleDataSpec.m */; };
162E83311A9BDE8B00906325 /* SDLListFilesSpec.m in Sources */ = {isa = PBXBuildFile; fileRef = 162E824D1A9BDE8A00906325 /* SDLListFilesSpec.m */; };
162E83321A9BDE8B00906325 /* SDLPerformAudioPassThruSpec.m in Sources */ = {isa = PBXBuildFile; fileRef = 162E824E1A9BDE8A00906325 /* SDLPerformAudioPassThruSpec.m */; };
162E83331A9BDE8B00906325 /* SDLPerformInteractionSpec.m in Sources */ = {isa = PBXBuildFile; fileRef = 162E824F1A9BDE8A00906325 /* SDLPerformInteractionSpec.m */; };
@@ -423,6 +422,9 @@
2BF2F85220ED068200A26EF2 /* SDLAudioStreamingIndicatorSpec.m in Sources */ = {isa = PBXBuildFile; fileRef = 2BF2F85120ED068200A26EF2 /* SDLAudioStreamingIndicatorSpec.m */; };
332A914F1CED9CC60043824C /* SDLAppInfo.m in Sources */ = {isa = PBXBuildFile; fileRef = 332A913D1CED87F80043824C /* SDLAppInfo.m */; };
332A91501CED9CF10043824C /* SDLAppInfo.h in Headers */ = {isa = PBXBuildFile; fileRef = 332A913C1CED87F80043824C /* SDLAppInfo.h */; settings = {ATTRIBUTES = (Public, ); }; };
+ 4A1B036C24CF43CD008C6B13 /* SDLDriverDistractionCapability.m in Sources */ = {isa = PBXBuildFile; fileRef = 4A1B036A24CF43CD008C6B13 /* SDLDriverDistractionCapability.m */; };
+ 4A1B036D24CF43CD008C6B13 /* SDLDriverDistractionCapability.h in Headers */ = {isa = PBXBuildFile; fileRef = 4A1B036B24CF43CD008C6B13 /* SDLDriverDistractionCapability.h */; settings = {ATTRIBUTES = (Public, ); }; };
+ 4A1B036F24CF484E008C6B13 /* SDLDriverDistractionCapabilitySpec.m in Sources */ = {isa = PBXBuildFile; fileRef = 4A1B036E24CF484E008C6B13 /* SDLDriverDistractionCapabilitySpec.m */; };
4A26370C2493F0CF00278BE3 /* SDLRPCMessageType.m in Sources */ = {isa = PBXBuildFile; fileRef = 4A26370B2493F0CE00278BE3 /* SDLRPCMessageType.m */; };
4A3BA4DC248E8F0F003E56B8 /* SDLLifecycleSystemRequestHandler.h in Headers */ = {isa = PBXBuildFile; fileRef = 4A3BA4DA248E8F0F003E56B8 /* SDLLifecycleSystemRequestHandler.h */; };
4A3BA4DD248E8F0F003E56B8 /* SDLLifecycleSystemRequestHandler.m in Sources */ = {isa = PBXBuildFile; fileRef = 4A3BA4DB248E8F0F003E56B8 /* SDLLifecycleSystemRequestHandler.m */; };
@@ -439,12 +441,21 @@
4A457DD924A5137100386CBA /* SDLLifecycleProtocolHandlerSpec.m in Sources */ = {isa = PBXBuildFile; fileRef = 4A457DD824A5137100386CBA /* SDLLifecycleProtocolHandlerSpec.m */; };
4A4AD8A424894260008FC414 /* TestOldConfigurationUpdateManagerDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 4A4AD8A324894260008FC414 /* TestOldConfigurationUpdateManagerDelegate.m */; };
4A4AD8A724894270008FC414 /* TestNewConfigurationUpdateManagerDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 4A4AD8A624894270008FC414 /* TestNewConfigurationUpdateManagerDelegate.m */; };
+ 4A899D3624D31FEE007BDD9F /* SDLOnUpdateFile.h in Headers */ = {isa = PBXBuildFile; fileRef = 4A899D3424D31FEE007BDD9F /* SDLOnUpdateFile.h */; settings = {ATTRIBUTES = (Public, ); }; };
+ 4A899D3724D31FEE007BDD9F /* SDLOnUpdateFile.m in Sources */ = {isa = PBXBuildFile; fileRef = 4A899D3524D31FEE007BDD9F /* SDLOnUpdateFile.m */; };
+ 4A899D3A24D32273007BDD9F /* SDLOnUpdateSubMenu.h in Headers */ = {isa = PBXBuildFile; fileRef = 4A899D3824D32273007BDD9F /* SDLOnUpdateSubMenu.h */; settings = {ATTRIBUTES = (Public, ); }; };
+ 4A899D3B24D32273007BDD9F /* SDLOnUpdateSubMenu.m in Sources */ = {isa = PBXBuildFile; fileRef = 4A899D3924D32273007BDD9F /* SDLOnUpdateSubMenu.m */; };
+ 4A899D3E24D335F8007BDD9F /* SDLDynamicUpdateCapabilities.h in Headers */ = {isa = PBXBuildFile; fileRef = 4A899D3C24D335F8007BDD9F /* SDLDynamicUpdateCapabilities.h */; settings = {ATTRIBUTES = (Public, ); }; };
+ 4A899D3F24D335F8007BDD9F /* SDLDynamicUpdateCapabilities.m in Sources */ = {isa = PBXBuildFile; fileRef = 4A899D3D24D335F8007BDD9F /* SDLDynamicUpdateCapabilities.m */; };
4A99D00E247576B7009B43E6 /* SDLTextField+ScreenManagerExtensions.h in Headers */ = {isa = PBXBuildFile; fileRef = 4A99D00C247576B7009B43E6 /* SDLTextField+ScreenManagerExtensions.h */; };
4A99D00F247576B7009B43E6 /* SDLTextField+ScreenManagerExtensions.m in Sources */ = {isa = PBXBuildFile; fileRef = 4A99D00D247576B7009B43E6 /* SDLTextField+ScreenManagerExtensions.m */; };
4A99D0122475773C009B43E6 /* SDLImageField+ScreenManagerExtensions.h in Headers */ = {isa = PBXBuildFile; fileRef = 4A99D0102475773C009B43E6 /* SDLImageField+ScreenManagerExtensions.h */; };
4A99D0132475773C009B43E6 /* SDLImageField+ScreenManagerExtensions.m in Sources */ = {isa = PBXBuildFile; fileRef = 4A99D0112475773C009B43E6 /* SDLImageField+ScreenManagerExtensions.m */; };
4A9D02BE2497EED400FBE99B /* SDLLifecycleRPCAdapter.h in Headers */ = {isa = PBXBuildFile; fileRef = 4A9D02BC2497EED400FBE99B /* SDLLifecycleRPCAdapter.h */; };
4A9D02BF2497EED400FBE99B /* SDLLifecycleRPCAdapter.m in Sources */ = {isa = PBXBuildFile; fileRef = 4A9D02BD2497EED400FBE99B /* SDLLifecycleRPCAdapter.m */; };
+ 4AC68FBA24D33B7A0073FF67 /* SDLOnUpdateFileSpec.m in Sources */ = {isa = PBXBuildFile; fileRef = 4AC68FB924D33B7A0073FF67 /* SDLOnUpdateFileSpec.m */; };
+ 4AC68FBC24D33E5D0073FF67 /* SDLOnUpdateSubMenuSpec.m in Sources */ = {isa = PBXBuildFile; fileRef = 4AC68FBB24D33E5D0073FF67 /* SDLOnUpdateSubMenuSpec.m */; };
+ 4AC68FBE24D340400073FF67 /* SDLDynamicUpdateCapabilitiesSpec.m in Sources */ = {isa = PBXBuildFile; fileRef = 4AC68FBD24D340400073FF67 /* SDLDynamicUpdateCapabilitiesSpec.m */; };
5D00AC671F140F0A004000D9 /* SDLSystemCapabilityType.h in Headers */ = {isa = PBXBuildFile; fileRef = 5D00AC651F140F0A004000D9 /* SDLSystemCapabilityType.h */; settings = {ATTRIBUTES = (Public, ); }; };
5D00AC681F140F0A004000D9 /* SDLSystemCapabilityType.m in Sources */ = {isa = PBXBuildFile; fileRef = 5D00AC661F140F0A004000D9 /* SDLSystemCapabilityType.m */; };
5D00AC6B1F141339004000D9 /* SDLSystemCapability.h in Headers */ = {isa = PBXBuildFile; fileRef = 5D00AC691F141339004000D9 /* SDLSystemCapability.h */; settings = {ATTRIBUTES = (Public, ); }; };
@@ -1423,6 +1434,15 @@
888DBAF022D528DE002A0AE2 /* SDLCloseApplicationResponse.m in Sources */ = {isa = PBXBuildFile; fileRef = 888DBAEE22D528DE002A0AE2 /* SDLCloseApplicationResponse.m */; };
888F86FE221DEE200052FE4C /* SDLAsynchronousRPCOperation.m in Sources */ = {isa = PBXBuildFile; fileRef = 888F86FD221DEE1F0052FE4C /* SDLAsynchronousRPCOperation.m */; };
888F8700221DF4880052FE4C /* SDLAsynchronousRPCOperationSpec.m in Sources */ = {isa = PBXBuildFile; fileRef = 888F86FF221DF4880052FE4C /* SDLAsynchronousRPCOperationSpec.m */; };
+ 889D0B8F24D052FE008AD494 /* SDLSubtleAlert.m in Sources */ = {isa = PBXBuildFile; fileRef = 889D0B8D24D052FD008AD494 /* SDLSubtleAlert.m */; };
+ 889D0B9024D052FE008AD494 /* SDLSubtleAlert.h in Headers */ = {isa = PBXBuildFile; fileRef = 889D0B8E24D052FD008AD494 /* SDLSubtleAlert.h */; settings = {ATTRIBUTES = (Public, ); }; };
+ 889D0B9324D05A0E008AD494 /* SDLSubtleAlertResponse.m in Sources */ = {isa = PBXBuildFile; fileRef = 889D0B9124D05A0E008AD494 /* SDLSubtleAlertResponse.m */; };
+ 889D0B9424D05A0E008AD494 /* SDLSubtleAlertResponse.h in Headers */ = {isa = PBXBuildFile; fileRef = 889D0B9224D05A0E008AD494 /* SDLSubtleAlertResponse.h */; settings = {ATTRIBUTES = (Public, ); }; };
+ 889D0B9624D065EE008AD494 /* SDLSubtleAlertResponseSpec.m in Sources */ = {isa = PBXBuildFile; fileRef = 889D0B9524D065EE008AD494 /* SDLSubtleAlertResponseSpec.m */; };
+ 889D0B9824D06E52008AD494 /* SDLSubtleAlertSpec.m in Sources */ = {isa = PBXBuildFile; fileRef = 889D0B9724D06E52008AD494 /* SDLSubtleAlertSpec.m */; };
+ 889D0B9B24D07DCB008AD494 /* SDLOnSubtleAlertPressed.m in Sources */ = {isa = PBXBuildFile; fileRef = 889D0B9924D07DCB008AD494 /* SDLOnSubtleAlertPressed.m */; };
+ 889D0B9C24D07DCB008AD494 /* SDLOnSubtleAlertPressed.h in Headers */ = {isa = PBXBuildFile; fileRef = 889D0B9A24D07DCB008AD494 /* SDLOnSubtleAlertPressed.h */; settings = {ATTRIBUTES = (Public, ); }; };
+ 889D0B9E24D07FF8008AD494 /* SDLOnSubtleAlertPressedSpec.m in Sources */ = {isa = PBXBuildFile; fileRef = 889D0B9D24D07FF8008AD494 /* SDLOnSubtleAlertPressedSpec.m */; };
889E7BAF249CEE07002E4BE1 /* SubscribeButtonManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 889E7BAD249CEDCF002E4BE1 /* SubscribeButtonManager.swift */; };
889E7BB2249D0877002E4BE1 /* SubscribeButtonManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 889E7BB1249D0877002E4BE1 /* SubscribeButtonManager.m */; };
88A098AE2476F0C200A50005 /* SDLSubscribeButtonManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 88A098AC2476F0C200A50005 /* SDLSubscribeButtonManager.h */; };
@@ -1569,6 +1589,22 @@
9FE2471522D77AD500F8D2FC /* SDLWindowType.h in Headers */ = {isa = PBXBuildFile; fileRef = 9FE2471322D77AD500F8D2FC /* SDLWindowType.h */; settings = {ATTRIBUTES = (Public, ); }; };
9FE2471622D77AD500F8D2FC /* SDLWindowType.m in Sources */ = {isa = PBXBuildFile; fileRef = 9FE2471422D77AD500F8D2FC /* SDLWindowType.m */; };
9FE2471922D77AED00F8D2FC /* SDLPredefinedWindows.h in Headers */ = {isa = PBXBuildFile; fileRef = 9FE2471722D77AED00F8D2FC /* SDLPredefinedWindows.h */; settings = {ATTRIBUTES = (Public, ); }; };
+ B38D8E6524A029F700B977D0 /* SDLWindowStatus.m in Sources */ = {isa = PBXBuildFile; fileRef = B38D8E6324A029F700B977D0 /* SDLWindowStatus.m */; };
+ B38D8E6624A029F700B977D0 /* SDLWindowStatus.h in Headers */ = {isa = PBXBuildFile; fileRef = B38D8E6424A029F700B977D0 /* SDLWindowStatus.h */; settings = {ATTRIBUTES = (Public, ); }; };
+ B38D8E6924A02A4800B977D0 /* SDLWindowState.h in Headers */ = {isa = PBXBuildFile; fileRef = B38D8E6724A02A4700B977D0 /* SDLWindowState.h */; settings = {ATTRIBUTES = (Public, ); }; };
+ B38D8E6A24A02A4800B977D0 /* SDLWindowState.m in Sources */ = {isa = PBXBuildFile; fileRef = B38D8E6824A02A4800B977D0 /* SDLWindowState.m */; };
+ B38D8E7B24A0E11C00B977D0 /* SDLWindowStatusSpec.m in Sources */ = {isa = PBXBuildFile; fileRef = B38D8E7924A0E11C00B977D0 /* SDLWindowStatusSpec.m */; };
+ B38D8E7C24A0E11C00B977D0 /* SDLWindowStateSpec.m in Sources */ = {isa = PBXBuildFile; fileRef = B38D8E7A24A0E11C00B977D0 /* SDLWindowStateSpec.m */; };
+ B38D8E61249FE28500B977D0 /* SDLCapacityUnit.h in Headers */ = {isa = PBXBuildFile; fileRef = B38D8E5F249FE28500B977D0 /* SDLCapacityUnit.h */; settings = {ATTRIBUTES = (Public, ); }; };
+ B38D8E62249FE28500B977D0 /* SDLCapacityUnit.m in Sources */ = {isa = PBXBuildFile; fileRef = B38D8E60249FE28500B977D0 /* SDLCapacityUnit.m */; };
+ B38D8E8224A1F53500B977D0 /* SDLCapacityUnitSpec.m in Sources */ = {isa = PBXBuildFile; fileRef = B38D8E8124A1F53500B977D0 /* SDLCapacityUnitSpec.m */; };
+ B3F7918324E062C200DB5CAF /* SDLGetVehicleDataSpec.m in Sources */ = {isa = PBXBuildFile; fileRef = 162E824C1A9BDE8A00906325 /* SDLGetVehicleDataSpec.m */; };
+ B38D8E6D24A034DB00B977D0 /* SDLGearStatus.h in Headers */ = {isa = PBXBuildFile; fileRef = B38D8E6B24A034DB00B977D0 /* SDLGearStatus.h */; settings = {ATTRIBUTES = (Public, ); }; };
+ B38D8E6E24A034DB00B977D0 /* SDLGearStatus.m in Sources */ = {isa = PBXBuildFile; fileRef = B38D8E6C24A034DB00B977D0 /* SDLGearStatus.m */; };
+ B38D8E7124A0351200B977D0 /* SDLTransmissionType.m in Sources */ = {isa = PBXBuildFile; fileRef = B38D8E6F24A0351200B977D0 /* SDLTransmissionType.m */; };
+ B38D8E7224A0351200B977D0 /* SDLTransmissionType.h in Headers */ = {isa = PBXBuildFile; fileRef = B38D8E7024A0351200B977D0 /* SDLTransmissionType.h */; settings = {ATTRIBUTES = (Public, ); }; };
+ B38D8E7E24A118BD00B977D0 /* SDLGearStatusSpec.m in Sources */ = {isa = PBXBuildFile; fileRef = B38D8E7D24A118BD00B977D0 /* SDLGearStatusSpec.m */; };
+ B38D8E8024A1E3D000B977D0 /* SDLTransmissionTypeSpec.m in Sources */ = {isa = PBXBuildFile; fileRef = B38D8E7F24A1E3D000B977D0 /* SDLTransmissionTypeSpec.m */; };
DA0C46AD1DCD35080001F2A8 /* SDLRPCParameterNames.m in Sources */ = {isa = PBXBuildFile; fileRef = DA0C46AC1DCD35080001F2A8 /* SDLRPCParameterNames.m */; };
DA0C46AF1DCD41E30001F2A8 /* SDLMacros.h in Headers */ = {isa = PBXBuildFile; fileRef = DA0C46AE1DCD41E30001F2A8 /* SDLMacros.h */; settings = {ATTRIBUTES = (Public, ); }; };
DA318C1F1DD0F06C00C035AC /* NSMutableDictionary+Store.h in Headers */ = {isa = PBXBuildFile; fileRef = DA318C1D1DD0F06C00C035AC /* NSMutableDictionary+Store.h */; };
@@ -2165,6 +2201,9 @@
2BF2F85120ED068200A26EF2 /* SDLAudioStreamingIndicatorSpec.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SDLAudioStreamingIndicatorSpec.m; sourceTree = "<group>"; };
332A913C1CED87F80043824C /* SDLAppInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDLAppInfo.h; sourceTree = "<group>"; };
332A913D1CED87F80043824C /* SDLAppInfo.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SDLAppInfo.m; sourceTree = "<group>"; };
+ 4A1B036A24CF43CD008C6B13 /* SDLDriverDistractionCapability.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SDLDriverDistractionCapability.m; sourceTree = "<group>"; };
+ 4A1B036B24CF43CD008C6B13 /* SDLDriverDistractionCapability.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDLDriverDistractionCapability.h; sourceTree = "<group>"; };
+ 4A1B036E24CF484E008C6B13 /* SDLDriverDistractionCapabilitySpec.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SDLDriverDistractionCapabilitySpec.m; sourceTree = "<group>"; };
4A26370B2493F0CE00278BE3 /* SDLRPCMessageType.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SDLRPCMessageType.m; sourceTree = "<group>"; };
4A3BA4DA248E8F0F003E56B8 /* SDLLifecycleSystemRequestHandler.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SDLLifecycleSystemRequestHandler.h; sourceTree = "<group>"; };
4A3BA4DB248E8F0F003E56B8 /* SDLLifecycleSystemRequestHandler.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SDLLifecycleSystemRequestHandler.m; sourceTree = "<group>"; };
@@ -2183,12 +2222,21 @@
4A4AD8A324894260008FC414 /* TestOldConfigurationUpdateManagerDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = TestOldConfigurationUpdateManagerDelegate.m; path = DevAPISpecs/TestOldConfigurationUpdateManagerDelegate.m; sourceTree = "<group>"; };
4A4AD8A524894270008FC414 /* TestNewConfigurationUpdateManagerDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TestNewConfigurationUpdateManagerDelegate.h; sourceTree = "<group>"; };
4A4AD8A624894270008FC414 /* TestNewConfigurationUpdateManagerDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = TestNewConfigurationUpdateManagerDelegate.m; sourceTree = "<group>"; };
+ 4A899D3424D31FEE007BDD9F /* SDLOnUpdateFile.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SDLOnUpdateFile.h; sourceTree = "<group>"; };
+ 4A899D3524D31FEE007BDD9F /* SDLOnUpdateFile.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SDLOnUpdateFile.m; sourceTree = "<group>"; };
+ 4A899D3824D32273007BDD9F /* SDLOnUpdateSubMenu.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SDLOnUpdateSubMenu.h; sourceTree = "<group>"; };
+ 4A899D3924D32273007BDD9F /* SDLOnUpdateSubMenu.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SDLOnUpdateSubMenu.m; sourceTree = "<group>"; };
+ 4A899D3C24D335F8007BDD9F /* SDLDynamicUpdateCapabilities.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SDLDynamicUpdateCapabilities.h; sourceTree = "<group>"; };
+ 4A899D3D24D335F8007BDD9F /* SDLDynamicUpdateCapabilities.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SDLDynamicUpdateCapabilities.m; sourceTree = "<group>"; };
4A99D00C247576B7009B43E6 /* SDLTextField+ScreenManagerExtensions.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "SDLTextField+ScreenManagerExtensions.h"; sourceTree = "<group>"; };
4A99D00D247576B7009B43E6 /* SDLTextField+ScreenManagerExtensions.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "SDLTextField+ScreenManagerExtensions.m"; sourceTree = "<group>"; };
4A99D0102475773C009B43E6 /* SDLImageField+ScreenManagerExtensions.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "SDLImageField+ScreenManagerExtensions.h"; sourceTree = "<group>"; };
4A99D0112475773C009B43E6 /* SDLImageField+ScreenManagerExtensions.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "SDLImageField+ScreenManagerExtensions.m"; sourceTree = "<group>"; };
4A9D02BC2497EED400FBE99B /* SDLLifecycleRPCAdapter.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SDLLifecycleRPCAdapter.h; sourceTree = "<group>"; };
4A9D02BD2497EED400FBE99B /* SDLLifecycleRPCAdapter.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SDLLifecycleRPCAdapter.m; sourceTree = "<group>"; };
+ 4AC68FB924D33B7A0073FF67 /* SDLOnUpdateFileSpec.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SDLOnUpdateFileSpec.m; sourceTree = "<group>"; };
+ 4AC68FBB24D33E5D0073FF67 /* SDLOnUpdateSubMenuSpec.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SDLOnUpdateSubMenuSpec.m; sourceTree = "<group>"; };
+ 4AC68FBD24D340400073FF67 /* SDLDynamicUpdateCapabilitiesSpec.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SDLDynamicUpdateCapabilitiesSpec.m; sourceTree = "<group>"; };
5D00AC651F140F0A004000D9 /* SDLSystemCapabilityType.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDLSystemCapabilityType.h; sourceTree = "<group>"; };
5D00AC661F140F0A004000D9 /* SDLSystemCapabilityType.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SDLSystemCapabilityType.m; sourceTree = "<group>"; };
5D00AC691F141339004000D9 /* SDLSystemCapability.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDLSystemCapability.h; sourceTree = "<group>"; };
@@ -3201,6 +3249,15 @@
888DBAEE22D528DE002A0AE2 /* SDLCloseApplicationResponse.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SDLCloseApplicationResponse.m; sourceTree = "<group>"; };
888F86FD221DEE1F0052FE4C /* SDLAsynchronousRPCOperation.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SDLAsynchronousRPCOperation.m; sourceTree = "<group>"; };
888F86FF221DF4880052FE4C /* SDLAsynchronousRPCOperationSpec.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SDLAsynchronousRPCOperationSpec.m; sourceTree = "<group>"; };
+ 889D0B8D24D052FD008AD494 /* SDLSubtleAlert.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SDLSubtleAlert.m; sourceTree = "<group>"; };
+ 889D0B8E24D052FD008AD494 /* SDLSubtleAlert.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDLSubtleAlert.h; sourceTree = "<group>"; };
+ 889D0B9124D05A0E008AD494 /* SDLSubtleAlertResponse.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SDLSubtleAlertResponse.m; sourceTree = "<group>"; };
+ 889D0B9224D05A0E008AD494 /* SDLSubtleAlertResponse.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDLSubtleAlertResponse.h; sourceTree = "<group>"; };
+ 889D0B9524D065EE008AD494 /* SDLSubtleAlertResponseSpec.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SDLSubtleAlertResponseSpec.m; sourceTree = "<group>"; };
+ 889D0B9724D06E52008AD494 /* SDLSubtleAlertSpec.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SDLSubtleAlertSpec.m; sourceTree = "<group>"; };
+ 889D0B9924D07DCB008AD494 /* SDLOnSubtleAlertPressed.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SDLOnSubtleAlertPressed.m; sourceTree = "<group>"; };
+ 889D0B9A24D07DCB008AD494 /* SDLOnSubtleAlertPressed.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDLOnSubtleAlertPressed.h; sourceTree = "<group>"; };
+ 889D0B9D24D07FF8008AD494 /* SDLOnSubtleAlertPressedSpec.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SDLOnSubtleAlertPressedSpec.m; sourceTree = "<group>"; };
889E7BAD249CEDCF002E4BE1 /* SubscribeButtonManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SubscribeButtonManager.swift; sourceTree = "<group>"; };
889E7BB0249D0877002E4BE1 /* SubscribeButtonManager.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SubscribeButtonManager.h; sourceTree = "<group>"; };
889E7BB1249D0877002E4BE1 /* SubscribeButtonManager.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SubscribeButtonManager.m; sourceTree = "<group>"; };
@@ -3353,6 +3410,21 @@
9FE2471322D77AD500F8D2FC /* SDLWindowType.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SDLWindowType.h; sourceTree = "<group>"; };
9FE2471422D77AD500F8D2FC /* SDLWindowType.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SDLWindowType.m; sourceTree = "<group>"; };
9FE2471722D77AED00F8D2FC /* SDLPredefinedWindows.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SDLPredefinedWindows.h; sourceTree = "<group>"; };
+ B38D8E6324A029F700B977D0 /* SDLWindowStatus.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SDLWindowStatus.m; sourceTree = "<group>"; };
+ B38D8E6424A029F700B977D0 /* SDLWindowStatus.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDLWindowStatus.h; sourceTree = "<group>"; };
+ B38D8E6724A02A4700B977D0 /* SDLWindowState.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDLWindowState.h; sourceTree = "<group>"; };
+ B38D8E6824A02A4800B977D0 /* SDLWindowState.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SDLWindowState.m; sourceTree = "<group>"; };
+ B38D8E7924A0E11C00B977D0 /* SDLWindowStatusSpec.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SDLWindowStatusSpec.m; sourceTree = "<group>"; };
+ B38D8E7A24A0E11C00B977D0 /* SDLWindowStateSpec.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SDLWindowStateSpec.m; sourceTree = "<group>"; };
+ B38D8E5F249FE28500B977D0 /* SDLCapacityUnit.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDLCapacityUnit.h; sourceTree = "<group>"; };
+ B38D8E60249FE28500B977D0 /* SDLCapacityUnit.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SDLCapacityUnit.m; sourceTree = "<group>"; };
+ B38D8E8124A1F53500B977D0 /* SDLCapacityUnitSpec.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SDLCapacityUnitSpec.m; sourceTree = "<group>"; };
+ B38D8E6B24A034DB00B977D0 /* SDLGearStatus.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDLGearStatus.h; sourceTree = "<group>"; };
+ B38D8E6C24A034DB00B977D0 /* SDLGearStatus.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SDLGearStatus.m; sourceTree = "<group>"; };
+ B38D8E6F24A0351200B977D0 /* SDLTransmissionType.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SDLTransmissionType.m; sourceTree = "<group>"; };
+ B38D8E7024A0351200B977D0 /* SDLTransmissionType.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDLTransmissionType.h; sourceTree = "<group>"; };
+ B38D8E7D24A118BD00B977D0 /* SDLGearStatusSpec.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SDLGearStatusSpec.m; sourceTree = "<group>"; };
+ B38D8E7F24A1E3D000B977D0 /* SDLTransmissionTypeSpec.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SDLTransmissionTypeSpec.m; sourceTree = "<group>"; };
BB3C600D221AEF37007DD4CA /* NSMutableDictionary+StoreSpec.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = "NSMutableDictionary+StoreSpec.m"; path = "DevAPISpecs/NSMutableDictionary+StoreSpec.m"; sourceTree = "<group>"; };
DA0C46AC1DCD35080001F2A8 /* SDLRPCParameterNames.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SDLRPCParameterNames.m; sourceTree = "<group>"; };
DA0C46AE1DCD41E30001F2A8 /* SDLMacros.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDLMacros.h; sourceTree = "<group>"; };
@@ -3601,6 +3673,7 @@
162E81E81A9BDE8A00906325 /* SDLButtonEventModeSpec.m */,
162E81E91A9BDE8A00906325 /* SDLButtonNameSpec.m */,
162E81EA1A9BDE8A00906325 /* SDLButtonPressModeSpec.m */,
+ B38D8E8124A1F53500B977D0 /* SDLCapacityUnitSpec.m */,
162E81EB1A9BDE8A00906325 /* SDLCarModeStatusSpec.m */,
162E81EC1A9BDE8A00906325 /* SDLCharacterSetSpec.m */,
162E81ED1A9BDE8A00906325 /* SDLCompassDirectionSpec.m */,
@@ -3672,6 +3745,7 @@
162E82181A9BDE8A00906325 /* SDLTextFieldNameSpec.m */,
162E82191A9BDE8A00906325 /* SDLTimerModeSpec.m */,
162E821A1A9BDE8A00906325 /* SDLTouchTypeSpec.m */,
+ B38D8E7F24A1E3D000B977D0 /* SDLTransmissionTypeSpec.m */,
162E821B1A9BDE8A00906325 /* SDLTriggerSource.m */,
8818ADDC2100FE0C007D6F19 /* SDLTurnSignalSpec.m */,
162E821C1A9BDE8A00906325 /* SDLUpdateModeSpec.m */,
@@ -3715,6 +3789,7 @@
162E82341A9BDE8A00906325 /* SDLOnLockScreenStatusSpec.m */,
162E82351A9BDE8A00906325 /* SDLOnPermissionsChangeSpec.m */,
1EAA470D2032BF1D000FE74B /* SDLOnRCStatusSpec.m */,
+ 889D0B9D24D07FF8008AD494 /* SDLOnSubtleAlertPressedSpec.m */,
162E82361A9BDE8A00906325 /* SDLOnSyncPDataSpec.m */,
88A5E7F3220B57F900495E8A /* SDLOnSystemCapabilityUpdatedSpec.m */,
162E82371A9BDE8A00906325 /* SDLOnSystemRequestSpec.m */,
@@ -3722,6 +3797,8 @@
162E82391A9BDE8A00906325 /* SDLOnTouchEventSpec.m */,
162E823A1A9BDE8A00906325 /* SDLOnVehicleDataSpec.m */,
DA9F7E9F1DCC05D200ACAE48 /* SDLOnWaypointChangeSpec.m */,
+ 4AC68FB924D33B7A0073FF67 /* SDLOnUpdateFileSpec.m */,
+ 4AC68FBB24D33E5D0073FF67 /* SDLOnUpdateSubMenuSpec.m */,
);
path = NotificationSpecs;
sourceTree = "<group>";
@@ -3786,6 +3863,7 @@
162E825D1A9BDE8A00906325 /* SDLSubscribeButtonSpec.m */,
162E825E1A9BDE8A00906325 /* SDLSubscribeVehicleDataSpec.m */,
DA9F7EA31DCC05EE00ACAE48 /* SDLSubscribeWaypointsSpec.m */,
+ 889D0B9724D06E52008AD494 /* SDLSubtleAlertSpec.m */,
162E825F1A9BDE8A00906325 /* SDLSyncPDataSpec.m */,
162E82601A9BDE8A00906325 /* SDLSystemRequestSpec.m */,
162E82611A9BDE8A00906325 /* SDLUnregisterAppInterfaceSpec.m */,
@@ -3860,6 +3938,7 @@
162E82861A9BDE8A00906325 /* SDLSubscribeButtonResponseSpec.m */,
162E82871A9BDE8A00906325 /* SDLSubscribeVehicleDataResponseSpec.m */,
DA9F7EA91DCC061A00ACAE48 /* SDLSubscribeWaypointsResponseSpec.m */,
+ 889D0B9524D065EE008AD494 /* SDLSubtleAlertResponseSpec.m */,
162E82881A9BDE8A00906325 /* SDLSyncPDataResponseSpec.m */,
162E82891A9BDE8A00906325 /* SDLSystemRequestResponseSpec.m */,
162E828A1A9BDE8A00906325 /* SDLUnregisterAppInterfaceResponseSpec.m */,
@@ -3903,10 +3982,13 @@
162E82981A9BDE8A00906325 /* SDLDIDResult.m */,
9FA0D00522DF06D3009CF344 /* SDLDisplayCapabilitySpec.m */,
162E82991A9BDE8A00906325 /* SDLDisplayCapabilitiesSpec.m */,
+ 4A1B036E24CF484E008C6B13 /* SDLDriverDistractionCapabilitySpec.m */,
+ 4AC68FBD24D340400073FF67 /* SDLDynamicUpdateCapabilitiesSpec.m */,
162E829A1A9BDE8A00906325 /* SDLECallInfoSpec.m */,
162E829B1A9BDE8A00906325 /* SDLEmergencyEventSpec.m */,
88B3BFA120DA911E00943565 /* SDLFuelRangeSpec.m */,
1EAA47752036B847000FE74B /* SDLEqualizerSettingsSpec.m */,
+ B38D8E7D24A118BD00B977D0 /* SDLGearStatusSpec.m */,
162E829C1A9BDE8A00906325 /* SDLGPSDataSpec.m */,
88EED83A1F33BECB00E6C42E /* SDLHapticRectSpec.m */,
162E829D1A9BDE8A00906325 /* SDLHeadLampStatusSpec.m */,
@@ -3981,6 +4063,8 @@
000DD56B22EEF8E4005AB7A7 /* SDLSeatLocationCapabilitySpec.m */,
000DD56D22EF01FC005AB7A7 /* SDLSeatLocationSpec.m */,
9FA0CFFF22DF06A0009CF344 /* SDLWindowCapabilitySpec.m */,
+ B38D8E7A24A0E11C00B977D0 /* SDLWindowStateSpec.m */,
+ B38D8E7924A0E11C00B977D0 /* SDLWindowStatusSpec.m */,
9FA0D00222DF06B9009CF344 /* SDLWindowTypeCapabilitiesSpec.m */,
);
path = StructSpecs;
@@ -4541,12 +4625,12 @@
isa = PBXGroup;
children = (
5D5934FF1A851B8400687FB9 /* Superclasses */,
+ 5D5934F41A85165E00687FB9 /* Enums */,
+ 5D5934F81A8519C300687FB9 /* Notification */,
5D5935041A851E1A00687FB9 /* Payload */,
5D5934F11A85162800687FB9 /* Requests */,
5D5934F21A85163200687FB9 /* Responses */,
5D5934F31A85164500687FB9 /* Structs */,
- 5D5934F41A85165E00687FB9 /* Enums */,
- 5D5934F81A8519C300687FB9 /* Notification */,
);
name = RPCs;
sourceTree = "<group>";
@@ -4675,6 +4759,8 @@
5D61FBC51A84238B00846EE7 /* SDLSubscribeVehicleData.m */,
DA9F7E851DCC049900ACAE48 /* SDLSubscribeWayPoints.h */,
DA9F7E861DCC049900ACAE48 /* SDLSubscribeWayPoints.m */,
+ 889D0B8E24D052FD008AD494 /* SDLSubtleAlert.h */,
+ 889D0B8D24D052FD008AD494 /* SDLSubtleAlert.m */,
5D61FBCA1A84238B00846EE7 /* SDLSyncPData.h */,
5D61FBCB1A84238B00846EE7 /* SDLSyncPData.m */,
5D61FBD21A84238B00846EE7 /* SDLSystemRequest.h */,
@@ -4810,6 +4896,8 @@
5D61FBC71A84238B00846EE7 /* SDLSubscribeVehicleDataResponse.m */,
DA9F7E891DCC04B000ACAE48 /* SDLSubscribeWayPointsResponse.h */,
DA9F7E8A1DCC04B000ACAE48 /* SDLSubscribeWayPointsResponse.m */,
+ 889D0B9224D05A0E008AD494 /* SDLSubtleAlertResponse.h */,
+ 889D0B9124D05A0E008AD494 /* SDLSubtleAlertResponse.m */,
5D61FBCC1A84238B00846EE7 /* SDLSyncPDataResponse.h */,
5D61FBCD1A84238B00846EE7 /* SDLSyncPDataResponse.m */,
5D61FBD41A84238B00846EE7 /* SDLSystemRequestResponse.h */,
@@ -4881,6 +4969,10 @@
9F425AD922DD983500BE3245 /* SDLDisplayCapability.m */,
5D61FAA31A84238A00846EE7 /* SDLDisplayCapabilities.h */,
5D61FAA41A84238A00846EE7 /* SDLDisplayCapabilities.m */,
+ 4A1B036B24CF43CD008C6B13 /* SDLDriverDistractionCapability.h */,
+ 4A1B036A24CF43CD008C6B13 /* SDLDriverDistractionCapability.m */,
+ 4A899D3C24D335F8007BDD9F /* SDLDynamicUpdateCapabilities.h */,
+ 4A899D3D24D335F8007BDD9F /* SDLDynamicUpdateCapabilities.m */,
5D61FAAB1A84238A00846EE7 /* SDLECallInfo.h */,
5D61FAAC1A84238A00846EE7 /* SDLECallInfo.m */,
5D61FAAD1A84238A00846EE7 /* SDLEmergencyEvent.h */,
@@ -4889,6 +4981,8 @@
88B3BF9B20DA8BBC00943565 /* SDLFuelRange.m */,
1EAA4723203416D3000FE74B /* SDLEqualizerSettings.h */,
1EAA4724203416D3000FE74B /* SDLEqualizerSettings.m */,
+ B38D8E6B24A034DB00B977D0 /* SDLGearStatus.h */,
+ B38D8E6C24A034DB00B977D0 /* SDLGearStatus.m */,
5D61FACE1A84238A00846EE7 /* SDLGPSData.h */,
5D61FACF1A84238A00846EE7 /* SDLGPSData.m */,
88EED8361F33AE1700E6C42E /* SDLHapticRect.h */,
@@ -5043,6 +5137,10 @@
0055413122D75A7B003194D3 /* SDLSeatLocationCapability.m */,
9F425AD022DD980200BE3245 /* SDLWindowCapability.h */,
9F425AD122DD980200BE3245 /* SDLWindowCapability.m */,
+ B38D8E6724A02A4700B977D0 /* SDLWindowState.h */,
+ B38D8E6824A02A4800B977D0 /* SDLWindowState.m */,
+ B38D8E6424A029F700B977D0 /* SDLWindowStatus.h */,
+ B38D8E6324A029F700B977D0 /* SDLWindowStatus.m */,
9F425AD422DD981E00BE3245 /* SDLWindowTypeCapabilities.h */,
9F425AD522DD981E00BE3245 /* SDLWindowTypeCapabilities.m */,
);
@@ -5074,6 +5172,8 @@
5D61FA691A84238A00846EE7 /* SDLButtonName.m */,
5D61FA6A1A84238A00846EE7 /* SDLButtonPressMode.h */,
5D61FA6B1A84238A00846EE7 /* SDLButtonPressMode.m */,
+ B38D8E5F249FE28500B977D0 /* SDLCapacityUnit.h */,
+ B38D8E60249FE28500B977D0 /* SDLCapacityUnit.m */,
5D61FA6C1A84238A00846EE7 /* SDLCarModeStatus.h */,
5D61FA6D1A84238A00846EE7 /* SDLCarModeStatus.m */,
5D61FA721A84238A00846EE7 /* SDLCharacterSet.h */,
@@ -5227,6 +5327,8 @@
5D61FBEB1A84238C00846EE7 /* SDLTouchType.m */,
5D3E420820EAAD6500D8C622 /* SDLTPMS.h */,
5D3E420920EAAD6500D8C622 /* SDLTPMS.m */,
+ B38D8E7024A0351200B977D0 /* SDLTransmissionType.h */,
+ B38D8E6F24A0351200B977D0 /* SDLTransmissionType.m */,
5D61FBEE1A84238C00846EE7 /* SDLTriggerSource.h */,
5D61FBEF1A84238C00846EE7 /* SDLTriggerSource.m */,
8818ADD62100FC18007D6F19 /* SDLTurnSignal.h */,
@@ -5346,6 +5448,8 @@
5D61FB2B1A84238B00846EE7 /* SDLOnPermissionsChange.m */,
1EAA47092032BAE5000FE74B /* SDLOnRCStatus.h */,
1EAA470A2032BAE5000FE74B /* SDLOnRCStatus.m */,
+ 889D0B9A24D07DCB008AD494 /* SDLOnSubtleAlertPressed.h */,
+ 889D0B9924D07DCB008AD494 /* SDLOnSubtleAlertPressed.m */,
5D61FB2C1A84238B00846EE7 /* SDLOnSyncPData.h */,
5D61FB2D1A84238B00846EE7 /* SDLOnSyncPData.m */,
884AF94D220B488900E22928 /* SDLOnSystemCapabilityUpdated.h */,
@@ -5356,6 +5460,10 @@
5D61FB311A84238B00846EE7 /* SDLOnTBTClientState.m */,
5D61FB321A84238B00846EE7 /* SDLOnTouchEvent.h */,
5D61FB331A84238B00846EE7 /* SDLOnTouchEvent.m */,
+ 4A899D3424D31FEE007BDD9F /* SDLOnUpdateFile.h */,
+ 4A899D3524D31FEE007BDD9F /* SDLOnUpdateFile.m */,
+ 4A899D3824D32273007BDD9F /* SDLOnUpdateSubMenu.h */,
+ 4A899D3924D32273007BDD9F /* SDLOnUpdateSubMenu.m */,
5D61FB341A84238B00846EE7 /* SDLOnVehicleData.h */,
5D61FB351A84238B00846EE7 /* SDLOnVehicleData.m */,
DA9F7E7D1DCC028B00ACAE48 /* SDLOnWayPointChange.h */,
@@ -6765,6 +6873,7 @@
8BBEA6061F324165003EEA26 /* SDLMetadataType.h in Headers */,
E4139D1D1F6017770005B6EA /* SDLLifecycleConfigurationUpdate.h in Headers */,
5DA3F35A1BC448480026F2D0 /* SDLError.h in Headers */,
+ 4A899D3A24D32273007BDD9F /* SDLOnUpdateSubMenu.h in Headers */,
5DA3F35F1BC448590026F2D0 /* SDLNotificationConstants.h in Headers */,
5DE5ABB71B0E38C90067BB02 /* SDLSystemRequest.h in Headers */,
5DA3F3701BC4489A0026F2D0 /* SDLManager.h in Headers */,
@@ -6852,6 +6961,7 @@
5D61FCB51A84238C00846EE7 /* SDLGetVehicleData.h in Headers */,
5D61FDEB1A84238C00846EE7 /* SDLUnsubscribeVehicleData.h in Headers */,
5DA3F3541BC448060026F2D0 /* NSMapTable+Subscripting.h in Headers */,
+ 889D0B9424D05A0E008AD494 /* SDLSubtleAlertResponse.h in Headers */,
5D61FC591A84238C00846EE7 /* SDLCarModeStatus.h in Headers */,
5D1665C41CF8CA2700CC4CA1 /* SDLListFilesOperation.h in Headers */,
5D61FC2B1A84238C00846EE7 /* SDLTransportType.h in Headers */,
@@ -6889,6 +6999,7 @@
884E701B21FB8D0F008D53BA /* SDLPublishAppService.h in Headers */,
5DA23FFD1F312DBA009C0313 /* SDLVideoEncoderDelegate.h in Headers */,
EE7B6124205BF97B00E0655B /* SDLControlFramePayloadRegisterSecondaryTransportNak.h in Headers */,
+ B38D8E6624A029F700B977D0 /* SDLWindowStatus.h in Headers */,
5D61FCE01A84238C00846EE7 /* SDLKeyboardEvent.h in Headers */,
5D3E48751D6F3B330000BFEF /* SDLAsynchronousOperation.h in Headers */,
88AF11DC220B6B3D00A59985 /* SDLPerformAppServiceInteraction.h in Headers */,
@@ -6913,6 +7024,7 @@
005DF3CA22C62E00006E01A9 /* SDLEncryptionManagerConstants.h in Headers */,
5D61FCAF1A84238C00846EE7 /* SDLGenericResponse.h in Headers */,
885468352225C1F800994D8D /* SDLCloudAppProperties.h in Headers */,
+ 4A899D3624D31FEE007BDD9F /* SDLOnUpdateFile.h in Headers */,
5D61FC4F1A84238C00846EE7 /* SDLBodyInformation.h in Headers */,
5D61FDAB1A84238C00846EE7 /* SDLStartTime.h in Headers */,
5D61FD071A84238C00846EE7 /* SDLOnCommand.h in Headers */,
@@ -6938,6 +7050,7 @@
5D61FD431A84238C00846EE7 /* SDLProtocol.h in Headers */,
5D8B17531AC9E11B006A6E1C /* SDLDialNumberResponse.h in Headers */,
5DEF695B1FD6F82D004B8C2F /* SDLStreamingAudioManagerType.h in Headers */,
+ B38D8E7224A0351200B977D0 /* SDLTransmissionType.h in Headers */,
5D61FC921A84238C00846EE7 /* SDLDisplayType.h in Headers */,
5D61FD0D1A84238C00846EE7 /* SDLOnHashChange.h in Headers */,
5D61FC6B1A84238C00846EE7 /* SDLCreateInteractionChoiceSet.h in Headers */,
@@ -7019,6 +7132,7 @@
5D61FD571A84238C00846EE7 /* SDLPutFileResponse.h in Headers */,
5D61FD411A84238C00846EE7 /* SDLPRNDL.h in Headers */,
5D61FDE51A84238C00846EE7 /* SDLUnregisterAppInterfaceResponse.h in Headers */,
+ 889D0B9C24D07DCB008AD494 /* SDLOnSubtleAlertPressed.h in Headers */,
5D61FCF81A84238C00846EE7 /* SDLMenuParams.h in Headers */,
5D61FD651A84238C00846EE7 /* SDLResetGlobalPropertiesResponse.h in Headers */,
DA9F7E671DCBFAD400ACAE48 /* SDLOasisAddress.h in Headers */,
@@ -7029,8 +7143,10 @@
5D2F58081D0717D5001085CE /* SDLManagerDelegate.h in Headers */,
5D61FC881A84238C00846EE7 /* SDLDiagnosticMessage.h in Headers */,
5D0A738A203F24320001595D /* SDLSoftButtonObject.h in Headers */,
+ 889D0B9024D052FE008AD494 /* SDLSubtleAlert.h in Headers */,
5D61FDB31A84238C00846EE7 /* SDLSubscribeVehicleDataResponse.h in Headers */,
5D92935A20B33D4F00FCC775 /* SDLChoiceCell.h in Headers */,
+ B38D8E61249FE28500B977D0 /* SDLCapacityUnit.h in Headers */,
5D61FC961A84238C00846EE7 /* SDLECallConfirmationStatus.h in Headers */,
5D4D67AC1D2ED37A00468B4A /* SDLNotificationDispatcher.h in Headers */,
5D61FDA51A84238C00846EE7 /* SDLSpeak.h in Headers */,
@@ -7114,6 +7230,7 @@
5D4631041F2120A30092EFDC /* SDLControlFramePayloadType.h in Headers */,
EED5CA061F4D1E2300F04000 /* SDLRTPH264Packetizer.h in Headers */,
5D61FCCF1A84238C00846EE7 /* SDLImageField.h in Headers */,
+ B38D8E6D24A034DB00B977D0 /* SDLGearStatus.h in Headers */,
5D535DC51B72473800CF7760 /* SDLGlobals.h in Headers */,
5D79A03B1CE36F030035797B /* SDLUploadFileOperation.h in Headers */,
8880D24722205B1B00964F6A /* SDLNavigationInstruction.h in Headers */,
@@ -7138,10 +7255,12 @@
7538764F22D8CEDB00FE8484 /* SDLShowAppMenu.h in Headers */,
1E5AD0841F20B9290029B8AF /* SDLButtonPressResponse.h in Headers */,
1E5AD0681F2080B50029B8AF /* SDLRadioControlData.h in Headers */,
+ B38D8E6924A02A4800B977D0 /* SDLWindowState.h in Headers */,
1E5AD0481F1F773E0029B8AF /* SDLModuleType.h in Headers */,
88B58DC622204AF10011B063 /* SDLNavigationAction.h in Headers */,
1E5AD06C1F208BAB0029B8AF /* SDLClimateControlData.h in Headers */,
1E5AD0381F1F4E390029B8AF /* SDLClimateControlCapabilities.h in Headers */,
+ 4A899D3E24D335F8007BDD9F /* SDLDynamicUpdateCapabilities.h in Headers */,
5D0C29FC20D93D8C008B56CD /* SDLVideoStreamingState.h in Headers */,
1E5AD0501F1F7BF10029B8AF /* SDLRadioBand.h in Headers */,
1E5AD0401F1F58480029B8AF /* SDLVentilationMode.h in Headers */,
@@ -7186,6 +7305,7 @@
5D61FCA31A84238C00846EE7 /* SDLEndAudioPassThru.h in Headers */,
88A795D22106787400056542 /* SDLStaticIconName.h in Headers */,
2B233530232BD8A5002118E5 /* SDLWindowCapability+ScreenManagerExtensions.h in Headers */,
+ 4A1B036D24CF43CD008C6B13 /* SDLDriverDistractionCapability.h in Headers */,
5D61FCB11A84238C00846EE7 /* SDLGetDTCs.h in Headers */,
5D61FDFF1A84238C00846EE7 /* SDLVehicleDataEventStatus.h in Headers */,
5D61FC5B1A84238C00846EE7 /* SDLChangeRegistration.h in Headers */,
@@ -7555,6 +7675,7 @@
5D61FC441A84238C00846EE7 /* SDLAppInterfaceUnregisteredReason.m in Sources */,
5D0A7387203F24060001595D /* SDLSoftButtonState.m in Sources */,
5D61FDCA1A84238C00846EE7 /* SDLTextField.m in Sources */,
+ 4A899D3B24D32273007BDD9F /* SDLOnUpdateSubMenu.m in Sources */,
DAA41D561DF66B2000BC7337 /* SDLH264VideoEncoder.m in Sources */,
5D61FC9D1A84238C00846EE7 /* SDLEmergencyEventType.m in Sources */,
5D61FCAC1A84238C00846EE7 /* SDLFuelCutoffStatus.m in Sources */,
@@ -7587,6 +7708,7 @@
DA9F7E801DCC028B00ACAE48 /* SDLOnWayPointChange.m in Sources */,
5D92935B20B33D4F00FCC775 /* SDLChoiceCell.m in Sources */,
E4139D1E1F6017770005B6EA /* SDLLifecycleConfigurationUpdate.m in Sources */,
+ B38D8E6A24A02A4800B977D0 /* SDLWindowState.m in Sources */,
5D61FC6E1A84238C00846EE7 /* SDLCreateInteractionChoiceSetResponse.m in Sources */,
888DBAF022D528DE002A0AE2 /* SDLCloseApplicationResponse.m in Sources */,
5D61FD061A84238C00846EE7 /* SDLOnButtonPress.m in Sources */,
@@ -7604,6 +7726,7 @@
5DD67CB11E65DDB7009CD394 /* SDLLogTargetAppleSystemLog.m in Sources */,
5D92935420B2F76500FCC775 /* SDLTemplateColorScheme.m in Sources */,
88D5EB38220CD95000EC3782 /* SDLWeatherServiceData.m in Sources */,
+ 4A899D3F24D335F8007BDD9F /* SDLDynamicUpdateCapabilities.m in Sources */,
5D019277214994AC003500F6 /* NSMutableArray+Safe.m in Sources */,
5D61FD1C1A84238C00846EE7 /* SDLOnSystemRequest.m in Sources */,
5D61FC911A84238C00846EE7 /* SDLDisplayCapabilities.m in Sources */,
@@ -7614,6 +7737,7 @@
5D61FD261A84238C00846EE7 /* SDLPerformAudioPassThru.m in Sources */,
1EAA471E203410BB000FE74B /* SDLAudioControlCapabilities.m in Sources */,
88BCEA932266250B00BB7E70 /* SDLIAPControlSession.m in Sources */,
+ B38D8E6524A029F700B977D0 /* SDLWindowStatus.m in Sources */,
5D61FC971A84238C00846EE7 /* SDLECallConfirmationStatus.m in Sources */,
8816772D222097C3001FACFF /* SDLNavigationServiceData.m in Sources */,
1E5AD04D1F1F79640029B8AF /* SDLDefrostZone.m in Sources */,
@@ -7652,6 +7776,7 @@
DA9F7E741DCC004C00ACAE48 /* SDLGetWayPointsResponse.m in Sources */,
5D61FD4D1A84238C00846EE7 /* SDLProtocolMessageDisassembler.m in Sources */,
5D61FD4B1A84238C00846EE7 /* SDLProtocolMessageAssembler.m in Sources */,
+ 889D0B9B24D07DCB008AD494 /* SDLOnSubtleAlertPressed.m in Sources */,
5D61FCC41A84238C00846EE7 /* SDLHMIPermissions.m in Sources */,
5D61FE141A84238C00846EE7 /* SDLWiperStatus.m in Sources */,
5D61FC8B1A84238C00846EE7 /* SDLDiagnosticMessageResponse.m in Sources */,
@@ -7678,6 +7803,7 @@
5D8204271BCEA8A600D0A41B /* SDLPermissionManager.m in Sources */,
5D61FDB21A84238C00846EE7 /* SDLSubscribeVehicleData.m in Sources */,
5D61FC991A84238C00846EE7 /* SDLECallInfo.m in Sources */,
+ 889D0B8F24D052FE008AD494 /* SDLSubtleAlert.m in Sources */,
5D61FD601A84238C00846EE7 /* SDLRegisterAppInterfaceResponse.m in Sources */,
106982AB24AA3B4700B1F649 /* SDLRPCPermissionStatus.m in Sources */,
5DB996581F268ECB002D8795 /* SDLControlFramePayloadAudioStartServiceAck.m in Sources */,
@@ -7763,6 +7889,7 @@
5D61FD661A84238C00846EE7 /* SDLResetGlobalPropertiesResponse.m in Sources */,
4A99D0132475773C009B43E6 /* SDLImageField+ScreenManagerExtensions.m in Sources */,
5D61FCFE1A84238C00846EE7 /* SDLObjectWithPriority.m in Sources */,
+ B38D8E62249FE28500B977D0 /* SDLCapacityUnit.m in Sources */,
5D92937D20B70A3E00FCC775 /* SDLPresentKeyboardOperation.m in Sources */,
9FD334E122DC6E7500F62736 /* SDLCreateWindow.m in Sources */,
5DBF06241E64A83F00A5CF03 /* SDLLogManager.m in Sources */,
@@ -7901,6 +8028,7 @@
5D61FCA41A84238C00846EE7 /* SDLEndAudioPassThru.m in Sources */,
5D339CEB207C066E000CC364 /* SDLMenuCell.m in Sources */,
8818ADD92100FC18007D6F19 /* SDLTurnSignal.m in Sources */,
+ B38D8E7124A0351200B977D0 /* SDLTransmissionType.m in Sources */,
5D8B17541AC9E11B006A6E1C /* SDLDialNumberResponse.m in Sources */,
DA6223BE1E7B088200878689 /* CVPixelBufferRef+SDLUtil.m in Sources */,
752ECDB7228B4D6B00D945F4 /* SDLDynamicMenuUpdateAlgorithm.m in Sources */,
@@ -7915,6 +8043,7 @@
5DD67CBD1E661C84009CD394 /* SDLLogTargetOSLog.m in Sources */,
DA9F7E641DCBFAC800ACAE48 /* SDLDateTime.m in Sources */,
5D61FD581A84238C00846EE7 /* SDLPutFileResponse.m in Sources */,
+ 889D0B9324D05A0E008AD494 /* SDLSubtleAlertResponse.m in Sources */,
5D61FCB21A84238C00846EE7 /* SDLGetDTCs.m in Sources */,
8881AFB92225E5EE00EA870B /* SDLGetCloudAppProperties.m in Sources */,
5D61FD441A84238C00846EE7 /* SDLProtocol.m in Sources */,
@@ -7978,12 +8107,14 @@
DA318C201DD0F06C00C035AC /* NSMutableDictionary+Store.m in Sources */,
9F425ACF22DD97DE00BE3245 /* SDLTemplateConfiguration.m in Sources */,
5D7F87EC1CE3C1A1002DD7C4 /* SDLDeleteFileOperation.m in Sources */,
+ 4A899D3724D31FEE007BDD9F /* SDLOnUpdateFile.m in Sources */,
1EB59CBC202DA1B400343A61 /* SDLSupportedSeat.m in Sources */,
97E26DED1E807AD70074A3C7 /* SDLMutableDataQueue.m in Sources */,
5D61FD641A84238C00846EE7 /* SDLResetGlobalProperties.m in Sources */,
5DCD7AE11FCCA8D200A0FC7F /* SDLCarWindow.m in Sources */,
1E5AD0911F20BE820029B8AF /* SDLSetInteriorVehicleData.m in Sources */,
884E702C21FBB151008D53BA /* SDLAppServiceRecord.m in Sources */,
+ B38D8E6E24A034DB00B977D0 /* SDLGearStatus.m in Sources */,
5D60088B1BE3ED540094A505 /* SDLStateMachine.m in Sources */,
8877F5EF1F34A72200DC128A /* SDLSendHapticDataResponse.m in Sources */,
5D61FD181A84238C00846EE7 /* SDLOnPermissionsChange.m in Sources */,
@@ -7996,6 +8127,7 @@
9FE2470E22D77A5A00F8D2FC /* SDLDeleteWindowResponse.m in Sources */,
5D82041F1BCD8E6100D0A41B /* SDLConfiguration.m in Sources */,
00E22CEC22C2F1B300BC6B08 /* SDLEncryptionConfiguration.m in Sources */,
+ 4A1B036C24CF43CD008C6B13 /* SDLDriverDistractionCapability.m in Sources */,
5D61FD381A84238C00846EE7 /* SDLPredefinedLayout.m in Sources */,
5D3E487C1D6F888E0000BFEF /* SDLRPCResponseNotification.m in Sources */,
5D61FD0E1A84238C00846EE7 /* SDLOnHashChange.m in Sources */,
@@ -8097,6 +8229,7 @@
4A4AD8A424894260008FC414 /* TestOldConfigurationUpdateManagerDelegate.m in Sources */,
162E838A1A9BDE8B00906325 /* SDLSingleTireStatusSpec.m in Sources */,
5D6EB4CC1BF28DC600693731 /* NSMapTable+SubscriptingSpec.m in Sources */,
+ B3F7918324E062C200DB5CAF /* SDLGetVehicleDataSpec.m in Sources */,
88F37A4D226F84BE00DF119B /* SDLIAPDataSessionSpec.m in Sources */,
9FA0D00322DF06B9009CF344 /* SDLWindowTypeCapabilitiesSpec.m in Sources */,
162E83051A9BDE8B00906325 /* SDLVehicleDataActiveStatusSpec.m in Sources */,
@@ -8159,6 +8292,7 @@
88B58DBD222042500011B063 /* SDLDirectionSpec.m in Sources */,
162E83721A9BDE8B00906325 /* SDLAudioPassThruCapabilitiesSpec.m in Sources */,
162E83681A9BDE8B00906325 /* SDLSpeakResponseSpec.m in Sources */,
+ B38D8E8224A1F53500B977D0 /* SDLCapacityUnitSpec.m in Sources */,
1EB59CD8202DCCD500343A61 /* SDLMassageCushionFirmnessSpec.m in Sources */,
162E83661A9BDE8B00906325 /* SDLShowResponseSpec.m in Sources */,
5D9F50831BEA5C6100FEF399 /* SDLFileManagerSpec.m in Sources */,
@@ -8229,6 +8363,7 @@
5DCC458D221C9F6600036C2F /* SDLVersionSpec.m in Sources */,
1EE8C45D1F387D1C00FDC2CF /* SDLGetInteriorVehicleDataResponseSpec.m in Sources */,
162E82F21A9BDE8B00906325 /* SDLPredefinedLayoutSpec.m in Sources */,
+ B38D8E7B24A0E11C00B977D0 /* SDLWindowStatusSpec.m in Sources */,
162E83521A9BDE8B00906325 /* SDLDeleteSubMenuResponseSpec.m in Sources */,
162E82E91A9BDE8B00906325 /* SDLKeypressModeSpec.m in Sources */,
162E83211A9BDE8B00906325 /* SDLRPCPayloadSpec.m in Sources */,
@@ -8242,6 +8377,7 @@
162E82CE1A9BDE8A00906325 /* SDLAudioTypeSpec.m in Sources */,
162E831C1A9BDE8B00906325 /* SDLOnSyncPDataSpec.m in Sources */,
00EADD3322DFE54B0088B608 /* SDLEncryptionLifecycleManagerSpec.m in Sources */,
+ 4A1B036F24CF484E008C6B13 /* SDLDriverDistractionCapabilitySpec.m in Sources */,
5D9F50871BED412E00FEF399 /* TestConnectionManager.m in Sources */,
1EAA47802036C2C9000FE74B /* SDLStationIDNumberSpec.m in Sources */,
162E83341A9BDE8B00906325 /* SDLPutFileSpec.m in Sources */,
@@ -8255,6 +8391,7 @@
1680B1141A9CD7AD00DBD79E /* SDLV1ProtocolHeaderSpec.m in Sources */,
880D2680220E038800B3F496 /* SDLWeatherServiceManifestSpec.m in Sources */,
88EEC5BE220A3B8B005AA2F9 /* SDLPublishAppServiceResponseSpec.m in Sources */,
+ B38D8E7C24A0E11C00B977D0 /* SDLWindowStateSpec.m in Sources */,
1680B1161A9CD7AD00DBD79E /* SDLProtocolMessageSpec.m in Sources */,
DA9F7EB21DCC084300ACAE48 /* SDLDeliveryModeSpec.m in Sources */,
162E83771A9BDE8B00906325 /* SDLClusterModeStatusSpec.m in Sources */,
@@ -8309,6 +8446,7 @@
162E83761A9BDE8B00906325 /* SDLChoiceSpec.m in Sources */,
162E83571A9BDE8B00906325 /* SDLGetDTCsResponseSpec.m in Sources */,
5D4346471E6F0BDA00B639C6 /* SDLLogFileModuleSpec.m in Sources */,
+ 889D0B9824D06E52008AD494 /* SDLSubtleAlertSpec.m in Sources */,
88A1CF1E21669AC7001ACC75 /* SDLLifecycleConfigurationUpdateSpec.m in Sources */,
1EE8C4581F387ABD00FDC2CF /* SDLButtonPressResponseSpec.m in Sources */,
884554AF2224554300BAFB6C /* SDLNavigationServiceManifestSpec.m in Sources */,
@@ -8324,12 +8462,15 @@
5DD8406520FCE21A0082CE04 /* SDLElectronicParkBrakeStatusSpec.m in Sources */,
162E82F61A9BDE8B00906325 /* SDLRequestTypeSpec.m in Sources */,
5DE35E4520CAFC5D0034BE5A /* SDLChoiceCellSpec.m in Sources */,
+ B38D8E8024A1E3D000B977D0 /* SDLTransmissionTypeSpec.m in Sources */,
162E82FB1A9BDE8B00906325 /* SDLSpeechCapabilitiesSpec.m in Sources */,
5D0A9F9C1F1565EB00CC80DD /* SDLGetSystemCapabilityResponseSpec.m in Sources */,
162E830D1A9BDE8B00906325 /* SDLWiperStatusSpec.m in Sources */,
+ B38D8E7E24A118BD00B977D0 /* SDLGearStatusSpec.m in Sources */,
5D60DF26202B7A97001EDA01 /* SDLSequentialRPCRequestOperationSpec.m in Sources */,
162E832C1A9BDE8B00906325 /* SDLDiagnosticMessageSpec.m in Sources */,
162E83381A9BDE8B00906325 /* SDLScrollableMessageSpec.m in Sources */,
+ 889D0B9624D065EE008AD494 /* SDLSubtleAlertResponseSpec.m in Sources */,
162E82E81A9BDE8B00906325 /* SDLKeyboardLayoutSpec.m in Sources */,
5D64FE6F20DA9E4300792F9F /* SDLStreamingVideoLifecycleManagerSpec.m in Sources */,
DA9F7EA41DCC05EE00ACAE48 /* SDLSubscribeWaypointsSpec.m in Sources */,
@@ -8378,7 +8519,9 @@
1EE8C4401F348D3200FDC2CF /* SDLClimateControlCapabilitiesSpec.m in Sources */,
5DE35E5420CB1C590034BE5A /* SDLPresentChoiceSetOperationSpec.m in Sources */,
162E838F1A9BDE8B00906325 /* SDLTextFieldSpec.m in Sources */,
+ 4AC68FBC24D33E5D0073FF67 /* SDLOnUpdateSubMenuSpec.m in Sources */,
8818ADDD2100FE0C007D6F19 /* SDLTurnSignalSpec.m in Sources */,
+ 4AC68FBE24D340400073FF67 /* SDLDynamicUpdateCapabilitiesSpec.m in Sources */,
162E82CA1A9BDE8A00906325 /* SDLAmbientLightStatusSpec.m in Sources */,
4A4AD8A724894270008FC414 /* TestNewConfigurationUpdateManagerDelegate.m in Sources */,
162E83091A9BDE8B00906325 /* SDLVehicleDataStatusSpec.m in Sources */,
@@ -8426,7 +8569,6 @@
162E82E71A9BDE8B00906325 /* SDLKeyboardEventSpec.m in Sources */,
162E834E1A9BDE8B00906325 /* SDLCreateInteractionChoiceSetResponseSpec.m in Sources */,
DA9F7EB61DCC086A00ACAE48 /* SDLOasisAddressSpec.m in Sources */,
- 162E83301A9BDE8B00906325 /* SDLGetVehicleDataSpec.m in Sources */,
162E833F1A9BDE8B00906325 /* SDLSliderSpec.m in Sources */,
162E838C1A9BDE8B00906325 /* SDLSoftButtonSpec.m in Sources */,
5DA23FF81F2FAF2D009C0313 /* SDLControlFramePayloadRPCStartServiceAckSpec.m in Sources */,
@@ -8451,6 +8593,7 @@
5DC978261B7A38640012C2F1 /* SDLGlobalsSpec.m in Sources */,
162E82FF1A9BDE8B00906325 /* SDLTextAlignmentSpec.m in Sources */,
000DD57222EF063F005AB7A7 /* SDLGetInteriorVehicleDataConsentResponseSpec.m in Sources */,
+ 889D0B9E24D07FF8008AD494 /* SDLOnSubtleAlertPressedSpec.m in Sources */,
162E831F1A9BDE8B00906325 /* SDLOnTouchEventSpec.m in Sources */,
162E83921A9BDE8B00906325 /* SDLTouchEventCapabilitiesSpec.m in Sources */,
162E837F1A9BDE8B00906325 /* SDLHeadLampStatusSpec.m in Sources */,
@@ -8461,6 +8604,7 @@
5D43466B1E6F3B4C00B639C6 /* SDLLogFilterSpec.m in Sources */,
88D2AAE41F682BB20078D5B2 /* SDLLogConstantsSpec.m in Sources */,
162E836B1A9BDE8B00906325 /* SDLSyncPDataResponseSpec.m in Sources */,
+ 4AC68FBA24D33B7A0073FF67 /* SDLOnUpdateFileSpec.m in Sources */,
8B7B31AF1F2FBA0200BDC38D /* SDLVideoStreamingCapabilitySpec.m in Sources */,
8B05F88922DD011300666CD8 /* SDLUnpublishAppServiceSpec.m in Sources */,
162E839B1A9BDE8B00906325 /* SDLRPCNotificationSpec.m in Sources */,
diff --git a/SmartDeviceLink.podspec b/SmartDeviceLink.podspec
index b4ba3d3fe..cc51e1ea7 100644
--- a/SmartDeviceLink.podspec
+++ b/SmartDeviceLink.podspec
@@ -61,6 +61,7 @@ sdefault.public_header_files = [
'SmartDeviceLink/SDLButtonPressMode.h',
'SmartDeviceLink/SDLCancelInteraction.h',
'SmartDeviceLink/SDLCancelInteractionResponse.h',
+'SmartDeviceLink/SDLCapacityUnit.h',
'SmartDeviceLink/SDLCarModeStatus.h',
'SmartDeviceLink/SDLCarWindowViewController.h',
'SmartDeviceLink/SDLChangeRegistration.h',
@@ -111,7 +112,9 @@ sdefault.public_header_files = [
'SmartDeviceLink/SDLDisplayMode.h',
'SmartDeviceLink/SDLDisplayType.h',
'SmartDeviceLink/SDLDistanceUnit.h',
+'SmartDeviceLink/SDLDriverDistractionCapability.h',
'SmartDeviceLink/SDLDriverDistractionState.h',
+'SmartDeviceLink/SDLDynamicUpdateCapabilities.h',
'SmartDeviceLink/SDLECallConfirmationStatus.h',
'SmartDeviceLink/SDLECallInfo.h',
'SmartDeviceLink/SDLElectronicParkBrakeStatus.h',
@@ -134,6 +137,7 @@ sdefault.public_header_files = [
'SmartDeviceLink/SDLFuelRange.h',
'SmartDeviceLink/SDLFuelType.h',
'SmartDeviceLink/SDLFunctionID.h',
+'SmartDeviceLink/SDLGearStatus.h',
'SmartDeviceLink/SDLGenericResponse.h',
'SmartDeviceLink/SDLGetAppServiceData.h',
'SmartDeviceLink/SDLGetAppServiceDataResponse.h',
@@ -253,11 +257,14 @@ sdefault.public_header_files = [
'SmartDeviceLink/SDLOnLockScreenStatus.h',
'SmartDeviceLink/SDLOnPermissionsChange.h',
'SmartDeviceLink/SDLOnRCStatus.h',
+'SmartDeviceLink/SDLOnSubtleAlertPressed.h',
'SmartDeviceLink/SDLOnSyncPData.h',
'SmartDeviceLink/SDLOnSystemCapabilityUpdated.h',
'SmartDeviceLink/SDLOnSystemRequest.h',
'SmartDeviceLink/SDLOnTBTClientState.h',
'SmartDeviceLink/SDLOnTouchEvent.h',
+'SmartDeviceLink/SDLOnUpdateFile.h',
+'SmartDeviceLink/SDLOnUpdateSubMenu.h',
'SmartDeviceLink/SDLOnVehicleData.h',
'SmartDeviceLink/SDLOnWayPointChange.h',
'SmartDeviceLink/SDLParameterPermissions.h',
@@ -379,6 +386,8 @@ sdefault.public_header_files = [
'SmartDeviceLink/SDLSubscribeVehicleDataResponse.h',
'SmartDeviceLink/SDLSubscribeWaypoints.h',
'SmartDeviceLink/SDLSubscribeWaypointsResponse.h',
+'SmartDeviceLink/SDLSubtleAlert.h',
+'SmartDeviceLink/SDLSubtleAlertResponse.h',
'SmartDeviceLink/SDLSupportedSeat.h',
'SmartDeviceLink/SDLSyncMsgVersion.h',
'SmartDeviceLink/SDLMsgVersion.h',
@@ -408,6 +417,7 @@ sdefault.public_header_files = [
'SmartDeviceLink/SDLTouchManagerDelegate.h',
'SmartDeviceLink/SDLTouchType.h',
'SmartDeviceLink/SDLTPMS.h',
+'SmartDeviceLink/SDLTransmissionType.h',
'SmartDeviceLink/SDLTriggerSource.h',
'SmartDeviceLink/SDLTTSChunk.h',
'SmartDeviceLink/SDLTurn.h',
@@ -451,6 +461,8 @@ sdefault.public_header_files = [
'SmartDeviceLink/SDLWeatherServiceManifest.h',
'SmartDeviceLink/SDLWiperStatus.h',
'SmartDeviceLink/SDLWindowCapability.h',
+'SmartDeviceLink/SDLWindowState.h',
+'SmartDeviceLink/SDLWindowStatus.h',
'SmartDeviceLink/SDLWindowType.h',
'SmartDeviceLink/SDLWindowTypeCapabilities.h',
'SmartDeviceLink/SmartDeviceLink.h',
diff --git a/SmartDeviceLink/SDLAddSubMenu.h b/SmartDeviceLink/SDLAddSubMenu.h
index 6f289e811..fbd8d872c 100644
--- a/SmartDeviceLink/SDLAddSubMenu.h
+++ b/SmartDeviceLink/SDLAddSubMenu.h
@@ -1,4 +1,34 @@
-// SDLAddSubMenu.h
+/*
+* Copyright (c) 2020, SmartDeviceLink Consortium, Inc.
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* Redistributions of source code must retain the above copyright notice, this
+* list of conditions and the following disclaimer.
+*
+* Redistributions in binary form must reproduce the above copyright notice,
+* this list of conditions and the following
+* disclaimer in the documentation and/or other materials provided with the
+* distribution.
+*
+* Neither the name of the SmartDeviceLink Consortium Inc. nor the names of
+* its contributors may be used to endorse or promote products derived
+* from this software without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+*/
#import "SDLRPCRequest.h"
@@ -25,13 +55,30 @@ NS_ASSUME_NONNULL_BEGIN
@interface SDLAddSubMenu : SDLRPCRequest
+/**
+ * @param menuID - @(menuID)
+ * @param menuName - menuName
+ * @return A SDLAddSubMenu object
+ */
+- (instancetype)initWithMenuID:(UInt32)menuID menuName:(NSString *)menuName;
+
+/**
+ * @param menuID - @(menuID)
+ * @param menuName - menuName
+ * @param position - position
+ * @param menuIcon - menuIcon
+ * @param menuLayout - menuLayout
+ * @param parentID - parentID
+ * @return A SDLAddSubMenu object
+ */
+- (instancetype)initWithMenuID:(UInt32)menuID menuName:(NSString *)menuName position:(nullable NSNumber<SDLUInt> *)position menuIcon:(nullable SDLImage *)menuIcon menuLayout:(nullable SDLMenuLayout)menuLayout parentID:(nullable NSNumber<SDLUInt> *)parentID;
/// Convenience init for creating an add submenu
///
/// @param menuId A menu id
/// @param menuName The menu name
/// @return An SDLAddSubMenu object
-- (instancetype)initWithId:(UInt32)menuId menuName:(NSString *)menuName;
+- (instancetype)initWithId:(UInt32)menuId menuName:(NSString *)menuName __deprecated_msg("Use initWithMenuID:menuName: instead");
/// Convenience init for creating an add submenu
///
@@ -39,7 +86,7 @@ NS_ASSUME_NONNULL_BEGIN
/// @param menuName The menu name
/// @param position The position within the menu to add
/// @return An SDLAddSubMenu object
-- (instancetype)initWithId:(UInt32)menuId menuName:(NSString *)menuName position:(UInt8)position __deprecated_msg("Use initWithId:menuName:menuLayout:menuIcon:position: instead");
+- (instancetype)initWithId:(UInt32)menuId menuName:(NSString *)menuName position:(UInt8)position __deprecated_msg("Use initWithMenuID:menuName:position:menuIcon:menuLayout:parentID: instead");
/// Convenience init for creating an add submenu
///
@@ -48,7 +95,7 @@ NS_ASSUME_NONNULL_BEGIN
/// @param icon The icon to show on the menu item
/// @param position The position within the menu to add
/// @return An SDLAddSubMenu object
-- (instancetype)initWithId:(UInt32)menuId menuName:(NSString *)menuName menuIcon:(nullable SDLImage *)icon position:(UInt8)position __deprecated_msg("Use initWithId:menuName:menuLayout:menuIcon:position: instead");
+- (instancetype)initWithId:(UInt32)menuId menuName:(NSString *)menuName menuIcon:(nullable SDLImage *)icon position:(UInt8)position __deprecated_msg("Use initWithMenuID:menuName:position:menuIcon:menuLayout:parentID: instead");
/// Convenience init for creating an add submenu with all properties.
///
@@ -58,7 +105,7 @@ NS_ASSUME_NONNULL_BEGIN
/// @param icon The icon to show on the menu item
/// @param position The position within the menu to add
/// @return An SDLAddSubMenu object
-- (instancetype)initWithId:(UInt32)menuId menuName:(NSString *)menuName menuLayout:(nullable SDLMenuLayout)menuLayout menuIcon:(nullable SDLImage *)icon position:(UInt8)position;
+- (instancetype)initWithId:(UInt32)menuId menuName:(NSString *)menuName menuLayout:(nullable SDLMenuLayout)menuLayout menuIcon:(nullable SDLImage *)icon position:(UInt8)position __deprecated_msg("Use initWithMenuID:menuName:position:menuIcon:menuLayout:parentID: instead");
/**
* a Menu ID that identifies a sub menu
@@ -104,6 +151,14 @@ NS_ASSUME_NONNULL_BEGIN
*/
@property (strong, nonatomic, nullable) SDLMenuLayout menuLayout;
+/**
+ * Unique ID of the sub menu the command will be added to. If not provided or 0, it will be provided to the top level of the in application menu.
+ * {"default_value": 0, "max_value": 2000000000, "min_value": 0}
+ *
+ * @since SDL 7.0.0
+ */
+@property (nullable, strong, nonatomic) NSNumber<SDLUInt> *parentID;
+
@end
NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLAddSubMenu.m b/SmartDeviceLink/SDLAddSubMenu.m
index 649a10a31..3e0b0bdd0 100644
--- a/SmartDeviceLink/SDLAddSubMenu.m
+++ b/SmartDeviceLink/SDLAddSubMenu.m
@@ -1,4 +1,34 @@
-// SDLAddSubMenu.m
+/*
+* Copyright (c) 2020, SmartDeviceLink Consortium, Inc.
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* Redistributions of source code must retain the above copyright notice, this
+* list of conditions and the following disclaimer.
+*
+* Redistributions in binary form must reproduce the above copyright notice,
+* this list of conditions and the following
+* disclaimer in the documentation and/or other materials provided with the
+* distribution.
+*
+* Neither the name of the SmartDeviceLink Consortium Inc. nor the names of
+* its contributors may be used to endorse or promote products derived
+* from this software without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+*/
#import "SDLAddSubMenu.h"
@@ -51,13 +81,35 @@ NS_ASSUME_NONNULL_BEGIN
return self;
}
+- (instancetype)initWithMenuID:(UInt32)menuID menuName:(NSString *)menuName {
+ self = [self init];
+ if (!self) {
+ return nil;
+ }
+ self.menuID = @(menuID);
+ self.menuName = menuName;
+ return self;
+}
+
+- (instancetype)initWithMenuID:(UInt32)menuID menuName:(NSString *)menuName position:(nullable NSNumber<SDLUInt> *)position menuIcon:(nullable SDLImage *)menuIcon menuLayout:(nullable SDLMenuLayout)menuLayout parentID:(nullable NSNumber<SDLUInt> *)parentID {
+ self = [self initWithMenuID:menuID menuName:menuName];
+ if (!self) {
+ return nil;
+ }
+ self.position = position;
+ self.menuIcon = menuIcon;
+ self.menuLayout = menuLayout;
+ self.parentID = parentID;
+ return self;
+}
+
- (void)setMenuID:(NSNumber<SDLInt> *)menuID {
- [self.parameters sdl_setObject:menuID forName:SDLRPCParameterNameMenuId];
+ [self.parameters sdl_setObject:menuID forName:SDLRPCParameterNameMenuID];
}
- (NSNumber<SDLInt> *)menuID {
NSError *error = nil;
- return [self.parameters sdl_objectForName:SDLRPCParameterNameMenuId ofClass:NSNumber.class error:&error];
+ return [self.parameters sdl_objectForName:SDLRPCParameterNameMenuID ofClass:NSNumber.class error:&error];
}
- (void)setPosition:(nullable NSNumber<SDLInt> *)position {
@@ -93,6 +145,14 @@ NS_ASSUME_NONNULL_BEGIN
return [self.parameters sdl_enumForName:SDLRPCParameterNameMenuLayout error:nil];
}
+- (void)setParentID:(nullable NSNumber<SDLUInt> *)parentID {
+ [self.parameters sdl_setObject:parentID forName:SDLRPCParameterNameParentID];
+}
+
+- (nullable NSNumber<SDLUInt> *)parentID {
+ return [self.parameters sdl_objectForName:SDLRPCParameterNameParentID ofClass:NSNumber.class error:nil];
+}
+
@end
NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLCancelInteraction.h b/SmartDeviceLink/SDLCancelInteraction.h
index 20b097699..289e85443 100644
--- a/SmartDeviceLink/SDLCancelInteraction.h
+++ b/SmartDeviceLink/SDLCancelInteraction.h
@@ -1,10 +1,34 @@
-//
-// SDLCancelInteraction.h
-// SmartDeviceLink
-//
-// Created by Nicole on 7/12/19.
-// Copyright © 2019 smartdevicelink. All rights reserved.
-//
+/*
+ * Copyright (c) 2020, SmartDeviceLink Consortium, Inc.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following
+ * disclaimer in the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * Neither the name of the SmartDeviceLink Consortium Inc. nor the names of
+ * its contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
#import "SDLRPCRequest.h"
@@ -67,6 +91,14 @@ NS_ASSUME_NONNULL_BEGIN
- (instancetype)initWithPerformInteractionCancelID:(UInt32)cancelID;
/**
+ Convenience init for dismissing a subtle alert.
+
+ @param cancelID The ID of the specific subtle alert to dismiss
+ @return A SDLCancelInteraction object
+ */
+- (instancetype)initWithSubtleAlertCancelID:(UInt32)cancelID;
+
+/**
Convenience init for dismissing the currently presented alert.
@return A SDLCancelInteraction object
@@ -95,6 +127,13 @@ NS_ASSUME_NONNULL_BEGIN
+ (instancetype)performInteraction NS_SWIFT_NAME(performInteraction());
/**
+ Convenience init for dismissing the currently presented subtle alert.
+
+ @return A SDLCancelInteraction object
+ */
++ (instancetype)subtleAlert;
+
+/**
The ID of the specific interaction to dismiss. If not set, the most recent of the RPC type set in functionID will be dismissed.
Integer, Optional
@@ -104,7 +143,7 @@ NS_ASSUME_NONNULL_BEGIN
/**
The ID of the type of interaction to dismiss.
- Only values 10 (PerformInteractionID), 12 (AlertID), 25 (ScrollableMessageID), and 26 (SliderID) are permitted.
+ The ID of the type of interaction the developer wants to dismiss. Only values 10, (PerformInteractionID), 12 (AlertID), 25 (ScrollableMessageID), 26 (SliderID), and 64 (SubtleAlertID) are permitted.
Integer, Required
*/
diff --git a/SmartDeviceLink/SDLCancelInteraction.m b/SmartDeviceLink/SDLCancelInteraction.m
index 40de4fbef..bd591dc28 100644
--- a/SmartDeviceLink/SDLCancelInteraction.m
+++ b/SmartDeviceLink/SDLCancelInteraction.m
@@ -1,10 +1,34 @@
-//
-// SDLCancelInteraction.m
-// SmartDeviceLink
-//
-// Created by Nicole on 7/12/19.
-// Copyright © 2019 smartdevicelink. All rights reserved.
-//
+/*
+ * Copyright (c) 2020, SmartDeviceLink Consortium, Inc.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following
+ * disclaimer in the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * Neither the name of the SmartDeviceLink Consortium Inc. nor the names of
+ * its contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
#import "SDLCancelInteraction.h"
@@ -65,6 +89,10 @@ NS_ASSUME_NONNULL_BEGIN
return [self initWithFunctionID:[SDLFunctionID.sharedInstance functionIdForName:SDLRPCFunctionNamePerformInteraction].unsignedIntValue cancelID:cancelID];
}
+- (instancetype)initWithSubtleAlertCancelID:(UInt32)cancelID {
+ return [self initWithFunctionID:[SDLFunctionID.sharedInstance functionIdForName:SDLRPCFunctionNameSubtleAlert].unsignedIntValue cancelID:cancelID];
+}
+
+ (instancetype)alert {
return [[self alloc] initWithFunctionID:[SDLFunctionID.sharedInstance functionIdForName:SDLRPCFunctionNameAlert].unsignedIntValue];
}
@@ -81,6 +109,10 @@ NS_ASSUME_NONNULL_BEGIN
return [[self alloc] initWithFunctionID:[SDLFunctionID.sharedInstance functionIdForName:SDLRPCFunctionNamePerformInteraction].unsignedIntValue];
}
++ (instancetype)subtleAlert {
+ return [[self alloc] initWithFunctionID:[SDLFunctionID.sharedInstance functionIdForName:SDLRPCFunctionNameSubtleAlert].unsignedIntValue];
+}
+
- (void)setCancelID:(nullable NSNumber<SDLInt> *)cancelID {
[self.parameters sdl_setObject:cancelID forName:SDLRPCParameterNameCancelID];
}
diff --git a/SmartDeviceLink/SDLCapacityUnit.h b/SmartDeviceLink/SDLCapacityUnit.h
new file mode 100644
index 000000000..415bd18c5
--- /dev/null
+++ b/SmartDeviceLink/SDLCapacityUnit.h
@@ -0,0 +1,48 @@
+/*
+ * Copyright (c) 2020, SmartDeviceLink Consortium, Inc.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following
+ * disclaimer in the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * Neither the name of the SmartDeviceLink Consortium Inc. nor the names of
+ * its contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#import "SDLEnum.h"
+
+NS_ASSUME_NONNULL_BEGIN
+
+/**
+ * @since SDL 7.0.0
+ */
+typedef SDLEnum SDLCapacityUnit SDL_SWIFT_ENUM;
+
+extern SDLCapacityUnit const SDLCapacityUnitKilograms;
+
+extern SDLCapacityUnit const SDLCapacityUnitKilowatthours;
+
+extern SDLCapacityUnit const SDLCapacityUnitLiters;
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLCapacityUnit.m b/SmartDeviceLink/SDLCapacityUnit.m
new file mode 100644
index 000000000..7e21103fa
--- /dev/null
+++ b/SmartDeviceLink/SDLCapacityUnit.m
@@ -0,0 +1,37 @@
+/*
+ * Copyright (c) 2020, SmartDeviceLink Consortium, Inc.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following
+ * disclaimer in the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * Neither the name of the SmartDeviceLink Consortium Inc. nor the names of
+ * its contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#import "SDLCapacityUnit.h"
+
+SDLCapacityUnit const SDLCapacityUnitLiters = @"LITERS";
+SDLCapacityUnit const SDLCapacityUnitKilowatthours = @"KILOWATTHOURS";
+SDLCapacityUnit const SDLCapacityUnitKilograms = @"KILOGRAMS";
diff --git a/SmartDeviceLink/SDLCharacterSet.h b/SmartDeviceLink/SDLCharacterSet.h
index 51771fe77..9cd096573 100644
--- a/SmartDeviceLink/SDLCharacterSet.h
+++ b/SmartDeviceLink/SDLCharacterSet.h
@@ -1,33 +1,98 @@
-// SDLCharacterSet.h
-//
+/*
+* Copyright (c) 2020, SmartDeviceLink Consortium, Inc.
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* Redistributions of source code must retain the above copyright notice, this
+* list of conditions and the following disclaimer.
+*
+* Redistributions in binary form must reproduce the above copyright notice,
+* this list of conditions and the following
+* disclaimer in the documentation and/or other materials provided with the
+* distribution.
+*
+* Neither the name of the SmartDeviceLink Consortium Inc. nor the names of
+* its contributors may be used to endorse or promote products derived
+* from this software without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+*/
#import "SDLEnum.h"
/**
- * Character sets supported by SDL. Used to describe text field capabilities.
+ * The list of potential character sets
*
- * @since SDL 1.0
+ * @since SDL 1.0.0
*/
typedef SDLEnum SDLCharacterSet SDL_SWIFT_ENUM;
/**
- Character Set Type 2
+ * @deprecated
+ * @since SDL 7.0.0
*/
-extern SDLCharacterSet const SDLCharacterSetType2;
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
+extern SDLCharacterSet const SDLCharacterSetType2 __deprecated_msg("Use Ascii, Iso88591, or Utf8 instead");
+#pragma clang diagnostic pop
/**
- Character Set Type 5
+ * @deprecated
+ * @since SDL 7.0.0
*/
-extern SDLCharacterSet const SDLCharacterSetType5;
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
+extern SDLCharacterSet const SDLCharacterSetType5 __deprecated_msg("Use Ascii, Iso88591, or Utf8 instead");
+#pragma clang diagnostic pop
/**
- Character Set CID1
+ * @deprecated
+ * @since SDL 7.0.0
*/
-extern SDLCharacterSet const SDLCharacterSetCID1;
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
+extern SDLCharacterSet const SDLCharacterSetCID1 __deprecated_msg("Use Ascii, Iso88591, or Utf8 instead");
+#pragma clang diagnostic pop
/**
- Character Set CID2
+ * @deprecated
+ * @since SDL 7.0.0
*/
-extern SDLCharacterSet const SDLCharacterSetCID2;
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
+extern SDLCharacterSet const SDLCharacterSetCID2 __deprecated_msg("Use Ascii, Iso88591, or Utf8 instead");
+#pragma clang diagnostic pop
+/**
+ * ASCII as defined in https://en.wikipedia.org/wiki/ASCII as defined in codes 0-127. Non-printable characters such as tabs and back spaces are ignored.
+ *
+ * @since SDL 7.0.0
+ */
+extern SDLCharacterSet const SDLCharacterSetAscii;
+
+/**
+ * Latin-1, as defined in https://en.wikipedia.org/wiki/ISO/IEC_8859-1
+ *
+ * @since SDL 7.0.0
+ */
+extern SDLCharacterSet const SDLCharacterSetIso88591;
+
+/**
+ * The UTF-8 character set that uses variable bytes per code point. See https://en.wikipedia.org/wiki/UTF-8 for more details. This is the preferred character set.
+ *
+ * @since SDL 7.0.0
+ */
+extern SDLCharacterSet const SDLCharacterSetUtf8;
diff --git a/SmartDeviceLink/SDLCharacterSet.m b/SmartDeviceLink/SDLCharacterSet.m
index 64733c0dc..47b595f7e 100644
--- a/SmartDeviceLink/SDLCharacterSet.m
+++ b/SmartDeviceLink/SDLCharacterSet.m
@@ -1,10 +1,57 @@
-// SDLCharacterSet.m
-//
-
+/*
+ * Copyright (c) 2020, SmartDeviceLink Consortium, Inc.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following
+ * disclaimer in the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * Neither the name of the SmartDeviceLink Consortium Inc. nor the names of
+ * its contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
#import "SDLCharacterSet.h"
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
SDLCharacterSet const SDLCharacterSetType2 = @"TYPE2SET";
+#pragma clang diagnostic pop
+
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
SDLCharacterSet const SDLCharacterSetType5 = @"TYPE5SET";
+#pragma clang diagnostic pop
+
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
SDLCharacterSet const SDLCharacterSetCID1 = @"CID1SET";
+#pragma clang diagnostic pop
+
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
SDLCharacterSet const SDLCharacterSetCID2 = @"CID2SET";
+#pragma clang diagnostic pop
+
+SDLCharacterSet const SDLCharacterSetAscii = @"ASCII";
+SDLCharacterSet const SDLCharacterSetIso88591 = @"ISO_8859_1";
+SDLCharacterSet const SDLCharacterSetUtf8 = @"UTF_8";
diff --git a/SmartDeviceLink/SDLChoiceSetManager.m b/SmartDeviceLink/SDLChoiceSetManager.m
index a8d3468b7..2b8422134 100644
--- a/SmartDeviceLink/SDLChoiceSetManager.m
+++ b/SmartDeviceLink/SDLChoiceSetManager.m
@@ -133,7 +133,7 @@ UInt16 const ChoiceCellCancelIdMin = 1;
- (void)stop {
SDLLogD(@"Stopping manager");
- [self sdl_runSyncOnQueue:^{
+ [SDLGlobals runSyncOnSerialSubQueue:self.readWriteQueue block:^{
[self.stateMachine transitionToState:SDLChoiceManagerStateShutdown];
}];
}
@@ -231,7 +231,7 @@ UInt16 const ChoiceCellCancelIdMin = 1;
NSMutableSet<SDLChoiceCell *> *choicesToUpload = [[self sdl_choicesToBeUploadedWithArray:choices] mutableCopy];
- [self sdl_runSyncOnQueue:^{
+ [SDLGlobals runSyncOnSerialSubQueue:self.readWriteQueue block:^{
[choicesToUpload minusSet:self.preloadedMutableChoices];
[choicesToUpload minusSet:self.pendingMutablePreloadChoices];
}];
@@ -248,7 +248,7 @@ UInt16 const ChoiceCellCancelIdMin = 1;
[self sdl_updateIdsOnChoices:choicesToUpload];
// Add the preload cells to the pending preloads
- [self sdl_runSyncOnQueue:^{
+ [SDLGlobals runSyncOnSerialSubQueue:self.readWriteQueue block:^{
[self.pendingMutablePreloadChoices unionSet:choicesToUpload];
}];
@@ -275,7 +275,7 @@ UInt16 const ChoiceCellCancelIdMin = 1;
return;
}
- [strongSelf sdl_runSyncOnQueue:^{
+ [SDLGlobals runSyncOnSerialSubQueue:self.readWriteQueue block:^{
__strong typeof(weakSelf) strongSelf = weakSelf;
[strongSelf.preloadedMutableChoices unionSet:choicesToUpload];
[strongSelf.pendingMutablePreloadChoices minusSet:choicesToUpload];
@@ -307,7 +307,7 @@ UInt16 const ChoiceCellCancelIdMin = 1;
}
// Remove the cells from pending and delete choices
- [self sdl_runSyncOnQueue:^{
+ [SDLGlobals runSyncOnSerialSubQueue:self.readWriteQueue block:^{
[self.pendingMutablePreloadChoices minusSet:cellsToBeRemovedFromPending];
}];
@@ -341,7 +341,7 @@ UInt16 const ChoiceCellCancelIdMin = 1;
return;
}
- [strongSelf sdl_runSyncOnQueue:^{
+ [SDLGlobals runSyncOnSerialSubQueue:self.readWriteQueue block:^{
__strong typeof(weakSelf) strongSelf = weakSelf;
[strongSelf.preloadedMutableChoices minusSet:cellsToBeDeleted];
}];
@@ -522,7 +522,7 @@ UInt16 const ChoiceCellCancelIdMin = 1;
- (NSSet<SDLChoiceCell *> *)preloadedChoices {
__block NSSet<SDLChoiceCell *> *set = nil;
- [self sdl_runSyncOnQueue:^{
+ [SDLGlobals runSyncOnSerialSubQueue:self.readWriteQueue block:^{
set = [self->_preloadedMutableChoices copy];
}];
@@ -531,7 +531,7 @@ UInt16 const ChoiceCellCancelIdMin = 1;
- (NSSet<SDLChoiceCell *> *)pendingPreloadChoices {
__block NSSet<SDLChoiceCell *> *set = nil;
- [self sdl_runSyncOnQueue:^{
+ [SDLGlobals runSyncOnSerialSubQueue:self.readWriteQueue block:^{
set = [self->_pendingMutablePreloadChoices copy];
}];
@@ -540,7 +540,7 @@ UInt16 const ChoiceCellCancelIdMin = 1;
- (UInt16)nextChoiceId {
__block UInt16 choiceId = 0;
- [self sdl_runSyncOnQueue:^{
+ [SDLGlobals runSyncOnSerialSubQueue:self.readWriteQueue block:^{
choiceId = self->_nextChoiceId;
self->_nextChoiceId = choiceId + 1;
}];
@@ -550,7 +550,7 @@ UInt16 const ChoiceCellCancelIdMin = 1;
- (UInt16)nextCancelId {
__block UInt16 cancelId = 0;
- [self sdl_runSyncOnQueue:^{
+ [SDLGlobals runSyncOnSerialSubQueue:self.readWriteQueue block:^{
cancelId = self->_nextCancelId;
self->_nextCancelId = cancelId + 1;
}];
@@ -562,19 +562,6 @@ UInt16 const ChoiceCellCancelIdMin = 1;
return self.stateMachine.currentState;
}
-#pragma mark Utilities
-
-/// Checks if we are already on a serial queue. If so, the block is added to the queue; if not, the block is dispatched to the serial `readWrite` queue.
-/// @discussion Used to synchronize access to class properties.
-/// @param block The block to be executed.
-- (void)sdl_runSyncOnQueue:(void (^)(void))block {
- if (dispatch_get_specific(SDLProcessingQueueName) != nil) {
- block();
- } else {
- dispatch_sync(self.readWriteQueue, block);
- }
-}
-
#pragma mark - RPC Responses / Notifications
- (void)sdl_displayCapabilityDidUpdate:(SDLSystemCapability *)systemCapability {
diff --git a/SmartDeviceLink/SDLDeleteSubMenu.m b/SmartDeviceLink/SDLDeleteSubMenu.m
index 2fd29100e..dedcff616 100644
--- a/SmartDeviceLink/SDLDeleteSubMenu.m
+++ b/SmartDeviceLink/SDLDeleteSubMenu.m
@@ -33,12 +33,12 @@ NS_ASSUME_NONNULL_BEGIN
}
- (void)setMenuID:(NSNumber<SDLInt> *)menuID {
- [self.parameters sdl_setObject:menuID forName:SDLRPCParameterNameMenuId];
+ [self.parameters sdl_setObject:menuID forName:SDLRPCParameterNameMenuID];
}
- (NSNumber<SDLInt> *)menuID {
NSError *error = nil;
- return [self.parameters sdl_objectForName:SDLRPCParameterNameMenuId ofClass:NSNumber.class error:&error];
+ return [self.parameters sdl_objectForName:SDLRPCParameterNameMenuID ofClass:NSNumber.class error:&error];
}
@end
diff --git a/SmartDeviceLink/SDLDriverDistractionCapability.h b/SmartDeviceLink/SDLDriverDistractionCapability.h
new file mode 100644
index 000000000..3f2943bef
--- /dev/null
+++ b/SmartDeviceLink/SDLDriverDistractionCapability.h
@@ -0,0 +1,63 @@
+/*
+ * Copyright (c) 2020, SmartDeviceLink Consortium, Inc.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following
+ * disclaimer in the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * Neither the name of the SmartDeviceLink Consortium Inc. nor the names of
+ * its contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#import "SDLRPCStruct.h"
+
+NS_ASSUME_NONNULL_BEGIN
+
+/**
+ * @since SDL 7.0.0
+ */
+@interface SDLDriverDistractionCapability : SDLRPCStruct
+
+/**
+ * @param menuLength - menuLength
+ * @param subMenuDepth - subMenuDepth
+ * @return A SDLDriverDistractionCapability object
+ */
+- (instancetype)initWithMenuLength:(nullable NSNumber<SDLInt> *)menuLength subMenuDepth:(nullable NSNumber<SDLUInt> *)subMenuDepth;
+
+/**
+ * The number of items allowed in a Choice Set or Command menu while the driver is distracted
+ * {"default_value": null, "max_value": null, "min_value": null}
+ */
+@property (nullable, strong, nonatomic) NSNumber<SDLInt> *menuLength;
+
+/**
+ * The depth of submenus allowed when the driver is distracted. e.g. 3 == top level menu -> submenu -> submenu; 1 == top level menu only
+ * {"default_value": null, "max_value": null, "min_value": 1}
+ */
+@property (nullable, strong, nonatomic) NSNumber<SDLUInt> *subMenuDepth;
+
+@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLDriverDistractionCapability.m b/SmartDeviceLink/SDLDriverDistractionCapability.m
new file mode 100644
index 000000000..3bfca9855
--- /dev/null
+++ b/SmartDeviceLink/SDLDriverDistractionCapability.m
@@ -0,0 +1,69 @@
+/*
+ * Copyright (c) 2020, SmartDeviceLink Consortium, Inc.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following
+ * disclaimer in the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * Neither the name of the SmartDeviceLink Consortium Inc. nor the names of
+ * its contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#import "SDLDriverDistractionCapability.h"
+#import "NSMutableDictionary+Store.h"
+#import "SDLRPCParameterNames.h"
+
+NS_ASSUME_NONNULL_BEGIN
+
+@implementation SDLDriverDistractionCapability
+
+- (instancetype)initWithMenuLength:(nullable NSNumber<SDLInt> *)menuLength subMenuDepth:(nullable NSNumber<SDLUInt> *)subMenuDepth {
+ self = [super init];
+ if (!self) {
+ return nil;
+ }
+ self.menuLength = menuLength;
+ self.subMenuDepth = subMenuDepth;
+ return self;
+}
+
+- (void)setMenuLength:(nullable NSNumber<SDLInt> *)menuLength {
+ [self.store sdl_setObject:menuLength forName:SDLRPCParameterNameMenuLength];
+}
+
+- (nullable NSNumber<SDLInt> *)menuLength {
+ return [self.store sdl_objectForName:SDLRPCParameterNameMenuLength ofClass:NSNumber.class error:nil];
+}
+
+- (void)setSubMenuDepth:(nullable NSNumber<SDLUInt> *)subMenuDepth {
+ [self.store sdl_setObject:subMenuDepth forName:SDLRPCParameterNameSubMenuDepth];
+}
+
+- (nullable NSNumber<SDLUInt> *)subMenuDepth {
+ return [self.store sdl_objectForName:SDLRPCParameterNameSubMenuDepth ofClass:NSNumber.class error:nil];
+}
+
+@end
+
+NS_ASSUME_NONNULL_END \ No newline at end of file
diff --git a/SmartDeviceLink/SDLDynamicUpdateCapabilities.h b/SmartDeviceLink/SDLDynamicUpdateCapabilities.h
new file mode 100644
index 000000000..35a7f4d0d
--- /dev/null
+++ b/SmartDeviceLink/SDLDynamicUpdateCapabilities.h
@@ -0,0 +1,63 @@
+/*
+ * Copyright (c) 2020, SmartDeviceLink Consortium, Inc.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following
+ * disclaimer in the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * Neither the name of the SmartDeviceLink Consortium Inc. nor the names of
+ * its contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#import "SDLRPCStruct.h"
+#import "SDLImageFieldName.h"
+
+NS_ASSUME_NONNULL_BEGIN
+
+/**
+ * @since SDL 7.0
+ */
+@interface SDLDynamicUpdateCapabilities : SDLRPCStruct
+
+/**
+ * @param supportedDynamicImageFieldNames - supportedDynamicImageFieldNames
+ * @param supportsDynamicSubMenus - supportsDynamicSubMenus
+ * @return A SDLDynamicUpdateCapabilities object
+ */
+- (instancetype)initWithSupportedDynamicImageFieldNames:(nullable NSArray<SDLImageFieldName> *)supportedDynamicImageFieldNames supportsDynamicSubMenus:(nullable NSNumber<SDLBool> *)supportsDynamicSubMenus;
+
+/**
+ * An array of ImageFieldName values for which the system supports sending OnFileUpdate notifications. If you send an Image struct for that image field with a name without having uploaded the image data using PutFile that matches that name, the system will request that you upload the data with PutFile at a later point when the HMI needs it. The HMI will then display the image in the appropriate field. If not sent, assume false.
+ * {"array_min_size": 1, "array_max_size": null}
+ */
+@property (nullable, strong, nonatomic) NSArray<SDLImageFieldName> *supportedDynamicImageFieldNames;
+
+/**
+ * If true, the head unit supports dynamic sub-menus by sending OnUpdateSubMenu notifications. If true, you should not send AddCommands that attach to a parentID for an AddSubMenu until OnUpdateSubMenu is received with the menuID. At that point, you should send all AddCommands with a parentID that match the menuID. If not set, assume false.
+ */
+@property (nullable, strong, nonatomic) NSNumber<SDLBool> *supportsDynamicSubMenus;
+
+@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLDynamicUpdateCapabilities.m b/SmartDeviceLink/SDLDynamicUpdateCapabilities.m
new file mode 100644
index 000000000..c24267fc5
--- /dev/null
+++ b/SmartDeviceLink/SDLDynamicUpdateCapabilities.m
@@ -0,0 +1,71 @@
+/*
+ * Copyright (c) 2020, SmartDeviceLink Consortium, Inc.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following
+ * disclaimer in the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * Neither the name of the SmartDeviceLink Consortium Inc. nor the names of
+ * its contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#import "SDLDynamicUpdateCapabilities.h"
+
+#import "NSMutableDictionary+Store.h"
+#import "SDLImageFieldName.h"
+#import "SDLRPCParameterNames.h"
+
+NS_ASSUME_NONNULL_BEGIN
+
+@implementation SDLDynamicUpdateCapabilities
+
+- (instancetype)initWithSupportedDynamicImageFieldNames:(nullable NSArray<SDLImageFieldName> *)supportedDynamicImageFieldNames supportsDynamicSubMenus:(nullable NSNumber<SDLBool> *)supportsDynamicSubMenus {
+ self = [super init];
+ if (!self) {
+ return nil;
+ }
+ self.supportedDynamicImageFieldNames = supportedDynamicImageFieldNames;
+ self.supportsDynamicSubMenus = supportsDynamicSubMenus;
+ return self;
+}
+
+- (void)setSupportedDynamicImageFieldNames:(nullable NSArray<SDLImageFieldName> *)supportedDynamicImageFieldNames {
+ [self.store sdl_setObject:supportedDynamicImageFieldNames forName:SDLRPCParameterNameSupportedDynamicImageFieldNames];
+}
+
+- (nullable NSArray<SDLImageFieldName> *)supportedDynamicImageFieldNames {
+ return [self.store sdl_enumsForName:SDLRPCParameterNameSupportedDynamicImageFieldNames error:nil];
+}
+
+- (void)setSupportsDynamicSubMenus:(nullable NSNumber<SDLBool> *)supportsDynamicSubMenus {
+ [self.store sdl_setObject:supportsDynamicSubMenus forName:SDLRPCParameterNameSupportsDynamicSubMenus];
+}
+
+- (nullable NSNumber<SDLBool> *)supportsDynamicSubMenus {
+ return [self.store sdl_objectForName:SDLRPCParameterNameSupportsDynamicSubMenus ofClass:NSNumber.class error:nil];
+}
+
+@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLFuelRange.h b/SmartDeviceLink/SDLFuelRange.h
index 3220256cb..981ecd94b 100644
--- a/SmartDeviceLink/SDLFuelRange.h
+++ b/SmartDeviceLink/SDLFuelRange.h
@@ -6,6 +6,8 @@
// Copyright © 2018 smartdevicelink. All rights reserved.
//
+#import "SDLCapacityUnit.h"
+#import "SDLComponentVolumeStatus.h"
#import "SDLRPCMessage.h"
#import "SDLFuelType.h"
@@ -17,6 +19,41 @@ NS_ASSUME_NONNULL_BEGIN
@interface SDLFuelRange : SDLRPCStruct
/**
+ * @param type - type
+ * @param range - @(range)
+ * @param level - @(level)
+ * @param levelState - levelState
+ * @param capacity - @(capacity)
+ * @param capacityUnit - capacityUnit
+ * @return A SDLFuelRange object
+ */
+- (instancetype)initWithType:(nullable SDLFuelType)type range:(float)range level:(float)level levelState:(nullable SDLComponentVolumeStatus)levelState capacity:(float)capacity capacityUnit:(nullable SDLCapacityUnit)capacityUnit;
+
+/**
+ * The absolute capacity of this fuel type.
+ *
+ * Optional, Float, 0.0 - 1000000.0
+ */
+@property (strong, nonatomic, nullable) NSNumber<SDLFloat> *capacity;
+
+/**
+ * The unit of the capacity of this fuel type such as liters for gasoline or kWh for batteries.
+ */
+@property (strong, nonatomic, nullable) SDLCapacityUnit capacityUnit;
+
+/**
+ * The relative remaining capacity of this fuel type (percentage).
+ *
+ * Optional, Float, -6.0 - 1000000.0
+ */
+@property (strong, nonatomic, nullable) NSNumber<SDLFloat> *level;
+
+/**
+ * The fuel level state.
+ */
+@property (strong, nonatomic, nullable) SDLComponentVolumeStatus levelState;
+
+/**
* The vehicle's fuel type
*
* Optional
diff --git a/SmartDeviceLink/SDLFuelRange.m b/SmartDeviceLink/SDLFuelRange.m
index 1512a0957..f8e54736d 100644
--- a/SmartDeviceLink/SDLFuelRange.m
+++ b/SmartDeviceLink/SDLFuelRange.m
@@ -15,6 +15,20 @@ NS_ASSUME_NONNULL_BEGIN
@implementation SDLFuelRange
+- (instancetype)initWithType:(nullable SDLFuelType)type range:(float)range level:(float)level levelState:(nullable SDLComponentVolumeStatus)levelState capacity:(float)capacity capacityUnit:(nullable SDLCapacityUnit)capacityUnit {
+ self = [super init];
+ if (!self) {
+ return nil;
+ }
+ self.type = type;
+ self.range = @(range);
+ self.level = @(level);
+ self.levelState = levelState;
+ self.capacity = @(capacity);
+ self.capacityUnit = capacityUnit;
+ return self;
+}
+
- (void)setType:(nullable SDLFuelType)type {
[self.store sdl_setObject:type forName:SDLRPCParameterNameType];
}
@@ -31,6 +45,41 @@ NS_ASSUME_NONNULL_BEGIN
return [self.store sdl_objectForName:SDLRPCParameterNameRange ofClass:NSNumber.class error:nil];
}
+- (void)setLevel:(nullable NSNumber<SDLFloat> *)level {
+ [self.store sdl_setObject:level forName:SDLRPCParameterNameLevel];
+}
+
+- (nullable NSNumber<SDLFloat> *)level {
+ NSError *error = nil;
+ return [self.store sdl_objectForName:SDLRPCParameterNameLevel ofClass:NSNumber.class error:&error];
+}
+
+- (void)setLevelState:(nullable SDLComponentVolumeStatus)levelState {
+ [self.store sdl_setObject:levelState forName:SDLRPCParameterNameLevelState];
+}
+
+- (nullable SDLComponentVolumeStatus)levelState {
+ NSError *error = nil;
+ return [self.store sdl_enumForName:SDLRPCParameterNameLevelState error:&error];
+}
+
+- (void)setCapacity:(nullable NSNumber<SDLFloat> *)capacity {
+ [self.store sdl_setObject:capacity forName:SDLRPCParameterNameCapacity];
+}
+
+- (nullable NSNumber<SDLFloat> *)capacity {
+ NSError *error = nil;
+ return [self.store sdl_objectForName:SDLRPCParameterNameCapacity ofClass:NSNumber.class error:&error];
+}
+
+- (void)setCapacityUnit:(nullable SDLCapacityUnit)capacityUnit {
+ [self.store sdl_setObject:capacityUnit forName:SDLRPCParameterNameCapacityUnit];
+}
+
+- (nullable SDLCapacityUnit)capacityUnit {
+ NSError *error = nil;
+ return [self.store sdl_enumForName:SDLRPCParameterNameCapacityUnit error:&error];
+}
@end
diff --git a/SmartDeviceLink/SDLFunctionID.m b/SmartDeviceLink/SDLFunctionID.m
index 1a3b93bbb..aa649a40a 100644
--- a/SmartDeviceLink/SDLFunctionID.m
+++ b/SmartDeviceLink/SDLFunctionID.m
@@ -96,6 +96,7 @@ NS_ASSUME_NONNULL_BEGIN
@61: SDLRPCFunctionNameDeleteWindow,
@62: SDLRPCFunctionNameGetInteriorVehicleDataConsent,
@63: SDLRPCFunctionNameReleaseInteriorVehicleDataModule,
+ @64: SDLRPCFunctionNameSubtleAlert,
@32768: SDLRPCFunctionNameOnHMIStatus,
@32769: SDLRPCFunctionNameOnAppInterfaceUnregistered,
@32770: SDLRPCFunctionNameOnButtonEvent,
@@ -116,6 +117,9 @@ NS_ASSUME_NONNULL_BEGIN
@32785: SDLRPCFunctionNameOnRCStatus,
@32786: SDLRPCFunctionNameOnAppServiceData,
@32787: SDLRPCFunctionNameOnSystemCapabilityUpdated,
+ @32788: SDLRPCFunctionNameOnSubtleAlertPressed,
+ @32789: SDLRPCFunctionNameOnUpdateFile,
+ @32790: SDLRPCFunctionNameOnUpdateSubMenu,
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
@65536: SDLRPCFunctionNameEncodedSyncPData,
diff --git a/SmartDeviceLink/SDLGearStatus.h b/SmartDeviceLink/SDLGearStatus.h
new file mode 100644
index 000000000..d4f1500b7
--- /dev/null
+++ b/SmartDeviceLink/SDLGearStatus.h
@@ -0,0 +1,71 @@
+/*
+ * Copyright (c) 2020, SmartDeviceLink Consortium, Inc.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following
+ * disclaimer in the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * Neither the name of the SmartDeviceLink Consortium Inc. nor the names of
+ * its contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#import "SDLPRNDL.h"
+#import "SDLRPCStruct.h"
+#import "SDLTransmissionType.h"
+
+NS_ASSUME_NONNULL_BEGIN
+
+/**
+ * @since SDL 7.0.0
+ */
+@interface SDLGearStatus : SDLRPCStruct
+
+/**
+ * Convenience initializer to assign all object properties
+ *
+ * @param userSelectedGear - userSelectedGear
+ * @param actualGear - actualGear
+ * @param transmissionType - transmissionType
+ * @return A SDLGearStatus object
+ */
+- (instancetype)initWithUserSelectedGear:(nullable SDLPRNDL)userSelectedGear actualGear:(nullable SDLPRNDL)actualGear transmissionType:(nullable SDLTransmissionType)transmissionType;
+
+/**
+ * Gear position selected by the user i.e. Park, Drive, Reverse
+ */
+@property (strong, nonatomic, nullable) SDLPRNDL userSelectedGear;
+
+/**
+ * Actual Gear in use by the transmission
+ */
+@property (strong, nonatomic, nullable) SDLPRNDL actualGear;
+
+/**
+ * Tells the transmission type
+ */
+@property (strong, nonatomic, nullable) SDLTransmissionType transmissionType;
+
+@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLGearStatus.m b/SmartDeviceLink/SDLGearStatus.m
new file mode 100644
index 000000000..66128c752
--- /dev/null
+++ b/SmartDeviceLink/SDLGearStatus.m
@@ -0,0 +1,83 @@
+/*
+ * Copyright (c) 2020, SmartDeviceLink Consortium, Inc.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following
+ * disclaimer in the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * Neither the name of the SmartDeviceLink Consortium Inc. nor the names of
+ * its contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#import "SDLGearStatus.h"
+#import "NSMutableDictionary+Store.h"
+#import "SDLPRNDL.h"
+#import "SDLTransmissionType.h"
+#import "SDLRPCParameterNames.h"
+
+NS_ASSUME_NONNULL_BEGIN
+
+@implementation SDLGearStatus
+
+- (instancetype)initWithUserSelectedGear:(nullable SDLPRNDL)userSelectedGear actualGear:(nullable SDLPRNDL)actualGear transmissionType:(nullable SDLTransmissionType)transmissionType {
+ self = [super init];
+ if (!self) {
+ return nil;
+ }
+ self.userSelectedGear = userSelectedGear;
+ self.actualGear = actualGear;
+ self.transmissionType = transmissionType;
+ return self;
+}
+
+- (void)setUserSelectedGear:(nullable SDLPRNDL)userSelectedGear {
+ [self.store sdl_setObject:userSelectedGear forName:SDLRPCParameterNameUserSelectedGear];
+}
+
+- (nullable SDLPRNDL)userSelectedGear {
+ NSError *error = nil;
+ return [self.store sdl_enumForName:SDLRPCParameterNameUserSelectedGear error:&error];
+}
+
+- (void)setActualGear:(nullable SDLPRNDL)actualGear {
+ [self.store sdl_setObject:actualGear forName:SDLRPCParameterNameActualGear];
+}
+
+- (nullable SDLPRNDL)actualGear {
+ NSError *error = nil;
+ return [self.store sdl_enumForName:SDLRPCParameterNameActualGear error:&error];
+}
+
+- (void)setTransmissionType:(nullable SDLTransmissionType)transmissionType {
+ [self.store sdl_setObject:transmissionType forName:SDLRPCParameterNameTransmissionType];
+}
+
+- (nullable SDLTransmissionType)transmissionType {
+ NSError *error = nil;
+ return [self.store sdl_enumForName:SDLRPCParameterNameTransmissionType error:&error];
+}
+
+@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLGetFile.m b/SmartDeviceLink/SDLGetFile.m
index 239a034ba..b39dce9ac 100644
--- a/SmartDeviceLink/SDLGetFile.m
+++ b/SmartDeviceLink/SDLGetFile.m
@@ -62,12 +62,12 @@ NS_ASSUME_NONNULL_BEGIN
}
- (void)setFileName:(NSString *)fileName {
- [self.parameters sdl_setObject:fileName forName:SDLRPCParameterNameFilename];
+ [self.parameters sdl_setObject:fileName forName:SDLRPCParameterNameFileName];
}
- (NSString *)fileName {
NSError *error = nil;
- return [self.parameters sdl_objectForName:SDLRPCParameterNameFilename ofClass:NSString.class error:&error];
+ return [self.parameters sdl_objectForName:SDLRPCParameterNameFileName ofClass:NSString.class error:&error];
}
- (void)setAppServiceId:(nullable NSString *)appServiceId {
diff --git a/SmartDeviceLink/SDLGetVehicleData.h b/SmartDeviceLink/SDLGetVehicleData.h
index 8e7082037..6084e56ee 100644
--- a/SmartDeviceLink/SDLGetVehicleData.h
+++ b/SmartDeviceLink/SDLGetVehicleData.h
@@ -47,7 +47,7 @@ NS_ASSUME_NONNULL_BEGIN
* @param wiperStatus Get wiperStatus data
* @return A SDLGetVehicleData object
*/
-- (instancetype)initWithAccelerationPedalPosition:(BOOL)accelerationPedalPosition airbagStatus:(BOOL)airbagStatus beltStatus:(BOOL)beltStatus bodyInformation:(BOOL)bodyInformation clusterModeStatus:(BOOL)clusterModeStatus deviceStatus:(BOOL)deviceStatus driverBraking:(BOOL)driverBraking eCallInfo:(BOOL)eCallInfo emergencyEvent:(BOOL)emergencyEvent engineTorque:(BOOL)engineTorque externalTemperature:(BOOL)externalTemperature fuelLevel:(BOOL)fuelLevel fuelLevelState:(BOOL)fuelLevelState gps:(BOOL)gps headLampStatus:(BOOL)headLampStatus instantFuelConsumption:(BOOL)instantFuelConsumption myKey:(BOOL)myKey odometer:(BOOL)odometer prndl:(BOOL)prndl rpm:(BOOL)rpm speed:(BOOL)speed steeringWheelAngle:(BOOL)steeringWheelAngle tirePressure:(BOOL)tirePressure vin:(BOOL)vin wiperStatus:(BOOL)wiperStatus __deprecated_msg("Use initWithAccelerationPedalPosition:airbagStatus:beltStatus:bodyInformation:clusterModeStatus:deviceStatus:driverBraking:eCallInfo:electronicParkBrakeStatus:emergencyEvent:engineOilLife:engineTorque:externalTemperature:fuelLevel:fuelLevelState:fuelRange:gps:headLampStatus:instantFuelConsumption:myKey:odometer:prndl:rpm:speed:steeringWheelAngle:tirePressure:turnSignal:wiperStatus: instead");
+- (instancetype)initWithAccelerationPedalPosition:(BOOL)accelerationPedalPosition airbagStatus:(BOOL)airbagStatus beltStatus:(BOOL)beltStatus bodyInformation:(BOOL)bodyInformation clusterModeStatus:(BOOL)clusterModeStatus deviceStatus:(BOOL)deviceStatus driverBraking:(BOOL)driverBraking eCallInfo:(BOOL)eCallInfo emergencyEvent:(BOOL)emergencyEvent engineTorque:(BOOL)engineTorque externalTemperature:(BOOL)externalTemperature fuelLevel:(BOOL)fuelLevel fuelLevelState:(BOOL)fuelLevelState gps:(BOOL)gps headLampStatus:(BOOL)headLampStatus instantFuelConsumption:(BOOL)instantFuelConsumption myKey:(BOOL)myKey odometer:(BOOL)odometer prndl:(BOOL)prndl rpm:(BOOL)rpm speed:(BOOL)speed steeringWheelAngle:(BOOL)steeringWheelAngle tirePressure:(BOOL)tirePressure vin:(BOOL)vin wiperStatus:(BOOL)wiperStatus __deprecated_msg("Use initWithGps:speed:rpm:instantFuelConsumption:fuelRange:externalTemperature:turnSignal:vin:gearStatus:tirePressure:odometer:beltStatus:bodyInformation:deviceStatus:driverBraking:wiperStatus:headLampStatus:engineTorque:accPedalPosition:steeringWheelAngle:engineOilLife:electronicParkBrakeStatus:cloudAppVehicleID:eCallInfo:airbagStatus:emergencyEvent:clusterModeStatus:myKey:handsOffSteering:windowStatus: instead");
/**
* Convenience init for getting data for all possible vehicle data items.
@@ -83,7 +83,7 @@ NS_ASSUME_NONNULL_BEGIN
* @param wiperStatus Get wiperStatus data
* @return A SDLGetVehicleData object
*/
-- (instancetype)initWithAccelerationPedalPosition:(BOOL)accelerationPedalPosition airbagStatus:(BOOL)airbagStatus beltStatus:(BOOL)beltStatus bodyInformation:(BOOL)bodyInformation clusterModeStatus:(BOOL)clusterModeStatus deviceStatus:(BOOL)deviceStatus driverBraking:(BOOL)driverBraking eCallInfo:(BOOL)eCallInfo electronicParkBrakeStatus:(BOOL)electronicParkBrakeStatus emergencyEvent:(BOOL)emergencyEvent engineOilLife:(BOOL)engineOilLife engineTorque:(BOOL)engineTorque externalTemperature:(BOOL)externalTemperature fuelLevel:(BOOL)fuelLevel fuelLevelState:(BOOL)fuelLevelState fuelRange:(BOOL)fuelRange gps:(BOOL)gps headLampStatus:(BOOL)headLampStatus instantFuelConsumption:(BOOL)instantFuelConsumption myKey:(BOOL)myKey odometer:(BOOL)odometer prndl:(BOOL)prndl rpm:(BOOL)rpm speed:(BOOL)speed steeringWheelAngle:(BOOL)steeringWheelAngle tirePressure:(BOOL)tirePressure turnSignal:(BOOL)turnSignal vin:(BOOL)vin wiperStatus:(BOOL)wiperStatus __deprecated_msg("Use initWithAccelerationPedalPosition:airbagStatus:beltStatus:bodyInformation:cloudAppVehicleID:clusterModeStatus:deviceStatus:driverBraking:eCallInfo:electronicParkBrakeStatus:emergencyEvent:engineOilLife:engineTorque:externalTemperature:fuelLevel:fuelLevelState:fuelRange:gps:headLampStatus:instantFuelConsumption:myKey:odometer:prndl:rpm:speed:steeringWheelAngle:tirePressure:turnSignal:wiperStatus: instead");
+- (instancetype)initWithAccelerationPedalPosition:(BOOL)accelerationPedalPosition airbagStatus:(BOOL)airbagStatus beltStatus:(BOOL)beltStatus bodyInformation:(BOOL)bodyInformation clusterModeStatus:(BOOL)clusterModeStatus deviceStatus:(BOOL)deviceStatus driverBraking:(BOOL)driverBraking eCallInfo:(BOOL)eCallInfo electronicParkBrakeStatus:(BOOL)electronicParkBrakeStatus emergencyEvent:(BOOL)emergencyEvent engineOilLife:(BOOL)engineOilLife engineTorque:(BOOL)engineTorque externalTemperature:(BOOL)externalTemperature fuelLevel:(BOOL)fuelLevel fuelLevelState:(BOOL)fuelLevelState fuelRange:(BOOL)fuelRange gps:(BOOL)gps headLampStatus:(BOOL)headLampStatus instantFuelConsumption:(BOOL)instantFuelConsumption myKey:(BOOL)myKey odometer:(BOOL)odometer prndl:(BOOL)prndl rpm:(BOOL)rpm speed:(BOOL)speed steeringWheelAngle:(BOOL)steeringWheelAngle tirePressure:(BOOL)tirePressure turnSignal:(BOOL)turnSignal vin:(BOOL)vin wiperStatus:(BOOL)wiperStatus __deprecated_msg("Use initWithGps:speed:rpm:instantFuelConsumption:fuelRange:externalTemperature:turnSignal:vin:gearStatus:tirePressure:odometer:beltStatus:bodyInformation:deviceStatus:driverBraking:wiperStatus:headLampStatus:engineTorque:accPedalPosition:steeringWheelAngle:engineOilLife:electronicParkBrakeStatus:cloudAppVehicleID:eCallInfo:airbagStatus:emergencyEvent:clusterModeStatus:myKey:handsOffSteering:windowStatus: instead");
/**
* Convenience init for getting data for all possible vehicle data items.
@@ -120,7 +120,51 @@ NS_ASSUME_NONNULL_BEGIN
* @param wiperStatus Get wiperStatus data
* @return A SDLGetVehicleData object
*/
-- (instancetype)initWithAccelerationPedalPosition:(BOOL)accelerationPedalPosition airbagStatus:(BOOL)airbagStatus beltStatus:(BOOL)beltStatus bodyInformation:(BOOL)bodyInformation cloudAppVehicleID:(BOOL)cloudAppVehicleID clusterModeStatus:(BOOL)clusterModeStatus deviceStatus:(BOOL)deviceStatus driverBraking:(BOOL)driverBraking eCallInfo:(BOOL)eCallInfo electronicParkBrakeStatus:(BOOL)electronicParkBrakeStatus emergencyEvent:(BOOL)emergencyEvent engineOilLife:(BOOL)engineOilLife engineTorque:(BOOL)engineTorque externalTemperature:(BOOL)externalTemperature fuelLevel:(BOOL)fuelLevel fuelLevelState:(BOOL)fuelLevelState fuelRange:(BOOL)fuelRange gps:(BOOL)gps headLampStatus:(BOOL)headLampStatus instantFuelConsumption:(BOOL)instantFuelConsumption myKey:(BOOL)myKey odometer:(BOOL)odometer prndl:(BOOL)prndl rpm:(BOOL)rpm speed:(BOOL)speed steeringWheelAngle:(BOOL)steeringWheelAngle tirePressure:(BOOL)tirePressure turnSignal:(BOOL)turnSignal vin:(BOOL)vin wiperStatus:(BOOL)wiperStatus;
+- (instancetype)initWithAccelerationPedalPosition:(BOOL)accelerationPedalPosition airbagStatus:(BOOL)airbagStatus beltStatus:(BOOL)beltStatus bodyInformation:(BOOL)bodyInformation cloudAppVehicleID:(BOOL)cloudAppVehicleID clusterModeStatus:(BOOL)clusterModeStatus deviceStatus:(BOOL)deviceStatus driverBraking:(BOOL)driverBraking eCallInfo:(BOOL)eCallInfo electronicParkBrakeStatus:(BOOL)electronicParkBrakeStatus emergencyEvent:(BOOL)emergencyEvent engineOilLife:(BOOL)engineOilLife engineTorque:(BOOL)engineTorque externalTemperature:(BOOL)externalTemperature fuelLevel:(BOOL)fuelLevel fuelLevelState:(BOOL)fuelLevelState fuelRange:(BOOL)fuelRange gps:(BOOL)gps headLampStatus:(BOOL)headLampStatus instantFuelConsumption:(BOOL)instantFuelConsumption myKey:(BOOL)myKey odometer:(BOOL)odometer prndl:(BOOL)prndl rpm:(BOOL)rpm speed:(BOOL)speed steeringWheelAngle:(BOOL)steeringWheelAngle tirePressure:(BOOL)tirePressure turnSignal:(BOOL)turnSignal vin:(BOOL)vin wiperStatus:(BOOL)wiperStatus __deprecated_msg("Use initWithGps:speed:rpm:instantFuelConsumption:fuelRange:externalTemperature:turnSignal:vin:gearStatus:tirePressure:odometer:beltStatus:bodyInformation:deviceStatus:driverBraking:wiperStatus:headLampStatus:engineTorque:accPedalPosition:steeringWheelAngle:engineOilLife:electronicParkBrakeStatus:cloudAppVehicleID:eCallInfo:airbagStatus:emergencyEvent:clusterModeStatus:myKey:handsOffSteering:windowStatus: instead");
+
+/**
+ * Convenience init for getting data for all possible vehicle data items.
+ *
+ * @param gps - gps
+ * @param speed - speed
+ * @param rpm - rpm
+ * @param instantFuelConsumption - instantFuelConsumption
+ * @param fuelRange - fuelRange
+ * @param externalTemperature - externalTemperature
+ * @param turnSignal - turnSignal
+ * @param vin - vin
+ * @param gearStatus - gearStatus
+ * @param tirePressure - tirePressure
+ * @param odometer - odometer
+ * @param beltStatus - beltStatus
+ * @param bodyInformation - bodyInformation
+ * @param deviceStatus - deviceStatus
+ * @param driverBraking - driverBraking
+ * @param wiperStatus - wiperStatus
+ * @param headLampStatus - headLampStatus
+ * @param engineTorque - engineTorque
+ * @param accPedalPosition - accPedalPosition
+ * @param steeringWheelAngle - steeringWheelAngle
+ * @param engineOilLife - engineOilLife
+ * @param electronicParkBrakeStatus - electronicParkBrakeStatus
+ * @param cloudAppVehicleID - cloudAppVehicleID
+ * @param eCallInfo - eCallInfo
+ * @param airbagStatus - airbagStatus
+ * @param emergencyEvent - emergencyEvent
+ * @param clusterModeStatus - clusterModeStatus
+ * @param myKey - myKey
+ * @param handsOffSteering - handsOffSteering
+ * @param windowStatus - windowStatus
+ * @return A SDLGetVehicleData object
+ */
+- (instancetype)initWithGps:(nullable NSNumber<SDLBool> *)gps speed:(nullable NSNumber<SDLBool> *)speed rpm:(nullable NSNumber<SDLBool> *)rpm instantFuelConsumption:(nullable NSNumber<SDLBool> *)instantFuelConsumption fuelRange:(nullable NSNumber<SDLBool> *)fuelRange externalTemperature:(nullable NSNumber<SDLBool> *)externalTemperature turnSignal:(nullable NSNumber<SDLBool> *)turnSignal vin:(nullable NSNumber<SDLBool> *)vin gearStatus:(nullable NSNumber<SDLBool> *)gearStatus tirePressure:(nullable NSNumber<SDLBool> *)tirePressure odometer:(nullable NSNumber<SDLBool> *)odometer beltStatus:(nullable NSNumber<SDLBool> *)beltStatus bodyInformation:(nullable NSNumber<SDLBool> *)bodyInformation deviceStatus:(nullable NSNumber<SDLBool> *)deviceStatus driverBraking:(nullable NSNumber<SDLBool> *)driverBraking wiperStatus:(nullable NSNumber<SDLBool> *)wiperStatus headLampStatus:(nullable NSNumber<SDLBool> *)headLampStatus engineTorque:(nullable NSNumber<SDLBool> *)engineTorque accPedalPosition:(nullable NSNumber<SDLBool> *)accPedalPosition steeringWheelAngle:(nullable NSNumber<SDLBool> *)steeringWheelAngle engineOilLife:(nullable NSNumber<SDLBool> *)engineOilLife electronicParkBrakeStatus:(nullable NSNumber<SDLBool> *)electronicParkBrakeStatus cloudAppVehicleID:(nullable NSNumber<SDLBool> *)cloudAppVehicleID eCallInfo:(nullable NSNumber<SDLBool> *)eCallInfo airbagStatus:(nullable NSNumber<SDLBool> *)airbagStatus emergencyEvent:(nullable NSNumber<SDLBool> *)emergencyEvent clusterModeStatus:(nullable NSNumber<SDLBool> *)clusterModeStatus myKey:(nullable NSNumber<SDLBool> *)myKey handsOffSteering:(nullable NSNumber<SDLBool> *)handsOffSteering windowStatus:(nullable NSNumber<SDLBool> *)windowStatus;
+
+/**
+ * See GearStatus
+ *
+ * @since SDL 7.0
+*/
+@property (strong, nonatomic, nullable) NSNumber<SDLBool> *gearStatus;
/**
* A boolean value. If true, requests GPS data.
@@ -140,12 +184,12 @@ NS_ASSUME_NONNULL_BEGIN
/**
* A boolean value. If true, requests Fuel Level data.
*/
-@property (nullable, strong, nonatomic) NSNumber<SDLBool> *fuelLevel;
+@property (strong, nonatomic, nullable) NSNumber<SDLBool> *fuelLevel __deprecated_msg("use fuelRange instead on 7.0+ RPC version connections");
/**
* A boolean value. If true, requests Fuel Level State data.
*/
-@property (nullable, strong, nonatomic) NSNumber<SDLBool> *fuelLevel_State;
+@property (strong, nonatomic, nullable) NSNumber<SDLBool> *fuelLevel_State __deprecated_msg("use fuelRange instead on 7.0+ RPC version connections");
/**
* A boolean value. If true, requests Fuel Range data.
@@ -168,9 +212,12 @@ NS_ASSUME_NONNULL_BEGIN
@property (nullable, strong, nonatomic) NSNumber<SDLBool> *vin;
/**
- * A boolean value. If true, requests PRNDL data.
- */
-@property (nullable, strong, nonatomic) NSNumber<SDLBool> *prndl;
+ * See PRNDL. This parameter is deprecated and it is now covered in `gearStatus`
+ *
+ * @deprecated
+ * @since SDL 7.0
+*/
+@property (strong, nonatomic, nullable) NSNumber<SDLBool> *prndl __deprecated_msg("use gearStatus instead on 7.0+ RPC version connections");
/**
* A boolean value. If true, requests Tire Pressure data.
@@ -203,11 +250,23 @@ NS_ASSUME_NONNULL_BEGIN
@property (nullable, strong, nonatomic) NSNumber<SDLBool> *driverBraking;
/**
+ * See WindowStatus
+ *
+ * @since SDL 7.0
+ */
+@property (strong, nonatomic, nullable) NSNumber<SDLBool> *windowStatus;
+
+/**
* A boolean value. If true, requests Wiper Status data.
*/
@property (nullable, strong, nonatomic) NSNumber<SDLBool> *wiperStatus;
/**
+ * To indicate whether driver hands are off the steering wheel
+ */
+@property (strong, nonatomic, nullable) NSNumber<SDLBool> *handsOffSteering;
+
+/**
* A boolean value. If true, requests Head Lamp Status data.
*/
@property (nullable, strong, nonatomic) NSNumber<SDLBool> *headLampStatus;
diff --git a/SmartDeviceLink/SDLGetVehicleData.m b/SmartDeviceLink/SDLGetVehicleData.m
index 30b8dfe81..875b90711 100644
--- a/SmartDeviceLink/SDLGetVehicleData.m
+++ b/SmartDeviceLink/SDLGetVehicleData.m
@@ -15,57 +15,88 @@ NS_ASSUME_NONNULL_BEGIN
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
- (instancetype)init {
- if (self = [super initWithName:SDLRPCFunctionNameGetVehicleData]) {
+ self = [super initWithName:SDLRPCFunctionNameGetVehicleData];
+ if (!self) {
+ return nil;
}
return self;
}
#pragma clang diagnostic pop
- (instancetype)initWithAccelerationPedalPosition:(BOOL)accelerationPedalPosition airbagStatus:(BOOL)airbagStatus beltStatus:(BOOL)beltStatus bodyInformation:(BOOL)bodyInformation clusterModeStatus:(BOOL)clusterModeStatus deviceStatus:(BOOL)deviceStatus driverBraking:(BOOL)driverBraking eCallInfo:(BOOL)eCallInfo emergencyEvent:(BOOL)emergencyEvent engineTorque:(BOOL)engineTorque externalTemperature:(BOOL)externalTemperature fuelLevel:(BOOL)fuelLevel fuelLevelState:(BOOL)fuelLevelState gps:(BOOL)gps headLampStatus:(BOOL)headLampStatus instantFuelConsumption:(BOOL)instantFuelConsumption myKey:(BOOL)myKey odometer:(BOOL)odometer prndl:(BOOL)prndl rpm:(BOOL)rpm speed:(BOOL)speed steeringWheelAngle:(BOOL)steeringWheelAngle tirePressure:(BOOL)tirePressure vin:(BOOL)vin wiperStatus:(BOOL)wiperStatus {
- return [self initWithAccelerationPedalPosition:accelerationPedalPosition airbagStatus:airbagStatus beltStatus:beltStatus bodyInformation:bodyInformation clusterModeStatus:clusterModeStatus deviceStatus:deviceStatus driverBraking:driverBraking eCallInfo:eCallInfo electronicParkBrakeStatus:NO emergencyEvent:emergencyEvent engineOilLife:NO engineTorque:engineTorque externalTemperature:externalTemperature fuelLevel:fuelLevel fuelLevelState:fuelLevelState fuelRange:NO gps:gps headLampStatus:headLampStatus instantFuelConsumption:instantFuelConsumption myKey:myKey odometer:odometer prndl:prndl rpm:rpm speed:speed steeringWheelAngle:steeringWheelAngle tirePressure:tirePressure turnSignal:NO vin:vin wiperStatus:wiperStatus];
+ self = [self initWithGps:@(gps) speed:@(speed) rpm:@(rpm) instantFuelConsumption:@(instantFuelConsumption) fuelRange:nil externalTemperature:@(externalTemperature) turnSignal:nil vin:@(vin) gearStatus:nil tirePressure:@(tirePressure) odometer:@(odometer) beltStatus:@(beltStatus) bodyInformation:@(bodyInformation) deviceStatus:@(deviceStatus) driverBraking:@(driverBraking) wiperStatus:@(wiperStatus) headLampStatus:@(headLampStatus) engineTorque:@(engineTorque) accPedalPosition:@(accelerationPedalPosition) steeringWheelAngle:@(steeringWheelAngle) engineOilLife:nil electronicParkBrakeStatus:nil cloudAppVehicleID:nil eCallInfo:@(eCallInfo) airbagStatus:@(airbagStatus) emergencyEvent:@(emergencyEvent) clusterModeStatus:@(clusterModeStatus) myKey:@(myKey) handsOffSteering:nil windowStatus:nil];
+ if (self) {
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
+ self.fuelLevel = @(fuelLevel);
+ self.fuelLevel_State = @(fuelLevelState);
+ self.prndl = @(prndl);
+#pragma clang diagnostic pop
+ }
+ return self;
}
- (instancetype)initWithAccelerationPedalPosition:(BOOL)accelerationPedalPosition airbagStatus:(BOOL)airbagStatus beltStatus:(BOOL)beltStatus bodyInformation:(BOOL)bodyInformation clusterModeStatus:(BOOL)clusterModeStatus deviceStatus:(BOOL)deviceStatus driverBraking:(BOOL)driverBraking eCallInfo:(BOOL)eCallInfo electronicParkBrakeStatus:(BOOL)electronicParkBrakeStatus emergencyEvent:(BOOL)emergencyEvent engineOilLife:(BOOL)engineOilLife engineTorque:(BOOL)engineTorque externalTemperature:(BOOL)externalTemperature fuelLevel:(BOOL)fuelLevel fuelLevelState:(BOOL)fuelLevelState fuelRange:(BOOL)fuelRange gps:(BOOL)gps headLampStatus:(BOOL)headLampStatus instantFuelConsumption:(BOOL)instantFuelConsumption myKey:(BOOL)myKey odometer:(BOOL)odometer prndl:(BOOL)prndl rpm:(BOOL)rpm speed:(BOOL)speed steeringWheelAngle:(BOOL)steeringWheelAngle tirePressure:(BOOL)tirePressure turnSignal:(BOOL)turnSignal vin:(BOOL)vin wiperStatus:(BOOL)wiperStatus {
- return [self initWithAccelerationPedalPosition:accelerationPedalPosition airbagStatus:airbagStatus beltStatus:beltStatus bodyInformation:bodyInformation cloudAppVehicleID:NO clusterModeStatus:clusterModeStatus deviceStatus:deviceStatus driverBraking:driverBraking eCallInfo:eCallInfo electronicParkBrakeStatus:electronicParkBrakeStatus emergencyEvent:emergencyEvent engineOilLife:engineOilLife engineTorque:engineTorque externalTemperature:externalTemperature fuelLevel:fuelLevel fuelLevelState:fuelLevelState fuelRange:fuelRange gps:gps headLampStatus:headLampStatus instantFuelConsumption:instantFuelConsumption myKey:myKey odometer:odometer prndl:prndl rpm:rpm speed:speed steeringWheelAngle:steeringWheelAngle tirePressure:tirePressure turnSignal:turnSignal vin:vin wiperStatus:wiperStatus];
+ self = [self initWithGps:@(gps) speed:@(speed) rpm:@(rpm) instantFuelConsumption:@(instantFuelConsumption) fuelRange:@(fuelRange) externalTemperature:@(externalTemperature) turnSignal:@(turnSignal) vin:@(vin) gearStatus:nil tirePressure:@(tirePressure) odometer:@(odometer) beltStatus:@(beltStatus) bodyInformation:@(bodyInformation) deviceStatus:@(deviceStatus) driverBraking:@(driverBraking) wiperStatus:@(wiperStatus) headLampStatus:@(headLampStatus) engineTorque:@(engineTorque) accPedalPosition:@(accelerationPedalPosition) steeringWheelAngle:@(steeringWheelAngle) engineOilLife:@(engineOilLife) electronicParkBrakeStatus:@(electronicParkBrakeStatus) cloudAppVehicleID:nil eCallInfo:@(eCallInfo) airbagStatus:@(airbagStatus) emergencyEvent:@(emergencyEvent) clusterModeStatus:@(clusterModeStatus) myKey:@(myKey) handsOffSteering:nil windowStatus:nil];
+ if (self) {
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
+ self.fuelLevel = @(fuelLevel);
+ self.fuelLevel_State = @(fuelLevelState);
+ self.prndl = @(prndl);
+#pragma clang diagnostic pop
+ }
+ return self;
}
- (instancetype)initWithAccelerationPedalPosition:(BOOL)accelerationPedalPosition airbagStatus:(BOOL)airbagStatus beltStatus:(BOOL)beltStatus bodyInformation:(BOOL)bodyInformation cloudAppVehicleID:(BOOL)cloudAppVehicleID clusterModeStatus:(BOOL)clusterModeStatus deviceStatus:(BOOL)deviceStatus driverBraking:(BOOL)driverBraking eCallInfo:(BOOL)eCallInfo electronicParkBrakeStatus:(BOOL)electronicParkBrakeStatus emergencyEvent:(BOOL)emergencyEvent engineOilLife:(BOOL)engineOilLife engineTorque:(BOOL)engineTorque externalTemperature:(BOOL)externalTemperature fuelLevel:(BOOL)fuelLevel fuelLevelState:(BOOL)fuelLevelState fuelRange:(BOOL)fuelRange gps:(BOOL)gps headLampStatus:(BOOL)headLampStatus instantFuelConsumption:(BOOL)instantFuelConsumption myKey:(BOOL)myKey odometer:(BOOL)odometer prndl:(BOOL)prndl rpm:(BOOL)rpm speed:(BOOL)speed steeringWheelAngle:(BOOL)steeringWheelAngle tirePressure:(BOOL)tirePressure turnSignal:(BOOL)turnSignal vin:(BOOL)vin wiperStatus:(BOOL)wiperStatus {
+ self = [self initWithGps:@(gps) speed:@(speed) rpm:@(rpm) instantFuelConsumption:@(instantFuelConsumption) fuelRange:@(fuelRange) externalTemperature:@(externalTemperature) turnSignal:@(turnSignal) vin:@(vin) gearStatus:nil tirePressure:@(tirePressure) odometer:@(odometer) beltStatus:@(beltStatus) bodyInformation:@(bodyInformation) deviceStatus:@(deviceStatus) driverBraking:@(driverBraking) wiperStatus:@(wiperStatus) headLampStatus:@(headLampStatus) engineTorque:@(engineTorque) accPedalPosition:@(accelerationPedalPosition) steeringWheelAngle:@(steeringWheelAngle) engineOilLife:@(engineOilLife) electronicParkBrakeStatus:@(electronicParkBrakeStatus) cloudAppVehicleID:@(cloudAppVehicleID) eCallInfo:@(eCallInfo) airbagStatus:@(airbagStatus) emergencyEvent:@(emergencyEvent) clusterModeStatus:@(clusterModeStatus) myKey:@(myKey) handsOffSteering:nil windowStatus:nil];
+ if (self) {
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
+ self.fuelLevel = @(fuelLevel);
+ self.fuelLevel_State = @(fuelLevelState);
+ self.prndl = @(prndl);
+#pragma clang diagnostic pop
+ }
+ return self;
+}
+
+- (instancetype)initWithGps:(nullable NSNumber<SDLBool> *)gps speed:(nullable NSNumber<SDLBool> *)speed rpm:(nullable NSNumber<SDLBool> *)rpm instantFuelConsumption:(nullable NSNumber<SDLBool> *)instantFuelConsumption fuelRange:(nullable NSNumber<SDLBool> *)fuelRange externalTemperature:(nullable NSNumber<SDLBool> *)externalTemperature turnSignal:(nullable NSNumber<SDLBool> *)turnSignal vin:(nullable NSNumber<SDLBool> *)vin gearStatus:(nullable NSNumber<SDLBool> *)gearStatus tirePressure:(nullable NSNumber<SDLBool> *)tirePressure odometer:(nullable NSNumber<SDLBool> *)odometer beltStatus:(nullable NSNumber<SDLBool> *)beltStatus bodyInformation:(nullable NSNumber<SDLBool> *)bodyInformation deviceStatus:(nullable NSNumber<SDLBool> *)deviceStatus driverBraking:(nullable NSNumber<SDLBool> *)driverBraking wiperStatus:(nullable NSNumber<SDLBool> *)wiperStatus headLampStatus:(nullable NSNumber<SDLBool> *)headLampStatus engineTorque:(nullable NSNumber<SDLBool> *)engineTorque accPedalPosition:(nullable NSNumber<SDLBool> *)accPedalPosition steeringWheelAngle:(nullable NSNumber<SDLBool> *)steeringWheelAngle engineOilLife:(nullable NSNumber<SDLBool> *)engineOilLife electronicParkBrakeStatus:(nullable NSNumber<SDLBool> *)electronicParkBrakeStatus cloudAppVehicleID:(nullable NSNumber<SDLBool> *)cloudAppVehicleID eCallInfo:(nullable NSNumber<SDLBool> *)eCallInfo airbagStatus:(nullable NSNumber<SDLBool> *)airbagStatus emergencyEvent:(nullable NSNumber<SDLBool> *)emergencyEvent clusterModeStatus:(nullable NSNumber<SDLBool> *)clusterModeStatus myKey:(nullable NSNumber<SDLBool> *)myKey handsOffSteering:(nullable NSNumber<SDLBool> *)handsOffSteering windowStatus:(nullable NSNumber<SDLBool> *)windowStatus {
self = [self init];
if (!self) {
return nil;
}
-
- self.accPedalPosition = @(accelerationPedalPosition);
- self.airbagStatus = @(airbagStatus);
- self.beltStatus = @(beltStatus);
- self.bodyInformation = @(bodyInformation);
- self.cloudAppVehicleID = @(cloudAppVehicleID);
- self.clusterModeStatus = @(clusterModeStatus);
- self.deviceStatus = @(deviceStatus);
- self.driverBraking = @(driverBraking);
- self.eCallInfo = @(eCallInfo);
- self.electronicParkBrakeStatus = @(electronicParkBrakeStatus);
- self.emergencyEvent = @(emergencyEvent);
- self.engineOilLife = @(engineOilLife);
- self.engineTorque = @(engineTorque);
- self.externalTemperature = @(externalTemperature);
- self.fuelLevel = @(fuelLevel);
- self.fuelLevel_State = @(fuelLevelState);
- self.fuelRange = @(fuelRange);
- self.myKey = @(myKey);
- self.odometer = @(odometer);
- self.gps = @(gps);
- self.headLampStatus = @(headLampStatus);
- self.instantFuelConsumption = @(instantFuelConsumption);
- self.prndl = @(prndl);
- self.rpm = @(rpm);
- self.speed = @(speed);
- self.steeringWheelAngle = @(steeringWheelAngle);
- self.tirePressure = @(tirePressure);
- self.turnSignal = @(turnSignal);
- self.vin = @(vin);
- self.wiperStatus = @(wiperStatus);
-
+ self.gps = gps;
+ self.speed = speed;
+ self.rpm = rpm;
+ self.instantFuelConsumption = instantFuelConsumption;
+ self.fuelRange = fuelRange;
+ self.externalTemperature = externalTemperature;
+ self.turnSignal = turnSignal;
+ self.vin = vin;
+ self.gearStatus = gearStatus;
+ self.tirePressure = tirePressure;
+ self.odometer = odometer;
+ self.beltStatus = beltStatus;
+ self.bodyInformation = bodyInformation;
+ self.deviceStatus = deviceStatus;
+ self.driverBraking = driverBraking;
+ self.wiperStatus = wiperStatus;
+ self.headLampStatus = headLampStatus;
+ self.engineTorque = engineTorque;
+ self.accPedalPosition = accPedalPosition;
+ self.steeringWheelAngle = steeringWheelAngle;
+ self.engineOilLife = engineOilLife;
+ self.electronicParkBrakeStatus = electronicParkBrakeStatus;
+ self.cloudAppVehicleID = cloudAppVehicleID;
+ self.eCallInfo = eCallInfo;
+ self.airbagStatus = airbagStatus;
+ self.emergencyEvent = emergencyEvent;
+ self.clusterModeStatus = clusterModeStatus;
+ self.myKey = myKey;
+ self.handsOffSteering = handsOffSteering;
+ self.windowStatus = windowStatus;
return self;
}
@@ -309,6 +340,23 @@ NS_ASSUME_NONNULL_BEGIN
return [self.parameters sdl_objectForName:SDLRPCParameterNameCloudAppVehicleID ofClass:NSNumber.class error:nil];
}
+- (void)setWindowStatus:(nullable NSNumber<SDLBool> *)windowStatus {
+ [self.parameters sdl_setObject:windowStatus forName:SDLRPCParameterNameWindowStatus];
+}
+
+- (nullable NSNumber<SDLBool> *)windowStatus {
+ NSError *error = nil;
+ return [self.parameters sdl_objectForName:SDLRPCParameterNameWindowStatus ofClass:NSNumber.class error:&error];
+}
+
+- (void)setGearStatus:(nullable NSNumber<SDLBool> *)gearStatus {
+ [self.parameters sdl_setObject:gearStatus forName:SDLRPCParameterNameGearStatus];
+}
+
+- (nullable NSNumber<SDLBool> *)gearStatus {
+ return [self.parameters sdl_objectForName:SDLRPCParameterNameGearStatus ofClass:NSNumber.class error:nil];
+}
+
- (void)setOEMCustomVehicleData:(NSString *)vehicleDataName withVehicleDataState:(BOOL)vehicleDataState {
[self.parameters sdl_setObject:@(vehicleDataState) forName:vehicleDataName];
}
@@ -317,6 +365,14 @@ NS_ASSUME_NONNULL_BEGIN
return [self.parameters sdl_objectForName:vehicleDataName ofClass:NSNumber.class error:nil];
}
+- (void)setHandsOffSteering:(nullable NSNumber<SDLBool> *)handsOffSteering {
+ [self.parameters sdl_setObject:handsOffSteering forName:SDLRPCParameterNameHandsOffSteering];
+}
+
+- (nullable NSNumber<SDLBool> *)handsOffSteering {
+ return [self.parameters sdl_objectForName:SDLRPCParameterNameHandsOffSteering ofClass:NSNumber.class error:nil];
+}
+
@end
NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLGetVehicleDataResponse.h b/SmartDeviceLink/SDLGetVehicleDataResponse.h
index 7e727aebd..4db703901 100644
--- a/SmartDeviceLink/SDLGetVehicleDataResponse.h
+++ b/SmartDeviceLink/SDLGetVehicleDataResponse.h
@@ -18,10 +18,12 @@
@class SDLECallInfo;
@class SDLEmergencyEvent;
@class SDLFuelRange;
+@class SDLGearStatus;
@class SDLGPSData;
@class SDLHeadLampStatus;
@class SDLMyKey;
@class SDLTireStatus;
+@class SDLWindowStatus;
/**
@@ -35,6 +37,50 @@ NS_ASSUME_NONNULL_BEGIN
@interface SDLGetVehicleDataResponse : SDLRPCResponse
/**
+ * initializes a new allocated object of the SDLGetVehicleDataResponse class
+ *
+ * @param gps - gps
+ * @param speed - @(speed)
+ * @param rpm - rpm
+ * @param instantFuelConsumption - @(instantFuelConsumption)
+ * @param fuelRange - fuelRange
+ * @param externalTemperature - @(externalTemperature)
+ * @param turnSignal - turnSignal
+ * @param vin - vin
+ * @param gearStatus - gearStatus
+ * @param tirePressure - tirePressure
+ * @param odometer - odometer
+ * @param beltStatus - beltStatus
+ * @param bodyInformation - bodyInformation
+ * @param deviceStatus - deviceStatus
+ * @param driverBraking - driverBraking
+ * @param wiperStatus - wiperStatus
+ * @param headLampStatus - headLampStatus
+ * @param engineTorque - @(engineTorque)
+ * @param accPedalPosition - @(accPedalPosition)
+ * @param steeringWheelAngle - @(steeringWheelAngle)
+ * @param engineOilLife - @(engineOilLife)
+ * @param electronicParkBrakeStatus - electronicParkBrakeStatus
+ * @param cloudAppVehicleID - cloudAppVehicleID
+ * @param eCallInfo - eCallInfo
+ * @param airbagStatus - airbagStatus
+ * @param emergencyEvent - emergencyEvent
+ * @param clusterModeStatus - clusterModeStatus
+ * @param myKey - myKey
+ * @param handsOffSteering - handsOffSteering
+ * @param windowStatus - windowStatus
+ * @return A SDLGetVehicleDataResponse object
+ */
+- (instancetype)initWithGps:(nullable SDLGPSData *)gps speed:(float)speed rpm:(nullable NSNumber<SDLUInt> *)rpm instantFuelConsumption:(float)instantFuelConsumption fuelRange:(nullable NSArray<SDLFuelRange *> *)fuelRange externalTemperature:(float)externalTemperature turnSignal:(nullable SDLTurnSignal)turnSignal vin:(nullable NSString *)vin gearStatus:(nullable SDLGearStatus *)gearStatus tirePressure:(nullable SDLTireStatus *)tirePressure odometer:(nullable NSNumber<SDLUInt> *)odometer beltStatus:(nullable SDLBeltStatus *)beltStatus bodyInformation:(nullable SDLBodyInformation *)bodyInformation deviceStatus:(nullable SDLDeviceStatus *)deviceStatus driverBraking:(nullable SDLVehicleDataEventStatus)driverBraking wiperStatus:(nullable SDLWiperStatus)wiperStatus headLampStatus:(nullable SDLHeadLampStatus *)headLampStatus engineTorque:(float)engineTorque accPedalPosition:(float)accPedalPosition steeringWheelAngle:(float)steeringWheelAngle engineOilLife:(float)engineOilLife electronicParkBrakeStatus:(nullable SDLElectronicParkBrakeStatus)electronicParkBrakeStatus cloudAppVehicleID:(nullable NSString *)cloudAppVehicleID eCallInfo:(nullable SDLECallInfo *)eCallInfo airbagStatus:(nullable SDLAirbagStatus *)airbagStatus emergencyEvent:(nullable SDLEmergencyEvent *)emergencyEvent clusterModeStatus:(nullable SDLClusterModeStatus *)clusterModeStatus myKey:(nullable SDLMyKey *)myKey handsOffSteering:(nullable NSNumber<SDLBool> *)handsOffSteering windowStatus:(nullable NSArray<SDLWindowStatus *> *)windowStatus;
+
+/**
+ * See GearStatus
+ *
+ * @since SDL 7.0
+*/
+@property (strong, nonatomic, nullable) SDLGearStatus *gearStatus;
+
+/**
The car current GPS coordinates
*/
@property (nullable, strong, nonatomic) SDLGPSData *gps;
@@ -52,12 +98,12 @@ NS_ASSUME_NONNULL_BEGIN
/**
The fuel level in the tank (percentage)
*/
-@property (nullable, strong, nonatomic) NSNumber<SDLFloat> *fuelLevel;
+@property (strong, nonatomic, nullable) NSNumber<SDLFloat> *fuelLevel __deprecated_msg("use fuelRange.level instead on 7.0+ RPC version connections");
/**
The fuel level state
*/
-@property (nullable, strong, nonatomic) SDLComponentVolumeStatus fuelLevel_State;
+@property (strong, nonatomic, nullable) SDLComponentVolumeStatus fuelLevel_State __deprecated_msg("use fuelRange.levelState instead on 7.0+ RPC version connections");
/**
The estimate range in KM the vehicle can travel based on fuel level and consumption
@@ -82,9 +128,12 @@ NS_ASSUME_NONNULL_BEGIN
@property (nullable, strong, nonatomic) NSString *vin;
/**
- The current gear shift state of the user's vehicle
- */
-@property (nullable, strong, nonatomic) SDLPRNDL prndl;
+ * See PRNDL. This parameter is deprecated and it is now covered in `gearStatus`
+ *
+ * @deprecated
+ * @since SDL 7.0
+*/
+@property (strong, nonatomic, nullable) SDLPRNDL prndl __deprecated_msg("use gearStatus instead on 7.0+ RPC version connections");
/**
The current pressure warnings for the user's vehicle
@@ -117,11 +166,24 @@ NS_ASSUME_NONNULL_BEGIN
@property (nullable, strong, nonatomic) SDLVehicleDataEventStatus driverBraking;
/**
+ * See WindowStatus
+ * {"array_min_size": 0, "array_max_size": 100}
+ *
+ * @since SDL 7.0
+ */
+@property (strong, nonatomic, nullable) NSArray<SDLWindowStatus *> *windowStatus;
+
+/**
The status of the wipers
*/
@property (nullable, strong, nonatomic) SDLWiperStatus wiperStatus;
/**
+ To indicate whether driver hands are off the steering wheel
+ */
+@property (strong, nonatomic, nullable) NSNumber<SDLBool> *handsOffSteering;
+
+/**
Status of the head lamps
*/
@property (nullable, strong, nonatomic) SDLHeadLampStatus *headLampStatus;
@@ -188,7 +250,7 @@ NS_ASSUME_NONNULL_BEGIN
/**
Sets the OEM custom vehicle data state for any given OEM custom vehicle data name.
-
+
@param vehicleDataName The name of the OEM custom vehicle data item.
@param vehicleDataState An object containing the OEM custom vehicle data item.
@@ -198,7 +260,7 @@ NS_ASSUME_NONNULL_BEGIN
/**
Gets the OEM custom vehicle data item for any given OEM custom vehicle data name.
-
+
@param vehicleDataName The name of the OEM custom vehicle data item.
@return An OEM custom vehicle data object for the given vehicle data name.
diff --git a/SmartDeviceLink/SDLGetVehicleDataResponse.m b/SmartDeviceLink/SDLGetVehicleDataResponse.m
index 25ddde3f4..355246692 100644
--- a/SmartDeviceLink/SDLGetVehicleDataResponse.m
+++ b/SmartDeviceLink/SDLGetVehicleDataResponse.m
@@ -13,12 +13,14 @@
#import "SDLECallInfo.h"
#import "SDLEmergencyEvent.h"
#import "SDLFuelRange.h"
+#import "SDLGearStatus.h"
#import "SDLGPSData.h"
#import "SDLHeadLampStatus.h"
#import "SDLMyKey.h"
#import "SDLRPCParameterNames.h"
#import "SDLRPCFunctionNames.h"
#import "SDLTireStatus.h"
+#import "SDLWindowStatus.h"
NS_ASSUME_NONNULL_BEGIN
@@ -27,12 +29,60 @@ NS_ASSUME_NONNULL_BEGIN
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
- (instancetype)init {
- if (self = [super initWithName:SDLRPCFunctionNameGetVehicleData]) {
+ self = [super initWithName:SDLRPCFunctionNameGetVehicleData];
+ if (!self) {
+ return nil;
}
return self;
}
#pragma clang diagnostic pop
+- (instancetype)initWithGps:(nullable SDLGPSData *)gps speed:(float)speed rpm:(nullable NSNumber<SDLUInt> *)rpm instantFuelConsumption:(float)instantFuelConsumption fuelRange:(nullable NSArray<SDLFuelRange *> *)fuelRange externalTemperature:(float)externalTemperature turnSignal:(nullable SDLTurnSignal)turnSignal vin:(nullable NSString *)vin gearStatus:(nullable SDLGearStatus *)gearStatus tirePressure:(nullable SDLTireStatus *)tirePressure odometer:(nullable NSNumber<SDLUInt> *)odometer beltStatus:(nullable SDLBeltStatus *)beltStatus bodyInformation:(nullable SDLBodyInformation *)bodyInformation deviceStatus:(nullable SDLDeviceStatus *)deviceStatus driverBraking:(nullable SDLVehicleDataEventStatus)driverBraking wiperStatus:(nullable SDLWiperStatus)wiperStatus headLampStatus:(nullable SDLHeadLampStatus *)headLampStatus engineTorque:(float)engineTorque accPedalPosition:(float)accPedalPosition steeringWheelAngle:(float)steeringWheelAngle engineOilLife:(float)engineOilLife electronicParkBrakeStatus:(nullable SDLElectronicParkBrakeStatus)electronicParkBrakeStatus cloudAppVehicleID:(nullable NSString *)cloudAppVehicleID eCallInfo:(nullable SDLECallInfo *)eCallInfo airbagStatus:(nullable SDLAirbagStatus *)airbagStatus emergencyEvent:(nullable SDLEmergencyEvent *)emergencyEvent clusterModeStatus:(nullable SDLClusterModeStatus *)clusterModeStatus myKey:(nullable SDLMyKey *)myKey handsOffSteering:(nullable NSNumber<SDLBool> *)handsOffSteering windowStatus:(nullable NSArray<SDLWindowStatus *> *)windowStatus { self = [self init];
+ if (!self) {
+ return nil;
+ }
+ self.gps = gps;
+ self.speed = @(speed);
+ self.rpm = rpm;
+ self.instantFuelConsumption = @(instantFuelConsumption);
+ self.fuelRange = fuelRange;
+ self.externalTemperature = @(externalTemperature);
+ self.turnSignal = turnSignal;
+ self.vin = vin;
+ self.gearStatus = gearStatus;
+ self.tirePressure = tirePressure;
+ self.odometer = odometer;
+ self.beltStatus = beltStatus;
+ self.bodyInformation = bodyInformation;
+ self.deviceStatus = deviceStatus;
+ self.driverBraking = driverBraking;
+ self.wiperStatus = wiperStatus;
+ self.headLampStatus = headLampStatus;
+ self.engineTorque = @(engineTorque);
+ self.accPedalPosition = @(accPedalPosition);
+ self.steeringWheelAngle = @(steeringWheelAngle);
+ self.engineOilLife = @(engineOilLife);
+ self.electronicParkBrakeStatus = electronicParkBrakeStatus;
+ self.cloudAppVehicleID = cloudAppVehicleID;
+ self.eCallInfo = eCallInfo;
+ self.airbagStatus = airbagStatus;
+ self.emergencyEvent = emergencyEvent;
+ self.clusterModeStatus = clusterModeStatus;
+ self.myKey = myKey;
+ self.handsOffSteering = handsOffSteering;
+ self.windowStatus = windowStatus;
+ return self;
+}
+
+- (void)setGearStatus:(nullable SDLGearStatus *)gearStatus {
+ [self.parameters sdl_setObject:gearStatus forName:SDLRPCParameterNameGearStatus];
+}
+
+- (nullable SDLGearStatus *)gearStatus {
+ NSError *error = nil;
+ return [self.parameters sdl_objectForName:SDLRPCParameterNameGearStatus ofClass:SDLGearStatus.class error:&error];
+}
+
- (void)setGps:(nullable SDLGPSData *)gps {
[self.parameters sdl_setObject:gps forName:SDLRPCParameterNameGPS];
}
@@ -161,6 +211,15 @@ NS_ASSUME_NONNULL_BEGIN
return [self.parameters sdl_enumForName:SDLRPCParameterNameDriverBraking error:nil];
}
+- (void)setWindowStatus:(nullable NSArray<SDLWindowStatus *> *)windowStatus {
+ [self.parameters sdl_setObject:windowStatus forName:SDLRPCParameterNameWindowStatus];
+}
+
+- (nullable NSArray<SDLWindowStatus *> *)windowStatus {
+ NSError *error = nil;
+ return [self.parameters sdl_objectsForName:SDLRPCParameterNameWindowStatus ofClass:SDLWindowStatus.class error:&error];
+}
+
- (void)setWiperStatus:(nullable SDLWiperStatus)wiperStatus {
[self.parameters sdl_setObject:wiperStatus forName:SDLRPCParameterNameWiperStatus];
}
@@ -169,6 +228,15 @@ NS_ASSUME_NONNULL_BEGIN
return [self.parameters sdl_enumForName:SDLRPCParameterNameWiperStatus error:nil];
}
+- (void)setHandsOffSteering:(nullable NSNumber<SDLBool> *)handsOffSteering {
+ [self.parameters sdl_setObject:handsOffSteering forName:SDLRPCParameterNameHandsOffSteering];
+}
+
+- (nullable NSNumber<SDLBool> *)handsOffSteering {
+ NSError *error = nil;
+ return [self.parameters sdl_objectForName:SDLRPCParameterNameHandsOffSteering ofClass:NSNumber.class error:&error];
+}
+
- (void)setHeadLampStatus:(nullable SDLHeadLampStatus *)headLampStatus {
[self.parameters sdl_setObject:headLampStatus forName:SDLRPCParameterNameHeadLampStatus];
}
diff --git a/SmartDeviceLink/SDLGlobals.h b/SmartDeviceLink/SDLGlobals.h
index 004a0e8d9..321fc60b4 100644
--- a/SmartDeviceLink/SDLGlobals.h
+++ b/SmartDeviceLink/SDLGlobals.h
@@ -43,6 +43,11 @@ extern void *const SDLConcurrentQueueName;
- (void)setDynamicMTUSize:(NSUInteger)maxMTUSize forServiceType:(SDLServiceType)serviceType;
- (NSUInteger)mtuSizeForServiceType:(SDLServiceType)serviceType;
+/// Calls a block on an SDL sub-queue of the internal serial SDLProcessingQueue. If the call to this method is already on that queue, the block will be run, if it is not, a `dispatch_sync` will occur to that queue first.
+/// @param queue The queue to run on. The passed queue should be a sub-queue of the SDLProcessingQueue. If it is not and the call to this method occurs on the passed queue, a deadlock will occur because the check will not pass correctly.
+/// @param block The block to run on the serial sub-queue.
++ (void)runSyncOnSerialSubQueue:(dispatch_queue_t)queue block:(void (^)(void))block;
+
@end
NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLGlobals.m b/SmartDeviceLink/SDLGlobals.m
index dc78e7a56..00d764edb 100644
--- a/SmartDeviceLink/SDLGlobals.m
+++ b/SmartDeviceLink/SDLGlobals.m
@@ -15,8 +15,8 @@
NS_ASSUME_NONNULL_BEGIN
// VERSION DEPENDENT CODE
-NSString *const SDLMaxProxyProtocolVersion = @"5.2.0";
-NSString *const SDLMaxProxyRPCVersion = @"6.0.0";
+NSString *const SDLMaxProxyProtocolVersion = @"5.3.0";
+NSString *const SDLMaxProxyRPCVersion = @"7.0.0";
NSUInteger const SDLDefaultMTUSize = UINT32_MAX;
NSUInteger const SDLV1MTUSize = 1024;
@@ -71,6 +71,13 @@ typedef NSNumber *MTUBox;
return self;
}
++ (void)runSyncOnSerialSubQueue:(dispatch_queue_t)queue block:(void (^)(void))block {
+ if (dispatch_get_specific(SDLProcessingQueueName) != nil) {
+ block();
+ } else {
+ dispatch_sync(queue, block);
+ }
+}
#pragma mark - Custom Getters / Setters
diff --git a/SmartDeviceLink/SDLHMICapabilities.h b/SmartDeviceLink/SDLHMICapabilities.h
index 84a2eecf7..3d2187631 100644
--- a/SmartDeviceLink/SDLHMICapabilities.h
+++ b/SmartDeviceLink/SDLHMICapabilities.h
@@ -1,6 +1,34 @@
-//
-// SDLHMICapabilities.h
-// SmartDeviceLink-iOS
+/*
+* Copyright (c) 2020, SmartDeviceLink Consortium, Inc.
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* Redistributions of source code must retain the above copyright notice, this
+* list of conditions and the following disclaimer.
+*
+* Redistributions in binary form must reproduce the above copyright notice,
+* this list of conditions and the following
+* disclaimer in the documentation and/or other materials provided with the
+* distribution.
+*
+* Neither the name of the SmartDeviceLink Consortium Inc. nor the names of
+* its contributors may be used to endorse or promote products derived
+* from this software without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+*/
#import "SDLRPCStruct.h"
@@ -14,6 +42,19 @@ NS_ASSUME_NONNULL_BEGIN
@interface SDLHMICapabilities : SDLRPCStruct
/**
+ * @param navigation - navigation
+ * @param phoneCall - phoneCall
+ * @param videoStreaming - videoStreaming
+ * @param remoteControl - remoteControl
+ * @param appServices - appServices
+ * @param displays - displays
+ * @param seatLocation - seatLocation
+ * @param driverDistraction - driverDistraction
+ * @return A SDLHMICapabilities object
+ */
+- (instancetype)initWithNavigation:(nullable NSNumber<SDLBool> *)navigation phoneCall:(nullable NSNumber<SDLBool> *)phoneCall videoStreaming:(nullable NSNumber<SDLBool> *)videoStreaming remoteControl:(nullable NSNumber<SDLBool> *)remoteControl appServices:(nullable NSNumber<SDLBool> *)appServices displays:(nullable NSNumber<SDLBool> *)displays seatLocation:(nullable NSNumber<SDLBool> *)seatLocation driverDistraction:(nullable NSNumber<SDLBool> *)driverDistraction;
+
+/**
Availability of built in Nav. True: Available, False: Not Available
Boolean value. Optional.
@@ -78,6 +119,13 @@ NS_ASSUME_NONNULL_BEGIN
**/
@property (nullable, copy, nonatomic) NSNumber<SDLBool> *seatLocation;
+/**
+ * Availability of driver distraction capability. True: Available, False: Not Available
+ *
+ * @since SDL 7.0.0
+ */
+@property (nullable, strong, nonatomic) NSNumber<SDLBool> *driverDistraction;
+
@end
NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLHMICapabilities.m b/SmartDeviceLink/SDLHMICapabilities.m
index fd0104e5e..ece1d811c 100644
--- a/SmartDeviceLink/SDLHMICapabilities.m
+++ b/SmartDeviceLink/SDLHMICapabilities.m
@@ -1,6 +1,34 @@
-//
-// SDLHMICapabilities.m
-// SmartDeviceLink-iOS
+/*
+* Copyright (c) 2020, SmartDeviceLink Consortium, Inc.
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* Redistributions of source code must retain the above copyright notice, this
+* list of conditions and the following disclaimer.
+*
+* Redistributions in binary form must reproduce the above copyright notice,
+* this list of conditions and the following
+* disclaimer in the documentation and/or other materials provided with the
+* distribution.
+*
+* Neither the name of the SmartDeviceLink Consortium Inc. nor the names of
+* its contributors may be used to endorse or promote products derived
+* from this software without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+*/
#import "SDLHMICapabilities.h"
@@ -11,6 +39,22 @@ NS_ASSUME_NONNULL_BEGIN
@implementation SDLHMICapabilities
+- (instancetype)initWithNavigation:(nullable NSNumber<SDLBool> *)navigation phoneCall:(nullable NSNumber<SDLBool> *)phoneCall videoStreaming:(nullable NSNumber<SDLBool> *)videoStreaming remoteControl:(nullable NSNumber<SDLBool> *)remoteControl appServices:(nullable NSNumber<SDLBool> *)appServices displays:(nullable NSNumber<SDLBool> *)displays seatLocation:(nullable NSNumber<SDLBool> *)seatLocation driverDistraction:(nullable NSNumber<SDLBool> *)driverDistraction {
+ self = [super init];
+ if (!self) { return nil; }
+
+ self.navigation = navigation;
+ self.phoneCall = phoneCall;
+ self.videoStreaming = videoStreaming;
+ self.remoteControl = remoteControl;
+ self.appServices = appServices;
+ self.displays = displays;
+ self.seatLocation = seatLocation;
+ self.driverDistraction = driverDistraction;
+
+ return self;
+}
+
- (void)setNavigation:(nullable NSNumber<SDLBool> *)navigation {
[self.store sdl_setObject:navigation forName:SDLRPCParameterNameNavigation];
}
@@ -67,6 +111,14 @@ NS_ASSUME_NONNULL_BEGIN
return [self.store sdl_objectForName:SDLRPCParameterNameSeatLocation ofClass:NSNumber.class error:nil];
}
+- (void)setDriverDistraction:(nullable NSNumber<SDLBool> *)driverDistraction {
+ [self.store sdl_setObject:driverDistraction forName:SDLRPCParameterNameDriverDistraction];
+}
+
+- (nullable NSNumber<SDLBool> *)driverDistraction {
+ return [self.store sdl_objectForName:SDLRPCParameterNameDriverDistraction ofClass:NSNumber.class error:nil];
+}
+
@end
NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLImageFieldName.h b/SmartDeviceLink/SDLImageFieldName.h
index cd3e101c9..c50e17b04 100644
--- a/SmartDeviceLink/SDLImageFieldName.h
+++ b/SmartDeviceLink/SDLImageFieldName.h
@@ -1,11 +1,40 @@
-// SDLImageFieldName.h
-//
+/*
+* Copyright (c) 2020, SmartDeviceLink Consortium, Inc.
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* Redistributions of source code must retain the above copyright notice, this
+* list of conditions and the following disclaimer.
+*
+* Redistributions in binary form must reproduce the above copyright notice,
+* this list of conditions and the following
+* disclaimer in the documentation and/or other materials provided with the
+* distribution.
+*
+* Neither the name of the SmartDeviceLink Consortium Inc. nor the names of
+* its contributors may be used to endorse or promote products derived
+* from this software without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+*/
#import "SDLEnum.h"
/**
- The name that identifies the filed. Used in DisplayCapabilities.
+ The name that identifies the field. Used in DisplayCapabilities.
@since SmartDeviceLink 3.0
*/
@@ -82,3 +111,17 @@ extern SDLImageFieldName const SDLImageFieldNameShowConstantTBTNextTurnIcon;
@since SDL 4.0
*/
extern SDLImageFieldName const SDLImageFieldNameLocationImage;
+
+/**
+ * The image field for AddSubMenu.menuIcon
+ *
+ * @since SDL 7.0
+ */
+extern SDLImageFieldName const SDLImageFieldNameSubMenuIcon;
+
+/**
+ * The image of the subtle alert; applies to `SubtleAlert` `alertImage`
+ *
+ * @since SDL 7.0
+ */
+extern SDLImageFieldName const SDLImageFieldNameSubtleAlertIcon;
diff --git a/SmartDeviceLink/SDLImageFieldName.m b/SmartDeviceLink/SDLImageFieldName.m
index 0282f25b6..dd195ce82 100644
--- a/SmartDeviceLink/SDLImageFieldName.m
+++ b/SmartDeviceLink/SDLImageFieldName.m
@@ -1,5 +1,34 @@
-// SDLImageFieldName.m
-//
+/*
+* Copyright (c) 2020, SmartDeviceLink Consortium, Inc.
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* Redistributions of source code must retain the above copyright notice, this
+* list of conditions and the following disclaimer.
+*
+* Redistributions in binary form must reproduce the above copyright notice,
+* this list of conditions and the following
+* disclaimer in the documentation and/or other materials provided with the
+* distribution.
+*
+* Neither the name of the SmartDeviceLink Consortium Inc. nor the names of
+* its contributors may be used to endorse or promote products derived
+* from this software without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+*/
#import "SDLImageFieldName.h"
@@ -18,3 +47,5 @@ SDLImageFieldName const SDLImageFieldNameSecondaryGraphic = @"secondaryGraphic";
SDLImageFieldName const SDLImageFieldNameShowConstantTBTIcon = @"showConstantTBTIcon";
SDLImageFieldName const SDLImageFieldNameShowConstantTBTNextTurnIcon = @"showConstantTBTNextTurnIcon";
SDLImageFieldName const SDLImageFieldNameLocationImage = @"locationImage";
+SDLImageFieldName const SDLImageFieldNameSubMenuIcon = @"subMenuIcon";
+SDLImageFieldName const SDLImageFieldNameSubtleAlertIcon = @"subtleAlertIcon";
diff --git a/SmartDeviceLink/SDLLifecycleManager.m b/SmartDeviceLink/SDLLifecycleManager.m
index f6896133c..97842dcd1 100644
--- a/SmartDeviceLink/SDLLifecycleManager.m
+++ b/SmartDeviceLink/SDLLifecycleManager.m
@@ -201,7 +201,7 @@ NSString *const BackgroundTaskTransportName = @"com.sdl.transport.backgroundTask
}
- (void)startWithReadyHandler:(SDLManagerReadyBlock)readyHandler {
- [self sdl_runOnProcessingQueue:^{
+ [SDLGlobals runSyncOnSerialSubQueue:self.lifecycleQueue block:^{
[self sdl_startWithReadyHandler:readyHandler];
}];
}
@@ -219,7 +219,7 @@ NSString *const BackgroundTaskTransportName = @"com.sdl.transport.backgroundTask
}
- (void)stop {
- [self sdl_runOnProcessingQueue:^{
+ [SDLGlobals runSyncOnSerialSubQueue:self.lifecycleQueue block:^{
SDLLogD(@"Lifecycle manager stopped");
if ([self.lifecycleStateMachine isCurrentState:SDLLifecycleStateReady]) {
[self sdl_transitionToState:SDLLifecycleStateUnregistering];
@@ -712,7 +712,7 @@ NSString *const BackgroundTaskTransportName = @"com.sdl.transport.backgroundTask
return;
}
- [self sdl_runOnProcessingQueue:^{
+ [SDLGlobals runSyncOnSerialSubQueue:self.lifecycleQueue block:^{
[self sdl_sendConnectionRequest:rpc withResponseHandler:nil];
}];
}
@@ -722,7 +722,7 @@ NSString *const BackgroundTaskTransportName = @"com.sdl.transport.backgroundTask
- (void)sendConnectionManagerRPC:(__kindof SDLRPCMessage *)rpc {
NSAssert(([rpc isKindOfClass:SDLRPCResponse.class] || [rpc isKindOfClass:SDLRPCNotification.class]), @"Only RPCs of type `Response` or `Notfication` can be sent using this method. To send RPCs of type `Request` use sendConnectionRequest:withResponseHandler:.");
- [self sdl_runOnProcessingQueue:^{
+ [SDLGlobals runSyncOnSerialSubQueue:self.lifecycleQueue block:^{
[self sdl_sendConnectionRequest:rpc withResponseHandler:nil];
}];
}
@@ -753,7 +753,7 @@ NSString *const BackgroundTaskTransportName = @"com.sdl.transport.backgroundTask
return;
}
- [self sdl_runOnProcessingQueue:^{
+ [SDLGlobals runSyncOnSerialSubQueue:self.lifecycleQueue block:^{
[self sdl_sendConnectionRequest:request withResponseHandler:handler];
}];
}
@@ -762,7 +762,7 @@ NSString *const BackgroundTaskTransportName = @"com.sdl.transport.backgroundTask
/// @param request The request to send
/// @param handler A callback handler for responses to the request
- (void)sendConnectionManagerRequest:(__kindof SDLRPCMessage *)request withResponseHandler:(nullable SDLResponseHandler)handler {
- [self sdl_runOnProcessingQueue:^{
+ [SDLGlobals runSyncOnSerialSubQueue:self.lifecycleQueue block:^{
[self sdl_sendConnectionRequest:request withResponseHandler:handler];
}];
}
@@ -834,17 +834,8 @@ NSString *const BackgroundTaskTransportName = @"com.sdl.transport.backgroundTask
return YES;
}
-// this is to make sure that the transition happens on the dedicated queue
-- (void)sdl_runOnProcessingQueue:(void (^)(void))block {
- if (dispatch_get_specific(SDLProcessingQueueName) != nil) {
- block();
- } else {
- dispatch_sync(self.lifecycleQueue, block);
- }
-}
-
- (void)sdl_transitionToState:(SDLState *)state {
- [self sdl_runOnProcessingQueue:^{
+ [SDLGlobals runSyncOnSerialSubQueue:self.lifecycleQueue block:^{
[self.lifecycleStateMachine transitionToState:state];
}];
}
@@ -875,7 +866,7 @@ NSString *const BackgroundTaskTransportName = @"com.sdl.transport.backgroundTask
- (void)sdl_transportDidDisconnect {
SDLLogD(@"Transport Disconnected");
- [self sdl_runOnProcessingQueue:^{
+ [SDLGlobals runSyncOnSerialSubQueue:self.lifecycleQueue block:^{
if (self.lifecycleState == SDLLifecycleStateUnregistering || self.lifecycleState == SDLLifecycleStateStopped) {
[self sdl_transitionToState:SDLLifecycleStateStopped];
} else {
@@ -885,7 +876,7 @@ NSString *const BackgroundTaskTransportName = @"com.sdl.transport.backgroundTask
}
- (void)hmiStatusDidChange:(SDLRPCNotificationNotification *)notification {
- [self sdl_runOnProcessingQueue:^{
+ [SDLGlobals runSyncOnSerialSubQueue:self.lifecycleQueue block:^{
[self sdl_hmiStatusDidChange:notification];
}];
}
@@ -962,7 +953,7 @@ NSString *const BackgroundTaskTransportName = @"com.sdl.transport.backgroundTask
}
- (void)remoteHardwareDidUnregister:(SDLRPCNotificationNotification *)notification {
- [self sdl_runOnProcessingQueue:^{
+ [SDLGlobals runSyncOnSerialSubQueue:self.lifecycleQueue block:^{
[self sdl_remoteHardwareDidUnregister:notification];
}];
}
diff --git a/SmartDeviceLink/SDLLifecycleProtocolHandler.m b/SmartDeviceLink/SDLLifecycleProtocolHandler.m
index 49a789637..858b0bdaf 100644
--- a/SmartDeviceLink/SDLLifecycleProtocolHandler.m
+++ b/SmartDeviceLink/SDLLifecycleProtocolHandler.m
@@ -158,7 +158,10 @@ NS_ASSUME_NONNULL_BEGIN
SDLRPCMessage *newMessage = [[NSClassFromString(functionClassName) alloc] initWithDictionary:rpcMessageAsDictionary];
// If we were unable to create the message, it's an unknown type; discard it
- if (newMessage == nil) { return; }
+ if (newMessage == nil) {
+ SDLLogE(@"Unable to create message for RPC: %@", rpcMessageAsDictionary);
+ return;
+ }
// Adapt the incoming message then call the callback
NSArray<SDLRPCMessage *> *adaptedMessages = [SDLLifecycleRPCAdapter adaptRPC:newMessage direction:SDLRPCDirectionIncoming];
diff --git a/SmartDeviceLink/SDLMenuManager.m b/SmartDeviceLink/SDLMenuManager.m
index 4d2d0737a..8cef8caef 100644
--- a/SmartDeviceLink/SDLMenuManager.m
+++ b/SmartDeviceLink/SDLMenuManager.m
@@ -665,7 +665,7 @@ UInt32 const MenuCellIdMin = 1;
submenuLayout = self.menuConfiguration.defaultSubmenuLayout;
}
- return [[SDLAddSubMenu alloc] initWithId:cell.cellId menuName:cell.title menuLayout:submenuLayout menuIcon:icon position:(UInt8)position];
+ return [[SDLAddSubMenu alloc] initWithMenuID:cell.cellId menuName:cell.title position:@(position) menuIcon:icon menuLayout:submenuLayout parentID:nil];
}
#pragma mark - Calling handlers
diff --git a/SmartDeviceLink/SDLMenuParams.m b/SmartDeviceLink/SDLMenuParams.m
index 0fcfbd60e..85cf5880a 100644
--- a/SmartDeviceLink/SDLMenuParams.m
+++ b/SmartDeviceLink/SDLMenuParams.m
@@ -35,11 +35,11 @@ NS_ASSUME_NONNULL_BEGIN
}
- (void)setParentID:(nullable NSNumber<SDLInt> *)parentID {
- [self.store sdl_setObject:parentID forName:SDLRPCParameterNameParentId];
+ [self.store sdl_setObject:parentID forName:SDLRPCParameterNameParentID];
}
- (nullable NSNumber<SDLInt> *)parentID {
- return [self.store sdl_objectForName:SDLRPCParameterNameParentId ofClass:NSNumber.class error:nil];
+ return [self.store sdl_objectForName:SDLRPCParameterNameParentID ofClass:NSNumber.class error:nil];
}
- (void)setPosition:(nullable NSNumber<SDLInt> *)position {
diff --git a/SmartDeviceLink/SDLNotificationConstants.h b/SmartDeviceLink/SDLNotificationConstants.h
index d99e0724c..ce2b32392 100644
--- a/SmartDeviceLink/SDLNotificationConstants.h
+++ b/SmartDeviceLink/SDLNotificationConstants.h
@@ -315,6 +315,9 @@ extern SDLNotificationName const SDLDidReceiveSubscribeVehicleDataResponse;
/// Name for a SubscribeWaypoints response RPC
extern SDLNotificationName const SDLDidReceiveSubscribeWaypointsResponse;
+/// Name for a SubtleAlert response RPC
+extern SDLNotificationName const SDLDidReceiveSubtleAlertResponse;
+
/// Name for a SyncPData response RPC
extern SDLNotificationName const SDLDidReceiveSyncPDataResponse __deprecated;
@@ -506,9 +509,12 @@ extern SDLNotificationName const SDLDidReceiveSubscribeButtonRequest;
/// Name for a SubscribeVehicleData request RPC
extern SDLNotificationName const SDLDidReceiveSubscribeVehicleDataRequest;
-/// Name for a ubscribeWayPoints request RPC
+/// Name for a SubscribeWayPoints request RPC
extern SDLNotificationName const SDLDidReceiveSubscribeWayPointsRequest;
+/// Name for a SubtleAlert request RPC
+extern SDLNotificationName const SDLDidReceiveSubtleAlertRequest;
+
/// Name for a SyncPData request RPC
extern SDLNotificationName const SDLDidReceiveSyncPDataRequest __deprecated;
@@ -583,6 +589,9 @@ extern SDLNotificationName const SDLDidReceiveVehicleIconNotification;
/// Name for a ChangePermissions notification RPC
extern SDLNotificationName const SDLDidChangePermissionsNotification;
+/// Name for a SubtleAlertPressed notification RPC
+extern SDLNotificationName const SDLDidReceiveSubtleAlertPressedNotification;
+
/// Name for a RemoteControlStatus notification RPC
extern SDLNotificationName const SDLDidReceiveRemoteControlStatusNotification;
@@ -601,12 +610,19 @@ extern SDLNotificationName const SDLDidChangeTurnByTurnStateNotification;
/// Name for a TouchEvent notification RPC
extern SDLNotificationName const SDLDidReceiveTouchEventNotification;
+/// Name for an OnUpdateFile notification RPC
+extern SDLNotificationName const SDLDidReceiveUpdateFileNotification;
+
+/// Name for an OnUpdateSubMenu notification RPC
+extern SDLNotificationName const SDLDidReceiveUpdateSubMenuNotification;
+
/// Name for a VehicleData notification RPC
extern SDLNotificationName const SDLDidReceiveVehicleDataNotification;
/// Name for a Waypoint notification RPC
extern SDLNotificationName const SDLDidReceiveWaypointNotification;
+
/// This class defines methods for getting groups of notifications
@interface SDLNotificationConstants : NSObject
diff --git a/SmartDeviceLink/SDLNotificationConstants.m b/SmartDeviceLink/SDLNotificationConstants.m
index d4cb7c9bc..c0b0577ed 100644
--- a/SmartDeviceLink/SDLNotificationConstants.m
+++ b/SmartDeviceLink/SDLNotificationConstants.m
@@ -84,6 +84,7 @@ SDLNotificationName const SDLDidReceiveSpeakResponse = @"com.sdl.response.Speak"
SDLNotificationName const SDLDidReceiveSubscribeButtonResponse = @"com.sdl.response.SubscribeButton";
SDLNotificationName const SDLDidReceiveSubscribeVehicleDataResponse = @"com.sdl.response.SubscribeVehicleData";
SDLNotificationName const SDLDidReceiveSubscribeWaypointsResponse = @"com.sdl.response.SubscribeWayPoints";
+SDLNotificationName const SDLDidReceiveSubtleAlertResponse = @"com.sdl.response.SubtleAlert";
SDLNotificationName const SDLDidReceiveSyncPDataResponse = @"com.sdl.response.SyncPData";
SDLNotificationName const SDLDidReceiveSystemRequestResponse = @"com.sdl.response.SystemRequest";
SDLNotificationName const SDLDidReceiveUpdateTurnListResponse = @"com.sdl.response.UpdateTurnList";
@@ -149,6 +150,7 @@ SDLNotificationName const SDLDidReceiveSpeakRequest = @"com.sdl.request.Speak";
SDLNotificationName const SDLDidReceiveSubscribeButtonRequest = @"com.sdl.request.SubscribeButton";
SDLNotificationName const SDLDidReceiveSubscribeVehicleDataRequest = @"com.sdl.request.SubscribeVehicleData";
SDLNotificationName const SDLDidReceiveSubscribeWayPointsRequest = @"com.sdl.request.SubscribeWayPoints";
+SDLNotificationName const SDLDidReceiveSubtleAlertRequest = @"com.sdl.request.SubtleAlert";
SDLNotificationName const SDLDidReceiveSyncPDataRequest = @"com.sdl.request.SyncPData";
SDLNotificationName const SDLDidReceiveSystemRequestRequest = @"com.sdl.request.SystemRequest";
SDLNotificationName const SDLDidReceiveUnpublishAppServiceRequest = @"com.sdl.request.UnpublishAppService";
@@ -174,11 +176,14 @@ SDLNotificationName const SDLDidChangeLanguageNotification = @"com.sdl.notificat
SDLNotificationName const SDLDidReceiveNewHashNotification = @"com.sdl.notification.OnHashChange";
SDLNotificationName const SDLDidChangePermissionsNotification = @"com.sdl.notification.OnPermissionsChange";
SDLNotificationName const SDLDidReceiveRemoteControlStatusNotification = @"com.sdl.notification.OnRCStatus";
+SDLNotificationName const SDLDidReceiveSubtleAlertPressedNotification = @"com.sdl.notification.OnSubtleAlertPressed";
SDLNotificationName const SDLDidReceiveSyncPDataNotification = @"com.sdl.notification.OnSyncPData";
SDLNotificationName const SDLDidReceiveSystemCapabilityUpdatedNotification = @"com.sdl.notification.OnSystemCapabilityUpdated";
SDLNotificationName const SDLDidReceiveSystemRequestNotification = @"com.sdl.notification.OnSystemRequest";
SDLNotificationName const SDLDidChangeTurnByTurnStateNotification = @"com.sdl.notification.OnTBTClientState";
SDLNotificationName const SDLDidReceiveTouchEventNotification = @"com.sdl.notification.OnTouchEvent";
+SDLNotificationName const SDLDidReceiveUpdateFileNotification = @"com.sdl.notification.OnUpdateFile";
+SDLNotificationName const SDLDidReceiveUpdateSubMenuNotification = @"com.sdl.notification.OnUpdateSubMenu";
SDLNotificationName const SDLDidReceiveVehicleDataNotification = @"com.sdl.notification.OnVehicleData";
SDLNotificationName const SDLDidReceiveWaypointNotification = @"com.sdl.notification.OnWayPointChange";
@@ -249,6 +254,7 @@ SDLNotificationName const SDLDidReceiveWaypointNotification = @"com.sdl.notifica
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
SDLDidReceiveSyncPDataResponse,
#pragma clang diagnostic pop
+ SDLDidReceiveSubtleAlertResponse,
SDLDidReceiveSystemRequestResponse,
SDLDidReceiveUpdateTurnListResponse,
SDLDidReceiveUnpublishAppServiceResponse,
diff --git a/SmartDeviceLink/SDLOnSubtleAlertPressed.h b/SmartDeviceLink/SDLOnSubtleAlertPressed.h
new file mode 100644
index 000000000..8a924d19b
--- /dev/null
+++ b/SmartDeviceLink/SDLOnSubtleAlertPressed.h
@@ -0,0 +1,46 @@
+/*
+ * Copyright (c) 2020, SmartDeviceLink Consortium, Inc.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following
+ * disclaimer in the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * Neither the name of the SmartDeviceLink Consortium Inc. nor the names of
+ * its contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#import "SDLRPCNotification.h"
+
+NS_ASSUME_NONNULL_BEGIN
+
+/**
+ * Sent when the alert itself is touched (outside of a soft button). Touching (or otherwise selecting) the alert should open the app before sending this notification.
+ *
+ * @since SDL 7.0.0
+ */
+@interface SDLOnSubtleAlertPressed : SDLRPCNotification
+
+@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLOnSubtleAlertPressed.m b/SmartDeviceLink/SDLOnSubtleAlertPressed.m
new file mode 100644
index 000000000..b89d7a38c
--- /dev/null
+++ b/SmartDeviceLink/SDLOnSubtleAlertPressed.m
@@ -0,0 +1,56 @@
+/*
+ * Copyright (c) 2020, SmartDeviceLink Consortium, Inc.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following
+ * disclaimer in the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * Neither the name of the SmartDeviceLink Consortium Inc. nor the names of
+ * its contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#import "SDLOnSubtleAlertPressed.h"
+
+#import "NSMutableDictionary+Store.h"
+#import "SDLRPCFunctionNames.h"
+#import "SDLRPCParameterNames.h"
+
+NS_ASSUME_NONNULL_BEGIN
+
+@implementation SDLOnSubtleAlertPressed
+
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
+- (instancetype)init {
+ self = [super initWithName:SDLRPCFunctionNameOnSubtleAlertPressed];
+ if (!self) {
+ return nil;
+ }
+ return self;
+}
+#pragma clang diagnostic pop
+
+@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLOnUpdateFile.h b/SmartDeviceLink/SDLOnUpdateFile.h
new file mode 100644
index 000000000..95929bd7b
--- /dev/null
+++ b/SmartDeviceLink/SDLOnUpdateFile.h
@@ -0,0 +1,58 @@
+/*
+ * Copyright (c) 2020, SmartDeviceLink Consortium, Inc.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following
+ * disclaimer in the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * Neither the name of the SmartDeviceLink Consortium Inc. nor the names of
+ * its contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#import "SDLRPCNotification.h"
+
+NS_ASSUME_NONNULL_BEGIN
+
+/**
+ * This notification tells an app to upload and update a file with a given name.
+ *
+ * @since SDL 7.0.0
+ */
+@interface SDLOnUpdateFile : SDLRPCNotification
+
+/**
+ * @param fileName - fileName
+ * @return A SDLOnUpdateFile object
+ */
+- (instancetype)initWithFileName:(NSString *)fileName;
+
+/**
+ * File reference name.
+ * {"default_value": null, "max_length": 255, "min_length": 1}
+ */
+@property (strong, nonatomic) NSString *fileName;
+
+@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLOnUpdateFile.m b/SmartDeviceLink/SDLOnUpdateFile.m
new file mode 100644
index 000000000..4ed8843a6
--- /dev/null
+++ b/SmartDeviceLink/SDLOnUpdateFile.m
@@ -0,0 +1,74 @@
+/*
+* Copyright (c) 2020, SmartDeviceLink Consortium, Inc.
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* Redistributions of source code must retain the above copyright notice, this
+* list of conditions and the following disclaimer.
+*
+* Redistributions in binary form must reproduce the above copyright notice,
+* this list of conditions and the following
+* disclaimer in the documentation and/or other materials provided with the
+* distribution.
+*
+* Neither the name of the SmartDeviceLink Consortium Inc. nor the names of
+* its contributors may be used to endorse or promote products derived
+* from this software without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+*/
+
+#import "SDLOnUpdateFile.h"
+
+#import "NSMutableDictionary+Store.h"
+#import "SDLRPCFunctionNames.h"
+#import "SDLRPCParameterNames.h"
+
+NS_ASSUME_NONNULL_BEGIN
+
+@implementation SDLOnUpdateFile
+
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
+- (instancetype)init {
+ self = [super initWithName:SDLRPCFunctionNameOnUpdateFile];
+ if (!self) {
+ return nil;
+ }
+ return self;
+}
+#pragma clang diagnostic pop
+
+- (instancetype)initWithFileName:(NSString *)fileName {
+ self = [self init];
+ if (!self) {
+ return nil;
+ }
+ self.fileName = fileName;
+ return self;
+}
+
+- (void)setFileName:(NSString *)fileName {
+ [self.parameters sdl_setObject:fileName forName:SDLRPCParameterNameFileName];
+}
+
+- (NSString *)fileName {
+ NSError *error = nil;
+ return [self.parameters sdl_objectForName:SDLRPCParameterNameFileName ofClass:NSString.class error:&error];
+}
+
+@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLOnUpdateSubMenu.h b/SmartDeviceLink/SDLOnUpdateSubMenu.h
new file mode 100644
index 000000000..285110cf0
--- /dev/null
+++ b/SmartDeviceLink/SDLOnUpdateSubMenu.h
@@ -0,0 +1,70 @@
+/*
+ * Copyright (c) 2020, SmartDeviceLink Consortium, Inc.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following
+ * disclaimer in the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * Neither the name of the SmartDeviceLink Consortium Inc. nor the names of
+ * its contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#import "SDLRPCNotification.h"
+
+NS_ASSUME_NONNULL_BEGIN
+
+/**
+ * This notification tells an app to update the AddSubMenu or its 'sub' AddCommand and AddSubMenus with the requested data
+ *
+ * @since SDL 7.0
+ */
+@interface SDLOnUpdateSubMenu : SDLRPCNotification
+
+/**
+ * @param menuID - @(menuID)
+ * @return A SDLOnUpdateSubMenu object
+ */
+- (instancetype)initWithMenuID:(UInt32)menuID;
+
+/**
+ * @param menuID - @(menuID)
+ * @param updateSubCells - updateSubCells
+ * @return A SDLOnUpdateSubMenu object
+ */
+- (instancetype)initWithMenuID:(UInt32)menuID updateSubCells:(nullable NSNumber<SDLBool> *)updateSubCells;
+
+/**
+ * This menuID must match a menuID in the current menu structure
+ * {"num_min_value": 0, "num_max_value": 2000000000}
+ */
+@property (strong, nonatomic) NSNumber<SDLUInt> *menuID;
+
+/**
+ * If not set, assume false. If true, the app should send AddCommands with parentIDs matching the menuID. These AddCommands will then be attached to the submenu and displayed if the submenu is selected.
+ */
+@property (nullable, strong, nonatomic) NSNumber<SDLBool> *updateSubCells;
+
+@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLOnUpdateSubMenu.m b/SmartDeviceLink/SDLOnUpdateSubMenu.m
new file mode 100644
index 000000000..55e53773f
--- /dev/null
+++ b/SmartDeviceLink/SDLOnUpdateSubMenu.m
@@ -0,0 +1,91 @@
+/*
+ * Copyright (c) 2020, SmartDeviceLink Consortium, Inc.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following
+ * disclaimer in the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * Neither the name of the SmartDeviceLink Consortium Inc. nor the names of
+ * its contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#import "SDLOnUpdateSubMenu.h"
+
+#import "NSMutableDictionary+Store.h"
+#import "SDLRPCFunctionNames.h"
+#import "SDLRPCParameterNames.h"
+
+NS_ASSUME_NONNULL_BEGIN
+
+@implementation SDLOnUpdateSubMenu
+
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
+- (instancetype)init {
+ self = [super initWithName:SDLRPCFunctionNameOnUpdateSubMenu];
+ if (!self) {
+ return nil;
+ }
+ return self;
+}
+#pragma clang diagnostic pop
+
+- (instancetype)initWithMenuID:(UInt32)menuID {
+ self = [self init];
+ if (!self) {
+ return nil;
+ }
+ self.menuID = @(menuID);
+ return self;
+}
+
+- (instancetype)initWithMenuID:(UInt32)menuID updateSubCells:(nullable NSNumber<SDLBool> *)updateSubCells {
+ self = [self initWithMenuID:menuID];
+ if (!self) {
+ return nil;
+ }
+ self.updateSubCells = updateSubCells;
+ return self;
+}
+
+- (void)setMenuID:(NSNumber<SDLUInt> *)menuID {
+ [self.parameters sdl_setObject:menuID forName:SDLRPCParameterNameMenuID];
+}
+
+- (NSNumber<SDLUInt> *)menuID {
+ NSError *error = nil;
+ return [self.parameters sdl_objectForName:SDLRPCParameterNameMenuID ofClass:NSNumber.class error:&error];
+}
+
+- (void)setUpdateSubCells:(nullable NSNumber<SDLBool> *)updateSubCells {
+ [self.parameters sdl_setObject:updateSubCells forName:SDLRPCParameterNameUpdateSubCells];
+}
+
+- (nullable NSNumber<SDLBool> *)updateSubCells {
+ return [self.parameters sdl_objectForName:SDLRPCParameterNameUpdateSubCells ofClass:NSNumber.class error:nil];
+}
+
+@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLOnVehicleData.h b/SmartDeviceLink/SDLOnVehicleData.h
index 815827cb3..8423141f4 100644
--- a/SmartDeviceLink/SDLOnVehicleData.h
+++ b/SmartDeviceLink/SDLOnVehicleData.h
@@ -18,10 +18,12 @@
@class SDLECallInfo;
@class SDLEmergencyEvent;
@class SDLFuelRange;
+@class SDLGearStatus;
@class SDLGPSData;
@class SDLHeadLampStatus;
@class SDLMyKey;
@class SDLTireStatus;
+@class SDLWindowStatus;
/**
@@ -35,6 +37,50 @@ NS_ASSUME_NONNULL_BEGIN
@interface SDLOnVehicleData : SDLRPCNotification
/**
+ * Initializes an instance of the SDLOnVehicleData class
+ *
+ * @param gps - gps
+ * @param speed - @(speed)
+ * @param rpm - rpm
+ * @param instantFuelConsumption - @(instantFuelConsumption)
+ * @param fuelRange - fuelRange
+ * @param externalTemperature - @(externalTemperature)
+ * @param turnSignal - turnSignal
+ * @param vin - vin
+ * @param gearStatus - gearStatus
+ * @param tirePressure - tirePressure
+ * @param odometer - odometer
+ * @param beltStatus - beltStatus
+ * @param bodyInformation - bodyInformation
+ * @param deviceStatus - deviceStatus
+ * @param driverBraking - driverBraking
+ * @param wiperStatus - wiperStatus
+ * @param headLampStatus - headLampStatus
+ * @param engineTorque - @(engineTorque)
+ * @param accPedalPosition - @(accPedalPosition)
+ * @param steeringWheelAngle - @(steeringWheelAngle)
+ * @param engineOilLife - @(engineOilLife)
+ * @param electronicParkBrakeStatus - electronicParkBrakeStatus
+ * @param cloudAppVehicleID - cloudAppVehicleID
+ * @param eCallInfo - eCallInfo
+ * @param airbagStatus - airbagStatus
+ * @param emergencyEvent - emergencyEvent
+ * @param clusterModeStatus - clusterModeStatus
+ * @param myKey - myKey
+ * @param handsOffSteering - handsOffSteering
+ * @param windowStatus - windowStatus
+ * @return A SDLOnVehicleData object
+ */
+- (instancetype)initWithGps:(nullable SDLGPSData *)gps speed:(float)speed rpm:(nullable NSNumber<SDLUInt> *)rpm instantFuelConsumption:(float)instantFuelConsumption fuelRange:(nullable NSArray<SDLFuelRange *> *)fuelRange externalTemperature:(float)externalTemperature turnSignal:(nullable SDLTurnSignal)turnSignal vin:(nullable NSString *)vin gearStatus:(nullable SDLGearStatus *)gearStatus tirePressure:(nullable SDLTireStatus *)tirePressure odometer:(nullable NSNumber<SDLUInt> *)odometer beltStatus:(nullable SDLBeltStatus *)beltStatus bodyInformation:(nullable SDLBodyInformation *)bodyInformation deviceStatus:(nullable SDLDeviceStatus *)deviceStatus driverBraking:(nullable SDLVehicleDataEventStatus)driverBraking wiperStatus:(nullable SDLWiperStatus)wiperStatus headLampStatus:(nullable SDLHeadLampStatus *)headLampStatus engineTorque:(float)engineTorque accPedalPosition:(float)accPedalPosition steeringWheelAngle:(float)steeringWheelAngle engineOilLife:(float)engineOilLife electronicParkBrakeStatus:(nullable SDLElectronicParkBrakeStatus)electronicParkBrakeStatus cloudAppVehicleID:(nullable NSString *)cloudAppVehicleID eCallInfo:(nullable SDLECallInfo *)eCallInfo airbagStatus:(nullable SDLAirbagStatus *)airbagStatus emergencyEvent:(nullable SDLEmergencyEvent *)emergencyEvent clusterModeStatus:(nullable SDLClusterModeStatus *)clusterModeStatus myKey:(nullable SDLMyKey *)myKey handsOffSteering:(nullable NSNumber<SDLBool> *)handsOffSteering windowStatus:(nullable NSArray<SDLWindowStatus *> *)windowStatus;
+
+/**
+ * See GearStatus
+ *
+ * @since SDL 7.0
+*/
+@property (nullable, strong, nonatomic) SDLGearStatus *gearStatus;
+
+/**
The car current GPS coordinates
*/
@property (nullable, strong, nonatomic) SDLGPSData *gps;
@@ -52,12 +98,12 @@ NS_ASSUME_NONNULL_BEGIN
/**
The fuel level in the tank (percentage)
*/
-@property (nullable, strong, nonatomic) NSNumber<SDLFloat> *fuelLevel;
+@property (strong, nonatomic, nullable) NSNumber<SDLFloat> *fuelLevel __deprecated_msg("use fuelRange.level instead on 7.0+ RPC version connections");
/**
The fuel level state
*/
-@property (nullable, strong, nonatomic) SDLComponentVolumeStatus fuelLevel_State;
+@property (strong, nonatomic, nullable) SDLComponentVolumeStatus fuelLevel_State __deprecated_msg("use fuelRange.levelState instead on 7.0+ RPC version connections");
/**
The estimate range in KM the vehicle can travel based on fuel level and consumption
@@ -82,9 +128,12 @@ NS_ASSUME_NONNULL_BEGIN
@property (nullable, strong, nonatomic) NSString *vin;
/**
- The current gear shift state of the user's vehicle
+ * See PRNDL. This parameter is deprecated and it is now covered in `gearStatus`
+ *
+ * @deprecated
+ * @since SDL 7.0.0
*/
-@property (nullable, strong, nonatomic) SDLPRNDL prndl;
+@property (strong, nonatomic, nullable) SDLPRNDL prndl __deprecated_msg("use gearStatus.actualGear instead on 7.0+ RPC version connections");
/**
The current pressure warnings for the user's vehicle
@@ -117,11 +166,24 @@ NS_ASSUME_NONNULL_BEGIN
@property (nullable, strong, nonatomic) SDLVehicleDataEventStatus driverBraking;
/**
+ * See WindowStatus
+ * {"array_min_size": 0, "array_max_size": 100}
+ *
+ * @since SDL 7.0
+ */
+@property (strong, nonatomic, nullable) NSArray<SDLWindowStatus *> *windowStatus;
+
+/**
The status of the wipers
*/
@property (nullable, strong, nonatomic) SDLWiperStatus wiperStatus;
/**
+ To indicate whether driver hands are off the steering wheel
+ */
+@property (strong, nonatomic, nullable) NSNumber<SDLBool> *handsOffSteering;
+
+/**
Status of the head lamps
*/
@property (nullable, strong, nonatomic) SDLHeadLampStatus *headLampStatus;
@@ -188,7 +250,7 @@ NS_ASSUME_NONNULL_BEGIN
/**
Sets the OEM custom vehicle data state for any given OEM custom vehicle data name.
-
+
@param vehicleDataName The name of the OEM custom vehicle data item.
@param vehicleDataState An object containing the OEM custom vehicle data item.
@@ -198,7 +260,7 @@ NS_ASSUME_NONNULL_BEGIN
/**
Gets the OEM custom vehicle data item for any given OEM custom vehicle data name.
-
+
@param vehicleDataName The name of the OEM custom vehicle data item.
@return An OEM custom vehicle data object for the given vehicle data name.
diff --git a/SmartDeviceLink/SDLOnVehicleData.m b/SmartDeviceLink/SDLOnVehicleData.m
index 7c59dee34..f215173a7 100644
--- a/SmartDeviceLink/SDLOnVehicleData.m
+++ b/SmartDeviceLink/SDLOnVehicleData.m
@@ -12,12 +12,14 @@
#import "SDLECallInfo.h"
#import "SDLEmergencyEvent.h"
#import "SDLFuelRange.h"
+#import "SDLGearStatus.h"
#import "SDLGPSData.h"
#import "SDLHeadLampStatus.h"
#import "SDLMyKey.h"
#import "SDLRPCParameterNames.h"
#import "SDLRPCFunctionNames.h"
#import "SDLTireStatus.h"
+#import "SDLWindowStatus.h"
NS_ASSUME_NONNULL_BEGIN
@@ -26,12 +28,61 @@ NS_ASSUME_NONNULL_BEGIN
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
- (instancetype)init {
- if (self = [super initWithName:SDLRPCFunctionNameOnVehicleData]) {
+ self = [super initWithName:SDLRPCFunctionNameOnVehicleData];
+ if (!self) {
+ return nil;
}
return self;
}
#pragma clang diagnostic pop
+- (instancetype)initWithGps:(nullable SDLGPSData *)gps speed:(float)speed rpm:(nullable NSNumber<SDLUInt> *)rpm instantFuelConsumption:(float)instantFuelConsumption fuelRange:(nullable NSArray<SDLFuelRange *> *)fuelRange externalTemperature:(float)externalTemperature turnSignal:(nullable SDLTurnSignal)turnSignal vin:(nullable NSString *)vin gearStatus:(nullable SDLGearStatus *)gearStatus tirePressure:(nullable SDLTireStatus *)tirePressure odometer:(nullable NSNumber<SDLUInt> *)odometer beltStatus:(nullable SDLBeltStatus *)beltStatus bodyInformation:(nullable SDLBodyInformation *)bodyInformation deviceStatus:(nullable SDLDeviceStatus *)deviceStatus driverBraking:(nullable SDLVehicleDataEventStatus)driverBraking wiperStatus:(nullable SDLWiperStatus)wiperStatus headLampStatus:(nullable SDLHeadLampStatus *)headLampStatus engineTorque:(float)engineTorque accPedalPosition:(float)accPedalPosition steeringWheelAngle:(float)steeringWheelAngle engineOilLife:(float)engineOilLife electronicParkBrakeStatus:(nullable SDLElectronicParkBrakeStatus)electronicParkBrakeStatus cloudAppVehicleID:(nullable NSString *)cloudAppVehicleID eCallInfo:(nullable SDLECallInfo *)eCallInfo airbagStatus:(nullable SDLAirbagStatus *)airbagStatus emergencyEvent:(nullable SDLEmergencyEvent *)emergencyEvent clusterModeStatus:(nullable SDLClusterModeStatus *)clusterModeStatus myKey:(nullable SDLMyKey *)myKey handsOffSteering:(nullable NSNumber<SDLBool> *)handsOffSteering windowStatus:(nullable NSArray<SDLWindowStatus *> *)windowStatus {
+ self = [self init];
+ if (!self) {
+ return nil;
+ }
+ self.gps = gps;
+ self.speed = @(speed);
+ self.rpm = rpm;
+ self.instantFuelConsumption = @(instantFuelConsumption);
+ self.fuelRange = fuelRange;
+ self.externalTemperature = @(externalTemperature);
+ self.turnSignal = turnSignal;
+ self.vin = vin;
+ self.gearStatus = gearStatus;
+ self.tirePressure = tirePressure;
+ self.odometer = odometer;
+ self.beltStatus = beltStatus;
+ self.bodyInformation = bodyInformation;
+ self.deviceStatus = deviceStatus;
+ self.driverBraking = driverBraking;
+ self.wiperStatus = wiperStatus;
+ self.headLampStatus = headLampStatus;
+ self.engineTorque = @(engineTorque);
+ self.accPedalPosition = @(accPedalPosition);
+ self.steeringWheelAngle = @(steeringWheelAngle);
+ self.engineOilLife = @(engineOilLife);
+ self.electronicParkBrakeStatus = electronicParkBrakeStatus;
+ self.cloudAppVehicleID = cloudAppVehicleID;
+ self.eCallInfo = eCallInfo;
+ self.airbagStatus = airbagStatus;
+ self.emergencyEvent = emergencyEvent;
+ self.clusterModeStatus = clusterModeStatus;
+ self.myKey = myKey;
+ self.handsOffSteering = handsOffSteering;
+ self.windowStatus = windowStatus;
+ return self;
+}
+
+- (void)setGearStatus:(nullable SDLGearStatus *)gearStatus {
+ [self.parameters sdl_setObject:gearStatus forName:SDLRPCParameterNameGearStatus];
+}
+
+- (nullable SDLGearStatus *)gearStatus {
+ NSError *error = nil;
+ return [self.parameters sdl_objectForName:SDLRPCParameterNameGearStatus ofClass:SDLGearStatus.class error:&error];
+}
+
- (void)setGps:(nullable SDLGPSData *)gps {
[self.parameters sdl_setObject:gps forName:SDLRPCParameterNameGPS];
}
@@ -168,6 +219,15 @@ NS_ASSUME_NONNULL_BEGIN
return [self.parameters sdl_enumForName:SDLRPCParameterNameWiperStatus error:nil];
}
+- (void)setHandsOffSteering:(nullable NSNumber<SDLBool> *)handsOffSteering {
+ [self.parameters sdl_setObject:handsOffSteering forName:SDLRPCParameterNameHandsOffSteering];
+}
+
+- (nullable NSNumber<SDLBool> *)handsOffSteering {
+ NSError *error = nil;
+ return [self.parameters sdl_objectForName:SDLRPCParameterNameHandsOffSteering ofClass:NSNumber.class error:&error];
+}
+
- (void)setHeadLampStatus:(nullable SDLHeadLampStatus *)headLampStatus {
[self.parameters sdl_setObject:headLampStatus forName:SDLRPCParameterNameHeadLampStatus];
}
@@ -272,6 +332,14 @@ NS_ASSUME_NONNULL_BEGIN
return [self.parameters sdl_objectForName:SDLRPCParameterNameCloudAppVehicleID ofClass:NSString.class error:nil];
}
+- (void)setWindowStatus:(nullable NSArray<SDLWindowStatus *> *)windowStatus {
+ [self.parameters sdl_setObject:windowStatus forName:SDLRPCParameterNameWindowStatus];
+}
+
+- (nullable NSArray<SDLWindowStatus *> *)windowStatus {
+ return [self.parameters sdl_objectsForName:SDLRPCParameterNameWindowStatus ofClass:SDLWindowStatus.class error:nil];
+}
+
- (void)setOEMCustomVehicleData:(NSString *)vehicleDataName withVehicleDataState:(NSObject *)vehicleDataState {
[self.parameters sdl_setObject:vehicleDataState forName:vehicleDataName];
}
diff --git a/SmartDeviceLink/SDLPRNDL.h b/SmartDeviceLink/SDLPRNDL.h
index db9c6e385..4ab8032a3 100644
--- a/SmartDeviceLink/SDLPRNDL.h
+++ b/SmartDeviceLink/SDLPRNDL.h
@@ -47,11 +47,23 @@ extern SDLPRNDL const SDLPRNDLLowGear;
extern SDLPRNDL const SDLPRNDLFirst;
/**
+ * Ninth gear
+ * @since SDL 7.0
+*/
+extern SDLPRNDL const SDLPRNDLNinth;
+
+/**
* Second gear
*/
extern SDLPRNDL const SDLPRNDLSecond;
/**
+ * Tenth gear
+ * @since SDL 7.0
+*/
+extern SDLPRNDL const SDLPRNDLTenth;
+
+/**
* Third gear
*/
extern SDLPRNDL const SDLPRNDLThird;
diff --git a/SmartDeviceLink/SDLPRNDL.m b/SmartDeviceLink/SDLPRNDL.m
index 77eed8336..b94437065 100644
--- a/SmartDeviceLink/SDLPRNDL.m
+++ b/SmartDeviceLink/SDLPRNDL.m
@@ -11,7 +11,9 @@ SDLPRNDL const SDLPRNDLDrive = @"DRIVE";
SDLPRNDL const SDLPRNDLSport = @"SPORT";
SDLPRNDL const SDLPRNDLLowGear = @"LOWGEAR";
SDLPRNDL const SDLPRNDLFirst = @"FIRST";
+SDLPRNDL const SDLPRNDLNinth = @"NINTH";
SDLPRNDL const SDLPRNDLSecond = @"SECOND";
+SDLPRNDL const SDLPRNDLTenth = @"TENTH";
SDLPRNDL const SDLPRNDLThird = @"THIRD";
SDLPRNDL const SDLPRNDLFourth = @"FOURTH";
SDLPRNDL const SDLPRNDLFifth = @"FIFTH";
diff --git a/SmartDeviceLink/SDLRPCFunctionNames.h b/SmartDeviceLink/SDLRPCFunctionNames.h
index fce4b61f7..180b69ad8 100644
--- a/SmartDeviceLink/SDLRPCFunctionNames.h
+++ b/SmartDeviceLink/SDLRPCFunctionNames.h
@@ -145,6 +145,9 @@ extern SDLRPCFunctionName const SDLRPCFunctionNameOnPermissionsChange;
/// Function name for an OnRCStatus notification RPC
extern SDLRPCFunctionName const SDLRPCFunctionNameOnRCStatus;
+/// Function name for an SubtleAlertPressed notification RPC
+extern SDLRPCFunctionName const SDLRPCFunctionNameOnSubtleAlertPressed;
+
/// Function name for an OnSyncPData notification RPC
extern SDLRPCFunctionName const SDLRPCFunctionNameOnSyncPData __deprecated;
@@ -160,6 +163,12 @@ extern SDLRPCFunctionName const SDLRPCFunctionNameOnTBTClientState;
/// Function name for an OnTouchEvent notification RPC
extern SDLRPCFunctionName const SDLRPCFunctionNameOnTouchEvent;
+/// Function name for an OnUpdateFile notification RPC
+extern SDLRPCFunctionName const SDLRPCFunctionNameOnUpdateFile;
+
+/// Function name for an OnUpdateSubMenu notification RPC
+extern SDLRPCFunctionName const SDLRPCFunctionNameOnUpdateSubMenu;
+
/// Function name for an OnVehicleData notification RPC
extern SDLRPCFunctionName const SDLRPCFunctionNameOnVehicleData;
@@ -247,6 +256,9 @@ extern SDLRPCFunctionName const SDLRPCFunctionNameSubscribeVehicleData;
/// Function name for a SubscribeWayPoints RPC
extern SDLRPCFunctionName const SDLRPCFunctionNameSubscribeWayPoints;
+/// Function name for a SubtleAlert RPC
+extern SDLRPCFunctionName const SDLRPCFunctionNameSubtleAlert;
+
/// Function name for a SyncPData RPC
extern SDLRPCFunctionName const SDLRPCFunctionNameSyncPData __deprecated;
diff --git a/SmartDeviceLink/SDLRPCFunctionNames.m b/SmartDeviceLink/SDLRPCFunctionNames.m
index 744922420..a0a0c4754 100644
--- a/SmartDeviceLink/SDLRPCFunctionNames.m
+++ b/SmartDeviceLink/SDLRPCFunctionNames.m
@@ -52,11 +52,14 @@ SDLRPCFunctionName const SDLRPCFunctionNameOnLanguageChange = @"OnLanguageChange
SDLRPCFunctionName const SDLRPCFunctionNameOnLockScreenStatus = @"OnLockScreenStatus";
SDLRPCFunctionName const SDLRPCFunctionNameOnPermissionsChange = @"OnPermissionsChange";
SDLRPCFunctionName const SDLRPCFunctionNameOnRCStatus = @"OnRCStatus";
+SDLRPCFunctionName const SDLRPCFunctionNameOnSubtleAlertPressed = @"OnSubtleAlertPressed";
SDLRPCFunctionName const SDLRPCFunctionNameOnSyncPData = @"OnSyncPData";
SDLRPCFunctionName const SDLRPCFunctionNameOnSystemCapabilityUpdated = @"OnSystemCapabilityUpdated";
SDLRPCFunctionName const SDLRPCFunctionNameOnSystemRequest = @"OnSystemRequest";
SDLRPCFunctionName const SDLRPCFunctionNameOnTBTClientState = @"OnTBTClientState";
SDLRPCFunctionName const SDLRPCFunctionNameOnTouchEvent = @"OnTouchEvent";
+SDLRPCFunctionName const SDLRPCFunctionNameOnUpdateFile = @"OnUpdateFile";
+SDLRPCFunctionName const SDLRPCFunctionNameOnUpdateSubMenu = @"OnUpdateSubMenu";
SDLRPCFunctionName const SDLRPCFunctionNameOnVehicleData = @"OnVehicleData";
SDLRPCFunctionName const SDLRPCFunctionNameOnWayPointChange = @"OnWayPointChange";
SDLRPCFunctionName const SDLRPCFunctionNamePerformAppServiceInteraction = @"PerformAppServiceInteraction";
@@ -86,6 +89,7 @@ SDLRPCFunctionName const SDLRPCFunctionNameSpeak = @"Speak";
SDLRPCFunctionName const SDLRPCFunctionNameSubscribeButton = @"SubscribeButton";
SDLRPCFunctionName const SDLRPCFunctionNameSubscribeVehicleData = @"SubscribeVehicleData";
SDLRPCFunctionName const SDLRPCFunctionNameSubscribeWayPoints = @"SubscribeWayPoints";
+SDLRPCFunctionName const SDLRPCFunctionNameSubtleAlert = @"SubtleAlert";
SDLRPCFunctionName const SDLRPCFunctionNameSyncPData = @"SyncPData";
SDLRPCFunctionName const SDLRPCFunctionNameSystemRequest = @"SystemRequest";
SDLRPCFunctionName const SDLRPCFunctionNameUnpublishAppService = @"UnpublishAppService";
diff --git a/SmartDeviceLink/SDLRPCParameterNames.h b/SmartDeviceLink/SDLRPCParameterNames.h
index e6541968a..a782281b1 100644
--- a/SmartDeviceLink/SDLRPCParameterNames.h
+++ b/SmartDeviceLink/SDLRPCParameterNames.h
@@ -1,5 +1,35 @@
+/*
+ * Copyright (c) 2020, SmartDeviceLink Consortium, Inc.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following
+ * disclaimer in the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * Neither the name of the SmartDeviceLink Consortium Inc. nor the names of
+ * its contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
// SDLRPCParameterNames.h
-//
#import <Foundation/Foundation.h>
#import "SDLMacros.h"
@@ -16,6 +46,7 @@ extern SDLRPCParameterName const SDLRPCParameterNameAccelerationPedalPosition;
extern SDLRPCParameterName const SDLRPCParameterNameAcceptsWayPoints;
extern SDLRPCParameterName const SDLRPCParameterNameAction;
extern SDLRPCParameterName const SDLRPCParameterNameActual;
+extern SDLRPCParameterName const SDLRPCParameterNameActualGear;
extern SDLRPCParameterName const SDLRPCParameterNameAddress;
extern SDLRPCParameterName const SDLRPCParameterNameAddressLines;
extern SDLRPCParameterName const SDLRPCParameterNameAdministrativeArea;
@@ -37,6 +68,7 @@ extern SDLRPCParameterName const SDLRPCParameterNameAmbientLightStatus;
extern SDLRPCParameterName const SDLRPCParameterNameApparentTemperature;
extern SDLRPCParameterName const SDLRPCParameterNameApparentTemperatureHigh;
extern SDLRPCParameterName const SDLRPCParameterNameApparentTemperatureLow;
+extern SDLRPCParameterName const SDLRPCParameterNameApproximatePosition;
extern SDLRPCParameterName const SDLRPCParameterNameAppBundleId;
extern SDLRPCParameterName const SDLRPCParameterNameAppDisplayName;
extern SDLRPCParameterName const SDLRPCParameterNameAppHMIType;
@@ -87,6 +119,8 @@ extern SDLRPCParameterName const SDLRPCParameterNameButtonEventMode;
extern SDLRPCParameterName const SDLRPCParameterNameButtonName;
extern SDLRPCParameterName const SDLRPCParameterNameButtonPressMode;
extern SDLRPCParameterName const SDLRPCParameterNameCancelID;
+extern SDLRPCParameterName const SDLRPCParameterNameCapacity;
+extern SDLRPCParameterName const SDLRPCParameterNameCapacityUnit;
extern SDLRPCParameterName const SDLRPCParameterNameColor;
extern SDLRPCParameterName const SDLRPCParameterNameCol;
extern SDLRPCParameterName const SDLRPCParameterNameColSpan;
@@ -144,6 +178,7 @@ extern SDLRPCParameterName const SDLRPCParameterNameDesiredTemperatureAvailable;
extern SDLRPCParameterName const SDLRPCParameterNameDestination;
extern SDLRPCParameterName const SDLRPCParameterNameDestinationETA;
extern SDLRPCParameterName const SDLRPCParameterNameDetails;
+extern SDLRPCParameterName const SDLRPCParameterNameDeviation;
extern SDLRPCParameterName const SDLRPCParameterNameDeviceInfo;
extern SDLRPCParameterName const SDLRPCParameterNameDeviceStatus;
extern SDLRPCParameterName const SDLRPCParameterNameDiagonalScreenSize;
@@ -169,6 +204,8 @@ extern SDLRPCParameterName const SDLRPCParameterNameDriverBeltDeployed;
extern SDLRPCParameterName const SDLRPCParameterNameDriverBraking;
extern SDLRPCParameterName const SDLRPCParameterNameDriverBuckleBelted;
extern SDLRPCParameterName const SDLRPCParameterNameDriverCurtainAirbagDeployed;
+extern SDLRPCParameterName const SDLRPCParameterNameDriverDistraction;
+extern SDLRPCParameterName const SDLRPCParameterNameDriverDistractionCapability;
extern SDLRPCParameterName const SDLRPCParameterNameDriverDistractionStatus;
extern SDLRPCParameterName const SDLRPCParameterNameDriverDoorAjar;
extern SDLRPCParameterName const SDLRPCParameterNameDriverKneeAirbagDeployed;
@@ -180,6 +217,7 @@ extern SDLRPCParameterName const SDLRPCParameterNameDualModeEnable;
extern SDLRPCParameterName const SDLRPCParameterNameDualModeEnableAvailable;
extern SDLRPCParameterName const SDLRPCParameterNameDuration;
extern SDLRPCParameterName const SDLRPCParameterNameDuplicateUpdatesFromWindowID;
+extern SDLRPCParameterName const SDLRPCParameterNameDynamicUpdateCapabilities;
extern SDLRPCParameterName const SDLRPCParameterNameE911Override;
extern SDLRPCParameterName const SDLRPCParameterNameECallConfirmationStatus;
extern SDLRPCParameterName const SDLRPCParameterNameECallEventActive;
@@ -205,7 +243,7 @@ extern SDLRPCParameterName const SDLRPCParameterNameExternalTemperature;
extern SDLRPCParameterName const SDLRPCParameterNameFanSpeed;
extern SDLRPCParameterName const SDLRPCParameterNameFanSpeedAvailable;
extern SDLRPCParameterName const SDLRPCParameterNameFCCFacilityId;
-extern SDLRPCParameterName const SDLRPCParameterNameFilename;
+extern SDLRPCParameterName const SDLRPCParameterNameFileName;
extern SDLRPCParameterName const SDLRPCParameterNameFilenames;
extern SDLRPCParameterName const SDLRPCParameterNameFileType;
extern SDLRPCParameterName const SDLRPCParameterNameFirmness;
@@ -224,11 +262,13 @@ extern SDLRPCParameterName const SDLRPCParameterNameFullAppID;
extern SDLRPCParameterName const SDLRPCParameterNameFunctionID;
extern SDLRPCParameterName const SDLRPCParameterNameGetWayPointsEnabled;
extern SDLRPCParameterName const SDLRPCParameterNameGPS;
+extern SDLRPCParameterName const SDLRPCParameterNameGearStatus;
extern SDLRPCParameterName const SDLRPCParameterNameGraphic;
extern SDLRPCParameterName const SDLRPCParameterNameGraphicSupported;
extern SDLRPCParameterName const SDLRPCParameterNameGreen;
extern SDLRPCParameterName const SDLRPCParameterNameGrid;
extern SDLRPCParameterName const SDLRPCParameterNameHandledRPCs;
+extern SDLRPCParameterName const SDLRPCParameterNameHandsOffSteering;
extern SDLRPCParameterName const SDLRPCParameterNameHapticRectData;
extern SDLRPCParameterName const SDLRPCParameterNameHapticSpatialDataSupported;
extern SDLRPCParameterName const SDLRPCParameterNameHardware;
@@ -321,6 +361,7 @@ extern SDLRPCParameterName const SDLRPCParameterNameLength;
extern SDLRPCParameterName const SDLRPCParameterNameLevel;
extern SDLRPCParameterName const SDLRPCParameterNameLevels;
extern SDLRPCParameterName const SDLRPCParameterNameLevelSpan;
+extern SDLRPCParameterName const SDLRPCParameterNameLevelState;
extern SDLRPCParameterName const SDLRPCParameterNameLightControlCapabilities;
extern SDLRPCParameterName const SDLRPCParameterNameLightControlData;
extern SDLRPCParameterName const SDLRPCParameterNameLightState;
@@ -356,7 +397,6 @@ extern SDLRPCParameterName const SDLRPCParameterNameMassageEnabled;
extern SDLRPCParameterName const SDLRPCParameterNameMassageEnabledAvailable;
extern SDLRPCParameterName const SDLRPCParameterNameMassageMode;
extern SDLRPCParameterName const SDLRPCParameterNameMassageModeAvailable;
-extern SDLRPCParameterName const SDLRPCParameterNameMemoryAvailable;
extern SDLRPCParameterName const SDLRPCParameterNameMassageZone;
extern SDLRPCParameterName const SDLRPCParameterNameMaxBitrate;
extern SDLRPCParameterName const SDLRPCParameterNameMaxDuration;
@@ -377,10 +417,12 @@ extern SDLRPCParameterName const SDLRPCParameterNameMediaTrack;
extern SDLRPCParameterName const SDLRPCParameterNameMediaImage;
extern SDLRPCParameterName const SDLRPCParameterNameMediaType;
extern SDLRPCParameterName const SDLRPCParameterNameMemory;
+extern SDLRPCParameterName const SDLRPCParameterNameMemoryAvailable;
extern SDLRPCParameterName const SDLRPCParameterNameMenuIcon;
-extern SDLRPCParameterName const SDLRPCParameterNameMenuId;
+extern SDLRPCParameterName const SDLRPCParameterNameMenuID;
extern SDLRPCParameterName const SDLRPCParameterNameMenuLayout;
extern SDLRPCParameterName const SDLRPCParameterNameMenuLayoutsAvailable;
+extern SDLRPCParameterName const SDLRPCParameterNameMenuLength;
extern SDLRPCParameterName const SDLRPCParameterNameMenuName;
extern SDLRPCParameterName const SDLRPCParameterNameMenuParams;
extern SDLRPCParameterName const SDLRPCParameterNameMenuTitle;
@@ -445,7 +487,7 @@ extern SDLRPCParameterName const SDLRPCParameterNameOS;
extern SDLRPCParameterName const SDLRPCParameterNameOSVersion;
extern SDLRPCParameterName const SDLRPCParameterNameParameterPermissions;
extern SDLRPCParameterName const SDLRPCParameterNameParameters;
-extern SDLRPCParameterName const SDLRPCParameterNameParentId;
+extern SDLRPCParameterName const SDLRPCParameterNameParentID;
extern SDLRPCParameterName const SDLRPCParameterNameParkBrakeActive;
extern SDLRPCParameterName const SDLRPCParameterNamePassengerAirbagDeployed;
extern SDLRPCParameterName const SDLRPCParameterNamePassengerBeltDeployed;
@@ -608,11 +650,14 @@ extern SDLRPCParameterName const SDLRPCParameterNameSteeringWheelAngle;
extern SDLRPCParameterName const SDLRPCParameterNameStereoAudioOutputMuted;
extern SDLRPCParameterName const SDLRPCParameterNameSubAdministrativeArea;
extern SDLRPCParameterName const SDLRPCParameterNameSubLocality;
+extern SDLRPCParameterName const SDLRPCParameterNameSubMenuDepth;
extern SDLRPCParameterName const SDLRPCParameterNameSubscribe;
extern SDLRPCParameterName const SDLRPCParameterNameSubThoroughfare;
extern SDLRPCParameterName const SDLRPCParameterNameSuccess;
extern SDLRPCParameterName const SDLRPCParameterNameSummary;
extern SDLRPCParameterName const SDLRPCParameterNameSupportedDiagnosticModes;
+extern SDLRPCParameterName const SDLRPCParameterNameSupportedDynamicImageFieldNames;
+extern SDLRPCParameterName const SDLRPCParameterNameSupportsDynamicSubMenus;
extern SDLRPCParameterName const SDLRPCParameterNameSupportedFormats;
extern SDLRPCParameterName const SDLRPCParameterNameSupportedLights;
extern SDLRPCParameterName const SDLRPCParameterNameSyncFileName;
@@ -657,6 +702,7 @@ extern SDLRPCParameterName const SDLRPCParameterNameTotalDistance;
extern SDLRPCParameterName const SDLRPCParameterNameTouchEventAvailable;
extern SDLRPCParameterName const SDLRPCParameterNameTPMS;
extern SDLRPCParameterName const SDLRPCParameterNameTrafficProgramIdentification;
+extern SDLRPCParameterName const SDLRPCParameterNameTransmissionType;
extern SDLRPCParameterName const SDLRPCParameterNameTriggerSource;
extern SDLRPCParameterName const SDLRPCParameterNameTrim;
extern SDLRPCParameterName const SDLRPCParameterNameTryAgainTime;
@@ -671,12 +717,14 @@ extern SDLRPCParameterName const SDLRPCParameterNameUnsubscribe;
extern SDLRPCParameterName const SDLRPCParameterNameUpdatedAppServiceRecord;
extern SDLRPCParameterName const SDLRPCParameterNameUpdateMode;
extern SDLRPCParameterName const SDLRPCParameterNameUpdateReason;
+extern SDLRPCParameterName const SDLRPCParameterNameUpdateSubCells;
extern SDLRPCParameterName const SDLRPCParameterNameUpDownAvailable;
extern SDLRPCParameterName const SDLRPCParameterNameURL;
extern SDLRPCParameterName const SDLRPCParameterNameURLUppercase;
extern SDLRPCParameterName const SDLRPCParameterNameUserDisallowed;
extern SDLRPCParameterName const SDLRPCParameterNameUserLocation;
extern SDLRPCParameterName const SDLRPCParameterNameUserSelected;
+extern SDLRPCParameterName const SDLRPCParameterNameUserSelectedGear;
extern SDLRPCParameterName const SDLRPCParameterNameUTCDay;
extern SDLRPCParameterName const SDLRPCParameterNameUTCHours;
extern SDLRPCParameterName const SDLRPCParameterNameUTCMinutes;
@@ -720,6 +768,7 @@ extern SDLRPCParameterName const SDLRPCParameterNameWiperStatus;
extern SDLRPCParameterName const SDLRPCParameterNameWindowCapabilities;
extern SDLRPCParameterName const SDLRPCParameterNameWindowId;
extern SDLRPCParameterName const SDLRPCParameterNameWindowName;
+extern SDLRPCParameterName const SDLRPCParameterNameWindowStatus;
extern SDLRPCParameterName const SDLRPCParameterNameWindowTypeSupported;
extern SDLRPCParameterName const SDLRPCParameterNameX;
extern SDLRPCParameterName const SDLRPCParameterNameY;
diff --git a/SmartDeviceLink/SDLRPCParameterNames.m b/SmartDeviceLink/SDLRPCParameterNames.m
index 85a88b1d4..b705b8f1a 100644
--- a/SmartDeviceLink/SDLRPCParameterNames.m
+++ b/SmartDeviceLink/SDLRPCParameterNames.m
@@ -1,5 +1,35 @@
+/*
+ * Copyright (c) 2020, SmartDeviceLink Consortium, Inc.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following
+ * disclaimer in the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * Neither the name of the SmartDeviceLink Consortium Inc. nor the names of
+ * its contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
// SDLRPCParameterNames.h
-//
#import "NSMutableDictionary+Store.h"
#import "SDLRPCParameterNames.h"
@@ -14,6 +44,7 @@ SDLRPCParameterName const SDLRPCParameterNameAccelerationPedalPosition = @"accPe
SDLRPCParameterName const SDLRPCParameterNameAcceptsWayPoints = @"acceptsWayPoints";
SDLRPCParameterName const SDLRPCParameterNameAction = @"action";
SDLRPCParameterName const SDLRPCParameterNameActual = @"actual";
+SDLRPCParameterName const SDLRPCParameterNameActualGear = @"actualGear";
SDLRPCParameterName const SDLRPCParameterNameAddress = @"address";
SDLRPCParameterName const SDLRPCParameterNameAddressLines = @"addressLines";
SDLRPCParameterName const SDLRPCParameterNameAdministrativeArea = @"administrativeArea";
@@ -35,6 +66,7 @@ SDLRPCParameterName const SDLRPCParameterNameAmbientLightStatus = @"ambientLight
SDLRPCParameterName const SDLRPCParameterNameApparentTemperature = @"apparentTemperature";
SDLRPCParameterName const SDLRPCParameterNameApparentTemperatureHigh = @"apparentTemperatureHigh";
SDLRPCParameterName const SDLRPCParameterNameApparentTemperatureLow = @"apparentTemperatureLow";
+SDLRPCParameterName const SDLRPCParameterNameApproximatePosition = @"approximatePosition";
SDLRPCParameterName const SDLRPCParameterNameAppBundleId = @"appBundleID";
SDLRPCParameterName const SDLRPCParameterNameAppHMIType = @"appHMIType";
SDLRPCParameterName const SDLRPCParameterNameAppId = @"appID";
@@ -85,6 +117,8 @@ SDLRPCParameterName const SDLRPCParameterNameButtonEventMode = @"buttonEventMode
SDLRPCParameterName const SDLRPCParameterNameButtonName = @"buttonName";
SDLRPCParameterName const SDLRPCParameterNameButtonPressMode = @"buttonPressMode";
SDLRPCParameterName const SDLRPCParameterNameCancelID = @"cancelID";
+SDLRPCParameterName const SDLRPCParameterNameCapacity = @"capacity";
+SDLRPCParameterName const SDLRPCParameterNameCapacityUnit = @"capacityUnit";
SDLRPCParameterName const SDLRPCParameterNameCoolingEnabled = @"coolingEnabled";
SDLRPCParameterName const SDLRPCParameterNameCoolingEnabledAvailable = @"coolingEnabledAvailable";
SDLRPCParameterName const SDLRPCParameterNameCoolingLevel = @"coolingLevel";
@@ -143,6 +177,7 @@ SDLRPCParameterName const SDLRPCParameterNameDestinationETA = @"destinationETA";
SDLRPCParameterName const SDLRPCParameterNameDeviceInfo = @"deviceInfo";
SDLRPCParameterName const SDLRPCParameterNameDeviceStatus = @"deviceStatus";
SDLRPCParameterName const SDLRPCParameterNameDetails = @"details";
+SDLRPCParameterName const SDLRPCParameterNameDeviation = @"deviation";
SDLRPCParameterName const SDLRPCParameterNameDiagonalScreenSize = @"diagonalScreenSize";
SDLRPCParameterName const SDLRPCParameterNameDialNumberEnabled = @"dialNumberEnabled";
SDLRPCParameterName const SDLRPCParameterNameDIDLocation = @"didLocation";
@@ -153,6 +188,7 @@ SDLRPCParameterName const SDLRPCParameterNameDisplayCapabilities = @"displayCapa
SDLRPCParameterName const SDLRPCParameterNameDisplayLayout = @"displayLayout";
SDLRPCParameterName const SDLRPCParameterNameDisplayMode = @"displayMode";
SDLRPCParameterName const SDLRPCParameterNameDisplayModeUnitAvailable = @"displayModeUnitAvailable";
+SDLRPCParameterName const SDLRPCParameterNameDisplayName = @"displayName";
SDLRPCParameterName const SDLRPCParameterNameDisplayType = @"displayType";
SDLRPCParameterName const SDLRPCParameterNameDistanceToEmpty = @"distanceToEmpty";
SDLRPCParameterName const SDLRPCParameterNameDistanceToManeuver = @"distanceToManeuver";
@@ -165,6 +201,8 @@ SDLRPCParameterName const SDLRPCParameterNameDriverBeltDeployed = @"driverBeltDe
SDLRPCParameterName const SDLRPCParameterNameDriverBraking = @"driverBraking";
SDLRPCParameterName const SDLRPCParameterNameDriverBuckleBelted = @"driverBuckleBelted";
SDLRPCParameterName const SDLRPCParameterNameDriverCurtainAirbagDeployed = @"driverCurtainAirbagDeployed";
+SDLRPCParameterName const SDLRPCParameterNameDriverDistraction = @"driverDistraction";
+SDLRPCParameterName const SDLRPCParameterNameDriverDistractionCapability = @"driverDistractionCapability";
SDLRPCParameterName const SDLRPCParameterNameDriverDistractionStatus = @"driverDistractionStatus";
SDLRPCParameterName const SDLRPCParameterNameDriverDoorAjar = @"driverDoorAjar";
SDLRPCParameterName const SDLRPCParameterNameDriverKneeAirbagDeployed = @"driverKneeAirbagDeployed";
@@ -176,6 +214,7 @@ SDLRPCParameterName const SDLRPCParameterNameDualModeEnable = @"dualModeEnable";
SDLRPCParameterName const SDLRPCParameterNameDualModeEnableAvailable = @"dualModeEnableAvailable";
SDLRPCParameterName const SDLRPCParameterNameDuration = @"duration";
SDLRPCParameterName const SDLRPCParameterNameDuplicateUpdatesFromWindowID = @"duplicateUpdatesFromWindowID";
+SDLRPCParameterName const SDLRPCParameterNameDynamicUpdateCapabilities = @"dynamicUpdateCapabilities";
SDLRPCParameterName const SDLRPCParameterNameE911Override = @"e911Override";
SDLRPCParameterName const SDLRPCParameterNameECallConfirmationStatus = @"eCallConfirmationStatus";
SDLRPCParameterName const SDLRPCParameterNameECallEventActive = @"eCallEventActive";
@@ -201,7 +240,7 @@ SDLRPCParameterName const SDLRPCParameterNameExternalTemperature = @"externalTem
SDLRPCParameterName const SDLRPCParameterNameFanSpeed = @"fanSpeed";
SDLRPCParameterName const SDLRPCParameterNameFanSpeedAvailable = @"fanSpeedAvailable";
SDLRPCParameterName const SDLRPCParameterNameFCCFacilityId = @"fccFacilityId";
-SDLRPCParameterName const SDLRPCParameterNameFilename = @"fileName";
+SDLRPCParameterName const SDLRPCParameterNameFileName = @"fileName";
SDLRPCParameterName const SDLRPCParameterNameFilenames = @"filenames";
SDLRPCParameterName const SDLRPCParameterNameFileType = @"fileType";
SDLRPCParameterName const SDLRPCParameterNameFirmness = @"firmness";
@@ -218,6 +257,7 @@ SDLRPCParameterName const SDLRPCParameterNameFuelMaintenanceMode = @"fuelMainten
SDLRPCParameterName const SDLRPCParameterNameFuelRange = @"fuelRange";
SDLRPCParameterName const SDLRPCParameterNameFunctionID = @"functionID";
SDLRPCParameterName const SDLRPCParameterNameFullAppID = @"fullAppID";
+SDLRPCParameterName const SDLRPCParameterNameGearStatus = @"gearStatus";
SDLRPCParameterName const SDLRPCParameterNameGetWayPointsEnabled = @"getWayPointsEnabled";
SDLRPCParameterName const SDLRPCParameterNameGPS = @"gps";
SDLRPCParameterName const SDLRPCParameterNameGraphic = @"graphic";
@@ -225,6 +265,7 @@ SDLRPCParameterName const SDLRPCParameterNameGraphicSupported = @"graphicSupport
SDLRPCParameterName const SDLRPCParameterNameGreen = @"green";
SDLRPCParameterName const SDLRPCParameterNameGrid = @"grid";
SDLRPCParameterName const SDLRPCParameterNameHandledRPCs = @"handledRPCs";
+SDLRPCParameterName const SDLRPCParameterNameHandsOffSteering = @"handsOffSteering";
SDLRPCParameterName const SDLRPCParameterNameHapticRectData = @"hapticRectData";
SDLRPCParameterName const SDLRPCParameterNameHapticSpatialDataSupported = @"hapticSpatialDataSupported";
SDLRPCParameterName const SDLRPCParameterNameHardware = @"hardware";
@@ -318,6 +359,7 @@ SDLRPCParameterName const SDLRPCParameterNameLength = @"length";
SDLRPCParameterName const SDLRPCParameterNameLevel = @"level";
SDLRPCParameterName const SDLRPCParameterNameLevels = @"levels";
SDLRPCParameterName const SDLRPCParameterNameLevelSpan = @"levelspan";
+SDLRPCParameterName const SDLRPCParameterNameLevelState = @"levelState";
SDLRPCParameterName const SDLRPCParameterNameLightControlCapabilities = @"lightControlCapabilities";
SDLRPCParameterName const SDLRPCParameterNameLightControlData = @"lightControlData";
SDLRPCParameterName const SDLRPCParameterNameLightState = @"lightState";
@@ -371,9 +413,10 @@ SDLRPCParameterName const SDLRPCParameterNameMediaType = @"mediaType";
SDLRPCParameterName const SDLRPCParameterNameMemory = @"memory";
SDLRPCParameterName const SDLRPCParameterNameMemoryAvailable = @"memoryAvailable";
SDLRPCParameterName const SDLRPCParameterNameMenuIcon = @"menuIcon";
-SDLRPCParameterName const SDLRPCParameterNameMenuId = @"menuID";
+SDLRPCParameterName const SDLRPCParameterNameMenuID = @"menuID";
SDLRPCParameterName const SDLRPCParameterNameMenuLayout = @"menuLayout";
SDLRPCParameterName const SDLRPCParameterNameMenuLayoutsAvailable = @"menuLayoutsAvailable";
+SDLRPCParameterName const SDLRPCParameterNameMenuLength = @"menuLength";
SDLRPCParameterName const SDLRPCParameterNameMenuName = @"menuName";
SDLRPCParameterName const SDLRPCParameterNameMenuParams = @"menuParams";
SDLRPCParameterName const SDLRPCParameterNameMenuTitle = @"menuTitle";
@@ -439,7 +482,7 @@ SDLRPCParameterName const SDLRPCParameterNameOS = @"os";
SDLRPCParameterName const SDLRPCParameterNameOSVersion = @"osVersion";
SDLRPCParameterName const SDLRPCParameterNameParameterPermissions = @"parameterPermissions";
SDLRPCParameterName const SDLRPCParameterNameParameters = @"parameters";
-SDLRPCParameterName const SDLRPCParameterNameParentId = @"parentID";
+SDLRPCParameterName const SDLRPCParameterNameParentID = @"parentID";
SDLRPCParameterName const SDLRPCParameterNameParkBrakeActive = @"parkBrakeActive";
SDLRPCParameterName const SDLRPCParameterNamePassengerAirbagDeployed = @"passengerAirbagDeployed";
SDLRPCParameterName const SDLRPCParameterNamePassengerBeltDeployed = @"passengerBeltDeployed";
@@ -562,7 +605,6 @@ SDLRPCParameterName const SDLRPCParameterNameServicePublished = @"servicePublish
SDLRPCParameterName const SDLRPCParameterNameServiceSpecificResult = @"serviceSpecificResult";
SDLRPCParameterName const SDLRPCParameterNameServiceType = @"serviceType";
SDLRPCParameterName const SDLRPCParameterNameServiceUri = @"serviceUri";
-SDLRPCParameterName const SDLRPCParameterNameDisplayName = @"displayName";
SDLRPCParameterName const SDLRPCParameterNameSeverity = @"severity";
SDLRPCParameterName const SDLRPCParameterNameShifted = @"shifted";
SDLRPCParameterName const SDLRPCParameterNameShortPress = @"shortPress";
@@ -603,11 +645,14 @@ SDLRPCParameterName const SDLRPCParameterNameSteeringWheelAngle = @"steeringWhee
SDLRPCParameterName const SDLRPCParameterNameStereoAudioOutputMuted = @"stereoAudioOutputMuted";
SDLRPCParameterName const SDLRPCParameterNameSubAdministrativeArea = @"subAdministrativeArea";
SDLRPCParameterName const SDLRPCParameterNameSubLocality = @"subLocality";
+SDLRPCParameterName const SDLRPCParameterNameSubMenuDepth = @"subMenuDepth";
SDLRPCParameterName const SDLRPCParameterNameSubscribe = @"subscribe";
SDLRPCParameterName const SDLRPCParameterNameSubThoroughfare = @"subThoroughfare";
SDLRPCParameterName const SDLRPCParameterNameSuccess = @"success";
SDLRPCParameterName const SDLRPCParameterNameSummary = @"summary";
SDLRPCParameterName const SDLRPCParameterNameSupportedDiagnosticModes = @"supportedDiagModes";
+SDLRPCParameterName const SDLRPCParameterNameSupportedDynamicImageFieldNames = @"supportedDynamicImageFieldNames";
+SDLRPCParameterName const SDLRPCParameterNameSupportsDynamicSubMenus = @"supportsDynamicSubMenus";
SDLRPCParameterName const SDLRPCParameterNameSupportedFormats = @"supportedFormats";
SDLRPCParameterName const SDLRPCParameterNameSupportedLights = @"supportedLights";
SDLRPCParameterName const SDLRPCParameterNameSyncFileName = @"syncFileName";
@@ -652,6 +697,7 @@ SDLRPCParameterName const SDLRPCParameterNameTotalDistance = @"totalDistance";
SDLRPCParameterName const SDLRPCParameterNameTouchEventAvailable = @"touchEventAvailable";
SDLRPCParameterName const SDLRPCParameterNameTPMS = @"tpms";
SDLRPCParameterName const SDLRPCParameterNameTrafficProgramIdentification = @"TP";
+SDLRPCParameterName const SDLRPCParameterNameTransmissionType = @"transmissionType";
SDLRPCParameterName const SDLRPCParameterNameTriggerSource = @"triggerSource";
SDLRPCParameterName const SDLRPCParameterNameTrim = @"trim";
SDLRPCParameterName const SDLRPCParameterNameTryAgainTime = @"tryAgainTime";
@@ -666,12 +712,14 @@ SDLRPCParameterName const SDLRPCParameterNameUnsubscribe = @"Unsubscribe";
SDLRPCParameterName const SDLRPCParameterNameUpdatedAppServiceRecord = @"updatedAppServiceRecord";
SDLRPCParameterName const SDLRPCParameterNameUpdateMode = @"updateMode";
SDLRPCParameterName const SDLRPCParameterNameUpdateReason= @"updateReason";
+SDLRPCParameterName const SDLRPCParameterNameUpdateSubCells = @"updateSubCells";
SDLRPCParameterName const SDLRPCParameterNameUpDownAvailable = @"upDownAvailable";
SDLRPCParameterName const SDLRPCParameterNameURL = @"url";
SDLRPCParameterName const SDLRPCParameterNameURLUppercase = @"URL";
SDLRPCParameterName const SDLRPCParameterNameUserDisallowed = @"userDisallowed";
SDLRPCParameterName const SDLRPCParameterNameUserLocation = @"userLocation";
SDLRPCParameterName const SDLRPCParameterNameUserSelected = @"userSelected";
+SDLRPCParameterName const SDLRPCParameterNameUserSelectedGear = @"userSelectedGear";
SDLRPCParameterName const SDLRPCParameterNameUTCDay = @"utcDay";
SDLRPCParameterName const SDLRPCParameterNameUTCHours = @"utcHours";
SDLRPCParameterName const SDLRPCParameterNameUTCMinutes = @"utcMinutes";
@@ -715,6 +763,7 @@ SDLRPCParameterName const SDLRPCParameterNameWiperStatus = @"wiperStatus";
SDLRPCParameterName const SDLRPCParameterNameWindowCapabilities = @"windowCapabilities";
SDLRPCParameterName const SDLRPCParameterNameWindowId = @"windowID";
SDLRPCParameterName const SDLRPCParameterNameWindowName = @"windowName";
+SDLRPCParameterName const SDLRPCParameterNameWindowStatus = @"windowStatus";
SDLRPCParameterName const SDLRPCParameterNameWindowTypeSupported = @"windowTypeSupported";
SDLRPCParameterName const SDLRPCParameterNameX = @"x";
SDLRPCParameterName const SDLRPCParameterNameY = @"y";
diff --git a/SmartDeviceLink/SDLResponseDispatcher.m b/SmartDeviceLink/SDLResponseDispatcher.m
index 7c5956616..5408ba9ed 100644
--- a/SmartDeviceLink/SDLResponseDispatcher.m
+++ b/SmartDeviceLink/SDLResponseDispatcher.m
@@ -162,7 +162,7 @@ NS_ASSUME_NONNULL_BEGIN
__block NSArray<SDLResponseHandler> *handlers = nil;
__block NSArray<SDLRPCRequest *> *requests = nil;
- [self sdl_runSyncOnQueue:^{
+ [SDLGlobals runSyncOnSerialSubQueue:self.readWriteQueue block:^{
__strong typeof(weakself) strongself = weakself;
NSMutableArray *handlerArray = [NSMutableArray array];
NSMutableArray *requestArray = [NSMutableArray array];
@@ -236,7 +236,7 @@ NS_ASSUME_NONNULL_BEGIN
__block SDLResponseHandler handler = nil;
__block SDLRPCRequest *request = nil;
- [self sdl_runSyncOnQueue:^{
+ [SDLGlobals runSyncOnSerialSubQueue:self.readWriteQueue block:^{
handler = self->_rpcResponseHandlerMap[response.correlationID];
request = self->_rpcRequestDictionary[response.correlationID];
}];
@@ -336,14 +336,6 @@ NS_ASSUME_NONNULL_BEGIN
#pragma mark Utilities
-- (void)sdl_runSyncOnQueue:(void (^)(void))block {
- if (dispatch_get_specific(SDLProcessingQueueName) != nil) {
- block();
- } else {
- dispatch_sync(self.readWriteQueue, block);
- }
-}
-
- (void)sdl_runAsyncOnQueue:(void (^)(void))block {
if (dispatch_get_specific(SDLProcessingQueueName) != nil) {
block();
@@ -356,7 +348,7 @@ NS_ASSUME_NONNULL_BEGIN
- (NSMapTable<SDLRPCCorrelationId *, SDLResponseHandler> *)rpcResponseHandlerMap {
__block NSMapTable<SDLRPCCorrelationId *, SDLResponseHandler> *map = nil;
- [self sdl_runSyncOnQueue:^{
+ [SDLGlobals runSyncOnSerialSubQueue:self.readWriteQueue block:^{
map = self->_rpcResponseHandlerMap;
}];
@@ -365,7 +357,7 @@ NS_ASSUME_NONNULL_BEGIN
- (NSMutableDictionary<SDLRPCCorrelationId *, SDLRPCRequest *> *)rpcRequestDictionary {
__block NSMutableDictionary<SDLRPCCorrelationId *, SDLRPCRequest *> *dict = nil;
- [self sdl_runSyncOnQueue:^{
+ [SDLGlobals runSyncOnSerialSubQueue:self.readWriteQueue block:^{
dict = self->_rpcRequestDictionary;
}];
@@ -374,7 +366,7 @@ NS_ASSUME_NONNULL_BEGIN
- (NSMapTable<SDLAddCommandCommandId *, SDLRPCCommandNotificationHandler> *)commandHandlerMap {
__block NSMapTable<SDLAddCommandCommandId *, SDLRPCCommandNotificationHandler> *map = nil;
- [self sdl_runSyncOnQueue:^{
+ [SDLGlobals runSyncOnSerialSubQueue:self.readWriteQueue block:^{
map = self->_commandHandlerMap;
}];
@@ -383,7 +375,7 @@ NS_ASSUME_NONNULL_BEGIN
- (NSMapTable<SDLSubscribeButtonName *, SDLRPCButtonNotificationHandler> *)buttonHandlerMap {
__block NSMapTable<SDLSubscribeButtonName *, SDLRPCButtonNotificationHandler> *map = nil;
- [self sdl_runSyncOnQueue:^{
+ [SDLGlobals runSyncOnSerialSubQueue:self.readWriteQueue block:^{
map = self->_buttonHandlerMap;
}];
@@ -392,7 +384,7 @@ NS_ASSUME_NONNULL_BEGIN
- (NSMapTable<SDLSoftButtonId *, SDLRPCButtonNotificationHandler> *)customButtonHandlerMap {
__block NSMapTable<SDLSoftButtonId *, SDLRPCButtonNotificationHandler> *map = nil;
- [self sdl_runSyncOnQueue:^{
+ [SDLGlobals runSyncOnSerialSubQueue:self.readWriteQueue block:^{
map = self->_customButtonHandlerMap;
}];
@@ -401,7 +393,7 @@ NS_ASSUME_NONNULL_BEGIN
- (nullable SDLAudioPassThruHandler)audioPassThruHandler {
__block SDLAudioPassThruHandler audioPassThruHandler = nil;
- [self sdl_runSyncOnQueue:^{
+ [SDLGlobals runSyncOnSerialSubQueue:self.readWriteQueue block:^{
audioPassThruHandler = self->_audioPassThruHandler;
}];
diff --git a/SmartDeviceLink/SDLShowAppMenu.m b/SmartDeviceLink/SDLShowAppMenu.m
index d93b8480d..7d7a5fc23 100644
--- a/SmartDeviceLink/SDLShowAppMenu.m
+++ b/SmartDeviceLink/SDLShowAppMenu.m
@@ -35,12 +35,12 @@ NS_ASSUME_NONNULL_BEGIN
}
- (void)setMenuID:(nullable NSNumber<SDLInt> *)menuID {
- [self.parameters sdl_setObject:menuID forName:SDLRPCParameterNameMenuId];
+ [self.parameters sdl_setObject:menuID forName:SDLRPCParameterNameMenuID];
}
- (nullable NSNumber<SDLInt> *)menuID {
NSError *error = nil;
- return [self.parameters sdl_objectForName:SDLRPCParameterNameMenuId ofClass:NSNumber.class error:&error];
+ return [self.parameters sdl_objectForName:SDLRPCParameterNameMenuID ofClass:NSNumber.class error:&error];
}
@end
diff --git a/SmartDeviceLink/SDLSubscribeButtonManager.m b/SmartDeviceLink/SDLSubscribeButtonManager.m
index 505740227..f311291c5 100644
--- a/SmartDeviceLink/SDLSubscribeButtonManager.m
+++ b/SmartDeviceLink/SDLSubscribeButtonManager.m
@@ -62,7 +62,7 @@ NS_ASSUME_NONNULL_BEGIN
- (void)stop {
__weak typeof(self) weakSelf = self;
- [self sdl_runSyncOnQueue:^{
+ [SDLGlobals runSyncOnSerialSubQueue:self.readWriteQueue block:^{
__strong typeof(weakSelf) strongself = weakSelf;
[strongself->_subscribeButtonObservers removeAllObjects];
}];
@@ -130,7 +130,7 @@ NS_ASSUME_NONNULL_BEGIN
/// @param buttonName The name of the button
- (void)sdl_addSubscribedObserver:(SDLSubscribeButtonObserver *)subscribedObserver forButtonName:(SDLButtonName)buttonName {
__weak typeof(self) weakSelf = self;
- [self sdl_runSyncOnQueue:^{
+ [SDLGlobals runSyncOnSerialSubQueue:self.readWriteQueue block:^{
__strong typeof(weakSelf) strongSelf = weakSelf;
if (strongSelf.subscribeButtonObservers[buttonName] == nil) {
SDLLogV(@"Adding first subscriber for button: %@", buttonName);
@@ -199,7 +199,7 @@ NS_ASSUME_NONNULL_BEGIN
/// @param buttonName The name of the button
- (void)sdl_removeSubscribedObserver:(id<NSObject>)observer forButtonName:(SDLButtonName)buttonName {
__weak typeof(self) weakSelf = self;
- [self sdl_runSyncOnQueue:^{
+ [SDLGlobals runSyncOnSerialSubQueue:self.readWriteQueue block:^{
__strong typeof(weakSelf) strongSelf = weakSelf;
for (NSUInteger i = 0; i < strongSelf.subscribeButtonObservers[buttonName].count; i++) {
SDLSubscribeButtonObserver *subscribedObserver = (SDLSubscribeButtonObserver *)strongSelf.subscribeButtonObservers[buttonName][i];
@@ -282,24 +282,11 @@ NS_ASSUME_NONNULL_BEGIN
}
}
-#pragma mark - Utilities
-
-/// Checks if we are already on the serial readWrite queue. If so, the block is added to the queue; if not, the block is dispatched to the readWrite queue.
-/// @discussion Used to ensure atomic access to global properties.
-/// @param block The block to be executed.
-- (void)sdl_runSyncOnQueue:(void (^)(void))block {
- if (dispatch_get_specific(SDLProcessingQueueName) != nil) {
- block();
- } else {
- dispatch_sync(self.readWriteQueue, block);
- }
-}
-
#pragma mark - Getters
- (NSMutableDictionary<SDLButtonName, NSMutableArray<SDLSubscribeButtonObserver *> *> *)subscribeButtonObservers {
__block NSMutableDictionary<SDLButtonName, NSMutableArray<SDLSubscribeButtonObserver *> *> *dict = nil;
- [self sdl_runSyncOnQueue:^{
+ [SDLGlobals runSyncOnSerialSubQueue:self.readWriteQueue block:^{
dict = self->_subscribeButtonObservers;
}];
diff --git a/SmartDeviceLink/SDLSubscribeVehicleData.h b/SmartDeviceLink/SDLSubscribeVehicleData.h
index d0e6d4629..bcd05c2fc 100644
--- a/SmartDeviceLink/SDLSubscribeVehicleData.h
+++ b/SmartDeviceLink/SDLSubscribeVehicleData.h
@@ -48,7 +48,7 @@ NS_ASSUME_NONNULL_BEGIN
* @param wiperStatus Subscribe to wiperStatus
* @return A SDLSubscribeVehicleData object
*/
-- (instancetype)initWithAccelerationPedalPosition:(BOOL)accelerationPedalPosition airbagStatus:(BOOL)airbagStatus beltStatus:(BOOL)beltStatus bodyInformation:(BOOL)bodyInformation clusterModeStatus:(BOOL)clusterModeStatus deviceStatus:(BOOL)deviceStatus driverBraking:(BOOL)driverBraking eCallInfo:(BOOL)eCallInfo emergencyEvent:(BOOL)emergencyEvent engineTorque:(BOOL)engineTorque externalTemperature:(BOOL)externalTemperature fuelLevel:(BOOL)fuelLevel fuelLevelState:(BOOL)fuelLevelState gps:(BOOL)gps headLampStatus:(BOOL)headLampStatus instantFuelConsumption:(BOOL)instantFuelConsumption myKey:(BOOL)myKey odometer:(BOOL)odometer prndl:(BOOL)prndl rpm:(BOOL)rpm speed:(BOOL)speed steeringWheelAngle:(BOOL)steeringWheelAngle tirePressure:(BOOL)tirePressure wiperStatus:(BOOL)wiperStatus __deprecated_msg("Use initWithAccelerationPedalPosition:airbagStatus:beltStatus:bodyInformation:clusterModeStatus:deviceStatus:driverBraking:eCallInfo:electronicParkBrakeStatus:emergencyEvent:engineOilLife:engineTorque:externalTemperature:fuelLevel:fuelLevelState:fuelRange:gps:headLampStatus:instantFuelConsumption:myKey:odometer:prndl:rpm:speed:steeringWheelAngle:tirePressure:turnSignal:wiperStatus: instead");
+- (instancetype)initWithAccelerationPedalPosition:(BOOL)accelerationPedalPosition airbagStatus:(BOOL)airbagStatus beltStatus:(BOOL)beltStatus bodyInformation:(BOOL)bodyInformation clusterModeStatus:(BOOL)clusterModeStatus deviceStatus:(BOOL)deviceStatus driverBraking:(BOOL)driverBraking eCallInfo:(BOOL)eCallInfo emergencyEvent:(BOOL)emergencyEvent engineTorque:(BOOL)engineTorque externalTemperature:(BOOL)externalTemperature fuelLevel:(BOOL)fuelLevel fuelLevelState:(BOOL)fuelLevelState gps:(BOOL)gps headLampStatus:(BOOL)headLampStatus instantFuelConsumption:(BOOL)instantFuelConsumption myKey:(BOOL)myKey odometer:(BOOL)odometer prndl:(BOOL)prndl rpm:(BOOL)rpm speed:(BOOL)speed steeringWheelAngle:(BOOL)steeringWheelAngle tirePressure:(BOOL)tirePressure wiperStatus:(BOOL)wiperStatus __deprecated_msg("Use initWithGps:speed:rpm:instantFuelConsumption:fuelRange:externalTemperature:turnSignal:gearStatus:tirePressure:odometer:beltStatus:bodyInformation:deviceStatus:driverBraking:wiperStatus:headLampStatus:engineTorque:accPedalPosition:steeringWheelAngle:engineOilLife:electronicParkBrakeStatus:cloudAppVehicleID:eCallInfo:airbagStatus:emergencyEvent:clusterModeStatus:myKey:handsOffSteering:windowStatus: instead");
/**
* Convenience init for subscribing to all possible vehicle data items.
@@ -83,7 +83,7 @@ NS_ASSUME_NONNULL_BEGIN
* @param wiperStatus Subscribe to wiperStatus
* @return A SDLSubscribeVehicleData object
*/
-- (instancetype)initWithAccelerationPedalPosition:(BOOL)accelerationPedalPosition airbagStatus:(BOOL)airbagStatus beltStatus:(BOOL)beltStatus bodyInformation:(BOOL)bodyInformation clusterModeStatus:(BOOL)clusterModeStatus deviceStatus:(BOOL)deviceStatus driverBraking:(BOOL)driverBraking eCallInfo:(BOOL)eCallInfo electronicParkBrakeStatus:(BOOL)electronicParkBrakeStatus emergencyEvent:(BOOL)emergencyEvent engineOilLife:(BOOL)engineOilLife engineTorque:(BOOL)engineTorque externalTemperature:(BOOL)externalTemperature fuelLevel:(BOOL)fuelLevel fuelLevelState:(BOOL)fuelLevelState fuelRange:(BOOL)fuelRange gps:(BOOL)gps headLampStatus:(BOOL)headLampStatus instantFuelConsumption:(BOOL)instantFuelConsumption myKey:(BOOL)myKey odometer:(BOOL)odometer prndl:(BOOL)prndl rpm:(BOOL)rpm speed:(BOOL)speed steeringWheelAngle:(BOOL)steeringWheelAngle tirePressure:(BOOL)tirePressure turnSignal:(BOOL)turnSignal wiperStatus:(BOOL)wiperStatus __deprecated_msg("Use initWithAccelerationPedalPosition:airbagStatus:beltStatus:bodyInformation:cloudAppVehicleID:clusterModeStatus:deviceStatus:driverBraking:eCallInfo:electronicParkBrakeStatus:emergencyEvent:engineOilLife:engineTorque:externalTemperature:fuelLevel:fuelLevelState:fuelRange:gps:headLampStatus:instantFuelConsumption:myKey:odometer:prndl:rpm:speed:steeringWheelAngle:tirePressure:turnSignal:wiperStatus: instead");
+- (instancetype)initWithAccelerationPedalPosition:(BOOL)accelerationPedalPosition airbagStatus:(BOOL)airbagStatus beltStatus:(BOOL)beltStatus bodyInformation:(BOOL)bodyInformation clusterModeStatus:(BOOL)clusterModeStatus deviceStatus:(BOOL)deviceStatus driverBraking:(BOOL)driverBraking eCallInfo:(BOOL)eCallInfo electronicParkBrakeStatus:(BOOL)electronicParkBrakeStatus emergencyEvent:(BOOL)emergencyEvent engineOilLife:(BOOL)engineOilLife engineTorque:(BOOL)engineTorque externalTemperature:(BOOL)externalTemperature fuelLevel:(BOOL)fuelLevel fuelLevelState:(BOOL)fuelLevelState fuelRange:(BOOL)fuelRange gps:(BOOL)gps headLampStatus:(BOOL)headLampStatus instantFuelConsumption:(BOOL)instantFuelConsumption myKey:(BOOL)myKey odometer:(BOOL)odometer prndl:(BOOL)prndl rpm:(BOOL)rpm speed:(BOOL)speed steeringWheelAngle:(BOOL)steeringWheelAngle tirePressure:(BOOL)tirePressure turnSignal:(BOOL)turnSignal wiperStatus:(BOOL)wiperStatus __deprecated_msg("Use initWithGps:speed:rpm:instantFuelConsumption:fuelRange:externalTemperature:turnSignal:gearStatus:tirePressure:odometer:beltStatus:bodyInformation:deviceStatus:driverBraking:wiperStatus:headLampStatus:engineTorque:accPedalPosition:steeringWheelAngle:engineOilLife:electronicParkBrakeStatus:cloudAppVehicleID:eCallInfo:airbagStatus:emergencyEvent:clusterModeStatus:myKey:handsOffSteering:windowStatus: instead");
/**
* Convenience init for subscribing to all possible vehicle data items.
@@ -119,7 +119,50 @@ NS_ASSUME_NONNULL_BEGIN
* @param wiperStatus Subscribe to wiperStatus
* @return A SDLSubscribeVehicleData object
*/
-- (instancetype)initWithAccelerationPedalPosition:(BOOL)accelerationPedalPosition airbagStatus:(BOOL)airbagStatus beltStatus:(BOOL)beltStatus bodyInformation:(BOOL)bodyInformation cloudAppVehicleID:(BOOL)cloudAppVehicleID clusterModeStatus:(BOOL)clusterModeStatus deviceStatus:(BOOL)deviceStatus driverBraking:(BOOL)driverBraking eCallInfo:(BOOL)eCallInfo electronicParkBrakeStatus:(BOOL)electronicParkBrakeStatus emergencyEvent:(BOOL)emergencyEvent engineOilLife:(BOOL)engineOilLife engineTorque:(BOOL)engineTorque externalTemperature:(BOOL)externalTemperature fuelLevel:(BOOL)fuelLevel fuelLevelState:(BOOL)fuelLevelState fuelRange:(BOOL)fuelRange gps:(BOOL)gps headLampStatus:(BOOL)headLampStatus instantFuelConsumption:(BOOL)instantFuelConsumption myKey:(BOOL)myKey odometer:(BOOL)odometer prndl:(BOOL)prndl rpm:(BOOL)rpm speed:(BOOL)speed steeringWheelAngle:(BOOL)steeringWheelAngle tirePressure:(BOOL)tirePressure turnSignal:(BOOL)turnSignal wiperStatus:(BOOL)wiperStatus;
+- (instancetype)initWithAccelerationPedalPosition:(BOOL)accelerationPedalPosition airbagStatus:(BOOL)airbagStatus beltStatus:(BOOL)beltStatus bodyInformation:(BOOL)bodyInformation cloudAppVehicleID:(BOOL)cloudAppVehicleID clusterModeStatus:(BOOL)clusterModeStatus deviceStatus:(BOOL)deviceStatus driverBraking:(BOOL)driverBraking eCallInfo:(BOOL)eCallInfo electronicParkBrakeStatus:(BOOL)electronicParkBrakeStatus emergencyEvent:(BOOL)emergencyEvent engineOilLife:(BOOL)engineOilLife engineTorque:(BOOL)engineTorque externalTemperature:(BOOL)externalTemperature fuelLevel:(BOOL)fuelLevel fuelLevelState:(BOOL)fuelLevelState fuelRange:(BOOL)fuelRange gps:(BOOL)gps headLampStatus:(BOOL)headLampStatus instantFuelConsumption:(BOOL)instantFuelConsumption myKey:(BOOL)myKey odometer:(BOOL)odometer prndl:(BOOL)prndl rpm:(BOOL)rpm speed:(BOOL)speed steeringWheelAngle:(BOOL)steeringWheelAngle tirePressure:(BOOL)tirePressure turnSignal:(BOOL)turnSignal wiperStatus:(BOOL)wiperStatus __deprecated_msg("Use initWithGps:speed:rpm:instantFuelConsumption:fuelRange:externalTemperature:turnSignal:gearStatus:tirePressure:odometer:beltStatus:bodyInformation:deviceStatus:driverBraking:wiperStatus:headLampStatus:engineTorque:accPedalPosition:steeringWheelAngle:engineOilLife:electronicParkBrakeStatus:cloudAppVehicleID:eCallInfo:airbagStatus:emergencyEvent:clusterModeStatus:myKey:handsOffSteering:windowStatus: instead");
+
+/**
+ * Convenience init for subscribing to all possible vehicle data items.
+ *
+ * @param gps - gps
+ * @param speed - speed
+ * @param rpm - rpm
+ * @param instantFuelConsumption - instantFuelConsumption
+ * @param fuelRange - fuelRange
+ * @param externalTemperature - externalTemperature
+ * @param turnSignal - turnSignal
+ * @param gearStatus - gearStatus
+ * @param tirePressure - tirePressure
+ * @param odometer - odometer
+ * @param beltStatus - beltStatus
+ * @param bodyInformation - bodyInformation
+ * @param deviceStatus - deviceStatus
+ * @param driverBraking - driverBraking
+ * @param wiperStatus - wiperStatus
+ * @param headLampStatus - headLampStatus
+ * @param engineTorque - engineTorque
+ * @param accPedalPosition - accPedalPosition
+ * @param steeringWheelAngle - steeringWheelAngle
+ * @param engineOilLife - engineOilLife
+ * @param electronicParkBrakeStatus - electronicParkBrakeStatus
+ * @param cloudAppVehicleID - cloudAppVehicleID
+ * @param eCallInfo - eCallInfo
+ * @param airbagStatus - airbagStatus
+ * @param emergencyEvent - emergencyEvent
+ * @param clusterModeStatus - clusterModeStatus
+ * @param myKey - myKey
+ * @param handsOffSteering - handsOffSteering
+ * @param windowStatus - windowStatus
+ * @return A SDLSubscribeVehicleData object
+ */
+- (instancetype)initWithGps:(nullable NSNumber<SDLBool> *)gps speed:(nullable NSNumber<SDLBool> *)speed rpm:(nullable NSNumber<SDLBool> *)rpm instantFuelConsumption:(nullable NSNumber<SDLBool> *)instantFuelConsumption fuelRange:(nullable NSNumber<SDLBool> *)fuelRange externalTemperature:(nullable NSNumber<SDLBool> *)externalTemperature turnSignal:(nullable NSNumber<SDLBool> *)turnSignal gearStatus:(nullable NSNumber<SDLBool> *)gearStatus tirePressure:(nullable NSNumber<SDLBool> *)tirePressure odometer:(nullable NSNumber<SDLBool> *)odometer beltStatus:(nullable NSNumber<SDLBool> *)beltStatus bodyInformation:(nullable NSNumber<SDLBool> *)bodyInformation deviceStatus:(nullable NSNumber<SDLBool> *)deviceStatus driverBraking:(nullable NSNumber<SDLBool> *)driverBraking wiperStatus:(nullable NSNumber<SDLBool> *)wiperStatus headLampStatus:(nullable NSNumber<SDLBool> *)headLampStatus engineTorque:(nullable NSNumber<SDLBool> *)engineTorque accPedalPosition:(nullable NSNumber<SDLBool> *)accPedalPosition steeringWheelAngle:(nullable NSNumber<SDLBool> *)steeringWheelAngle engineOilLife:(nullable NSNumber<SDLBool> *)engineOilLife electronicParkBrakeStatus:(nullable NSNumber<SDLBool> *)electronicParkBrakeStatus cloudAppVehicleID:(nullable NSNumber<SDLBool> *)cloudAppVehicleID eCallInfo:(nullable NSNumber<SDLBool> *)eCallInfo airbagStatus:(nullable NSNumber<SDLBool> *)airbagStatus emergencyEvent:(nullable NSNumber<SDLBool> *)emergencyEvent clusterModeStatus:(nullable NSNumber<SDLBool> *)clusterModeStatus myKey:(nullable NSNumber<SDLBool> *)myKey handsOffSteering:(nullable NSNumber<SDLBool> *)handsOffSteering windowStatus:(nullable NSNumber<SDLBool> *)windowStatus;
+
+/**
+ * See GearStatus
+ *
+ * @since SDL 7.0
+*/
+@property (strong, nonatomic, nullable) NSNumber<SDLBool> *gearStatus;
/**
* A boolean value. If true, subscribes GPS data.
@@ -139,12 +182,12 @@ NS_ASSUME_NONNULL_BEGIN
/**
* A boolean value. If true, subscribes Fuel Level data.
*/
-@property (strong, nonatomic, nullable) NSNumber<SDLBool> *fuelLevel;
+@property (strong, nonatomic, nullable) NSNumber<SDLBool> *fuelLevel __deprecated_msg("use fuelRange instead on 7.0+ RPC version connections");
/**
* A boolean value. If true, subscribes Fuel Level State data.
*/
-@property (strong, nonatomic, nullable) NSNumber<SDLBool> *fuelLevel_State;
+@property (strong, nonatomic, nullable) NSNumber<SDLBool> *fuelLevel_State __deprecated_msg("use fuelRange instead on 7.0+ RPC version connections");
/**
* A boolean value. If true, subscribes Fuel Range data.
@@ -162,9 +205,12 @@ NS_ASSUME_NONNULL_BEGIN
@property (strong, nonatomic, nullable) NSNumber<SDLBool> *externalTemperature;
/**
- * A boolean value. If true, subscribes PRNDL data.
- */
-@property (strong, nonatomic, nullable) NSNumber<SDLBool> *prndl;
+ * See PRNDL. This parameter is deprecated and it is now covered in `gearStatus`
+ *
+ * @deprecated
+ * @since SDL 7.0
+*/
+@property (strong, nonatomic, nullable) NSNumber<SDLBool> *prndl __deprecated_msg("use gearStatus instead on 7.0+ RPC version connections");
/**
* A boolean value. If true, subscribes Tire Pressure status data.
@@ -197,11 +243,23 @@ NS_ASSUME_NONNULL_BEGIN
@property (strong, nonatomic, nullable) NSNumber<SDLBool> *driverBraking;
/**
+ * See WindowStatus
+ *
+ * @since SDL 7.0
+ */
+@property (strong, nonatomic, nullable) NSNumber<SDLBool> *windowStatus;
+
+/**
* A boolean value. If true, subscribes Wiper Status data.
*/
@property (strong, nonatomic, nullable) NSNumber<SDLBool> *wiperStatus;
/**
+ * To indicate whether driver hands are off the steering wheel
+ */
+@property (strong, nonatomic, nullable) NSNumber<SDLBool> *handsOffSteering;
+
+/**
* A boolean value. If true, subscribes Head Lamp Status data.
*/
@property (strong, nonatomic, nullable) NSNumber<SDLBool> *headLampStatus;
@@ -268,7 +326,7 @@ NS_ASSUME_NONNULL_BEGIN
/**
Sets the OEM custom vehicle data state for any given OEM custom vehicle data name.
-
+
@param vehicleDataName The name of the OEM custom vehicle data item.
@param vehicleDataState A boolean value. If true, requests the OEM custom vehicle data item.
@@ -278,7 +336,7 @@ NS_ASSUME_NONNULL_BEGIN
/**
Gets the OEM custom vehicle data value for any given OEM custom vehicle data name.
-
+
@param vehicleDataName The name of the OEM custom vehicle data item.
@return The state of an OEM custom vehicle data item for the given vehicle data name.
diff --git a/SmartDeviceLink/SDLSubscribeVehicleData.m b/SmartDeviceLink/SDLSubscribeVehicleData.m
index a5bd22070..fc26ddbd4 100644
--- a/SmartDeviceLink/SDLSubscribeVehicleData.m
+++ b/SmartDeviceLink/SDLSubscribeVehicleData.m
@@ -15,57 +15,97 @@ NS_ASSUME_NONNULL_BEGIN
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
- (instancetype)init {
- if (self = [super initWithName:SDLRPCFunctionNameSubscribeVehicleData]) {
+ self = [super initWithName:SDLRPCFunctionNameSubscribeVehicleData];
+ if (!self) {
+ return nil;
}
return self;
}
#pragma clang diagnostic pop
- (instancetype)initWithAccelerationPedalPosition:(BOOL)accelerationPedalPosition airbagStatus:(BOOL)airbagStatus beltStatus:(BOOL)beltStatus bodyInformation:(BOOL)bodyInformation clusterModeStatus:(BOOL)clusterModeStatus deviceStatus:(BOOL)deviceStatus driverBraking:(BOOL)driverBraking eCallInfo:(BOOL)eCallInfo emergencyEvent:(BOOL)emergencyEvent engineTorque:(BOOL)engineTorque externalTemperature:(BOOL)externalTemperature fuelLevel:(BOOL)fuelLevel fuelLevelState:(BOOL)fuelLevelState gps:(BOOL)gps headLampStatus:(BOOL)headLampStatus instantFuelConsumption:(BOOL)instantFuelConsumption myKey:(BOOL)myKey odometer:(BOOL)odometer prndl:(BOOL)prndl rpm:(BOOL)rpm speed:(BOOL)speed steeringWheelAngle:(BOOL)steeringWheelAngle tirePressure:(BOOL)tirePressure wiperStatus:(BOOL)wiperStatus {
- return [self initWithAccelerationPedalPosition:accelerationPedalPosition airbagStatus:airbagStatus beltStatus:beltStatus bodyInformation:bodyInformation clusterModeStatus:clusterModeStatus deviceStatus:deviceStatus driverBraking:driverBraking eCallInfo:eCallInfo electronicParkBrakeStatus:NO emergencyEvent:emergencyEvent engineOilLife:NO engineTorque:engineTorque externalTemperature:externalTemperature fuelLevel:fuelLevel fuelLevelState:fuelLevelState fuelRange:NO gps:gps headLampStatus:headLampStatus instantFuelConsumption:instantFuelConsumption myKey:myKey odometer:odometer prndl:prndl rpm:rpm speed:speed steeringWheelAngle:steeringWheelAngle tirePressure:tirePressure turnSignal:NO wiperStatus:wiperStatus];
+ self = [self initWithGps:@(gps) speed:@(speed) rpm:@(rpm) instantFuelConsumption:@(instantFuelConsumption) fuelRange:nil externalTemperature:@(externalTemperature) turnSignal:nil gearStatus:nil tirePressure:@(tirePressure) odometer:@(odometer) beltStatus:@(beltStatus) bodyInformation:@(bodyInformation) deviceStatus:@(deviceStatus) driverBraking:@(driverBraking) wiperStatus:@(wiperStatus) headLampStatus:@(headLampStatus) engineTorque:@(engineTorque) accPedalPosition:@(accelerationPedalPosition) steeringWheelAngle:@(steeringWheelAngle) engineOilLife:nil electronicParkBrakeStatus:nil cloudAppVehicleID:nil eCallInfo:@(eCallInfo) airbagStatus:@(airbagStatus) emergencyEvent:@(emergencyEvent) clusterModeStatus:@(clusterModeStatus) myKey:@(myKey) handsOffSteering:nil windowStatus:nil];
+ if (self) {
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
+ self.fuelLevel = @(fuelLevel);
+ self.fuelLevel_State = @(fuelLevelState);
+ self.prndl = @(prndl);
+#pragma clang diagnostic pop
+ }
+ return self;
}
- (instancetype)initWithAccelerationPedalPosition:(BOOL)accelerationPedalPosition airbagStatus:(BOOL)airbagStatus beltStatus:(BOOL)beltStatus bodyInformation:(BOOL)bodyInformation clusterModeStatus:(BOOL)clusterModeStatus deviceStatus:(BOOL)deviceStatus driverBraking:(BOOL)driverBraking eCallInfo:(BOOL)eCallInfo electronicParkBrakeStatus:(BOOL)electronicParkBrakeStatus emergencyEvent:(BOOL)emergencyEvent engineOilLife:(BOOL)engineOilLife engineTorque:(BOOL)engineTorque externalTemperature:(BOOL)externalTemperature fuelLevel:(BOOL)fuelLevel fuelLevelState:(BOOL)fuelLevelState fuelRange:(BOOL)fuelRange gps:(BOOL)gps headLampStatus:(BOOL)headLampStatus instantFuelConsumption:(BOOL)instantFuelConsumption myKey:(BOOL)myKey odometer:(BOOL)odometer prndl:(BOOL)prndl rpm:(BOOL)rpm speed:(BOOL)speed steeringWheelAngle:(BOOL)steeringWheelAngle tirePressure:(BOOL)tirePressure turnSignal:(BOOL)turnSignal wiperStatus:(BOOL)wiperStatus {
- return [self initWithAccelerationPedalPosition:accelerationPedalPosition airbagStatus:airbagStatus beltStatus:beltStatus bodyInformation:bodyInformation cloudAppVehicleID:NO clusterModeStatus:clusterModeStatus deviceStatus:deviceStatus driverBraking:driverBraking eCallInfo:eCallInfo electronicParkBrakeStatus:electronicParkBrakeStatus emergencyEvent:emergencyEvent engineOilLife:engineOilLife engineTorque:engineTorque externalTemperature:externalTemperature fuelLevel:fuelLevel fuelLevelState:fuelLevelState fuelRange:fuelRange gps:gps headLampStatus:headLampStatus instantFuelConsumption:instantFuelConsumption myKey:myKey odometer:odometer prndl:prndl rpm:rpm speed:speed steeringWheelAngle:steeringWheelAngle tirePressure:tirePressure turnSignal:turnSignal wiperStatus:wiperStatus];
+ self = [self initWithGps:@(gps) speed:@(speed) rpm:@(rpm) instantFuelConsumption:@(instantFuelConsumption) fuelRange:@(fuelRange) externalTemperature:@(externalTemperature) turnSignal:@(turnSignal) gearStatus:nil tirePressure:@(tirePressure) odometer:@(odometer) beltStatus:@(beltStatus) bodyInformation:@(bodyInformation) deviceStatus:@(deviceStatus) driverBraking:@(driverBraking) wiperStatus:@(wiperStatus) headLampStatus:@(headLampStatus) engineTorque:@(engineTorque) accPedalPosition:@(accelerationPedalPosition) steeringWheelAngle:@(steeringWheelAngle) engineOilLife:@(engineOilLife) electronicParkBrakeStatus:@(electronicParkBrakeStatus) cloudAppVehicleID:nil eCallInfo:@(eCallInfo) airbagStatus:@(airbagStatus) emergencyEvent:@(emergencyEvent) clusterModeStatus:@(clusterModeStatus) myKey:@(myKey) handsOffSteering:nil windowStatus:nil];
+ if (self) {
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
+ self.fuelLevel = @(fuelLevel);
+ self.fuelLevel_State = @(fuelLevelState);
+ self.prndl = @(prndl);
+#pragma clang diagnostic pop
+ }
+ return self;
}
- (instancetype)initWithAccelerationPedalPosition:(BOOL)accelerationPedalPosition airbagStatus:(BOOL)airbagStatus beltStatus:(BOOL)beltStatus bodyInformation:(BOOL)bodyInformation cloudAppVehicleID:(BOOL)cloudAppVehicleID clusterModeStatus:(BOOL)clusterModeStatus deviceStatus:(BOOL)deviceStatus driverBraking:(BOOL)driverBraking eCallInfo:(BOOL)eCallInfo electronicParkBrakeStatus:(BOOL)electronicParkBrakeStatus emergencyEvent:(BOOL)emergencyEvent engineOilLife:(BOOL)engineOilLife engineTorque:(BOOL)engineTorque externalTemperature:(BOOL)externalTemperature fuelLevel:(BOOL)fuelLevel fuelLevelState:(BOOL)fuelLevelState fuelRange:(BOOL)fuelRange gps:(BOOL)gps headLampStatus:(BOOL)headLampStatus instantFuelConsumption:(BOOL)instantFuelConsumption myKey:(BOOL)myKey odometer:(BOOL)odometer prndl:(BOOL)prndl rpm:(BOOL)rpm speed:(BOOL)speed steeringWheelAngle:(BOOL)steeringWheelAngle tirePressure:(BOOL)tirePressure turnSignal:(BOOL)turnSignal wiperStatus:(BOOL)wiperStatus {
+ self = [self initWithGps:@(gps) speed:@(speed) rpm:@(rpm) instantFuelConsumption:@(instantFuelConsumption) fuelRange:@(fuelRange) externalTemperature:@(externalTemperature) turnSignal:@(turnSignal) gearStatus:nil tirePressure:@(tirePressure) odometer:@(odometer) beltStatus:@(beltStatus) bodyInformation:@(bodyInformation) deviceStatus:@(deviceStatus) driverBraking:@(driverBraking) wiperStatus:@(wiperStatus) headLampStatus:@(headLampStatus) engineTorque:@(engineTorque) accPedalPosition:@(accelerationPedalPosition) steeringWheelAngle:@(steeringWheelAngle) engineOilLife:@(engineOilLife) electronicParkBrakeStatus:@(electronicParkBrakeStatus) cloudAppVehicleID:@(cloudAppVehicleID) eCallInfo:@(eCallInfo) airbagStatus:@(airbagStatus) emergencyEvent:@(emergencyEvent) clusterModeStatus:@(clusterModeStatus) myKey:@(myKey) handsOffSteering:nil windowStatus:nil];
+ if (self) {
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
+ self.fuelLevel = @(fuelLevel);
+ self.fuelLevel_State = @(fuelLevelState);
+ self.prndl = @(prndl);
+#pragma clang diagnostic pop
+ }
+
+ return self;
+}
+
+- (instancetype)initWithGps:(nullable NSNumber<SDLBool> *)gps speed:(nullable NSNumber<SDLBool> *)speed rpm:(nullable NSNumber<SDLBool> *)rpm instantFuelConsumption:(nullable NSNumber<SDLBool> *)instantFuelConsumption fuelRange:(nullable NSNumber<SDLBool> *)fuelRange externalTemperature:(nullable NSNumber<SDLBool> *)externalTemperature turnSignal:(nullable NSNumber<SDLBool> *)turnSignal gearStatus:(nullable NSNumber<SDLBool> *)gearStatus tirePressure:(nullable NSNumber<SDLBool> *)tirePressure odometer:(nullable NSNumber<SDLBool> *)odometer beltStatus:(nullable NSNumber<SDLBool> *)beltStatus bodyInformation:(nullable NSNumber<SDLBool> *)bodyInformation deviceStatus:(nullable NSNumber<SDLBool> *)deviceStatus driverBraking:(nullable NSNumber<SDLBool> *)driverBraking wiperStatus:(nullable NSNumber<SDLBool> *)wiperStatus headLampStatus:(nullable NSNumber<SDLBool> *)headLampStatus engineTorque:(nullable NSNumber<SDLBool> *)engineTorque accPedalPosition:(nullable NSNumber<SDLBool> *)accPedalPosition steeringWheelAngle:(nullable NSNumber<SDLBool> *)steeringWheelAngle engineOilLife:(nullable NSNumber<SDLBool> *)engineOilLife electronicParkBrakeStatus:(nullable NSNumber<SDLBool> *)electronicParkBrakeStatus cloudAppVehicleID:(nullable NSNumber<SDLBool> *)cloudAppVehicleID eCallInfo:(nullable NSNumber<SDLBool> *)eCallInfo airbagStatus:(nullable NSNumber<SDLBool> *)airbagStatus emergencyEvent:(nullable NSNumber<SDLBool> *)emergencyEvent clusterModeStatus:(nullable NSNumber<SDLBool> *)clusterModeStatus myKey:(nullable NSNumber<SDLBool> *)myKey handsOffSteering:(nullable NSNumber<SDLBool> *)handsOffSteering windowStatus:(nullable NSNumber<SDLBool> *)windowStatus {
self = [self init];
if (!self) {
return nil;
}
+ self.gps = gps;
+ self.speed = speed;
+ self.rpm = rpm;
+ self.instantFuelConsumption = instantFuelConsumption;
+ self.fuelRange = fuelRange;
+ self.externalTemperature = externalTemperature;
+ self.turnSignal = turnSignal;
+ self.gearStatus = gearStatus;
+ self.tirePressure = tirePressure;
+ self.odometer = odometer;
+ self.beltStatus = beltStatus;
+ self.bodyInformation = bodyInformation;
+ self.deviceStatus = deviceStatus;
+ self.driverBraking = driverBraking;
+ self.wiperStatus = wiperStatus;
+ self.headLampStatus = headLampStatus;
+ self.engineTorque = engineTorque;
+ self.accPedalPosition = accPedalPosition;
+ self.steeringWheelAngle = steeringWheelAngle;
+ self.engineOilLife = engineOilLife;
+ self.electronicParkBrakeStatus = electronicParkBrakeStatus;
+ self.cloudAppVehicleID = cloudAppVehicleID;
+ self.eCallInfo = eCallInfo;
+ self.airbagStatus = airbagStatus;
+ self.emergencyEvent = emergencyEvent;
+ self.clusterModeStatus = clusterModeStatus;
+ self.myKey = myKey;
+ self.handsOffSteering = handsOffSteering;
+ self.windowStatus = windowStatus;
+ return self;
+}
- self.accPedalPosition = @(accelerationPedalPosition);
- self.airbagStatus = @(airbagStatus);
- self.beltStatus = @(beltStatus);
- self.bodyInformation = @(bodyInformation);
- self.cloudAppVehicleID = @(cloudAppVehicleID);
- self.clusterModeStatus = @(clusterModeStatus);
- self.deviceStatus = @(deviceStatus);
- self.driverBraking = @(driverBraking);
- self.eCallInfo = @(eCallInfo);
- self.electronicParkBrakeStatus = @(electronicParkBrakeStatus);
- self.emergencyEvent = @(emergencyEvent);
- self.engineOilLife = @(engineOilLife);
- self.engineTorque = @(engineTorque);
- self.externalTemperature = @(externalTemperature);
- self.fuelLevel = @(fuelLevel);
- self.fuelLevel_State = @(fuelLevelState);
- self.fuelRange = @(fuelRange);
- self.myKey = @(myKey);
- self.odometer = @(odometer);
- self.gps = @(gps);
- self.headLampStatus = @(headLampStatus);
- self.instantFuelConsumption = @(instantFuelConsumption);
- self.prndl = @(prndl);
- self.rpm = @(rpm);
- self.speed = @(speed);
- self.steeringWheelAngle = @(steeringWheelAngle);
- self.tirePressure = @(tirePressure);
- self.turnSignal = @(turnSignal);
- self.wiperStatus = @(wiperStatus);
+- (void)setGearStatus:(nullable NSNumber<SDLBool> *)gearStatus {
+ [self.parameters sdl_setObject:gearStatus forName:SDLRPCParameterNameGearStatus];
+}
- return self;
+- (nullable NSNumber<SDLBool> *)gearStatus {
+ return [self.parameters sdl_objectForName:SDLRPCParameterNameGearStatus ofClass:NSNumber.class error:nil];
}
- (void)setGps:(nullable NSNumber<SDLBool> *)gps {
@@ -188,6 +228,15 @@ NS_ASSUME_NONNULL_BEGIN
return [self.parameters sdl_objectForName:SDLRPCParameterNameDriverBraking ofClass:NSNumber.class error:nil];
}
+- (void)setWindowStatus:(nullable NSNumber<SDLBool> *)windowStatus {
+ [self.parameters sdl_setObject:windowStatus forName:SDLRPCParameterNameWindowStatus];
+}
+
+- (nullable NSNumber<SDLBool> *)windowStatus {
+ NSError *error = nil;
+ return [self.parameters sdl_objectForName:SDLRPCParameterNameWindowStatus ofClass:NSNumber.class error:&error];
+}
+
- (void)setWiperStatus:(nullable NSNumber<SDLBool> *)wiperStatus {
[self.parameters sdl_setObject:wiperStatus forName:SDLRPCParameterNameWiperStatus];
}
@@ -196,6 +245,15 @@ NS_ASSUME_NONNULL_BEGIN
return [self.parameters sdl_objectForName:SDLRPCParameterNameWiperStatus ofClass:NSNumber.class error:nil];
}
+- (void)setHandsOffSteering:(nullable NSNumber<SDLBool> *)handsOffSteering {
+ [self.parameters sdl_setObject:handsOffSteering forName:SDLRPCParameterNameHandsOffSteering];
+}
+
+- (nullable NSNumber<SDLBool> *)handsOffSteering {
+ NSError *error = nil;
+ return [self.parameters sdl_objectForName:SDLRPCParameterNameHandsOffSteering ofClass:NSNumber.class error:&error];
+}
+
- (void)setHeadLampStatus:(nullable NSNumber<SDLBool> *)headLampStatus {
[self.parameters sdl_setObject:headLampStatus forName:SDLRPCParameterNameHeadLampStatus];
}
diff --git a/SmartDeviceLink/SDLSubscribeVehicleDataResponse.h b/SmartDeviceLink/SDLSubscribeVehicleDataResponse.h
index 3f4386499..fa66f4fbf 100644
--- a/SmartDeviceLink/SDLSubscribeVehicleDataResponse.h
+++ b/SmartDeviceLink/SDLSubscribeVehicleDataResponse.h
@@ -17,6 +17,49 @@ NS_ASSUME_NONNULL_BEGIN
@interface SDLSubscribeVehicleDataResponse : SDLRPCResponse
/**
+ * Convenience init for setting all possible values on vehicle data items.
+ *
+ * @param gps - gps
+ * @param speed - speed
+ * @param rpm - rpm
+ * @param instantFuelConsumption - instantFuelConsumption
+ * @param fuelRange - fuelRange
+ * @param externalTemperature - externalTemperature
+ * @param turnSignal - turnSignal
+ * @param gearStatus - gearStatus
+ * @param tirePressure - tirePressure
+ * @param odometer - odometer
+ * @param beltStatus - beltStatus
+ * @param bodyInformation - bodyInformation
+ * @param deviceStatus - deviceStatus
+ * @param driverBraking - driverBraking
+ * @param wiperStatus - wiperStatus
+ * @param headLampStatus - headLampStatus
+ * @param engineTorque - engineTorque
+ * @param accPedalPosition - accPedalPosition
+ * @param steeringWheelAngle - steeringWheelAngle
+ * @param engineOilLife - engineOilLife
+ * @param electronicParkBrakeStatus - electronicParkBrakeStatus
+ * @param cloudAppVehicleID - cloudAppVehicleID
+ * @param eCallInfo - eCallInfo
+ * @param airbagStatus - airbagStatus
+ * @param emergencyEvent - emergencyEvent
+ * @param clusterModes - clusterModes
+ * @param myKey - myKey
+ * @param handsOffSteering - handsOffSteering
+ * @param windowStatus - windowStatus
+ * @return A SDLSubscribeVehicleDataResponse object
+ */
+- (instancetype)initWithGps:(nullable SDLVehicleDataResult *)gps speed:(nullable SDLVehicleDataResult *)speed rpm:(nullable SDLVehicleDataResult *)rpm instantFuelConsumption:(nullable SDLVehicleDataResult *)instantFuelConsumption fuelRange:(nullable SDLVehicleDataResult *)fuelRange externalTemperature:(nullable SDLVehicleDataResult *)externalTemperature turnSignal:(nullable SDLVehicleDataResult *)turnSignal gearStatus:(nullable SDLVehicleDataResult *)gearStatus tirePressure:(nullable SDLVehicleDataResult *)tirePressure odometer:(nullable SDLVehicleDataResult *)odometer beltStatus:(nullable SDLVehicleDataResult *)beltStatus bodyInformation:(nullable SDLVehicleDataResult *)bodyInformation deviceStatus:(nullable SDLVehicleDataResult *)deviceStatus driverBraking:(nullable SDLVehicleDataResult *)driverBraking wiperStatus:(nullable SDLVehicleDataResult *)wiperStatus headLampStatus:(nullable SDLVehicleDataResult *)headLampStatus engineTorque:(nullable SDLVehicleDataResult *)engineTorque accPedalPosition:(nullable SDLVehicleDataResult *)accPedalPosition steeringWheelAngle:(nullable SDLVehicleDataResult *)steeringWheelAngle engineOilLife:(nullable SDLVehicleDataResult *)engineOilLife electronicParkBrakeStatus:(nullable SDLVehicleDataResult *)electronicParkBrakeStatus cloudAppVehicleID:(nullable SDLVehicleDataResult *)cloudAppVehicleID eCallInfo:(nullable SDLVehicleDataResult *)eCallInfo airbagStatus:(nullable SDLVehicleDataResult *)airbagStatus emergencyEvent:(nullable SDLVehicleDataResult *)emergencyEvent clusterModes:(nullable SDLVehicleDataResult *)clusterModes myKey:(nullable SDLVehicleDataResult *)myKey handsOffSteering:(nullable SDLVehicleDataResult *)handsOffSteering windowStatus:(nullable SDLVehicleDataResult *)windowStatus;
+
+/**
+ * See GearStatus
+ *
+ * @since SDL 7.0
+*/
+@property (strong, nonatomic, nullable) SDLVehicleDataResult *gearStatus;
+
+/**
The result of requesting to subscribe to the GPSData.
Optional
@@ -42,14 +85,14 @@ NS_ASSUME_NONNULL_BEGIN
Optional
*/
-@property (strong, nonatomic, nullable) SDLVehicleDataResult *fuelLevel;
+@property (strong, nonatomic, nullable) SDLVehicleDataResult *fuelLevel __deprecated_msg("use fuelRange instead on 7.0+ RPC version connections");
/**
The result of requesting to subscribe to the fuel level state.
Optional
*/
-@property (strong, nonatomic, nullable) SDLVehicleDataResult *fuelLevel_State;
+@property (strong, nonatomic, nullable) SDLVehicleDataResult *fuelLevel_State __deprecated_msg("use fuelRange instead on 7.0+ RPC version connections");
/**
The result of requesting to subscribe to the fuel range.
@@ -73,11 +116,12 @@ NS_ASSUME_NONNULL_BEGIN
@property (strong, nonatomic, nullable) SDLVehicleDataResult *externalTemperature;
/**
- The result of requesting to subscribe to the PRNDL status.
-
- Optional
- */
-@property (strong, nonatomic, nullable) SDLVehicleDataResult *prndl;
+ * See PRNDL. This parameter is deprecated and it is now covered in `gearStatus`
+ *
+ * @deprecated
+ * @since SDL 7.0
+*/
+@property (strong, nonatomic, nullable) SDLVehicleDataResult *prndl __deprecated_msg("use gearStatus instead on 7.0+ RPC version connections");
/**
The result of requesting to subscribe to the tireStatus.
@@ -122,6 +166,13 @@ NS_ASSUME_NONNULL_BEGIN
@property (strong, nonatomic, nullable) SDLVehicleDataResult *driverBraking;
/**
+ * See WindowStatus
+ *
+ * @since SDL 7.0
+ */
+@property (strong, nonatomic, nullable) SDLVehicleDataResult *windowStatus;
+
+/**
The result of requesting to subscribe to the status of the wipers.
Optional
@@ -129,6 +180,11 @@ NS_ASSUME_NONNULL_BEGIN
@property (strong, nonatomic, nullable) SDLVehicleDataResult *wiperStatus;
/**
+ To indicate whether driver hands are off the steering wheel
+ */
+@property (strong, nonatomic, nullable) SDLVehicleDataResult *handsOffSteering;
+
+/**
The result of requesting to subscribe to the status of the head lamps.
Optional
@@ -221,7 +277,7 @@ NS_ASSUME_NONNULL_BEGIN
/**
Sets the OEM custom vehicle data state for any given OEM custom vehicle data name.
-
+
@param vehicleDataName The name of the OEM custom vehicle data item.
@param vehicleDataState SDLVehicleDataResult object containing custom data type and result code information.
@@ -231,7 +287,7 @@ NS_ASSUME_NONNULL_BEGIN
/**
Gets the OEM custom vehicle data state for any given OEM custom vehicle data name.
-
+
@param vehicleDataName The name of the OEM custom vehicle data item.
@return SDLVehicleDataResult An object containing custom data type and result code information.
diff --git a/SmartDeviceLink/SDLSubscribeVehicleDataResponse.m b/SmartDeviceLink/SDLSubscribeVehicleDataResponse.m
index 7ab6b4e63..ec2432d80 100644
--- a/SmartDeviceLink/SDLSubscribeVehicleDataResponse.m
+++ b/SmartDeviceLink/SDLSubscribeVehicleDataResponse.m
@@ -16,12 +16,59 @@ NS_ASSUME_NONNULL_BEGIN
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
- (instancetype)init {
- if (self = [super initWithName:SDLRPCFunctionNameSubscribeVehicleData]) {
+ self = [super initWithName:SDLRPCFunctionNameSubscribeVehicleData];
+ if (!self) {
+ return nil;
}
return self;
}
#pragma clang diagnostic pop
+- (instancetype)initWithGps:(nullable SDLVehicleDataResult *)gps speed:(nullable SDLVehicleDataResult *)speed rpm:(nullable SDLVehicleDataResult *)rpm instantFuelConsumption:(nullable SDLVehicleDataResult *)instantFuelConsumption fuelRange:(nullable SDLVehicleDataResult *)fuelRange externalTemperature:(nullable SDLVehicleDataResult *)externalTemperature turnSignal:(nullable SDLVehicleDataResult *)turnSignal gearStatus:(nullable SDLVehicleDataResult *)gearStatus tirePressure:(nullable SDLVehicleDataResult *)tirePressure odometer:(nullable SDLVehicleDataResult *)odometer beltStatus:(nullable SDLVehicleDataResult *)beltStatus bodyInformation:(nullable SDLVehicleDataResult *)bodyInformation deviceStatus:(nullable SDLVehicleDataResult *)deviceStatus driverBraking:(nullable SDLVehicleDataResult *)driverBraking wiperStatus:(nullable SDLVehicleDataResult *)wiperStatus headLampStatus:(nullable SDLVehicleDataResult *)headLampStatus engineTorque:(nullable SDLVehicleDataResult *)engineTorque accPedalPosition:(nullable SDLVehicleDataResult *)accPedalPosition steeringWheelAngle:(nullable SDLVehicleDataResult *)steeringWheelAngle engineOilLife:(nullable SDLVehicleDataResult *)engineOilLife electronicParkBrakeStatus:(nullable SDLVehicleDataResult *)electronicParkBrakeStatus cloudAppVehicleID:(nullable SDLVehicleDataResult *)cloudAppVehicleID eCallInfo:(nullable SDLVehicleDataResult *)eCallInfo airbagStatus:(nullable SDLVehicleDataResult *)airbagStatus emergencyEvent:(nullable SDLVehicleDataResult *)emergencyEvent clusterModes:(nullable SDLVehicleDataResult *)clusterModes myKey:(nullable SDLVehicleDataResult *)myKey handsOffSteering:(nullable SDLVehicleDataResult *)handsOffSteering windowStatus:(nullable SDLVehicleDataResult *)windowStatus {
+ self = [self init];
+ if (!self) {
+ return nil;
+ }
+ self.gps = gps;
+ self.speed = speed;
+ self.rpm = rpm;
+ self.instantFuelConsumption = instantFuelConsumption;
+ self.fuelRange = fuelRange;
+ self.externalTemperature = externalTemperature;
+ self.turnSignal = turnSignal;
+ self.gearStatus = gearStatus;
+ self.tirePressure = tirePressure;
+ self.odometer = odometer;
+ self.beltStatus = beltStatus;
+ self.bodyInformation = bodyInformation;
+ self.deviceStatus = deviceStatus;
+ self.driverBraking = driverBraking;
+ self.wiperStatus = wiperStatus;
+ self.headLampStatus = headLampStatus;
+ self.engineTorque = engineTorque;
+ self.accPedalPosition = accPedalPosition;
+ self.steeringWheelAngle = steeringWheelAngle;
+ self.engineOilLife = engineOilLife;
+ self.electronicParkBrakeStatus = electronicParkBrakeStatus;
+ self.cloudAppVehicleID = cloudAppVehicleID;
+ self.eCallInfo = eCallInfo;
+ self.airbagStatus = airbagStatus;
+ self.emergencyEvent = emergencyEvent;
+ self.clusterModes = clusterModes;
+ self.myKey = myKey;
+ self.handsOffSteering = handsOffSteering;
+ self.windowStatus = windowStatus;
+ return self;
+}
+
+- (void)setGearStatus:(nullable SDLVehicleDataResult *)gearStatus {
+ [self.parameters sdl_setObject:gearStatus forName:SDLRPCParameterNameGearStatus];
+}
+
+- (nullable SDLVehicleDataResult *)gearStatus {
+ return [self.parameters sdl_objectForName:SDLRPCParameterNameGearStatus ofClass:SDLVehicleDataResult.class error:nil];
+}
+
- (void)setGps:(nullable SDLVehicleDataResult *)gps {
[self.parameters sdl_setObject:gps forName:SDLRPCParameterNameGPS];
}
@@ -142,6 +189,15 @@ NS_ASSUME_NONNULL_BEGIN
return [self.parameters sdl_objectForName:SDLRPCParameterNameDriverBraking ofClass:SDLVehicleDataResult.class error:nil];
}
+- (void)setWindowStatus:(nullable SDLVehicleDataResult *)windowStatus {
+ [self.parameters sdl_setObject:windowStatus forName:SDLRPCParameterNameWindowStatus];
+}
+
+- (nullable SDLVehicleDataResult *)windowStatus {
+ NSError *error = nil;
+ return [self.parameters sdl_objectForName:SDLRPCParameterNameWindowStatus ofClass:SDLVehicleDataResult.class error:&error];
+}
+
- (void)setWiperStatus:(nullable SDLVehicleDataResult *)wiperStatus {
[self.parameters sdl_setObject:wiperStatus forName:SDLRPCParameterNameWiperStatus];
}
@@ -150,6 +206,15 @@ NS_ASSUME_NONNULL_BEGIN
return [self.parameters sdl_objectForName:SDLRPCParameterNameWiperStatus ofClass:SDLVehicleDataResult.class error:nil];
}
+- (void)setHandsOffSteering:(nullable SDLVehicleDataResult *)handsOffSteering {
+ [self.parameters sdl_setObject:handsOffSteering forName:SDLRPCParameterNameHandsOffSteering];
+}
+
+- (nullable SDLVehicleDataResult *)handsOffSteering {
+ NSError *error = nil;
+ return [self.parameters sdl_objectForName:SDLRPCParameterNameHandsOffSteering ofClass:SDLVehicleDataResult.class error:&error];
+}
+
- (void)setHeadLampStatus:(nullable SDLVehicleDataResult *)headLampStatus {
[self.parameters sdl_setObject:headLampStatus forName:SDLRPCParameterNameHeadLampStatus];
}
diff --git a/SmartDeviceLink/SDLSubtleAlert.h b/SmartDeviceLink/SDLSubtleAlert.h
new file mode 100644
index 000000000..f49c0e2c9
--- /dev/null
+++ b/SmartDeviceLink/SDLSubtleAlert.h
@@ -0,0 +1,103 @@
+/*
+ * Copyright (c) 2020, SmartDeviceLink Consortium, Inc.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following
+ * disclaimer in the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * Neither the name of the SmartDeviceLink Consortium Inc. nor the names of
+ * its contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#import "SDLRPCRequest.h"
+
+@class SDLImage;
+@class SDLSoftButton;
+@class SDLTTSChunk;
+
+NS_ASSUME_NONNULL_BEGIN
+
+/**
+ * Shows an alert which typically consists of text-to-speech message and text on the display. At least either alertText1, alertText2 or TTSChunks need to be provided.
+ *
+ * @since SDL 7.0.0
+ */
+@interface SDLSubtleAlert : SDLRPCRequest
+
+/**
+ * @param alertText1 - alertText1
+ * @param alertText2 - alertText2
+ * @param alertIcon - alertIcon
+ * @param ttsChunks - ttsChunks
+ * @param duration - duration
+ * @param softButtons - softButtons
+ * @param cancelID - cancelID
+ * @return A SDLSubtleAlert object
+ */
+- (instancetype)initWithAlertText1:(nullable NSString *)alertText1 alertText2:(nullable NSString *)alertText2 alertIcon:(nullable SDLImage *)alertIcon ttsChunks:(nullable NSArray<SDLTTSChunk *> *)ttsChunks duration:(nullable NSNumber<SDLUInt> *)duration softButtons:(nullable NSArray<SDLSoftButton *> *)softButtons cancelID:(nullable NSNumber<SDLInt> *)cancelID;
+
+/**
+ * The first line of the alert text field
+ * {"default_value": null, "max_length": 500, "min_length": 1}
+ */
+@property (nullable, strong, nonatomic) NSString *alertText1;
+
+/**
+ * The second line of the alert text field
+ * {"default_value": null, "max_length": 500, "min_length": 1}
+ */
+@property (nullable, strong, nonatomic) NSString *alertText2;
+
+/**
+ * Image to be displayed for the corresponding alert. See Image. If omitted on supported displays, no (or the default if applicable) icon should be displayed.
+ */
+@property (nullable, strong, nonatomic) SDLImage *alertIcon;
+
+/**
+ * An array of text chunks of type TTSChunk. See TTSChunk. The array must have at least one item.
+ * {"default_value": null, "max_size": 100, "min_size": 1}
+ */
+@property (nullable, strong, nonatomic) NSArray<SDLTTSChunk *> *ttsChunks;
+
+/**
+ * Timeout in milliseconds. Typical timeouts are 3-5 seconds. If omitted, timeout is set to 5s.
+ * {"default_value": 5000, "max_value": 10000, "min_value": 3000}
+ */
+@property (nullable, strong, nonatomic) NSNumber<SDLUInt> *duration;
+
+/**
+ * App defined SoftButtons. If omitted on supported displays, the displayed alert shall not have any SoftButtons.
+ * {"default_value": null, "max_size": 2, "min_size": 0}
+ */
+@property (nullable, strong, nonatomic) NSArray<SDLSoftButton *> *softButtons;
+
+/**
+ * An ID for this specific alert to allow cancellation through the `CancelInteraction` RPC.
+ * {"default_value": null, "max_value": null, "min_value": null}
+ */
+@property (nullable, strong, nonatomic) NSNumber<SDLInt> *cancelID;
+
+@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLSubtleAlert.m b/SmartDeviceLink/SDLSubtleAlert.m
new file mode 100644
index 000000000..651b92a2c
--- /dev/null
+++ b/SmartDeviceLink/SDLSubtleAlert.m
@@ -0,0 +1,130 @@
+/*
+ * Copyright (c) 2020, SmartDeviceLink Consortium, Inc.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following
+ * disclaimer in the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * Neither the name of the SmartDeviceLink Consortium Inc. nor the names of
+ * its contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#import "SDLSubtleAlert.h"
+
+#import "NSMutableDictionary+Store.h"
+#import "SDLImage.h"
+#import "SDLRPCFunctionNames.h"
+#import "SDLRPCParameterNames.h"
+#import "SDLSoftButton.h"
+#import "SDLTTSChunk.h"
+
+NS_ASSUME_NONNULL_BEGIN
+
+@implementation SDLSubtleAlert
+
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
+- (instancetype)init {
+ self = [super initWithName:SDLRPCFunctionNameSubtleAlert];
+ if (!self) {
+ return nil;
+ }
+ return self;
+}
+#pragma clang diagnostic pop
+
+- (instancetype)initWithAlertText1:(nullable NSString *)alertText1 alertText2:(nullable NSString *)alertText2 alertIcon:(nullable SDLImage *)alertIcon ttsChunks:(nullable NSArray<SDLTTSChunk *> *)ttsChunks duration:(nullable NSNumber<SDLUInt> *)duration softButtons:(nullable NSArray<SDLSoftButton *> *)softButtons cancelID:(nullable NSNumber<SDLInt> *)cancelID {
+ self = [self init];
+ if (!self) {
+ return nil;
+ }
+ self.alertText1 = alertText1;
+ self.alertText2 = alertText2;
+ self.alertIcon = alertIcon;
+ self.ttsChunks = ttsChunks;
+ self.duration = duration;
+ self.softButtons = softButtons;
+ self.cancelID = cancelID;
+ return self;
+}
+
+- (void)setAlertText1:(nullable NSString *)alertText1 {
+ [self.parameters sdl_setObject:alertText1 forName:SDLRPCParameterNameAlertText1];
+}
+
+- (nullable NSString *)alertText1 {
+ return [self.parameters sdl_objectForName:SDLRPCParameterNameAlertText1 ofClass:NSString.class error:nil];
+}
+
+- (void)setAlertText2:(nullable NSString *)alertText2 {
+ [self.parameters sdl_setObject:alertText2 forName:SDLRPCParameterNameAlertText2];
+}
+
+- (nullable NSString *)alertText2 {
+ return [self.parameters sdl_objectForName:SDLRPCParameterNameAlertText2 ofClass:NSString.class error:nil];
+}
+
+- (void)setAlertIcon:(nullable SDLImage *)alertIcon {
+ [self.parameters sdl_setObject:alertIcon forName:SDLRPCParameterNameAlertIcon];
+}
+
+- (nullable SDLImage *)alertIcon {
+ return [self.parameters sdl_objectForName:SDLRPCParameterNameAlertIcon ofClass:SDLImage.class error:nil];
+}
+
+- (void)setTtsChunks:(nullable NSArray<SDLTTSChunk *> *)ttsChunks {
+ [self.parameters sdl_setObject:ttsChunks forName:SDLRPCParameterNameTTSChunks];
+}
+
+- (nullable NSArray<SDLTTSChunk *> *)ttsChunks {
+ return [self.parameters sdl_objectsForName:SDLRPCParameterNameTTSChunks ofClass:SDLTTSChunk.class error:nil];
+}
+
+- (void)setDuration:(nullable NSNumber<SDLUInt> *)duration {
+ [self.parameters sdl_setObject:duration forName:SDLRPCParameterNameDuration];
+}
+
+- (nullable NSNumber<SDLUInt> *)duration {
+ return [self.parameters sdl_objectForName:SDLRPCParameterNameDuration ofClass:NSNumber.class error:nil];
+}
+
+- (void)setSoftButtons:(nullable NSArray<SDLSoftButton *> *)softButtons {
+ [self.parameters sdl_setObject:softButtons forName:SDLRPCParameterNameSoftButtons];
+}
+
+- (nullable NSArray<SDLSoftButton *> *)softButtons {
+ return [self.parameters sdl_objectsForName:SDLRPCParameterNameSoftButtons ofClass:SDLSoftButton.class error:nil];
+}
+
+- (void)setCancelID:(nullable NSNumber<SDLInt> *)cancelID {
+ [self.parameters sdl_setObject:cancelID forName:SDLRPCParameterNameCancelID];
+}
+
+- (nullable NSNumber<SDLInt> *)cancelID {
+ return [self.parameters sdl_objectForName:SDLRPCParameterNameCancelID ofClass:NSNumber.class error:nil];
+}
+
+@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLSubtleAlertResponse.h b/SmartDeviceLink/SDLSubtleAlertResponse.h
new file mode 100644
index 000000000..00940a540
--- /dev/null
+++ b/SmartDeviceLink/SDLSubtleAlertResponse.h
@@ -0,0 +1,56 @@
+/*
+ * Copyright (c) 2020, SmartDeviceLink Consortium, Inc.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following
+ * disclaimer in the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * Neither the name of the SmartDeviceLink Consortium Inc. nor the names of
+ * its contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#import "SDLRPCResponse.h"
+
+NS_ASSUME_NONNULL_BEGIN
+
+/**
+ * @since SDL 7.0.0
+ */
+@interface SDLSubtleAlertResponse : SDLRPCResponse
+
+/**
+ * @param tryAgainTime - tryAgainTime
+ * @return A SDLSubtleAlertResponse object
+ */
+- (instancetype)initWithTryAgainTime:(nullable NSNumber<SDLUInt> *)tryAgainTime;
+
+/**
+ * Amount of time (in milliseconds) that an app must wait before resending an alert. If provided, another system event or overlay currently has a higher priority than this alert. An app must not send an alert without waiting at least the amount of time dictated.
+ * {"default_value": null, "max_value": 2000000000, "min_value": 0}
+ */
+@property (nullable, strong, nonatomic) NSNumber<SDLUInt> *tryAgainTime;
+
+@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLSubtleAlertResponse.m b/SmartDeviceLink/SDLSubtleAlertResponse.m
new file mode 100644
index 000000000..4bd9c4b5a
--- /dev/null
+++ b/SmartDeviceLink/SDLSubtleAlertResponse.m
@@ -0,0 +1,73 @@
+/*
+ * Copyright (c) 2020, SmartDeviceLink Consortium, Inc.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following
+ * disclaimer in the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * Neither the name of the SmartDeviceLink Consortium Inc. nor the names of
+ * its contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#import "SDLSubtleAlertResponse.h"
+
+#import "NSMutableDictionary+Store.h"
+#import "SDLRPCFunctionNames.h"
+#import "SDLRPCParameterNames.h"
+
+NS_ASSUME_NONNULL_BEGIN
+
+@implementation SDLSubtleAlertResponse
+
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
+- (instancetype)init {
+ self = [super initWithName:SDLRPCFunctionNameSubtleAlert];
+ if (!self) {
+ return nil;
+ }
+ return self;
+}
+#pragma clang diagnostic pop
+
+- (instancetype)initWithTryAgainTime:(nullable NSNumber<SDLUInt> *)tryAgainTime {
+ self = [self init];
+ if (!self) {
+ return nil;
+ }
+ self.tryAgainTime = tryAgainTime;
+ return self;
+}
+
+- (void)setTryAgainTime:(nullable NSNumber<SDLUInt> *)tryAgainTime {
+ [self.parameters sdl_setObject:tryAgainTime forName:SDLRPCParameterNameTryAgainTime];
+}
+
+- (nullable NSNumber<SDLUInt> *)tryAgainTime {
+ return [self.parameters sdl_objectForName:SDLRPCParameterNameTryAgainTime ofClass:NSNumber.class error:nil];
+}
+
+@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLSystemCapability.h b/SmartDeviceLink/SDLSystemCapability.h
index f0ac7b2d8..d41136c2f 100755
--- a/SmartDeviceLink/SDLSystemCapability.h
+++ b/SmartDeviceLink/SDLSystemCapability.h
@@ -1,21 +1,46 @@
-//
-// SDLSystemCapability.h
-// SmartDeviceLink-iOS
-//
-// Created by Joel Fischer on 7/10/17.
-// Copyright © 2017 smartdevicelink. All rights reserved.
-//
+/*
+* Copyright (c) 2020, SmartDeviceLink Consortium, Inc.
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* Redistributions of source code must retain the above copyright notice, this
+* list of conditions and the following disclaimer.
+*
+* Redistributions in binary form must reproduce the above copyright notice,
+* this list of conditions and the following
+* disclaimer in the documentation and/or other materials provided with the
+* distribution.
+*
+* Neither the name of the SmartDeviceLink Consortium Inc. nor the names of
+* its contributors may be used to endorse or promote products derived
+* from this software without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+*/
#import "SDLRPCStruct.h"
#import "SDLSystemCapabilityType.h"
@class SDLAppServicesCapabilities;
-@class SDLPhoneCapability;
+@class SDLDisplayCapability;
+@class SDLDriverDistractionCapability;
@class SDLNavigationCapability;
-@class SDLVideoStreamingCapability;
+@class SDLPhoneCapability;
@class SDLRemoteControlCapabilities;
@class SDLSeatLocationCapability;
-@class SDLDisplayCapability;
+@class SDLVideoStreamingCapability;
NS_ASSUME_NONNULL_BEGIN
@@ -82,6 +107,11 @@ NS_ASSUME_NONNULL_BEGIN
*/
- (instancetype)initWithSeatLocationCapability:(SDLSeatLocationCapability *)capability;
+/// Convenience init for a Driver Distraction capability
+/// @param capability Describes capabilities when the driver is distracted
+/// @return A SDLSystemCapability object
+- (instancetype)initWithDriverDistractionCapability:(SDLDriverDistractionCapability *)capability;
+
/**
* Used as a descriptor of what data to expect in this struct. The corresponding param to this enum should be included and the only other parameter included.
*/
@@ -138,6 +168,13 @@ NS_ASSUME_NONNULL_BEGIN
*/
@property (nullable, strong, nonatomic) NSArray<SDLDisplayCapability *> *displayCapabilities;
+/**
+ * Describes capabilities when the driver is distracted
+ *
+ * @since SDL 7.0.0
+ */
+@property (nullable, strong, nonatomic) SDLDriverDistractionCapability *driverDistractionCapability;
+
@end
NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLSystemCapability.m b/SmartDeviceLink/SDLSystemCapability.m
index 3936e463b..8cfe47dbe 100755
--- a/SmartDeviceLink/SDLSystemCapability.m
+++ b/SmartDeviceLink/SDLSystemCapability.m
@@ -1,23 +1,48 @@
-//
-// SDLSystemCapability.m
-// SmartDeviceLink-iOS
-//
-// Created by Joel Fischer on 7/10/17.
-// Copyright © 2017 smartdevicelink. All rights reserved.
-//
+/*
+* Copyright (c) 2020, SmartDeviceLink Consortium, Inc.
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* Redistributions of source code must retain the above copyright notice, this
+* list of conditions and the following disclaimer.
+*
+* Redistributions in binary form must reproduce the above copyright notice,
+* this list of conditions and the following
+* disclaimer in the documentation and/or other materials provided with the
+* distribution.
+*
+* Neither the name of the SmartDeviceLink Consortium Inc. nor the names of
+* its contributors may be used to endorse or promote products derived
+* from this software without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+*/
#import "SDLSystemCapability.h"
#import "NSMutableDictionary+Store.h"
#import "SDLAppServicesCapabilities.h"
-#import "SDLRPCParameterNames.h"
+#import "SDLDisplayCapability.h"
+#import "SDLDriverDistractionCapability.h"
#import "SDLNavigationCapability.h"
#import "SDLPhoneCapability.h"
-#import "SDLSystemCapabilityType.h"
-#import "SDLVideoStreamingCapability.h"
#import "SDLRemoteControlCapabilities.h"
+#import "SDLRPCParameterNames.h"
#import "SDLSeatLocationCapability.h"
-#import "SDLDisplayCapability.h"
+#import "SDLSystemCapabilityType.h"
+#import "SDLVideoStreamingCapability.h"
NS_ASSUME_NONNULL_BEGIN
@@ -107,6 +132,18 @@ NS_ASSUME_NONNULL_BEGIN
return self;
}
+- (instancetype)initWithDriverDistractionCapability:(SDLDriverDistractionCapability *)capability {
+ self = [self init];
+ if (!self) {
+ return nil;
+ }
+
+ self.systemCapabilityType = SDLSystemCapabilityTypeDriverDistraction;
+ self.driverDistractionCapability = capability;
+
+ return self;
+}
+
- (void)setSystemCapabilityType:(SDLSystemCapabilityType)type {
[self.store sdl_setObject:type forName:SDLRPCParameterNameSystemCapabilityType];
}
@@ -172,6 +209,14 @@ NS_ASSUME_NONNULL_BEGIN
return [self.store sdl_objectsForName:SDLRPCParameterNameDisplayCapabilities ofClass:SDLDisplayCapability.class error:nil];
}
+- (void)setDriverDistractionCapability:(nullable SDLDriverDistractionCapability *)driverDistractionCapability {
+ [self.store sdl_setObject:driverDistractionCapability forName:SDLRPCParameterNameDriverDistractionCapability];
+}
+
+- (nullable SDLDriverDistractionCapability *)driverDistractionCapability {
+ return [self.store sdl_objectForName:SDLRPCParameterNameDriverDistractionCapability ofClass:SDLDriverDistractionCapability.class error:nil];
+}
+
@end
NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLSystemCapabilityManager.h b/SmartDeviceLink/SDLSystemCapabilityManager.h
index ca1c35792..bbedc4c66 100644
--- a/SmartDeviceLink/SDLSystemCapabilityManager.h
+++ b/SmartDeviceLink/SDLSystemCapabilityManager.h
@@ -19,6 +19,7 @@
@class SDLButtonCapabilities;
@class SDLDisplayCapability;
@class SDLDisplayCapabilities;
+@class SDLDriverDistractionCapability;
@class SDLHMICapabilities;
@class SDLNavigationCapability;
@class SDLPhoneCapability;
@@ -156,58 +157,36 @@ typedef void (^SDLCapabilityUpdateWithErrorHandler)(SDLSystemCapability * _Nulla
/**
* If returned, the platform supports app services
- *
- * @see SDLAppServicesCapabilities
- *
- * Optional
*/
@property (nullable, strong, nonatomic, readonly) SDLAppServicesCapabilities *appServicesCapabilities;
/**
If returned, the platform supports navigation
-
- @see SDLNavigationCapability
-
- Optional
*/
@property (nullable, strong, nonatomic, readonly) SDLNavigationCapability *navigationCapability;
/**
If returned, the platform supports making phone calls
-
- @see SDLPhoneCapability
-
- Optional
*/
@property (nullable, strong, nonatomic, readonly) SDLPhoneCapability *phoneCapability;
/**
If returned, the platform supports video streaming
-
- @see SDLVideoStreamingCapability
-
- Optional
*/
@property (nullable, strong, nonatomic, readonly) SDLVideoStreamingCapability *videoStreamingCapability;
/**
If returned, the platform supports remote control capabilities
-
- @see SDLRemoteControlCapabilities
-
- Optional
*/
@property (nullable, strong, nonatomic, readonly) SDLRemoteControlCapabilities *remoteControlCapability;
/**
If returned, the platform supports remote control capabilities for seats
-
- @see SDLSeatLocationCapability
-
- Optional
*/
@property (nullable, strong, nonatomic, readonly) SDLSeatLocationCapability *seatLocationCapability;
+/// If returned, the platform supports driver distraction capabilities
+@property (nullable, strong, nonatomic, readonly) SDLDriverDistractionCapability *driverDistractionCapability;
/**
* Returns the window capability object of the default main window which is always pre-created by the connected system. This is a convenience method for easily accessing the capabilities of the default main window.
diff --git a/SmartDeviceLink/SDLSystemCapabilityManager.m b/SmartDeviceLink/SDLSystemCapabilityManager.m
index e5817b9d7..8c979a18e 100644
--- a/SmartDeviceLink/SDLSystemCapabilityManager.m
+++ b/SmartDeviceLink/SDLSystemCapabilityManager.m
@@ -14,6 +14,7 @@
#import "SDLConnectionManagerType.h"
#import "SDLDisplayCapabilities.h"
#import "SDLDisplayCapability.h"
+#import "SDLDriverDistractionCapability.h"
#import "SDLError.h"
#import "SDLGenericResponse.h"
#import "SDLGetSystemCapability.h"
@@ -68,6 +69,7 @@ typedef NSString * SDLServiceID;
@property (nullable, strong, nonatomic, readwrite) SDLVideoStreamingCapability *videoStreamingCapability;
@property (nullable, strong, nonatomic, readwrite) SDLRemoteControlCapabilities *remoteControlCapability;
@property (nullable, strong, nonatomic, readwrite) SDLSeatLocationCapability *seatLocationCapability;
+@property (nullable, strong, nonatomic, readwrite) SDLDriverDistractionCapability *driverDistractionCapability;
@property (nullable, strong, nonatomic) NSMutableDictionary<SDLServiceID, SDLAppServiceCapability *> *appServicesCapabilitiesDictionary;
@@ -119,7 +121,7 @@ typedef NSString * SDLServiceID;
*/
- (void)stop {
SDLLogD(@"System Capability manager stopped");
- [self sdl_runSyncOnQueue:^{
+ [SDLGlobals runSyncOnSerialSubQueue:self.readWriteQueue block:^{
self.displayCapabilities = nil;
self.displays = nil;
self.hmiCapabilities = nil;
@@ -137,6 +139,7 @@ typedef NSString * SDLServiceID;
self.videoStreamingCapability = nil;
self.remoteControlCapability = nil;
self.seatLocationCapability = nil;
+ self.driverDistractionCapability = nil;
self.supportsSubscriptions = NO;
@@ -292,6 +295,8 @@ typedef NSString * SDLServiceID;
return self.hmiCapabilities.remoteControl.boolValue;
} else if ([type isEqualToEnum:SDLSystemCapabilityTypeSeatLocation]) {
return self.hmiCapabilities.seatLocation.boolValue;
+ } else if ([type isEqualToEnum:SDLSystemCapabilityTypeDriverDistraction]) {
+ return self.hmiCapabilities.driverDistraction.boolValue;
} else if ([type isEqualToEnum:SDLSystemCapabilityTypeAppServices]) {
//This is a corner case that the param was not available in 5.1.0, but the app services feature was available. We have to say it's available because we don't know.
if ([[SDLGlobals sharedGlobals].rpcVersion isEqualToVersion:[SDLVersion versionWithString:@"5.1.0"]]) {
@@ -325,6 +330,8 @@ typedef NSString * SDLServiceID;
return [[SDLSystemCapability alloc] initWithDisplayCapabilities:self.displays];
} else if ([type isEqualToEnum:SDLSystemCapabilityTypeSeatLocation] && self.seatLocationCapability != nil) {
return [[SDLSystemCapability alloc] initWithSeatLocationCapability:self.seatLocationCapability];
+ } else if ([type isEqualToEnum:SDLSystemCapabilityTypeDriverDistraction] && self.driverDistractionCapability != nil) {
+ return [[SDLSystemCapability alloc] initWithDriverDistractionCapability:self.driverDistractionCapability];
} else if ([type isEqualToEnum:SDLSystemCapabilityTypeRemoteControl] && self.remoteControlCapability != nil) {
return [[SDLSystemCapability alloc] initWithRemoteControlCapability:self.remoteControlCapability];
} else if ([type isEqualToEnum:SDLSystemCapabilityTypeVideoStreaming] && self.videoStreamingCapability != nil) {
@@ -388,7 +395,7 @@ typedef NSString * SDLServiceID;
SDLLogD(@"GetSystemCapability response succeeded, type: %@, response: %@", type, getSystemCapabilityResponse);
if (![weakself.subscriptionStatus[type] isEqualToNumber:subscribe] && weakself.supportsSubscriptions) {
- [self sdl_runSyncOnQueue:^{
+ [SDLGlobals runSyncOnSerialSubQueue:self.readWriteQueue block:^{
weakself.subscriptionStatus[type] = subscribe;
}];
}
@@ -435,6 +442,12 @@ typedef NSString * SDLServiceID;
return NO;
}
self.seatLocationCapability = systemCapability.seatLocationCapability;
+ } else if ([systemCapabilityType isEqualToEnum:SDLSystemCapabilityTypeDriverDistraction]) {
+ if ([self.driverDistractionCapability isEqual:systemCapability.driverDistractionCapability]) {
+ [self sdl_callObserversForUpdate:systemCapability error:error handler:handler];
+ return NO;
+ }
+ self.driverDistractionCapability = systemCapability.driverDistractionCapability;
} else if ([systemCapabilityType isEqualToEnum:SDLSystemCapabilityTypeVideoStreaming]) {
if ([self.videoStreamingCapability isEqual:systemCapability.videoStreamingCapability]) {
[self sdl_callObserversForUpdate:systemCapability error:error handler:handler];
@@ -465,7 +478,7 @@ typedef NSString * SDLServiceID;
for (SDLAppServiceCapability *capability in newCapabilities.appServices) {
// If the capability has been removed, delete the saved capability; otherwise just update with the new capability
SDLAppServiceCapability *newCapability = [capability.updateReason isEqualToEnum:SDLServiceUpdateRemoved] ? nil : capability;
- [self sdl_runSyncOnQueue:^{
+ [SDLGlobals runSyncOnSerialSubQueue:self.readWriteQueue block:^{
self.appServicesCapabilitiesDictionary[capability.updatedAppServiceRecord.serviceID] = newCapability;
}];
}
@@ -569,7 +582,7 @@ typedef NSString * SDLServiceID;
if (self.capabilityObservers[type] == nil) {
SDLLogD(@"This is the first subscription to capability type: %@, sending a GetSystemCapability with subscribe true", type);
- [self sdl_runSyncOnQueue:^{
+ [SDLGlobals runSyncOnSerialSubQueue:self.readWriteQueue block:^{
self.capabilityObservers[type] = [NSMutableArray arrayWithObject:observerObject];
}];
@@ -582,7 +595,7 @@ typedef NSString * SDLServiceID;
}
} else {
// Store the observer and call it immediately with the cached value
- [self sdl_runSyncOnQueue:^{
+ [SDLGlobals runSyncOnSerialSubQueue:self.readWriteQueue block:^{
[self.capabilityObservers[type] addObject:observerObject];
}];
@@ -598,7 +611,7 @@ typedef NSString * SDLServiceID;
SDLLogD(@"Unsubscribing from capability type: %@", type);
for (SDLSystemCapabilityObserver *capabilityObserver in self.capabilityObservers[type]) {
if ([observer isEqual:capabilityObserver.observer] && self.capabilityObservers[type] != nil) {
- [self sdl_runSyncOnQueue:^{
+ [SDLGlobals runSyncOnSerialSubQueue:self.readWriteQueue block:^{
[self.capabilityObservers[type] removeObject:capabilityObserver];
}];
@@ -613,7 +626,7 @@ typedef NSString * SDLServiceID;
// Loop through our observers
for (SDLSystemCapabilityType key in self.capabilityObservers.allKeys) {
for (SDLSystemCapabilityObserver *observer in self.capabilityObservers[key]) {
- [self sdl_runSyncOnQueue:^{
+ [SDLGlobals runSyncOnSerialSubQueue:self.readWriteQueue block:^{
// If an observer object is nil, remove it
if (observer.observer == nil) {
[self.capabilityObservers[key] removeObject:observer];
@@ -791,24 +804,12 @@ typedef NSString * SDLServiceID;
self.currentHMILevel = onHMIStatus.hmiLevel;
}
-#pragma mark Utilities
-
-/// Checks if we are already on the serial readWrite queue. If so, the block is added to the queue; if not, the block is dispatched to the readWrite queue.
-/// @discussion Used to ensure atomic access to global properties.
-/// @param block The block to be executed.
-- (void)sdl_runSyncOnQueue:(void (^)(void))block {
- if (dispatch_get_specific(SDLProcessingQueueName) != nil) {
- block();
- } else {
- dispatch_sync(self.readWriteQueue, block);
- }
-}
#pragma mark Getters
- (NSMutableDictionary<SDLSystemCapabilityType, NSMutableArray<SDLSystemCapabilityObserver *> *> *)capabilityObservers {
__block NSMutableDictionary<SDLSystemCapabilityType, NSMutableArray<SDLSystemCapabilityObserver *> *> *dict = nil;
- [self sdl_runSyncOnQueue:^{
+ [SDLGlobals runSyncOnSerialSubQueue:self.readWriteQueue block:^{
dict = self->_capabilityObservers;
}];
@@ -817,7 +818,7 @@ typedef NSString * SDLServiceID;
- (NSMutableDictionary<SDLSystemCapabilityType, NSNumber<SDLBool> *> *)subscriptionStatus {
__block NSMutableDictionary<SDLSystemCapabilityType, NSNumber<SDLBool> *> *dict = nil;
- [self sdl_runSyncOnQueue:^{
+ [SDLGlobals runSyncOnSerialSubQueue:self.readWriteQueue block:^{
dict = self->_subscriptionStatus;
}];
@@ -826,7 +827,7 @@ typedef NSString * SDLServiceID;
- (nullable NSMutableDictionary<SDLServiceID, SDLAppServiceCapability *> *)appServicesCapabilitiesDictionary {
__block NSMutableDictionary<SDLServiceID, SDLAppServiceCapability *> *dict = nil;
- [self sdl_runSyncOnQueue:^{
+ [SDLGlobals runSyncOnSerialSubQueue:self.readWriteQueue block:^{
dict = self->_appServicesCapabilitiesDictionary;
}];
diff --git a/SmartDeviceLink/SDLSystemCapabilityType.h b/SmartDeviceLink/SDLSystemCapabilityType.h
index 60f11a78a..2c5092794 100755
--- a/SmartDeviceLink/SDLSystemCapabilityType.h
+++ b/SmartDeviceLink/SDLSystemCapabilityType.h
@@ -1,10 +1,34 @@
-//
-// SDLSystemCapabilityType.h
-// SmartDeviceLink-iOS
-//
-// Created by Joel Fischer on 7/10/17.
-// Copyright © 2017 smartdevicelink. All rights reserved.
-//
+/*
+* Copyright (c) 2020, SmartDeviceLink Consortium, Inc.
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* Redistributions of source code must retain the above copyright notice, this
+* list of conditions and the following disclaimer.
+*
+* Redistributions in binary form must reproduce the above copyright notice,
+* this list of conditions and the following
+* disclaimer in the documentation and/or other materials provided with the
+* distribution.
+*
+* Neither the name of the SmartDeviceLink Consortium Inc. nor the names of
+* its contributors may be used to endorse or promote products derived
+* from this software without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+*/
#import "SDLEnum.h"
@@ -49,3 +73,8 @@ extern SDLSystemCapabilityType const SDLSystemCapabilityTypeSeatLocation;
@since SDL 6.0
*/
extern SDLSystemCapabilityType const SDLSystemCapabilityTypeDisplays;
+
+/**
+ * @since SDL 7.0.0
+ */
+extern SDLSystemCapabilityType const SDLSystemCapabilityTypeDriverDistraction;
diff --git a/SmartDeviceLink/SDLSystemCapabilityType.m b/SmartDeviceLink/SDLSystemCapabilityType.m
index 4185345e6..5f5894ec5 100755
--- a/SmartDeviceLink/SDLSystemCapabilityType.m
+++ b/SmartDeviceLink/SDLSystemCapabilityType.m
@@ -15,3 +15,4 @@ SDLSystemCapabilityType const SDLSystemCapabilityTypeVideoStreaming = @"VIDEO_ST
SDLSystemCapabilityType const SDLSystemCapabilityTypeRemoteControl = @"REMOTE_CONTROL";
SDLSystemCapabilityType const SDLSystemCapabilityTypeSeatLocation = @"SEAT_LOCATION";
SDLSystemCapabilityType const SDLSystemCapabilityTypeDisplays = @"DISPLAYS";
+SDLSystemCapabilityType const SDLSystemCapabilityTypeDriverDistraction = @"DRIVER_DISTRACTION";
diff --git a/SmartDeviceLink/SDLSystemRequest.m b/SmartDeviceLink/SDLSystemRequest.m
index 6999a5bca..e16968be0 100644
--- a/SmartDeviceLink/SDLSystemRequest.m
+++ b/SmartDeviceLink/SDLSystemRequest.m
@@ -62,11 +62,11 @@ NS_ASSUME_NONNULL_BEGIN
}
- (void)setFileName:(nullable NSString *)fileName {
- [self.parameters sdl_setObject:fileName forName:SDLRPCParameterNameFilename];
+ [self.parameters sdl_setObject:fileName forName:SDLRPCParameterNameFileName];
}
- (nullable NSString *)fileName {
- return [self.parameters sdl_objectForName:SDLRPCParameterNameFilename ofClass:NSString.class error:nil];
+ return [self.parameters sdl_objectForName:SDLRPCParameterNameFileName ofClass:NSString.class error:nil];
}
@end
diff --git a/SmartDeviceLink/SDLTextField+ScreenManagerExtensions.m b/SmartDeviceLink/SDLTextField+ScreenManagerExtensions.m
index 746c5ae23..28e6b349d 100644
--- a/SmartDeviceLink/SDLTextField+ScreenManagerExtensions.m
+++ b/SmartDeviceLink/SDLTextField+ScreenManagerExtensions.m
@@ -17,7 +17,7 @@
+ (NSArray<SDLTextField *> *)allTextFields {
NSMutableArray<SDLTextField *> *tempTextFields = [NSMutableArray array];
for (SDLTextFieldName fieldName in [self sdl_allTextFieldNames]) {
- [tempTextFields addObject:[[SDLTextField alloc] initWithName:fieldName characterSet:SDLCharacterSetCID1 width:500 rows:8]];
+ [tempTextFields addObject:[[SDLTextField alloc] initWithName:fieldName characterSet:SDLCharacterSetUtf8 width:500 rows:8]];
}
return tempTextFields;
diff --git a/SmartDeviceLink/SDLTextField.h b/SmartDeviceLink/SDLTextField.h
index d1dcedb1d..a345ff145 100644
--- a/SmartDeviceLink/SDLTextField.h
+++ b/SmartDeviceLink/SDLTextField.h
@@ -26,11 +26,7 @@ NS_ASSUME_NONNULL_BEGIN
@property (strong, nonatomic) SDLTextFieldName name;
/**
- * The character set that is supported in this field.
- *
- * @see SDLCharacterSet
- *
- * Required
+ * The set of characters that are supported by this text field. All text is sent in UTF-8 format, but not all systems may support all of the characters expressed by UTF-8. All systems will support at least ASCII, but they may support more, either the LATIN-1 character set, or the full UTF-8 character set.
*/
@property (strong, nonatomic) SDLCharacterSet characterSet;
diff --git a/SmartDeviceLink/SDLTextFieldName.h b/SmartDeviceLink/SDLTextFieldName.h
index 7827e4e2a..a61146aa6 100644
--- a/SmartDeviceLink/SDLTextFieldName.h
+++ b/SmartDeviceLink/SDLTextFieldName.h
@@ -1,6 +1,34 @@
-// SDLTextFieldName.h
-//
-
+/*
+ * Copyright (c) 2020, SmartDeviceLink Consortium, Inc.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following
+ * disclaimer in the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * Neither the name of the SmartDeviceLink Consortium Inc. nor the names of
+ * its contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
#import "SDLEnum.h"
@@ -199,3 +227,24 @@ extern SDLTextFieldName const SDLTextFieldNameAddressLines;
* @since SDL 4.0
*/
extern SDLTextFieldName const SDLTextFieldNamePhoneNumber;
+
+/**
+ * The first line of the subtle alert text field; applies to `SubtleAlert` `alertText1`
+ *
+ * @since SDL 7.0.0
+ */
+extern SDLTextFieldName const SDLTextFieldNameSubtleAlertText1;
+
+/**
+ * The second line of the subtle alert text field; applies to `SubtleAlert` `alertText2`
+ *
+ * @since SDL 7.0.0
+ */
+extern SDLTextFieldName const SDLTextFieldNameSubtleAlertText2;
+
+/**
+ * A text field in the soft button of a subtle alert; applies to `SubtleAlert` `softButtons`
+ *
+ * @since SDL 7.0.0
+ */
+extern SDLTextFieldName const SDLTextFieldNameSubtleAlertSoftButtonText;
diff --git a/SmartDeviceLink/SDLTextFieldName.m b/SmartDeviceLink/SDLTextFieldName.m
index 3bb04fd4b..54f8c781e 100644
--- a/SmartDeviceLink/SDLTextFieldName.m
+++ b/SmartDeviceLink/SDLTextFieldName.m
@@ -1,6 +1,34 @@
-// SDLTextFieldName.m
-//
-
+/*
+ * Copyright (c) 2020, SmartDeviceLink Consortium, Inc.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following
+ * disclaimer in the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * Neither the name of the SmartDeviceLink Consortium Inc. nor the names of
+ * its contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
#import "SDLTextFieldName.h"
@@ -33,3 +61,6 @@ SDLTextFieldName const SDLTextFieldNameLocationName = @"locationName";
SDLTextFieldName const SDLTextFieldNameLocationDescription = @"locationDescription";
SDLTextFieldName const SDLTextFieldNameAddressLines = @"addressLines";
SDLTextFieldName const SDLTextFieldNamePhoneNumber = @"phoneNumber";
+SDLTextFieldName const SDLTextFieldNameSubtleAlertText1 = @"subtleAlertText1";
+SDLTextFieldName const SDLTextFieldNameSubtleAlertText2 = @"subtleAlertText2";
+SDLTextFieldName const SDLTextFieldNameSubtleAlertSoftButtonText = @"subtleAlertSoftButtonText";
diff --git a/SmartDeviceLink/SDLTransmissionType.h b/SmartDeviceLink/SDLTransmissionType.h
new file mode 100644
index 000000000..0a11ace1f
--- /dev/null
+++ b/SmartDeviceLink/SDLTransmissionType.h
@@ -0,0 +1,80 @@
+/*
+ * Copyright (c) 2020, SmartDeviceLink Consortium, Inc.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following
+ * disclaimer in the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * Neither the name of the SmartDeviceLink Consortium Inc. nor the names of
+ * its contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#import "SDLEnum.h"
+
+/**
+ * Type of transmission used in the vehicle.
+ *
+ * @since SDL 7.0
+*/
+typedef SDLEnum SDLTransmissionType SDL_SWIFT_ENUM;
+
+/**
+ * Automatic transmission.
+ */
+extern SDLTransmissionType const SDLTransmissionTypeAutomatic;
+
+/**
+ * Continuously variable transmission(CVT).
+ */
+extern SDLTransmissionType const SDLTransmissionTypeContinuouslyVariable;
+
+/**
+ * Direct drive between engine and wheels.
+ */
+extern SDLTransmissionType const SDLTransmissionTypeDirectDrive;
+
+/**
+ * Dual clutch transmission.
+ */
+extern SDLTransmissionType const SDLTransmissionTypeDualClutch;
+
+/**
+ * Electric variable transmission.
+ */
+extern SDLTransmissionType const SDLTransmissionTypeElectricVariable;
+
+/**
+ * Infinitely variable transmission.
+ */
+extern SDLTransmissionType const SDLTransmissionTypeInfinitelyVariable;
+
+/**
+ * Manual transmission.
+ */
+extern SDLTransmissionType const SDLTransmissionTypeManual;
+
+/**
+ * Semi automatic transmission.
+ */
+extern SDLTransmissionType const SDLTransmissionTypeSemiAutomatic;
diff --git a/SmartDeviceLink/SDLTransmissionType.m b/SmartDeviceLink/SDLTransmissionType.m
new file mode 100644
index 000000000..800935124
--- /dev/null
+++ b/SmartDeviceLink/SDLTransmissionType.m
@@ -0,0 +1,42 @@
+/*
+ * Copyright (c) 2020, SmartDeviceLink Consortium, Inc.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following
+ * disclaimer in the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * Neither the name of the SmartDeviceLink Consortium Inc. nor the names of
+ * its contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#import "SDLTransmissionType.h"
+
+SDLTransmissionType const SDLTransmissionTypeAutomatic = @"AUTOMATIC";
+SDLTransmissionType const SDLTransmissionTypeContinuouslyVariable = @"CONTINUOUSLY_VARIABLE";
+SDLTransmissionType const SDLTransmissionTypeDirectDrive = @"DIRECT_DRIVE";
+SDLTransmissionType const SDLTransmissionTypeDualClutch = @"DUAL_CLUTCH";
+SDLTransmissionType const SDLTransmissionTypeElectricVariable = @"ELECTRIC_VARIABLE";
+SDLTransmissionType const SDLTransmissionTypeInfinitelyVariable = @"INFINITELY_VARIABLE";
+SDLTransmissionType const SDLTransmissionTypeManual = @"MANUAL";
+SDLTransmissionType const SDLTransmissionTypeSemiAutomatic = @"SEMI_AUTOMATIC";
diff --git a/SmartDeviceLink/SDLUnsubscribeVehicleData.h b/SmartDeviceLink/SDLUnsubscribeVehicleData.h
index 370f34882..c1d2930e7 100644
--- a/SmartDeviceLink/SDLUnsubscribeVehicleData.h
+++ b/SmartDeviceLink/SDLUnsubscribeVehicleData.h
@@ -50,7 +50,7 @@ NS_ASSUME_NONNULL_BEGIN
* @param wiperStatus Unsubscribe to wiperStatus
* @return A SDLUnsubscribeVehicleData object
*/
-- (instancetype)initWithAccelerationPedalPosition:(BOOL)accelerationPedalPosition airbagStatus:(BOOL)airbagStatus beltStatus:(BOOL)beltStatus bodyInformation:(BOOL)bodyInformation clusterModeStatus:(BOOL)clusterModeStatus deviceStatus:(BOOL)deviceStatus driverBraking:(BOOL)driverBraking eCallInfo:(BOOL)eCallInfo emergencyEvent:(BOOL)emergencyEvent engineTorque:(BOOL)engineTorque externalTemperature:(BOOL)externalTemperature fuelLevel:(BOOL)fuelLevel fuelLevelState:(BOOL)fuelLevelState gps:(BOOL)gps headLampStatus:(BOOL)headLampStatus instantFuelConsumption:(BOOL)instantFuelConsumption myKey:(BOOL)myKey odometer:(BOOL)odometer prndl:(BOOL)prndl rpm:(BOOL)rpm speed:(BOOL)speed steeringWheelAngle:(BOOL)steeringWheelAngle tirePressure:(BOOL)tirePressure wiperStatus:(BOOL)wiperStatus __deprecated_msg("Use initWithAccelerationPedalPosition:airbagStatus:beltStatus:bodyInformation:clusterModeStatus:deviceStatus:driverBraking:eCallInfo:electronicParkBrakeStatus:emergencyEvent:engineOilLife:engineTorque:externalTemperature:fuelLevel:fuelLevelState:fuelRange:gps:headLampStatus:instantFuelConsumption:myKey:odometer:prndl:rpm:speed:steeringWheelAngle:tirePressure:turnSignal:wiperStatus: instead");
+- (instancetype)initWithAccelerationPedalPosition:(BOOL)accelerationPedalPosition airbagStatus:(BOOL)airbagStatus beltStatus:(BOOL)beltStatus bodyInformation:(BOOL)bodyInformation clusterModeStatus:(BOOL)clusterModeStatus deviceStatus:(BOOL)deviceStatus driverBraking:(BOOL)driverBraking eCallInfo:(BOOL)eCallInfo emergencyEvent:(BOOL)emergencyEvent engineTorque:(BOOL)engineTorque externalTemperature:(BOOL)externalTemperature fuelLevel:(BOOL)fuelLevel fuelLevelState:(BOOL)fuelLevelState gps:(BOOL)gps headLampStatus:(BOOL)headLampStatus instantFuelConsumption:(BOOL)instantFuelConsumption myKey:(BOOL)myKey odometer:(BOOL)odometer prndl:(BOOL)prndl rpm:(BOOL)rpm speed:(BOOL)speed steeringWheelAngle:(BOOL)steeringWheelAngle tirePressure:(BOOL)tirePressure wiperStatus:(BOOL)wiperStatus __deprecated_msg("Use initWithGps:speed:rpm:instantFuelConsumption:fuelRange:externalTemperature:turnSignal:gearStatus:tirePressure:odometer:beltStatus:bodyInformation:deviceStatus:driverBraking:wiperStatus:headLampStatus:engineTorque:accPedalPosition:steeringWheelAngle:engineOilLife:electronicParkBrakeStatus:cloudAppVehicleID:eCallInfo:airbagStatus:emergencyEvent:clusterModeStatus:myKey:handsOffSteering:windowStatus: instead");
/**
* Convenience init for unsubscribing to all possible vehicle data items.
@@ -85,7 +85,7 @@ NS_ASSUME_NONNULL_BEGIN
* @param wiperStatus Unsubscribe to wiperStatus
* @return A SDLUnsubscribeVehicleData object
*/
-- (instancetype)initWithAccelerationPedalPosition:(BOOL)accelerationPedalPosition airbagStatus:(BOOL)airbagStatus beltStatus:(BOOL)beltStatus bodyInformation:(BOOL)bodyInformation clusterModeStatus:(BOOL)clusterModeStatus deviceStatus:(BOOL)deviceStatus driverBraking:(BOOL)driverBraking eCallInfo:(BOOL)eCallInfo electronicParkBrakeStatus:(BOOL)electronicParkBrakeStatus emergencyEvent:(BOOL)emergencyEvent engineOilLife:(BOOL)engineOilLife engineTorque:(BOOL)engineTorque externalTemperature:(BOOL)externalTemperature fuelLevel:(BOOL)fuelLevel fuelLevelState:(BOOL)fuelLevelState fuelRange:(BOOL)fuelRange gps:(BOOL)gps headLampStatus:(BOOL)headLampStatus instantFuelConsumption:(BOOL)instantFuelConsumption myKey:(BOOL)myKey odometer:(BOOL)odometer prndl:(BOOL)prndl rpm:(BOOL)rpm speed:(BOOL)speed steeringWheelAngle:(BOOL)steeringWheelAngle tirePressure:(BOOL)tirePressure turnSignal:(BOOL)turnSignal wiperStatus:(BOOL)wiperStatus __deprecated_msg("Use initWithAccelerationPedalPosition:airbagStatus:beltStatus:bodyInformation:cloudAppVehicleID:clusterModeStatus:deviceStatus:driverBraking:eCallInfo:electronicParkBrakeStatus:emergencyEvent:engineOilLife:engineTorque:externalTemperature:fuelLevel:fuelLevelState:fuelRange:gps:headLampStatus:instantFuelConsumption:myKey:odometer:prndl:rpm:speed:steeringWheelAngle:tirePressure:turnSignal:wiperStatus: instead");
+- (instancetype)initWithAccelerationPedalPosition:(BOOL)accelerationPedalPosition airbagStatus:(BOOL)airbagStatus beltStatus:(BOOL)beltStatus bodyInformation:(BOOL)bodyInformation clusterModeStatus:(BOOL)clusterModeStatus deviceStatus:(BOOL)deviceStatus driverBraking:(BOOL)driverBraking eCallInfo:(BOOL)eCallInfo electronicParkBrakeStatus:(BOOL)electronicParkBrakeStatus emergencyEvent:(BOOL)emergencyEvent engineOilLife:(BOOL)engineOilLife engineTorque:(BOOL)engineTorque externalTemperature:(BOOL)externalTemperature fuelLevel:(BOOL)fuelLevel fuelLevelState:(BOOL)fuelLevelState fuelRange:(BOOL)fuelRange gps:(BOOL)gps headLampStatus:(BOOL)headLampStatus instantFuelConsumption:(BOOL)instantFuelConsumption myKey:(BOOL)myKey odometer:(BOOL)odometer prndl:(BOOL)prndl rpm:(BOOL)rpm speed:(BOOL)speed steeringWheelAngle:(BOOL)steeringWheelAngle tirePressure:(BOOL)tirePressure turnSignal:(BOOL)turnSignal wiperStatus:(BOOL)wiperStatus __deprecated_msg("Use initWithGps:speed:rpm:instantFuelConsumption:fuelRange:externalTemperature:turnSignal:gearStatus:tirePressure:odometer:beltStatus:bodyInformation:deviceStatus:driverBraking:wiperStatus:headLampStatus:engineTorque:accPedalPosition:steeringWheelAngle:engineOilLife:electronicParkBrakeStatus:cloudAppVehicleID:eCallInfo:airbagStatus:emergencyEvent:clusterModeStatus:myKey:handsOffSteering:windowStatus: instead");
/**
* Convenience init for unsubscribing to all possible vehicle data items.
@@ -121,7 +121,50 @@ NS_ASSUME_NONNULL_BEGIN
* @param wiperStatus Unsubscribe to wiperStatus
* @return A SDLUnsubscribeVehicleData object
*/
-- (instancetype)initWithAccelerationPedalPosition:(BOOL)accelerationPedalPosition airbagStatus:(BOOL)airbagStatus beltStatus:(BOOL)beltStatus bodyInformation:(BOOL)bodyInformation cloudAppVehicleID:(BOOL)cloudAppVehicleID clusterModeStatus:(BOOL)clusterModeStatus deviceStatus:(BOOL)deviceStatus driverBraking:(BOOL)driverBraking eCallInfo:(BOOL)eCallInfo electronicParkBrakeStatus:(BOOL)electronicParkBrakeStatus emergencyEvent:(BOOL)emergencyEvent engineOilLife:(BOOL)engineOilLife engineTorque:(BOOL)engineTorque externalTemperature:(BOOL)externalTemperature fuelLevel:(BOOL)fuelLevel fuelLevelState:(BOOL)fuelLevelState fuelRange:(BOOL)fuelRange gps:(BOOL)gps headLampStatus:(BOOL)headLampStatus instantFuelConsumption:(BOOL)instantFuelConsumption myKey:(BOOL)myKey odometer:(BOOL)odometer prndl:(BOOL)prndl rpm:(BOOL)rpm speed:(BOOL)speed steeringWheelAngle:(BOOL)steeringWheelAngle tirePressure:(BOOL)tirePressure turnSignal:(BOOL)turnSignal wiperStatus:(BOOL)wiperStatus;
+- (instancetype)initWithAccelerationPedalPosition:(BOOL)accelerationPedalPosition airbagStatus:(BOOL)airbagStatus beltStatus:(BOOL)beltStatus bodyInformation:(BOOL)bodyInformation cloudAppVehicleID:(BOOL)cloudAppVehicleID clusterModeStatus:(BOOL)clusterModeStatus deviceStatus:(BOOL)deviceStatus driverBraking:(BOOL)driverBraking eCallInfo:(BOOL)eCallInfo electronicParkBrakeStatus:(BOOL)electronicParkBrakeStatus emergencyEvent:(BOOL)emergencyEvent engineOilLife:(BOOL)engineOilLife engineTorque:(BOOL)engineTorque externalTemperature:(BOOL)externalTemperature fuelLevel:(BOOL)fuelLevel fuelLevelState:(BOOL)fuelLevelState fuelRange:(BOOL)fuelRange gps:(BOOL)gps headLampStatus:(BOOL)headLampStatus instantFuelConsumption:(BOOL)instantFuelConsumption myKey:(BOOL)myKey odometer:(BOOL)odometer prndl:(BOOL)prndl rpm:(BOOL)rpm speed:(BOOL)speed steeringWheelAngle:(BOOL)steeringWheelAngle tirePressure:(BOOL)tirePressure turnSignal:(BOOL)turnSignal wiperStatus:(BOOL)wiperStatus __deprecated_msg("Use initWithGps:speed:rpm:instantFuelConsumption:fuelRange:externalTemperature:turnSignal:gearStatus:tirePressure:odometer:beltStatus:bodyInformation:deviceStatus:driverBraking:wiperStatus:headLampStatus:engineTorque:accPedalPosition:steeringWheelAngle:engineOilLife:electronicParkBrakeStatus:cloudAppVehicleID:eCallInfo:airbagStatus:emergencyEvent:clusterModeStatus:myKey:handsOffSteering:windowStatus: instead");
+
+/**
+ * Convenience init for unsubscribing from all possible vehicle data items.
+ *
+ * @param gps - gps
+ * @param speed - speed
+ * @param rpm - rpm
+ * @param instantFuelConsumption - instantFuelConsumption
+ * @param fuelRange - fuelRange
+ * @param externalTemperature - externalTemperature
+ * @param turnSignal - turnSignal
+ * @param gearStatus - gearStatus
+ * @param tirePressure - tirePressure
+ * @param odometer - odometer
+ * @param beltStatus - beltStatus
+ * @param bodyInformation - bodyInformation
+ * @param deviceStatus - deviceStatus
+ * @param driverBraking - driverBraking
+ * @param wiperStatus - wiperStatus
+ * @param headLampStatus - headLampStatus
+ * @param engineTorque - engineTorque
+ * @param accPedalPosition - accPedalPosition
+ * @param steeringWheelAngle - steeringWheelAngle
+ * @param engineOilLife - engineOilLife
+ * @param electronicParkBrakeStatus - electronicParkBrakeStatus
+ * @param cloudAppVehicleID - cloudAppVehicleID
+ * @param eCallInfo - eCallInfo
+ * @param airbagStatus - airbagStatus
+ * @param emergencyEvent - emergencyEvent
+ * @param clusterModeStatus - clusterModeStatus
+ * @param myKey - myKey
+ * @param handsOffSteering - handsOffSteering
+ * @param windowStatus - windowStatus
+ * @return A SDLUnsubscribeVehicleData object
+ */
+- (instancetype)initWithGps:(nullable NSNumber<SDLBool> *)gps speed:(nullable NSNumber<SDLBool> *)speed rpm:(nullable NSNumber<SDLBool> *)rpm instantFuelConsumption:(nullable NSNumber<SDLBool> *)instantFuelConsumption fuelRange:(nullable NSNumber<SDLBool> *)fuelRange externalTemperature:(nullable NSNumber<SDLBool> *)externalTemperature turnSignal:(nullable NSNumber<SDLBool> *)turnSignal gearStatus:(nullable NSNumber<SDLBool> *)gearStatus tirePressure:(nullable NSNumber<SDLBool> *)tirePressure odometer:(nullable NSNumber<SDLBool> *)odometer beltStatus:(nullable NSNumber<SDLBool> *)beltStatus bodyInformation:(nullable NSNumber<SDLBool> *)bodyInformation deviceStatus:(nullable NSNumber<SDLBool> *)deviceStatus driverBraking:(nullable NSNumber<SDLBool> *)driverBraking wiperStatus:(nullable NSNumber<SDLBool> *)wiperStatus headLampStatus:(nullable NSNumber<SDLBool> *)headLampStatus engineTorque:(nullable NSNumber<SDLBool> *)engineTorque accPedalPosition:(nullable NSNumber<SDLBool> *)accPedalPosition steeringWheelAngle:(nullable NSNumber<SDLBool> *)steeringWheelAngle engineOilLife:(nullable NSNumber<SDLBool> *)engineOilLife electronicParkBrakeStatus:(nullable NSNumber<SDLBool> *)electronicParkBrakeStatus cloudAppVehicleID:(nullable NSNumber<SDLBool> *)cloudAppVehicleID eCallInfo:(nullable NSNumber<SDLBool> *)eCallInfo airbagStatus:(nullable NSNumber<SDLBool> *)airbagStatus emergencyEvent:(nullable NSNumber<SDLBool> *)emergencyEvent clusterModeStatus:(nullable NSNumber<SDLBool> *)clusterModeStatus myKey:(nullable NSNumber<SDLBool> *)myKey handsOffSteering:(nullable NSNumber<SDLBool> *)handsOffSteering windowStatus:(nullable NSNumber<SDLBool> *)windowStatus;
+
+/**
+ * See GearStatus
+ *
+ * @since SDL 7.0
+*/
+@property (strong, nonatomic, nullable) NSNumber<SDLBool> *gearStatus;
/**
* If true, unsubscribes from GPS
@@ -141,12 +184,12 @@ NS_ASSUME_NONNULL_BEGIN
/**
* If true, unsubscribes from Fuel Level
*/
-@property (strong, nonatomic, nullable) NSNumber<SDLBool> *fuelLevel;
+@property (strong, nonatomic, nullable) NSNumber<SDLBool> *fuelLevel __deprecated_msg("use fuelRange instead on 7.0+ RPC version connections");
/**
* If true, unsubscribes from Fuel Level State
*/
-@property (strong, nonatomic, nullable) NSNumber<SDLBool> *fuelLevel_State;
+@property (strong, nonatomic, nullable) NSNumber<SDLBool> *fuelLevel_State __deprecated_msg("use fuelRange instead on 7.0+ RPC version connections");
/**
* If true, unsubscribes from Fuel Range
@@ -164,9 +207,12 @@ NS_ASSUME_NONNULL_BEGIN
@property (strong, nonatomic, nullable) NSNumber<SDLBool> *externalTemperature;
/**
- * If true, unsubscribes from PRNDL
- */
-@property (strong, nonatomic, nullable) NSNumber<SDLBool> *prndl;
+ * See PRNDL. This parameter is deprecated and it is now covered in `gearStatus`
+ *
+ * @deprecated
+ * @since SDL 7.0
+*/
+@property (strong, nonatomic, nullable) NSNumber<SDLBool> *prndl __deprecated_msg("use gearStatus instead on 7.0+ RPC version connections");
/**
* If true, unsubscribes from Tire Pressure
@@ -199,11 +245,23 @@ NS_ASSUME_NONNULL_BEGIN
@property (strong, nonatomic, nullable) NSNumber<SDLBool> *driverBraking;
/**
+ * See WindowStatus
+ *
+ * @since SDL 7.0
+ */
+@property (strong, nonatomic, nullable) NSNumber<SDLBool> *windowStatus;
+
+/**
* If true, unsubscribes from Wiper Status
*/
@property (strong, nonatomic, nullable) NSNumber<SDLBool> *wiperStatus;
/**
+ * To indicate whether driver hands are off the steering wheel
+ */
+@property (strong, nonatomic, nullable) NSNumber<SDLBool> *handsOffSteering;
+
+/**
* If true, unsubscribes from Head Lamp Status
*/
@property (strong, nonatomic, nullable) NSNumber<SDLBool> *headLampStatus;
@@ -270,7 +328,7 @@ NS_ASSUME_NONNULL_BEGIN
/**
Sets the OEM custom vehicle data state for any given OEM custom vehicle data name.
-
+
@param vehicleDataName The name of the OEM custom vehicle data item.
@param vehicleDataState A boolean value. If true, requests an unsubscribes of the OEM custom vehicle data item.
@@ -280,7 +338,7 @@ NS_ASSUME_NONNULL_BEGIN
/**
Gets the OEM custom vehicle data state for any given OEM custom vehicle data name.
-
+
@param vehicleDataName The name of the OEM custom vehicle data item to unsubscribe for.
@return A boolean value indicating if an unsubscribe request will occur for the OEM custom vehicle data item.
diff --git a/SmartDeviceLink/SDLUnsubscribeVehicleData.m b/SmartDeviceLink/SDLUnsubscribeVehicleData.m
index e83148be0..3db5afa69 100644
--- a/SmartDeviceLink/SDLUnsubscribeVehicleData.m
+++ b/SmartDeviceLink/SDLUnsubscribeVehicleData.m
@@ -15,57 +15,96 @@ NS_ASSUME_NONNULL_BEGIN
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
- (instancetype)init {
- if (self = [super initWithName:SDLRPCFunctionNameUnsubscribeVehicleData]) {
+ self = [super initWithName:SDLRPCFunctionNameUnsubscribeVehicleData];
+ if (!self) {
+ return nil;
}
return self;
}
#pragma clang diagnostic pop
- (instancetype)initWithAccelerationPedalPosition:(BOOL)accelerationPedalPosition airbagStatus:(BOOL)airbagStatus beltStatus:(BOOL)beltStatus bodyInformation:(BOOL)bodyInformation clusterModeStatus:(BOOL)clusterModeStatus deviceStatus:(BOOL)deviceStatus driverBraking:(BOOL)driverBraking eCallInfo:(BOOL)eCallInfo emergencyEvent:(BOOL)emergencyEvent engineTorque:(BOOL)engineTorque externalTemperature:(BOOL)externalTemperature fuelLevel:(BOOL)fuelLevel fuelLevelState:(BOOL)fuelLevelState gps:(BOOL)gps headLampStatus:(BOOL)headLampStatus instantFuelConsumption:(BOOL)instantFuelConsumption myKey:(BOOL)myKey odometer:(BOOL)odometer prndl:(BOOL)prndl rpm:(BOOL)rpm speed:(BOOL)speed steeringWheelAngle:(BOOL)steeringWheelAngle tirePressure:(BOOL)tirePressure wiperStatus:(BOOL)wiperStatus {
- return [self initWithAccelerationPedalPosition:accelerationPedalPosition airbagStatus:airbagStatus beltStatus:beltStatus bodyInformation:bodyInformation clusterModeStatus:clusterModeStatus deviceStatus:deviceStatus driverBraking:driverBraking eCallInfo:eCallInfo electronicParkBrakeStatus:NO emergencyEvent:emergencyEvent engineOilLife:NO engineTorque:engineTorque externalTemperature:externalTemperature fuelLevel:fuelLevel fuelLevelState:fuelLevelState fuelRange:NO gps:gps headLampStatus:headLampStatus instantFuelConsumption:instantFuelConsumption myKey:myKey odometer:odometer prndl:prndl rpm:rpm speed:speed steeringWheelAngle:steeringWheelAngle tirePressure:tirePressure turnSignal:NO wiperStatus:wiperStatus];
+ self = [self initWithGps:@(gps) speed:@(speed) rpm:@(rpm) instantFuelConsumption:@(instantFuelConsumption) fuelRange:nil externalTemperature:@(externalTemperature) turnSignal:nil gearStatus:nil tirePressure:@(tirePressure) odometer:@(odometer) beltStatus:@(beltStatus) bodyInformation:@(bodyInformation) deviceStatus:@(deviceStatus) driverBraking:@(driverBraking) wiperStatus:@(wiperStatus) headLampStatus:@(headLampStatus) engineTorque:@(engineTorque) accPedalPosition:@(accelerationPedalPosition) steeringWheelAngle:@(steeringWheelAngle) engineOilLife:nil electronicParkBrakeStatus:nil cloudAppVehicleID:nil eCallInfo:@(eCallInfo) airbagStatus:@(airbagStatus) emergencyEvent:@(emergencyEvent) clusterModeStatus:@(clusterModeStatus) myKey:@(myKey) handsOffSteering:nil windowStatus:nil];
+ if (self) {
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
+ self.fuelLevel = @(fuelLevel);
+ self.fuelLevel_State = @(fuelLevelState);
+ self.prndl = @(prndl);
+#pragma clang diagnostic pop
+ }
+ return self;
}
- (instancetype)initWithAccelerationPedalPosition:(BOOL)accelerationPedalPosition airbagStatus:(BOOL)airbagStatus beltStatus:(BOOL)beltStatus bodyInformation:(BOOL)bodyInformation clusterModeStatus:(BOOL)clusterModeStatus deviceStatus:(BOOL)deviceStatus driverBraking:(BOOL)driverBraking eCallInfo:(BOOL)eCallInfo electronicParkBrakeStatus:(BOOL)electronicParkBrakeStatus emergencyEvent:(BOOL)emergencyEvent engineOilLife:(BOOL)engineOilLife engineTorque:(BOOL)engineTorque externalTemperature:(BOOL)externalTemperature fuelLevel:(BOOL)fuelLevel fuelLevelState:(BOOL)fuelLevelState fuelRange:(BOOL)fuelRange gps:(BOOL)gps headLampStatus:(BOOL)headLampStatus instantFuelConsumption:(BOOL)instantFuelConsumption myKey:(BOOL)myKey odometer:(BOOL)odometer prndl:(BOOL)prndl rpm:(BOOL)rpm speed:(BOOL)speed steeringWheelAngle:(BOOL)steeringWheelAngle tirePressure:(BOOL)tirePressure turnSignal:(BOOL)turnSignal wiperStatus:(BOOL)wiperStatus {
- return [self initWithAccelerationPedalPosition:accelerationPedalPosition airbagStatus:airbagStatus beltStatus:beltStatus bodyInformation:bodyInformation cloudAppVehicleID:NO clusterModeStatus:clusterModeStatus deviceStatus:deviceStatus driverBraking:driverBraking eCallInfo:eCallInfo electronicParkBrakeStatus:electronicParkBrakeStatus emergencyEvent:emergencyEvent engineOilLife:engineOilLife engineTorque:engineTorque externalTemperature:externalTemperature fuelLevel:fuelLevel fuelLevelState:fuelLevelState fuelRange:fuelRange gps:gps headLampStatus:headLampStatus instantFuelConsumption:instantFuelConsumption myKey:myKey odometer:odometer prndl:prndl rpm:rpm speed:speed steeringWheelAngle:steeringWheelAngle tirePressure:tirePressure turnSignal:turnSignal wiperStatus:wiperStatus];
+ self = [self initWithGps:@(gps) speed:@(speed) rpm:@(rpm) instantFuelConsumption:@(instantFuelConsumption) fuelRange:@(fuelRange) externalTemperature:@(externalTemperature) turnSignal:@(turnSignal) gearStatus:nil tirePressure:@(tirePressure) odometer:@(odometer) beltStatus:@(beltStatus) bodyInformation:@(bodyInformation) deviceStatus:@(deviceStatus) driverBraking:@(driverBraking) wiperStatus:@(wiperStatus) headLampStatus:@(headLampStatus) engineTorque:@(engineTorque) accPedalPosition:@(accelerationPedalPosition) steeringWheelAngle:@(steeringWheelAngle) engineOilLife:@(engineOilLife) electronicParkBrakeStatus:@(electronicParkBrakeStatus) cloudAppVehicleID:nil eCallInfo:@(eCallInfo) airbagStatus:@(airbagStatus) emergencyEvent:@(emergencyEvent) clusterModeStatus:@(clusterModeStatus) myKey:@(myKey) handsOffSteering:nil windowStatus:nil];
+ if (self) {
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
+ self.fuelLevel = @(fuelLevel);
+ self.fuelLevel_State = @(fuelLevelState);
+ self.prndl = @(prndl);
+#pragma clang diagnostic pop
+ }
+ return self;
}
- (instancetype)initWithAccelerationPedalPosition:(BOOL)accelerationPedalPosition airbagStatus:(BOOL)airbagStatus beltStatus:(BOOL)beltStatus bodyInformation:(BOOL)bodyInformation cloudAppVehicleID:(BOOL)cloudAppVehicleID clusterModeStatus:(BOOL)clusterModeStatus deviceStatus:(BOOL)deviceStatus driverBraking:(BOOL)driverBraking eCallInfo:(BOOL)eCallInfo electronicParkBrakeStatus:(BOOL)electronicParkBrakeStatus emergencyEvent:(BOOL)emergencyEvent engineOilLife:(BOOL)engineOilLife engineTorque:(BOOL)engineTorque externalTemperature:(BOOL)externalTemperature fuelLevel:(BOOL)fuelLevel fuelLevelState:(BOOL)fuelLevelState fuelRange:(BOOL)fuelRange gps:(BOOL)gps headLampStatus:(BOOL)headLampStatus instantFuelConsumption:(BOOL)instantFuelConsumption myKey:(BOOL)myKey odometer:(BOOL)odometer prndl:(BOOL)prndl rpm:(BOOL)rpm speed:(BOOL)speed steeringWheelAngle:(BOOL)steeringWheelAngle tirePressure:(BOOL)tirePressure turnSignal:(BOOL)turnSignal wiperStatus:(BOOL)wiperStatus {
+ self = [self initWithGps:@(gps) speed:@(speed) rpm:@(rpm) instantFuelConsumption:@(instantFuelConsumption) fuelRange:@(fuelRange) externalTemperature:@(externalTemperature) turnSignal:@(turnSignal) gearStatus:nil tirePressure:@(tirePressure) odometer:@(odometer) beltStatus:@(beltStatus) bodyInformation:@(bodyInformation) deviceStatus:@(deviceStatus) driverBraking:@(driverBraking) wiperStatus:@(wiperStatus) headLampStatus:@(headLampStatus) engineTorque:@(engineTorque) accPedalPosition:@(accelerationPedalPosition) steeringWheelAngle:@(steeringWheelAngle) engineOilLife:@(engineOilLife) electronicParkBrakeStatus:@(electronicParkBrakeStatus) cloudAppVehicleID:@(cloudAppVehicleID) eCallInfo:@(eCallInfo) airbagStatus:@(airbagStatus) emergencyEvent:@(emergencyEvent) clusterModeStatus:@(clusterModeStatus) myKey:@(myKey) handsOffSteering:nil windowStatus:nil];
+ if (self) {
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
+ self.fuelLevel = @(fuelLevel);
+ self.fuelLevel_State = @(fuelLevelState);
+ self.prndl = @(prndl);
+#pragma clang diagnostic pop
+ }
+ return self;
+}
+
+- (instancetype)initWithGps:(nullable NSNumber<SDLBool> *)gps speed:(nullable NSNumber<SDLBool> *)speed rpm:(nullable NSNumber<SDLBool> *)rpm instantFuelConsumption:(nullable NSNumber<SDLBool> *)instantFuelConsumption fuelRange:(nullable NSNumber<SDLBool> *)fuelRange externalTemperature:(nullable NSNumber<SDLBool> *)externalTemperature turnSignal:(nullable NSNumber<SDLBool> *)turnSignal gearStatus:(nullable NSNumber<SDLBool> *)gearStatus tirePressure:(nullable NSNumber<SDLBool> *)tirePressure odometer:(nullable NSNumber<SDLBool> *)odometer beltStatus:(nullable NSNumber<SDLBool> *)beltStatus bodyInformation:(nullable NSNumber<SDLBool> *)bodyInformation deviceStatus:(nullable NSNumber<SDLBool> *)deviceStatus driverBraking:(nullable NSNumber<SDLBool> *)driverBraking wiperStatus:(nullable NSNumber<SDLBool> *)wiperStatus headLampStatus:(nullable NSNumber<SDLBool> *)headLampStatus engineTorque:(nullable NSNumber<SDLBool> *)engineTorque accPedalPosition:(nullable NSNumber<SDLBool> *)accPedalPosition steeringWheelAngle:(nullable NSNumber<SDLBool> *)steeringWheelAngle engineOilLife:(nullable NSNumber<SDLBool> *)engineOilLife electronicParkBrakeStatus:(nullable NSNumber<SDLBool> *)electronicParkBrakeStatus cloudAppVehicleID:(nullable NSNumber<SDLBool> *)cloudAppVehicleID eCallInfo:(nullable NSNumber<SDLBool> *)eCallInfo airbagStatus:(nullable NSNumber<SDLBool> *)airbagStatus emergencyEvent:(nullable NSNumber<SDLBool> *)emergencyEvent clusterModeStatus:(nullable NSNumber<SDLBool> *)clusterModeStatus myKey:(nullable NSNumber<SDLBool> *)myKey handsOffSteering:(nullable NSNumber<SDLBool> *)handsOffSteering windowStatus:(nullable NSNumber<SDLBool> *)windowStatus {
self = [self init];
if (!self) {
return nil;
}
+ self.gps = gps;
+ self.speed = speed;
+ self.rpm = rpm;
+ self.instantFuelConsumption = instantFuelConsumption;
+ self.fuelRange = fuelRange;
+ self.externalTemperature = externalTemperature;
+ self.turnSignal = turnSignal;
+ self.gearStatus = gearStatus;
+ self.tirePressure = tirePressure;
+ self.odometer = odometer;
+ self.beltStatus = beltStatus;
+ self.bodyInformation = bodyInformation;
+ self.deviceStatus = deviceStatus;
+ self.driverBraking = driverBraking;
+ self.wiperStatus = wiperStatus;
+ self.headLampStatus = headLampStatus;
+ self.engineTorque = engineTorque;
+ self.accPedalPosition = accPedalPosition;
+ self.steeringWheelAngle = steeringWheelAngle;
+ self.engineOilLife = engineOilLife;
+ self.electronicParkBrakeStatus = electronicParkBrakeStatus;
+ self.cloudAppVehicleID = cloudAppVehicleID;
+ self.eCallInfo = eCallInfo;
+ self.airbagStatus = airbagStatus;
+ self.emergencyEvent = emergencyEvent;
+ self.clusterModeStatus = clusterModeStatus;
+ self.myKey = myKey;
+ self.handsOffSteering = handsOffSteering;
+ self.windowStatus = windowStatus;
+ return self;
+}
- self.accPedalPosition = @(accelerationPedalPosition);
- self.airbagStatus = @(airbagStatus);
- self.beltStatus = @(beltStatus);
- self.bodyInformation = @(bodyInformation);
- self.cloudAppVehicleID = @(cloudAppVehicleID);
- self.clusterModeStatus = @(clusterModeStatus);
- self.deviceStatus = @(deviceStatus);
- self.driverBraking = @(driverBraking);
- self.eCallInfo = @(eCallInfo);
- self.electronicParkBrakeStatus = @(electronicParkBrakeStatus);
- self.emergencyEvent = @(emergencyEvent);
- self.engineOilLife = @(engineOilLife);
- self.engineTorque = @(engineTorque);
- self.externalTemperature = @(externalTemperature);
- self.fuelLevel = @(fuelLevel);
- self.fuelLevel_State = @(fuelLevelState);
- self.fuelRange = @(fuelRange);
- self.myKey = @(myKey);
- self.odometer = @(odometer);
- self.gps = @(gps);
- self.headLampStatus = @(headLampStatus);
- self.instantFuelConsumption = @(instantFuelConsumption);
- self.prndl = @(prndl);
- self.rpm = @(rpm);
- self.speed = @(speed);
- self.steeringWheelAngle = @(steeringWheelAngle);
- self.tirePressure = @(tirePressure);
- self.turnSignal = @(turnSignal);
- self.wiperStatus = @(wiperStatus);
+- (void)setGearStatus:(nullable NSNumber<SDLBool> *)gearStatus {
+ [self.parameters sdl_setObject:gearStatus forName:SDLRPCParameterNameGearStatus];
+}
- return self;
+- (nullable NSNumber<SDLBool> *)gearStatus {
+ return [self.parameters sdl_objectForName:SDLRPCParameterNameGearStatus ofClass:NSNumber.class error:nil];
}
- (void)setGps:(nullable NSNumber<SDLBool> *)gps {
@@ -196,6 +235,15 @@ NS_ASSUME_NONNULL_BEGIN
return [self.parameters sdl_objectForName:SDLRPCParameterNameWiperStatus ofClass:NSNumber.class error:nil];
}
+- (void)setHandsOffSteering:(nullable NSNumber<SDLBool> *)handsOffSteering {
+ [self.parameters sdl_setObject:handsOffSteering forName:SDLRPCParameterNameHandsOffSteering];
+}
+
+- (nullable NSNumber<SDLBool> *)handsOffSteering {
+ NSError *error = nil;
+ return [self.parameters sdl_objectForName:SDLRPCParameterNameHandsOffSteering ofClass:NSNumber.class error:&error];
+}
+
- (void)setHeadLampStatus:(nullable NSNumber<SDLBool> *)headLampStatus {
[self.parameters sdl_setObject:headLampStatus forName:SDLRPCParameterNameHeadLampStatus];
}
@@ -300,6 +348,15 @@ NS_ASSUME_NONNULL_BEGIN
return [self.parameters sdl_objectForName:SDLRPCParameterNameCloudAppVehicleID ofClass:NSNumber.class error:nil];
}
+- (void)setWindowStatus:(nullable NSNumber<SDLBool> *)windowStatus {
+ [self.parameters sdl_setObject:windowStatus forName:SDLRPCParameterNameWindowStatus];
+}
+
+- (nullable NSNumber<SDLBool> *)windowStatus {
+ NSError *error = nil;
+ return [self.parameters sdl_objectForName:SDLRPCParameterNameWindowStatus ofClass:NSNumber.class error:&error];
+}
+
- (void)setOEMCustomVehicleData:(NSString *)vehicleDataName withVehicleDataState:(BOOL)vehicleDataState {
[self.parameters sdl_setObject:@(vehicleDataState) forName:vehicleDataName];
}
diff --git a/SmartDeviceLink/SDLUnsubscribeVehicleDataResponse.h b/SmartDeviceLink/SDLUnsubscribeVehicleDataResponse.h
index da07d6616..fca751001 100644
--- a/SmartDeviceLink/SDLUnsubscribeVehicleDataResponse.h
+++ b/SmartDeviceLink/SDLUnsubscribeVehicleDataResponse.h
@@ -16,6 +16,49 @@ NS_ASSUME_NONNULL_BEGIN
@interface SDLUnsubscribeVehicleDataResponse : SDLRPCResponse
/**
+ * Convenience init for setting all possible values on vehicle data items.
+ *
+ * @param gps - gps
+ * @param speed - speed
+ * @param rpm - rpm
+ * @param instantFuelConsumption - instantFuelConsumption
+ * @param fuelRange - fuelRange
+ * @param externalTemperature - externalTemperature
+ * @param turnSignal - turnSignal
+ * @param gearStatus - gearStatus
+ * @param tirePressure - tirePressure
+ * @param odometer - odometer
+ * @param beltStatus - beltStatus
+ * @param bodyInformation - bodyInformation
+ * @param deviceStatus - deviceStatus
+ * @param driverBraking - driverBraking
+ * @param wiperStatus - wiperStatus
+ * @param headLampStatus - headLampStatus
+ * @param engineTorque - engineTorque
+ * @param accPedalPosition - accPedalPosition
+ * @param steeringWheelAngle - steeringWheelAngle
+ * @param engineOilLife - engineOilLife
+ * @param electronicParkBrakeStatus - electronicParkBrakeStatus
+ * @param cloudAppVehicleID - cloudAppVehicleID
+ * @param eCallInfo - eCallInfo
+ * @param airbagStatus - airbagStatus
+ * @param emergencyEvent - emergencyEvent
+ * @param clusterModes - clusterModes
+ * @param myKey - myKey
+ * @param handsOffSteering - handsOffSteering
+ * @param windowStatus - windowStatus
+ * @return A SDLUnsubscribeVehicleDataResponse object
+ */
+- (instancetype)initWithGps:(nullable SDLVehicleDataResult *)gps speed:(nullable SDLVehicleDataResult *)speed rpm:(nullable SDLVehicleDataResult *)rpm instantFuelConsumption:(nullable SDLVehicleDataResult *)instantFuelConsumption fuelRange:(nullable SDLVehicleDataResult *)fuelRange externalTemperature:(nullable SDLVehicleDataResult *)externalTemperature turnSignal:(nullable SDLVehicleDataResult *)turnSignal gearStatus:(nullable SDLVehicleDataResult *)gearStatus tirePressure:(nullable SDLVehicleDataResult *)tirePressure odometer:(nullable SDLVehicleDataResult *)odometer beltStatus:(nullable SDLVehicleDataResult *)beltStatus bodyInformation:(nullable SDLVehicleDataResult *)bodyInformation deviceStatus:(nullable SDLVehicleDataResult *)deviceStatus driverBraking:(nullable SDLVehicleDataResult *)driverBraking wiperStatus:(nullable SDLVehicleDataResult *)wiperStatus headLampStatus:(nullable SDLVehicleDataResult *)headLampStatus engineTorque:(nullable SDLVehicleDataResult *)engineTorque accPedalPosition:(nullable SDLVehicleDataResult *)accPedalPosition steeringWheelAngle:(nullable SDLVehicleDataResult *)steeringWheelAngle engineOilLife:(nullable SDLVehicleDataResult *)engineOilLife electronicParkBrakeStatus:(nullable SDLVehicleDataResult *)electronicParkBrakeStatus cloudAppVehicleID:(nullable SDLVehicleDataResult *)cloudAppVehicleID eCallInfo:(nullable SDLVehicleDataResult *)eCallInfo airbagStatus:(nullable SDLVehicleDataResult *)airbagStatus emergencyEvent:(nullable SDLVehicleDataResult *)emergencyEvent clusterModes:(nullable SDLVehicleDataResult *)clusterModes myKey:(nullable SDLVehicleDataResult *)myKey handsOffSteering:(nullable SDLVehicleDataResult *)handsOffSteering windowStatus:(nullable SDLVehicleDataResult *)windowStatus;
+
+/**
+ * See GearStatus
+ *
+ * @since SDL 7.0
+*/
+@property (strong, nonatomic, nullable) SDLVehicleDataResult *gearStatus;
+
+/**
The result of requesting to unsubscribe to the GPSData.
Optional
@@ -41,14 +84,14 @@ NS_ASSUME_NONNULL_BEGIN
Optional
*/
-@property (strong, nonatomic, nullable) SDLVehicleDataResult *fuelLevel;
+@property (strong, nonatomic, nullable) SDLVehicleDataResult *fuelLevel __deprecated_msg("use fuelRange instead on 7.0+ RPC version connections");
/**
The result of requesting to unsubscribe to the fuel level state.
Optional
*/
-@property (strong, nonatomic, nullable) SDLVehicleDataResult *fuelLevel_State;
+@property (strong, nonatomic, nullable) SDLVehicleDataResult *fuelLevel_State __deprecated_msg("use fuelRange instead on 7.0+ RPC version connections");
/**
The result of requesting to unsubscribe to the fuel range.
@@ -72,11 +115,12 @@ NS_ASSUME_NONNULL_BEGIN
@property (strong, nonatomic, nullable) SDLVehicleDataResult *externalTemperature;
/**
- The result of requesting to unsubscribe to the PRNDL status.
-
- Optional
- */
-@property (strong, nonatomic, nullable) SDLVehicleDataResult *prndl;
+ * See PRNDL. This parameter is deprecated and it is now covered in `gearStatus`
+ *
+ * @deprecated
+ * @since SDL 7.0
+*/
+@property (strong, nonatomic, nullable) SDLVehicleDataResult *prndl __deprecated_msg("use gearStatus instead on 7.0+ RPC version connections");
/**
The result of requesting to unsubscribe to the tireStatus.
@@ -121,6 +165,13 @@ NS_ASSUME_NONNULL_BEGIN
@property (strong, nonatomic, nullable) SDLVehicleDataResult *driverBraking;
/**
+ * See WindowStatus
+ *
+ * @since SDL 7.0
+ */
+@property (strong, nonatomic, nullable) SDLVehicleDataResult *windowStatus;
+
+/**
The result of requesting to unsubscribe to the status of the wipers.
Optional
@@ -128,6 +179,11 @@ NS_ASSUME_NONNULL_BEGIN
@property (strong, nonatomic, nullable) SDLVehicleDataResult *wiperStatus;
/**
+ The result of requesting to unsubscribe from the status of driver hands are off the steering wheel
+ */
+@property (nullable, strong, nonatomic) SDLVehicleDataResult *handsOffSteering;
+
+/**
The result of requesting to unsubscribe to the status of the head lamps.
Optional
@@ -220,7 +276,7 @@ NS_ASSUME_NONNULL_BEGIN
/**
Sets the OEM custom vehicle data state for any given OEM custom vehicle data name.
-
+
@param vehicleDataName The name of the OEM custom vehicle data item.
@param vehicleDataState SDLVehicleDataResult object containing custom data type and result code information.
diff --git a/SmartDeviceLink/SDLUnsubscribeVehicleDataResponse.m b/SmartDeviceLink/SDLUnsubscribeVehicleDataResponse.m
index b86423085..271020beb 100644
--- a/SmartDeviceLink/SDLUnsubscribeVehicleDataResponse.m
+++ b/SmartDeviceLink/SDLUnsubscribeVehicleDataResponse.m
@@ -16,12 +16,60 @@ NS_ASSUME_NONNULL_BEGIN
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
- (instancetype)init {
- if (self = [super initWithName:SDLRPCFunctionNameUnsubscribeVehicleData]) {
+ self = [super initWithName:SDLRPCFunctionNameUnsubscribeVehicleData];
+ if (!self) {
+ return nil;
}
return self;
}
#pragma clang diagnostic pop
+- (instancetype)initWithGps:(nullable SDLVehicleDataResult *)gps speed:(nullable SDLVehicleDataResult *)speed rpm:(nullable SDLVehicleDataResult *)rpm instantFuelConsumption:(nullable SDLVehicleDataResult *)instantFuelConsumption fuelRange:(nullable SDLVehicleDataResult *)fuelRange externalTemperature:(nullable SDLVehicleDataResult *)externalTemperature turnSignal:(nullable SDLVehicleDataResult *)turnSignal gearStatus:(nullable SDLVehicleDataResult *)gearStatus tirePressure:(nullable SDLVehicleDataResult *)tirePressure odometer:(nullable SDLVehicleDataResult *)odometer beltStatus:(nullable SDLVehicleDataResult *)beltStatus bodyInformation:(nullable SDLVehicleDataResult *)bodyInformation deviceStatus:(nullable SDLVehicleDataResult *)deviceStatus driverBraking:(nullable SDLVehicleDataResult *)driverBraking wiperStatus:(nullable SDLVehicleDataResult *)wiperStatus headLampStatus:(nullable SDLVehicleDataResult *)headLampStatus engineTorque:(nullable SDLVehicleDataResult *)engineTorque accPedalPosition:(nullable SDLVehicleDataResult *)accPedalPosition steeringWheelAngle:(nullable SDLVehicleDataResult *)steeringWheelAngle engineOilLife:(nullable SDLVehicleDataResult *)engineOilLife electronicParkBrakeStatus:(nullable SDLVehicleDataResult *)electronicParkBrakeStatus cloudAppVehicleID:(nullable SDLVehicleDataResult *)cloudAppVehicleID eCallInfo:(nullable SDLVehicleDataResult *)eCallInfo airbagStatus:(nullable SDLVehicleDataResult *)airbagStatus emergencyEvent:(nullable SDLVehicleDataResult *)emergencyEvent clusterModes:(nullable SDLVehicleDataResult *)clusterModes myKey:(nullable SDLVehicleDataResult *)myKey handsOffSteering:(nullable SDLVehicleDataResult *)handsOffSteering windowStatus:(nullable SDLVehicleDataResult *)windowStatus {
+ self = [self init];
+ if (!self) {
+ return nil;
+ }
+ self.gps = gps;
+ self.speed = speed;
+ self.rpm = rpm;
+ self.instantFuelConsumption = instantFuelConsumption;
+ self.fuelRange = fuelRange;
+ self.externalTemperature = externalTemperature;
+ self.turnSignal = turnSignal;
+ self.gearStatus = gearStatus;
+ self.tirePressure = tirePressure;
+ self.odometer = odometer;
+ self.beltStatus = beltStatus;
+ self.bodyInformation = bodyInformation;
+ self.deviceStatus = deviceStatus;
+ self.driverBraking = driverBraking;
+ self.wiperStatus = wiperStatus;
+ self.headLampStatus = headLampStatus;
+ self.engineTorque = engineTorque;
+ self.accPedalPosition = accPedalPosition;
+ self.steeringWheelAngle = steeringWheelAngle;
+ self.engineOilLife = engineOilLife;
+ self.electronicParkBrakeStatus = electronicParkBrakeStatus;
+ self.cloudAppVehicleID = cloudAppVehicleID;
+ self.eCallInfo = eCallInfo;
+ self.airbagStatus = airbagStatus;
+ self.emergencyEvent = emergencyEvent;
+ self.clusterModes = clusterModes;
+ self.myKey = myKey;
+ self.handsOffSteering = handsOffSteering;
+ self.windowStatus = windowStatus;
+ return self;
+}
+
+- (void)setGearStatus:(nullable SDLVehicleDataResult *)gearStatus {
+ [self.parameters sdl_setObject:gearStatus forName:SDLRPCParameterNameGearStatus];
+}
+
+- (nullable SDLVehicleDataResult *)gearStatus {
+ NSError *error = nil;
+ return [self.parameters sdl_objectForName:SDLRPCParameterNameGearStatus ofClass:SDLVehicleDataResult.class error:&error];
+}
+
- (void)setGps:(nullable SDLVehicleDataResult *)gps {
[self.parameters sdl_setObject:gps forName:SDLRPCParameterNameGPS];
}
@@ -142,6 +190,15 @@ NS_ASSUME_NONNULL_BEGIN
return [self.parameters sdl_objectForName:SDLRPCParameterNameDriverBraking ofClass:SDLVehicleDataResult.class error:nil];
}
+- (void)setWindowStatus:(nullable SDLVehicleDataResult *)windowStatus {
+ [self.parameters sdl_setObject:windowStatus forName:SDLRPCParameterNameWindowStatus];
+}
+
+- (nullable SDLVehicleDataResult *)windowStatus {
+ NSError *error = nil;
+ return [self.parameters sdl_objectForName:SDLRPCParameterNameWindowStatus ofClass:SDLVehicleDataResult.class error:&error];
+}
+
- (void)setWiperStatus:(nullable SDLVehicleDataResult *)wiperStatus {
[self.parameters sdl_setObject:wiperStatus forName:SDLRPCParameterNameWiperStatus];
}
@@ -150,6 +207,15 @@ NS_ASSUME_NONNULL_BEGIN
return [self.parameters sdl_objectForName:SDLRPCParameterNameWiperStatus ofClass:SDLVehicleDataResult.class error:nil];
}
+- (void)setHandsOffSteering:(nullable SDLVehicleDataResult *)handsOffSteering {
+ [self.parameters sdl_setObject:handsOffSteering forName:SDLRPCParameterNameHandsOffSteering];
+}
+
+- (nullable SDLVehicleDataResult *)handsOffSteering {
+ NSError *error = nil;
+ return [self.parameters sdl_objectForName:SDLRPCParameterNameHandsOffSteering ofClass:SDLVehicleDataResult.class error:&error];
+}
+
- (void)setHeadLampStatus:(nullable SDLVehicleDataResult *)headLampStatus {
[self.parameters sdl_setObject:headLampStatus forName:SDLRPCParameterNameHeadLampStatus];
}
diff --git a/SmartDeviceLink/SDLVehicleDataType.h b/SmartDeviceLink/SDLVehicleDataType.h
index e65cdcef9..54bc2b16d 100644
--- a/SmartDeviceLink/SDLVehicleDataType.h
+++ b/SmartDeviceLink/SDLVehicleDataType.h
@@ -10,6 +10,12 @@
typedef SDLEnum SDLVehicleDataType SDL_SWIFT_ENUM;
/**
+ * Vehicle Gear Status data
+ * @since SDL 7.0
+ */
+extern SDLVehicleDataType const SDLVehicleDataTypeGearStatus;
+
+/**
GPS vehicle data
*/
extern SDLVehicleDataType const SDLVehicleDataTypeGPS;
@@ -27,12 +33,12 @@ extern SDLVehicleDataType const SDLVehicleDataTypeRPM;
/**
Vehicle fuel level data
*/
-extern SDLVehicleDataType const SDLVehicleDataTypeFuelLevel;
+extern SDLVehicleDataType const SDLVehicleDataTypeFuelLevel __deprecated_msg("use SDLVehicleDataTypeFuelRange on RPC 7.0+ connections");
/**
Vehicle fuel level state data
*/
-extern SDLVehicleDataType const SDLVehicleDataTypeFuelLevelState;
+extern SDLVehicleDataType const SDLVehicleDataTypeFuelLevelState __deprecated_msg("use SDLVehicleDataTypeFuelRange on RPC 7.0+ connections");
/**
Vehicle fuel consumption data
@@ -52,7 +58,7 @@ extern SDLVehicleDataType const SDLVehicleDataTypeVIN;
/**
Vehicle PRNDL data
*/
-extern SDLVehicleDataType const SDLVehicleDataTypePRNDL;
+extern SDLVehicleDataType const SDLVehicleDataTypePRNDL __deprecated_msg("use SDLVehicleDataTypeGearStatus instead on 7.0+ RPC version connections");
/**
Vehicle tire pressure data
@@ -120,6 +126,12 @@ extern SDLVehicleDataType const SDLVehicleDataTypeBraking;
extern SDLVehicleDataType const SDLVehicleDataTypeWiperStatus;
/**
+ To indicate whether driver hands are off the steering wheel
+ Added in SDL 7.0.0
+ */
+extern SDLVehicleDataType const SDLVehicleDataTypeHandsOffSteering;
+
+/**
Vehicle headlamp status
*/
extern SDLVehicleDataType const SDLVehicleDataTypeHeadlampStatus;
@@ -170,3 +182,10 @@ extern SDLVehicleDataType const SDLVehicleDataTypeCloudAppVehicleID;
Added in SDL 6.0
*/
extern SDLVehicleDataType const SDLVehicleDataTypeOEMVehicleDataType;
+
+/**
+ * Describes the status of a window of a door/liftgate etc.
+ *
+ * @since SDL 7.0
+ */
+extern SDLVehicleDataType const SDLVehicleDataTypeWindowStatus;
diff --git a/SmartDeviceLink/SDLVehicleDataType.m b/SmartDeviceLink/SDLVehicleDataType.m
index 895613873..585e40130 100644
--- a/SmartDeviceLink/SDLVehicleDataType.m
+++ b/SmartDeviceLink/SDLVehicleDataType.m
@@ -4,36 +4,38 @@
#import "SDLVehicleDataType.h"
-SDLVehicleDataType const SDLVehicleDataTypeGPS = @"VEHICLEDATA_GPS";
-SDLVehicleDataType const SDLVehicleDataTypeSpeed = @"VEHICLEDATA_SPEED";
-SDLVehicleDataType const SDLVehicleDataTypeRPM = @"VEHICLEDATA_RPM";
-SDLVehicleDataType const SDLVehicleDataTypeFuelLevel = @"VEHICLEDATA_FUELLEVEL";
-SDLVehicleDataType const SDLVehicleDataTypeFuelLevelState = @"VEHICLEDATA_FUELLEVEL_STATE";
-SDLVehicleDataType const SDLVehicleDataTypeFuelConsumption = @"VEHICLEDATA_FUELCONSUMPTION";
-SDLVehicleDataType const SDLVehicleDataTypeFuelRange = @"VEHICLEDATA_FUELRANGE";
-SDLVehicleDataType const SDLVehicleDataTypeExternalTemperature = @"VEHICLEDATA_EXTERNTEMP";
-SDLVehicleDataType const SDLVehicleDataTypeVIN = @"VEHICLEDATA_VIN";
-SDLVehicleDataType const SDLVehicleDataTypePRNDL = @"VEHICLEDATA_PRNDL";
-SDLVehicleDataType const SDLVehicleDataTypeTirePressure = @"VEHICLEDATA_TIREPRESSURE";
-SDLVehicleDataType const SDLVehicleDataTypeOdometer = @"VEHICLEDATA_ODOMETER";
+SDLVehicleDataType const SDLVehicleDataTypeAccelerationPedal = @"VEHICLEDATA_ACCPEDAL";
+SDLVehicleDataType const SDLVehicleDataTypeAirbagStatus = @"VEHICLEDATA_AIRBAGSTATUS";
+SDLVehicleDataType const SDLVehicleDataTypeBatteryVoltage = @"VEHICLEDATA_BATTVOLTAGE";
SDLVehicleDataType const SDLVehicleDataTypeBeltStatus = @"VEHICLEDATA_BELTSTATUS";
SDLVehicleDataType const SDLVehicleDataTypeBodyInfo = @"VEHICLEDATA_BODYINFO";
+SDLVehicleDataType const SDLVehicleDataTypeBraking = @"VEHICLEDATA_BRAKING";
+SDLVehicleDataType const SDLVehicleDataTypeCloudAppVehicleID = @"VEHICLEDATA_CLOUDAPPVEHICLEID";
+SDLVehicleDataType const SDLVehicleDataTypeClusterModeStatus = @"VEHICLEDATA_CLUSTERMODESTATUS";
SDLVehicleDataType const SDLVehicleDataTypeDeviceStatus = @"VEHICLEDATA_DEVICESTATUS";
SDLVehicleDataType const SDLVehicleDataTypeECallInfo = @"VEHICLEDATA_ECALLINFO";
-SDLVehicleDataType const SDLVehicleDataTypeAirbagStatus = @"VEHICLEDATA_AIRBAGSTATUS";
+SDLVehicleDataType const SDLVehicleDataTypeElectronicParkBrakeStatus = @"VEHICLEDATA_ELECTRONICPARKBRAKESTATUS";
SDLVehicleDataType const SDLVehicleDataTypeEmergencyEvent = @"VEHICLEDATA_EMERGENCYEVENT";
-SDLVehicleDataType const SDLVehicleDataTypeClusterModeStatus = @"VEHICLEDATA_CLUSTERMODESTATUS";
-SDLVehicleDataType const SDLVehicleDataTypeMyKey = @"VEHICLEDATA_MYKEY";
-SDLVehicleDataType const SDLVehicleDataTypeBraking = @"VEHICLEDATA_BRAKING";
-SDLVehicleDataType const SDLVehicleDataTypeWiperStatus = @"VEHICLEDATA_WIPERSTATUS";
-SDLVehicleDataType const SDLVehicleDataTypeHeadlampStatus = @"VEHICLEDATA_HEADLAMPSTATUS";
-SDLVehicleDataType const SDLVehicleDataTypeBatteryVoltage = @"VEHICLEDATA_BATTVOLTAGE";
SDLVehicleDataType const SDLVehicleDataTypeEngineOilLife = @"VEHICLEDATA_ENGINEOILLIFE";
SDLVehicleDataType const SDLVehicleDataTypeEngineTorque = @"VEHICLEDATA_ENGINETORQUE";
-SDLVehicleDataType const SDLVehicleDataTypeAccelerationPedal = @"VEHICLEDATA_ACCPEDAL";
+SDLVehicleDataType const SDLVehicleDataTypeExternalTemperature = @"VEHICLEDATA_EXTERNTEMP";
+SDLVehicleDataType const SDLVehicleDataTypeFuelConsumption = @"VEHICLEDATA_FUELCONSUMPTION";
+SDLVehicleDataType const SDLVehicleDataTypeFuelLevel = @"VEHICLEDATA_FUELLEVEL";
+SDLVehicleDataType const SDLVehicleDataTypeFuelLevelState = @"VEHICLEDATA_FUELLEVEL_STATE";
+SDLVehicleDataType const SDLVehicleDataTypeFuelRange = @"VEHICLEDATA_FUELRANGE";
+SDLVehicleDataType const SDLVehicleDataTypeGPS = @"VEHICLEDATA_GPS";
+SDLVehicleDataType const SDLVehicleDataTypeGearStatus = @"VEHICLEDATA_GEARSTATUS";
+SDLVehicleDataType const SDLVehicleDataTypeHandsOffSteering = @"VEHICLEDATA_HANDSOFFSTEERING";
+SDLVehicleDataType const SDLVehicleDataTypeHeadlampStatus = @"VEHICLEDATA_HEADLAMPSTATUS";
+SDLVehicleDataType const SDLVehicleDataTypeMyKey = @"VEHICLEDATA_MYKEY";
+SDLVehicleDataType const SDLVehicleDataTypeOEMVehicleDataType = @"VEHICLEDATA_OEM_CUSTOM_DATA";
+SDLVehicleDataType const SDLVehicleDataTypeOdometer = @"VEHICLEDATA_ODOMETER";
+SDLVehicleDataType const SDLVehicleDataTypePRNDL = @"VEHICLEDATA_PRNDL";
+SDLVehicleDataType const SDLVehicleDataTypeRPM = @"VEHICLEDATA_RPM";
+SDLVehicleDataType const SDLVehicleDataTypeSpeed = @"VEHICLEDATA_SPEED";
SDLVehicleDataType const SDLVehicleDataTypeSteeringWheel = @"VEHICLEDATA_STEERINGWHEEL";
-SDLVehicleDataType const SDLVehicleDataTypeElectronicParkBrakeStatus = @"VEHICLEDATA_ELECTRONICPARKBRAKESTATUS";
+SDLVehicleDataType const SDLVehicleDataTypeTirePressure = @"VEHICLEDATA_TIREPRESSURE";
SDLVehicleDataType const SDLVehicleDataTypeTurnSignal = @"VEHICLEDATA_TURNSIGNAL";
-SDLVehicleDataType const SDLVehicleDataTypeCloudAppVehicleID = @"VEHICLEDATA_CLOUDAPPVEHICLEID";
-SDLVehicleDataType const SDLVehicleDataTypeOEMVehicleDataType = @"VEHICLEDATA_OEM_CUSTOM_DATA";
-
+SDLVehicleDataType const SDLVehicleDataTypeVIN = @"VEHICLEDATA_VIN";
+SDLVehicleDataType const SDLVehicleDataTypeWindowStatus = @"VEHICLEDATA_WINDOWSTATUS";
+SDLVehicleDataType const SDLVehicleDataTypeWiperStatus = @"VEHICLEDATA_WIPERSTATUS";
diff --git a/SmartDeviceLink/SDLWindowCapability.h b/SmartDeviceLink/SDLWindowCapability.h
index 8360416b2..4795e667b 100644
--- a/SmartDeviceLink/SDLWindowCapability.h
+++ b/SmartDeviceLink/SDLWindowCapability.h
@@ -1,15 +1,45 @@
-//
-// SDLWindowCapability.h
-// SmartDeviceLink
+/*
+* Copyright (c) 2020, SmartDeviceLink Consortium, Inc.
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* Redistributions of source code must retain the above copyright notice, this
+* list of conditions and the following disclaimer.
+*
+* Redistributions in binary form must reproduce the above copyright notice,
+* this list of conditions and the following
+* disclaimer in the documentation and/or other materials provided with the
+* distribution.
+*
+* Neither the name of the SmartDeviceLink Consortium Inc. nor the names of
+* its contributors may be used to endorse or promote products derived
+* from this software without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+*/
#import "SDLRPCStruct.h"
+
#import "SDLImageType.h"
#import "SDLMenuLayout.h"
-@class SDLTextField;
-@class SDLImageField;
@class SDLButtonCapabilities;
+@class SDLDynamicUpdateCapabilities;
+@class SDLImageField;
@class SDLSoftButtonCapabilities;
+@class SDLTextField;
NS_ASSUME_NONNULL_BEGIN
@@ -22,6 +52,21 @@ NS_ASSUME_NONNULL_BEGIN
@interface SDLWindowCapability : SDLRPCStruct
/**
+ * @param windowID - windowID
+ * @param textFields - textFields
+ * @param imageFields - imageFields
+ * @param imageTypeSupported - imageTypeSupported
+ * @param templatesAvailable - templatesAvailable
+ * @param numCustomPresetsAvailable - numCustomPresetsAvailable
+ * @param buttonCapabilities - buttonCapabilities
+ * @param softButtonCapabilities - softButtonCapabilities
+ * @param menuLayoutsAvailable - menuLayoutsAvailable
+ * @param dynamicUpdateCapabilities - dynamicUpdateCapabilities
+ * @return A SDLWindowCapability object
+ */
+- (instancetype)initWithWindowID:(nullable NSNumber<SDLInt> *)windowID textFields:(nullable NSArray<SDLTextField *> *)textFields imageFields:(nullable NSArray<SDLImageField *> *)imageFields imageTypeSupported:(nullable NSArray<SDLImageType> *)imageTypeSupported templatesAvailable:(nullable NSArray<NSString *> *)templatesAvailable numCustomPresetsAvailable:(nullable NSNumber<SDLUInt> *)numCustomPresetsAvailable buttonCapabilities:(nullable NSArray<SDLButtonCapabilities *> *)buttonCapabilities softButtonCapabilities:(nullable NSArray<SDLSoftButtonCapabilities *> *)softButtonCapabilities menuLayoutsAvailable:(nullable NSArray<SDLMenuLayout> *)menuLayoutsAvailable dynamicUpdateCapabilities:(nullable SDLDynamicUpdateCapabilities *)dynamicUpdateCapabilities;
+
+/**
The specified ID of the window. Can be set to a predefined window, or omitted for the main window on the main display.
Size: min 1 max 100
@@ -47,14 +92,14 @@ NS_ASSUME_NONNULL_BEGIN
Size: min 0 max 1000
*/
-@property (nullable, strong, nonatomic) NSArray<SDLImageType> *imageTypeSupported;
+@property (nullable, strong, nonatomic) NSArray<SDLImageType> *imageTypeSupported;
/**
A set of all window templates available on the head unit.
Size: min 0 max 100
*/
-@property (nullable, strong, nonatomic) NSArray<NSString *> *templatesAvailable;
+@property (nullable, strong, nonatomic) NSArray<NSString *> *templatesAvailable;
/**
The number of on-window custom presets available (if any); otherwise omitted.
@@ -84,6 +129,13 @@ NS_ASSUME_NONNULL_BEGIN
*/
@property (nullable, strong, nonatomic) NSArray<SDLMenuLayout> *menuLayoutsAvailable;
+/**
+ * Contains the head unit's capabilities for dynamic updating features declaring if the module will send dynamic update RPCs.
+ *
+ * @since SDL 7.0.0
+ */
+@property (nullable, strong, nonatomic) SDLDynamicUpdateCapabilities *dynamicUpdateCapabilities;
+
@end
NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLWindowCapability.m b/SmartDeviceLink/SDLWindowCapability.m
index 509e2aa96..9c3ebe7e2 100644
--- a/SmartDeviceLink/SDLWindowCapability.m
+++ b/SmartDeviceLink/SDLWindowCapability.m
@@ -1,18 +1,65 @@
-//
-// SDLWindowCapability.m
-// SmartDeviceLink
+/*
+* Copyright (c) 2020, SmartDeviceLink Consortium, Inc.
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* Redistributions of source code must retain the above copyright notice, this
+* list of conditions and the following disclaimer.
+*
+* Redistributions in binary form must reproduce the above copyright notice,
+* this list of conditions and the following
+* disclaimer in the documentation and/or other materials provided with the
+* distribution.
+*
+* Neither the name of the SmartDeviceLink Consortium Inc. nor the names of
+* its contributors may be used to endorse or promote products derived
+* from this software without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+*/
#import "SDLWindowCapability.h"
#import "NSMutableDictionary+Store.h"
-#import "SDLRPCParameterNames.h"
-#import "SDLTextField.h"
-#import "SDLImageField.h"
#import "SDLButtonCapabilities.h"
+#import "SDLDynamicUpdateCapabilities.h"
+#import "SDLImageField.h"
+#import "SDLRPCParameterNames.h"
#import "SDLSoftButtonCapabilities.h"
+#import "SDLTextField.h"
@implementation SDLWindowCapability
+- (instancetype)initWithWindowID:(nullable NSNumber<SDLInt> *)windowID textFields:(nullable NSArray<SDLTextField *> *)textFields imageFields:(nullable NSArray<SDLImageField *> *)imageFields imageTypeSupported:(nullable NSArray<SDLImageType> *)imageTypeSupported templatesAvailable:(nullable NSArray<NSString *> *)templatesAvailable numCustomPresetsAvailable:(nullable NSNumber<SDLUInt> *)numCustomPresetsAvailable buttonCapabilities:(nullable NSArray<SDLButtonCapabilities *> *)buttonCapabilities softButtonCapabilities:(nullable NSArray<SDLSoftButtonCapabilities *> *)softButtonCapabilities menuLayoutsAvailable:(nullable NSArray<SDLMenuLayout> *)menuLayoutsAvailable dynamicUpdateCapabilities:(nullable SDLDynamicUpdateCapabilities *)dynamicUpdateCapabilities {
+ self = [super init];
+ if (!self) {
+ return nil;
+ }
+ self.windowID = windowID;
+ self.textFields = textFields;
+ self.imageFields = imageFields;
+ self.imageTypeSupported = imageTypeSupported;
+ self.templatesAvailable = templatesAvailable;
+ self.numCustomPresetsAvailable = numCustomPresetsAvailable;
+ self.buttonCapabilities = buttonCapabilities;
+ self.softButtonCapabilities = softButtonCapabilities;
+ self.menuLayoutsAvailable = menuLayoutsAvailable;
+ self.dynamicUpdateCapabilities = dynamicUpdateCapabilities;
+ return self;
+}
+
- (void)setWindowID:(nullable NSNumber<SDLUInt> *)windowID {
[self.store sdl_setObject:windowID forName:SDLRPCParameterNameWindowId];
}
@@ -86,4 +133,12 @@
return [self.store sdl_enumsForName:SDLRPCParameterNameMenuLayoutsAvailable error:nil];
}
+- (void)setDynamicUpdateCapabilities:(nullable SDLDynamicUpdateCapabilities *)dynamicUpdateCapabilities {
+ [self.store sdl_setObject:dynamicUpdateCapabilities forName:SDLRPCParameterNameDynamicUpdateCapabilities];
+}
+
+- (nullable SDLDynamicUpdateCapabilities *)dynamicUpdateCapabilities {
+ return [self.store sdl_objectForName:SDLRPCParameterNameDynamicUpdateCapabilities ofClass:SDLDynamicUpdateCapabilities.class error:nil];
+}
+
@end
diff --git a/SmartDeviceLink/SDLWindowState.h b/SmartDeviceLink/SDLWindowState.h
new file mode 100644
index 000000000..fcbab5691
--- /dev/null
+++ b/SmartDeviceLink/SDLWindowState.h
@@ -0,0 +1,65 @@
+/*
+ * Copyright (c) 2020, SmartDeviceLink Consortium, Inc.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following
+ * disclaimer in the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * Neither the name of the SmartDeviceLink Consortium Inc. nor the names of
+ * its contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#import "SDLRPCStruct.h"
+
+NS_ASSUME_NONNULL_BEGIN
+
+/**
+ * @since SDL 7.0.0
+ */
+@interface SDLWindowState : SDLRPCStruct
+
+/**
+ * @param approximatePosition - The approximate percentage that the window is open - 0 being fully closed, 100 being fully open
+ * @param deviation - The percentage deviation of the approximatePosition. e.g. If the approximatePosition is 50 and the deviation is 10, then the window's location is somewhere between 40 and 60.
+ * @return A SDLWindowState object
+ */
+- (instancetype)initWithApproximatePosition:(UInt8)approximatePosition deviation:(UInt8)deviation;
+
+/**
+ * The approximate percentage that the window is open - 0 being fully closed, 100 being fully open
+ *
+ * Mandatory, Integer, 0 - 100
+ */
+@property (strong, nonatomic) NSNumber<SDLUInt> *approximatePosition;
+
+/**
+ * The percentage deviation of the approximatePosition. e.g. If the approximatePosition is 50 and the deviation is 10, then the window's location is somewhere between 40 and 60.
+ *
+ * Mandatory, Integer, 0 - 100
+ */
+@property (strong, nonatomic) NSNumber<SDLUInt> *deviation;
+
+@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLWindowState.m b/SmartDeviceLink/SDLWindowState.m
new file mode 100644
index 000000000..ee22c09bb
--- /dev/null
+++ b/SmartDeviceLink/SDLWindowState.m
@@ -0,0 +1,71 @@
+/*
+ * Copyright (c) 2020, SmartDeviceLink Consortium, Inc.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following
+ * disclaimer in the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * Neither the name of the SmartDeviceLink Consortium Inc. nor the names of
+ * its contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#import "NSMutableDictionary+Store.h"
+#import "SDLRPCParameterNames.h"
+#import "SDLWindowState.h"
+
+NS_ASSUME_NONNULL_BEGIN
+
+@implementation SDLWindowState
+
+- (instancetype)initWithApproximatePosition:(UInt8)approximatePosition deviation:(UInt8)deviation {
+ self = [super init];
+ if (!self) {
+ return nil;
+ }
+ self.approximatePosition = @(approximatePosition);
+ self.deviation = @(deviation);
+ return self;
+}
+
+- (void)setApproximatePosition:(NSNumber<SDLUInt> *)approximatePosition {
+ [self.store sdl_setObject:approximatePosition forName:SDLRPCParameterNameApproximatePosition];
+}
+
+- (NSNumber<SDLUInt> *)approximatePosition {
+ NSError *error = nil;
+ return [self.store sdl_objectForName:SDLRPCParameterNameApproximatePosition ofClass:NSNumber.class error:&error];
+}
+
+- (void)setDeviation:(NSNumber<SDLUInt> *)deviation {
+ [self.store sdl_setObject:deviation forName:SDLRPCParameterNameDeviation];
+}
+
+- (NSNumber<SDLUInt> *)deviation {
+ NSError *error = nil;
+ return [self.store sdl_objectForName:SDLRPCParameterNameDeviation ofClass:NSNumber.class error:&error];
+}
+
+@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLWindowStatus.h b/SmartDeviceLink/SDLWindowStatus.h
new file mode 100644
index 000000000..e3e235242
--- /dev/null
+++ b/SmartDeviceLink/SDLWindowStatus.h
@@ -0,0 +1,70 @@
+/*
+ * Copyright (c) 2020, SmartDeviceLink Consortium, Inc.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following
+ * disclaimer in the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * Neither the name of the SmartDeviceLink Consortium Inc. nor the names of
+ * its contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#import "SDLRPCStruct.h"
+
+@class SDLGrid;
+@class SDLWindowState;
+
+NS_ASSUME_NONNULL_BEGIN
+
+/**
+ * Describes the status of a window of a door/liftgate etc.
+ *
+ * @since SDL 7.0.0
+ */
+@interface SDLWindowStatus : SDLRPCStruct
+
+/**
+ * @param location - location
+ * @param state - state
+ * @return A SDLWindowStatus object
+ */
+- (instancetype)initWithLocation:(SDLGrid *)location state:(SDLWindowState *)state;
+
+/**
+ * location
+ *
+ * Mandatory
+*/
+@property (strong, nonatomic) SDLGrid *location;
+
+/**
+ * state
+ *
+ * Mandatory
+*/
+@property (strong, nonatomic) SDLWindowState *state;
+
+@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLWindowStatus.m b/SmartDeviceLink/SDLWindowStatus.m
new file mode 100644
index 000000000..1fc54b359
--- /dev/null
+++ b/SmartDeviceLink/SDLWindowStatus.m
@@ -0,0 +1,73 @@
+/*
+ * Copyright (c) 2020, SmartDeviceLink Consortium, Inc.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following
+ * disclaimer in the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * Neither the name of the SmartDeviceLink Consortium Inc. nor the names of
+ * its contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#import "NSMutableDictionary+Store.h"
+#import "SDLGrid.h"
+#import "SDLRPCParameterNames.h"
+#import "SDLWindowState.h"
+#import "SDLWindowStatus.h"
+
+NS_ASSUME_NONNULL_BEGIN
+
+@implementation SDLWindowStatus
+
+- (instancetype)initWithLocation:(SDLGrid *)location state:(SDLWindowState *)state {
+ self = [super init];
+ if (!self) {
+ return nil;
+ }
+ self.location = location;
+ self.state = state;
+ return self;
+}
+
+- (void)setLocation:(SDLGrid *)location {
+ [self.store sdl_setObject:location forName:SDLRPCParameterNameLocation];
+}
+
+- (SDLGrid *)location {
+ NSError *error = nil;
+ return [self.store sdl_objectForName:SDLRPCParameterNameLocation ofClass:SDLGrid.class error:&error];
+}
+
+- (void)setState:(SDLWindowState *)state {
+ [self.store sdl_setObject:state forName:SDLRPCParameterNameState];
+}
+
+- (SDLWindowState *)state {
+ NSError *error = nil;
+ return [self.store sdl_objectForName:SDLRPCParameterNameState ofClass:SDLWindowState.class error:&error];
+}
+
+@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SmartDeviceLink.h b/SmartDeviceLink/SmartDeviceLink.h
index 177d60bd7..66f82fb70 100644
--- a/SmartDeviceLink/SmartDeviceLink.h
+++ b/SmartDeviceLink/SmartDeviceLink.h
@@ -9,8 +9,8 @@ FOUNDATION_EXPORT double SmartDeviceLinkVersionNumber;
/// Project version string for SmartDeviceLink.
FOUNDATION_EXPORT const unsigned char SmartDeviceLinkVersionString[];
-/***** RPCs *****/
-// Superclasses
+#pragma mark - RPCs
+#pragma mark Superclasses
#import "SDLEnum.h"
#import "SDLRPCMessage.h"
#import "SDLRPCNotification.h"
@@ -18,7 +18,7 @@ FOUNDATION_EXPORT const unsigned char SmartDeviceLinkVersionString[];
#import "SDLRPCResponse.h"
#import "SDLRPCStruct.h"
-// Requests
+#pragma mark Requests
#import "SDLAddCommand.h"
#import "SDLAddSubMenu.h"
#import "SDLAlert.h"
@@ -73,6 +73,7 @@ FOUNDATION_EXPORT const unsigned char SmartDeviceLinkVersionString[];
#import "SDLSubscribeButton.h"
#import "SDLSubscribeVehicleData.h"
#import "SDLSubscribeWayPoints.h"
+#import "SDLSubtleAlert.h"
#import "SDLSyncPData.h"
#import "SDLSystemRequest.h"
#import "SDLUnpublishAppService.h"
@@ -83,7 +84,7 @@ FOUNDATION_EXPORT const unsigned char SmartDeviceLinkVersionString[];
#import "SDLUnsubscribeWayPoints.h"
#import "SDLUpdateTurnList.h"
-// Responses
+#pragma mark Responses
#import "SDLAddCommandResponse.h"
#import "SDLAddSubMenuResponse.h"
#import "SDLAlertManeuverResponse.h"
@@ -139,6 +140,7 @@ FOUNDATION_EXPORT const unsigned char SmartDeviceLinkVersionString[];
#import "SDLSubscribeButtonResponse.h"
#import "SDLSubscribeVehicleDataResponse.h"
#import "SDLSubscribeWayPointsResponse.h"
+#import "SDLSubtleAlertResponse.h"
#import "SDLSyncPDataResponse.h"
#import "SDLUnpublishAppServiceResponse.h"
#import "SDLReleaseInteriorVehicleDataModuleResponse.h"
@@ -148,7 +150,7 @@ FOUNDATION_EXPORT const unsigned char SmartDeviceLinkVersionString[];
#import "SDLUnsubscribeWayPointsResponse.h"
#import "SDLUpdateTurnListResponse.h"
-// Notifications
+#pragma mark Notifications
#import "SDLOnAppInterfaceUnregistered.h"
#import "SDLOnAppServiceData.h"
#import "SDLOnAudioPassThru.h"
@@ -165,15 +167,18 @@ FOUNDATION_EXPORT const unsigned char SmartDeviceLinkVersionString[];
#import "SDLOnLockScreenStatus.h"
#import "SDLOnPermissionsChange.h"
#import "SDLOnRCStatus.h"
+#import "SDLOnSubtleAlertPressed.h"
#import "SDLOnSyncPData.h"
#import "SDLOnSystemCapabilityUpdated.h"
#import "SDLOnSystemRequest.h"
#import "SDLOnTBTClientState.h"
#import "SDLOnTouchEvent.h"
+#import "SDLOnUpdateFile.h"
+#import "SDLOnUpdateSubMenu.h"
#import "SDLOnVehicleData.h"
#import "SDLOnWayPointChange.h"
-// Structs
+#pragma mark Structs
#import "SDLAirbagStatus.h"
#import "SDLAppInfo.h"
#import "SDLAppServiceCapability.h"
@@ -198,10 +203,13 @@ FOUNDATION_EXPORT const unsigned char SmartDeviceLinkVersionString[];
#import "SDLDeviceStatus.h"
#import "SDLDisplayCapabilities.h"
#import "SDLDisplayCapability.h"
+#import "SDLDynamicUpdateCapabilities.h"
+#import "SDLDriverDistractionCapability.h"
#import "SDLECallInfo.h"
#import "SDLEmergencyEvent.h"
#import "SDLFuelRange.h"
#import "SDLEqualizerSettings.h"
+#import "SDLGearStatus.h"
#import "SDLGPSData.h"
#import "SDLGrid.h"
#import "SDLHapticRect.h"
@@ -268,6 +276,7 @@ FOUNDATION_EXPORT const unsigned char SmartDeviceLinkVersionString[];
#import "SDLTouchCoord.h"
#import "SDLTouchEvent.h"
#import "SDLTouchEventCapabilities.h"
+#import "SDLTransmissionType.h"
#import "SDLTurn.h"
#import "SDLVehicleDataResult.h"
#import "SDLVehicleType.h"
@@ -279,9 +288,11 @@ FOUNDATION_EXPORT const unsigned char SmartDeviceLinkVersionString[];
#import "SDLWeatherServiceData.h"
#import "SDLWeatherServiceManifest.h"
#import "SDLWindowCapability.h"
+#import "SDLWindowStatus.h"
+#import "SDLWindowState.h"
#import "SDLWindowTypeCapabilities.h"
-// Enums
+#pragma mark Enums
#import "SDLAmbientLightStatus.h"
#import "SDLAppHMIType.h"
#import "SDLAppInterfaceUnregisteredReason.h"
@@ -390,8 +401,8 @@ FOUNDATION_EXPORT const unsigned char SmartDeviceLinkVersionString[];
#import "SDLWindowType.h"
#import "SDLWiperStatus.h"
-// Developer API
-// Configurations
+#pragma mark - Developer API
+#pragma mark Configurations
#import "SDLConfiguration.h"
#import "SDLEncryptionConfiguration.h"
#import "SDLFileManagerConfiguration.h"
@@ -400,11 +411,11 @@ FOUNDATION_EXPORT const unsigned char SmartDeviceLinkVersionString[];
#import "SDLLockScreenConfiguration.h"
#import "SDLStreamingMediaConfiguration.h"
-// Encryption
+#pragma mark Encryption
#import "SDLProtocolConstants.h"
#import "SDLServiceEncryptionDelegate.h"
-// Streaming
+#pragma mark Streaming
#import "SDLAudioFile.h"
#import "SDLAudioStreamManager.h"
#import "SDLAudioStreamManagerDelegate.h"
@@ -417,29 +428,29 @@ FOUNDATION_EXPORT const unsigned char SmartDeviceLinkVersionString[];
#import "SDLStreamingMediaManagerDataSource.h"
#import "SDLStreamingVideoScaleManager.h"
-// Files
+#pragma mark Files
#import "SDLArtwork.h"
#import "SDLFile.h"
#import "SDLFileManager.h"
#import "SDLFileManagerConstants.h"
-// Lockscreen
+#pragma mark Lockscreen
#import "SDLLockScreenViewController.h"
-// Lifecycle
+#pragma mark Lifecycle
#import "SDLManager.h"
#import "SDLManagerDelegate.h"
-// System Capabilities
+#pragma mark System Capabilities
#import "SDLSystemCapabilityManager.h"
-// Permissions
+#pragma mark Permissions
#import "SDLPermissionConstants.h"
#import "SDLPermissionElement.h"
#import "SDLRPCPermissionStatus.h"
#import "SDLPermissionManager.h"
-// Screen
+#pragma mark Screen
#import "SDLScreenManager.h"
#import "SDLSoftButtonObject.h"
#import "SDLSoftButtonState.h"
@@ -453,11 +464,11 @@ FOUNDATION_EXPORT const unsigned char SmartDeviceLinkVersionString[];
#import "SDLChoiceSetDelegate.h"
#import "SDLKeyboardDelegate.h"
-// Touches
+#pragma mark Touches
#import "SDLPinchGesture.h"
#import "SDLTouch.h"
-// Utilities
+#pragma mark - Utilities
#import "NSNumber+NumberType.h"
#import "SDLErrorConstants.h"
#import "SDLFunctionID.h"
@@ -466,12 +477,12 @@ FOUNDATION_EXPORT const unsigned char SmartDeviceLinkVersionString[];
#import "SDLStreamingMediaManagerConstants.h"
#import "SDLVersion.h"
-// Notifications
+#pragma mark Notifications
#import "SDLRPCNotificationNotification.h"
#import "SDLRPCResponseNotification.h"
#import "SDLRPCRequestNotification.h"
-// Logger
+#pragma mark Logger
#import "SDLLogConstants.h"
#import "SDLLogConfiguration.h"
#import "SDLLogFileModule.h"
@@ -483,5 +494,5 @@ FOUNDATION_EXPORT const unsigned char SmartDeviceLinkVersionString[];
#import "SDLLogTargetFile.h"
#import "SDLLogTargetOSLog.h"
-// Macros
+#pragma mark Macros
#import "SDLMacros.h"
diff --git a/SmartDeviceLinkTests/DevAPISpecs/SDLChoiceSetManagerSpec.m b/SmartDeviceLinkTests/DevAPISpecs/SDLChoiceSetManagerSpec.m
index c9ce76b50..47156d1c0 100644
--- a/SmartDeviceLinkTests/DevAPISpecs/SDLChoiceSetManagerSpec.m
+++ b/SmartDeviceLinkTests/DevAPISpecs/SDLChoiceSetManagerSpec.m
@@ -95,7 +95,7 @@ describe(@"choice set manager tests", ^{
testCell3 = [[SDLChoiceCell alloc] initWithText:@"test3"];
enabledWindowCapability = [[SDLWindowCapability alloc] init];
- enabledWindowCapability.textFields = @[[[SDLTextField alloc] initWithName:SDLTextFieldNameMenuName characterSet:SDLCharacterSetType5 width:500 rows:1]];
+ enabledWindowCapability.textFields = @[[[SDLTextField alloc] initWithName:SDLTextFieldNameMenuName characterSet:SDLCharacterSetUtf8 width:500 rows:1]];
disabledWindowCapability = [[SDLWindowCapability alloc] init];
disabledWindowCapability.textFields = @[];
blankWindowCapability = [[SDLWindowCapability alloc] init];
diff --git a/SmartDeviceLinkTests/ProtocolSpecs/SDLFunctionIDSpec.m b/SmartDeviceLinkTests/ProtocolSpecs/SDLFunctionIDSpec.m
index 32599856d..b47292f55 100644
--- a/SmartDeviceLinkTests/ProtocolSpecs/SDLFunctionIDSpec.m
+++ b/SmartDeviceLinkTests/ProtocolSpecs/SDLFunctionIDSpec.m
@@ -89,6 +89,8 @@ describe(@"GetFunctionName Tests", ^ {
expect([functionID functionNameForId:32785]).to(equal(SDLRPCFunctionNameOnRCStatus));
expect([functionID functionNameForId:32786]).to(equal(SDLRPCFunctionNameOnAppServiceData));
expect([functionID functionNameForId:32787]).to(equal(SDLRPCFunctionNameOnSystemCapabilityUpdated));
+ expect([functionID functionNameForId:32789]).to(equal(SDLRPCFunctionNameOnUpdateFile));
+ expect([functionID functionNameForId:32790]).to(equal(SDLRPCFunctionNameOnUpdateSubMenu));
//Not listed in Spec
#pragma clang diagnostic push
diff --git a/SmartDeviceLinkTests/RPCSpecs/EnumSpecs/SDLCapacityUnitSpec.m b/SmartDeviceLinkTests/RPCSpecs/EnumSpecs/SDLCapacityUnitSpec.m
new file mode 100644
index 000000000..8dc19f03e
--- /dev/null
+++ b/SmartDeviceLinkTests/RPCSpecs/EnumSpecs/SDLCapacityUnitSpec.m
@@ -0,0 +1,21 @@
+//
+// SDLCapacityUnitSpec.m
+// SmartDeviceLinkTests
+//
+
+#import <Nimble/Nimble.h>
+#import <Quick/Quick.h>
+
+#import "SDLCapacityUnit.h"
+
+QuickSpecBegin(SDLCapacityUnitSpec)
+
+describe(@"Individual Enum Value Tests", ^ {
+ it(@"Should match internal values", ^ {
+ expect(SDLCapacityUnitKilograms).to(equal(@"KILOGRAMS"));
+ expect(SDLCapacityUnitKilowatthours).to(equal(@"KILOWATTHOURS"));
+ expect(SDLCapacityUnitLiters).to(equal(@"LITERS"));
+ });
+});
+
+QuickSpecEnd
diff --git a/SmartDeviceLinkTests/RPCSpecs/EnumSpecs/SDLCharacterSetSpec.m b/SmartDeviceLinkTests/RPCSpecs/EnumSpecs/SDLCharacterSetSpec.m
index 293b2f3fe..58440e51d 100644
--- a/SmartDeviceLinkTests/RPCSpecs/EnumSpecs/SDLCharacterSetSpec.m
+++ b/SmartDeviceLinkTests/RPCSpecs/EnumSpecs/SDLCharacterSetSpec.m
@@ -14,10 +14,16 @@ QuickSpecBegin(SDLCharacterSetSpec)
describe(@"Individual Enum Value Tests", ^ {
it(@"Should match internal values", ^ {
+ #pragma clang diagnostic push
+ #pragma clang diagnostic ignored "-Wdeprecated-declarations"
expect(SDLCharacterSetType2).to(equal(@"TYPE2SET"));
expect(SDLCharacterSetType5).to(equal(@"TYPE5SET"));
expect(SDLCharacterSetCID1).to(equal(@"CID1SET"));
expect(SDLCharacterSetCID2).to(equal(@"CID2SET"));
+ #pragma clang diagnostic pop
+ expect(SDLCharacterSetAscii).to(equal(@"ASCII"));
+ expect(SDLCharacterSetIso88591).to(equal(@"ISO_8859_1"));
+ expect(SDLCharacterSetUtf8).to(equal(@"UTF_8"));
});
});
diff --git a/SmartDeviceLinkTests/RPCSpecs/EnumSpecs/SDLImageFieldNameSpec.m b/SmartDeviceLinkTests/RPCSpecs/EnumSpecs/SDLImageFieldNameSpec.m
index bf3e9f82f..6363714eb 100644
--- a/SmartDeviceLinkTests/RPCSpecs/EnumSpecs/SDLImageFieldNameSpec.m
+++ b/SmartDeviceLinkTests/RPCSpecs/EnumSpecs/SDLImageFieldNameSpec.m
@@ -27,6 +27,8 @@ describe(@"Individual Enum Value Tests", ^ {
expect(SDLImageFieldNameShowConstantTBTIcon).to(equal(@"showConstantTBTIcon"));
expect(SDLImageFieldNameShowConstantTBTNextTurnIcon).to(equal(@"showConstantTBTNextTurnIcon"));
expect(SDLImageFieldNameLocationImage).to(equal(@"locationImage"));
+ expect(SDLImageFieldNameSubMenuIcon).to(equal(@"subMenuIcon"));
+ expect(SDLImageFieldNameSubtleAlertIcon).to(equal(@"subtleAlertIcon"));
});
});
diff --git a/SmartDeviceLinkTests/RPCSpecs/EnumSpecs/SDLPRNDLSpec.m b/SmartDeviceLinkTests/RPCSpecs/EnumSpecs/SDLPRNDLSpec.m
index 169bf4ffb..6d370c57b 100644
--- a/SmartDeviceLinkTests/RPCSpecs/EnumSpecs/SDLPRNDLSpec.m
+++ b/SmartDeviceLinkTests/RPCSpecs/EnumSpecs/SDLPRNDLSpec.m
@@ -12,8 +12,8 @@
QuickSpecBegin(SDLPRNDLSpec)
-describe(@"Individual Enum Value Tests", ^ {
- it(@"Should match internal values", ^ {
+describe(@"individual enum value tests", ^ {
+ it(@"should match internal values", ^ {
expect(SDLPRNDLPark).to(equal(@"PARK"));
expect(SDLPRNDLReverse).to(equal(@"REVERSE"));
expect(SDLPRNDLNeutral).to(equal(@"NEUTRAL"));
@@ -21,7 +21,9 @@ describe(@"Individual Enum Value Tests", ^ {
expect(SDLPRNDLSport).to(equal(@"SPORT"));
expect(SDLPRNDLLowGear).to(equal(@"LOWGEAR"));
expect(SDLPRNDLFirst).to(equal(@"FIRST"));
+ expect(SDLPRNDLNinth).to(equal(@"NINTH"));
expect(SDLPRNDLSecond).to(equal(@"SECOND"));
+ expect(SDLPRNDLTenth).to(equal(@"TENTH"));
expect(SDLPRNDLThird).to(equal(@"THIRD"));
expect(SDLPRNDLFourth).to(equal(@"FOURTH"));
expect(SDLPRNDLFifth).to(equal(@"FIFTH"));
diff --git a/SmartDeviceLinkTests/RPCSpecs/EnumSpecs/SDLSystemCapabilityTypeSpec.m b/SmartDeviceLinkTests/RPCSpecs/EnumSpecs/SDLSystemCapabilityTypeSpec.m
index 58bb889dc..ff6fe1656 100755
--- a/SmartDeviceLinkTests/RPCSpecs/EnumSpecs/SDLSystemCapabilityTypeSpec.m
+++ b/SmartDeviceLinkTests/RPCSpecs/EnumSpecs/SDLSystemCapabilityTypeSpec.m
@@ -15,6 +15,9 @@ describe(@"Individual Enum Value Tests", ^ {
expect(SDLSystemCapabilityTypePhoneCall).to(equal(@"PHONE_CALL"));
expect(SDLSystemCapabilityTypeVideoStreaming).to(equal(@"VIDEO_STREAMING"));
expect(SDLSystemCapabilityTypeRemoteControl).to(equal(@"REMOTE_CONTROL"));
+ expect(SDLSystemCapabilityTypeDisplays).to(equal(@"DISPLAYS"));
+ expect(SDLSystemCapabilityTypeSeatLocation).to(equal(@"SEAT_LOCATION"));
+ expect(SDLSystemCapabilityTypeDriverDistraction).to(equal(@"DRIVER_DISTRACTION"));
});
});
diff --git a/SmartDeviceLinkTests/RPCSpecs/EnumSpecs/SDLTextFieldNameSpec.m b/SmartDeviceLinkTests/RPCSpecs/EnumSpecs/SDLTextFieldNameSpec.m
index bacc79853..8f4b698fa 100644
--- a/SmartDeviceLinkTests/RPCSpecs/EnumSpecs/SDLTextFieldNameSpec.m
+++ b/SmartDeviceLinkTests/RPCSpecs/EnumSpecs/SDLTextFieldNameSpec.m
@@ -43,6 +43,9 @@ describe(@"Individual Enum Value Tests", ^ {
expect(SDLTextFieldNameLocationDescription).to(equal(@"locationDescription"));
expect(SDLTextFieldNameAddressLines).to(equal(@"addressLines"));
expect(SDLTextFieldNamePhoneNumber).to(equal(@"phoneNumber"));
+ expect(SDLTextFieldNameSubtleAlertText1).to(equal(@"subtleAlertText1"));
+ expect(SDLTextFieldNameSubtleAlertText2).to(equal(@"subtleAlertText2"));
+ expect(SDLTextFieldNameSubtleAlertSoftButtonText).to(equal("subtleAlertSoftButtonText"));
});
});
diff --git a/SmartDeviceLinkTests/RPCSpecs/EnumSpecs/SDLTransmissionTypeSpec.m b/SmartDeviceLinkTests/RPCSpecs/EnumSpecs/SDLTransmissionTypeSpec.m
new file mode 100644
index 000000000..73a245e44
--- /dev/null
+++ b/SmartDeviceLinkTests/RPCSpecs/EnumSpecs/SDLTransmissionTypeSpec.m
@@ -0,0 +1,25 @@
+//
+// SDLTransmissionTypeSpec.m
+// SmartDeviceLinkTests
+//
+
+#import <Nimble/Nimble.h>
+#import <Quick/Quick.h>
+#import "SDLTransmissionType.h"
+
+QuickSpecBegin(SDLTransmissionTypeSpec)
+
+describe(@"individual enum value tests", ^{
+ it(@"should match internal values", ^{
+ expect(SDLTransmissionTypeAutomatic).to(equal(@"AUTOMATIC"));
+ expect(SDLTransmissionTypeContinuouslyVariable).to(equal(@"CONTINUOUSLY_VARIABLE"));
+ expect(SDLTransmissionTypeDirectDrive).to(equal(@"DIRECT_DRIVE"));
+ expect(SDLTransmissionTypeDualClutch).to(equal(@"DUAL_CLUTCH"));
+ expect(SDLTransmissionTypeElectricVariable).to(equal(@"ELECTRIC_VARIABLE"));
+ expect(SDLTransmissionTypeInfinitelyVariable).to(equal(@"INFINITELY_VARIABLE"));
+ expect(SDLTransmissionTypeManual).to(equal(@"MANUAL"));
+ expect(SDLTransmissionTypeSemiAutomatic).to(equal(@"SEMI_AUTOMATIC"));
+ });
+});
+
+QuickSpecEnd
diff --git a/SmartDeviceLinkTests/RPCSpecs/EnumSpecs/SDLVehicleDataTypeSpec.m b/SmartDeviceLinkTests/RPCSpecs/EnumSpecs/SDLVehicleDataTypeSpec.m
index 16f87d613..3f423bd0b 100644
--- a/SmartDeviceLinkTests/RPCSpecs/EnumSpecs/SDLVehicleDataTypeSpec.m
+++ b/SmartDeviceLinkTests/RPCSpecs/EnumSpecs/SDLVehicleDataTypeSpec.m
@@ -2,49 +2,56 @@
// SDLVehicleDataTypeSpec.m
// SmartDeviceLink
-
#import <Foundation/Foundation.h>
-
-#import <Quick/Quick.h>
#import <Nimble/Nimble.h>
+#import <Quick/Quick.h>
#import "SDLVehicleDataType.h"
QuickSpecBegin(SDLVehicleDataTypeSpec)
-describe(@"Individual Enum Value Tests", ^ {
- it(@"Should match internal values", ^ {
- expect(SDLVehicleDataTypeGPS).to(equal(@"VEHICLEDATA_GPS"));
- expect(SDLVehicleDataTypeSpeed).to(equal(@"VEHICLEDATA_SPEED"));
- expect(SDLVehicleDataTypeRPM).to(equal(@"VEHICLEDATA_RPM"));
- expect(SDLVehicleDataTypeFuelLevel).to(equal(@"VEHICLEDATA_FUELLEVEL"));
- expect(SDLVehicleDataTypeFuelLevelState).to(equal(@"VEHICLEDATA_FUELLEVEL_STATE"));
- expect(SDLVehicleDataTypeFuelConsumption).to(equal(@"VEHICLEDATA_FUELCONSUMPTION"));
- expect(SDLVehicleDataTypeFuelRange).to(equal(@"VEHICLEDATA_FUELRANGE"));
- expect(SDLVehicleDataTypeExternalTemperature).to(equal(@"VEHICLEDATA_EXTERNTEMP"));
- expect(SDLVehicleDataTypeVIN).to(equal(@"VEHICLEDATA_VIN"));
- expect(SDLVehicleDataTypePRNDL).to(equal(@"VEHICLEDATA_PRNDL"));
- expect(SDLVehicleDataTypeTirePressure).to(equal(@"VEHICLEDATA_TIREPRESSURE"));
- expect(SDLVehicleDataTypeOdometer).to(equal(@"VEHICLEDATA_ODOMETER"));
+describe(@"individual enum value tests", ^{
+ it(@"should match internal values", ^{
+ expect(SDLVehicleDataTypeAccelerationPedal).to(equal(@"VEHICLEDATA_ACCPEDAL"));
+ expect(SDLVehicleDataTypeAirbagStatus).to(equal(@"VEHICLEDATA_AIRBAGSTATUS"));
+ expect(SDLVehicleDataTypeBatteryVoltage).to(equal(@"VEHICLEDATA_BATTVOLTAGE"));
expect(SDLVehicleDataTypeBeltStatus).to(equal(@"VEHICLEDATA_BELTSTATUS"));
expect(SDLVehicleDataTypeBodyInfo).to(equal(@"VEHICLEDATA_BODYINFO"));
+ expect(SDLVehicleDataTypeBraking).to(equal(@"VEHICLEDATA_BRAKING"));
+ expect(SDLVehicleDataTypeCloudAppVehicleID).to(equal(@"VEHICLEDATA_CLOUDAPPVEHICLEID"));
+ expect(SDLVehicleDataTypeClusterModeStatus).to(equal(@"VEHICLEDATA_CLUSTERMODESTATUS"));
expect(SDLVehicleDataTypeDeviceStatus).to(equal(@"VEHICLEDATA_DEVICESTATUS"));
expect(SDLVehicleDataTypeECallInfo).to(equal(@"VEHICLEDATA_ECALLINFO"));
- expect(SDLVehicleDataTypeAirbagStatus).to(equal(@"VEHICLEDATA_AIRBAGSTATUS"));
+ expect(SDLVehicleDataTypeElectronicParkBrakeStatus).to(equal(@"VEHICLEDATA_ELECTRONICPARKBRAKESTATUS"));
expect(SDLVehicleDataTypeEmergencyEvent).to(equal(@"VEHICLEDATA_EMERGENCYEVENT"));
- expect(SDLVehicleDataTypeClusterModeStatus).to(equal(@"VEHICLEDATA_CLUSTERMODESTATUS"));
- expect(SDLVehicleDataTypeMyKey).to(equal(@"VEHICLEDATA_MYKEY"));
- expect(SDLVehicleDataTypeBraking).to(equal(@"VEHICLEDATA_BRAKING"));
- expect(SDLVehicleDataTypeWiperStatus).to(equal(@"VEHICLEDATA_WIPERSTATUS"));
- expect(SDLVehicleDataTypeHeadlampStatus).to(equal(@"VEHICLEDATA_HEADLAMPSTATUS"));
- expect(SDLVehicleDataTypeBatteryVoltage).to(equal(@"VEHICLEDATA_BATTVOLTAGE"));
expect(SDLVehicleDataTypeEngineOilLife).to(equal(@"VEHICLEDATA_ENGINEOILLIFE"));
expect(SDLVehicleDataTypeEngineTorque).to(equal(@"VEHICLEDATA_ENGINETORQUE"));
- expect(SDLVehicleDataTypeAccelerationPedal).to(equal(@"VEHICLEDATA_ACCPEDAL"));
+ expect(SDLVehicleDataTypeExternalTemperature).to(equal(@"VEHICLEDATA_EXTERNTEMP"));
+ expect(SDLVehicleDataTypeFuelConsumption).to(equal(@"VEHICLEDATA_FUELCONSUMPTION"));
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
+ expect(SDLVehicleDataTypeFuelLevel).to(equal(@"VEHICLEDATA_FUELLEVEL"));
+ expect(SDLVehicleDataTypeFuelLevelState).to(equal(@"VEHICLEDATA_FUELLEVEL_STATE"));
+#pragma clang diagnostic pop
+ expect(SDLVehicleDataTypeFuelRange).to(equal(@"VEHICLEDATA_FUELRANGE"));
+ expect(SDLVehicleDataTypeGPS).to(equal(@"VEHICLEDATA_GPS"));
+ expect(SDLVehicleDataTypeGearStatus).to(equal(@"VEHICLEDATA_GEARSTATUS"));
+ expect(SDLVehicleDataTypeHandsOffSteering).to(equal(@"VEHICLEDATA_HANDSOFFSTEERING"));
+ expect(SDLVehicleDataTypeHeadlampStatus).to(equal(@"VEHICLEDATA_HEADLAMPSTATUS"));
+ expect(SDLVehicleDataTypeMyKey).to(equal(@"VEHICLEDATA_MYKEY"));
+ expect(SDLVehicleDataTypeOdometer).to(equal(@"VEHICLEDATA_ODOMETER"));
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
+ expect(SDLVehicleDataTypePRNDL).to(equal(@"VEHICLEDATA_PRNDL"));
+#pragma clang diagnostic pop
+ expect(SDLVehicleDataTypeRPM).to(equal(@"VEHICLEDATA_RPM"));
+ expect(SDLVehicleDataTypeSpeed).to(equal(@"VEHICLEDATA_SPEED"));
expect(SDLVehicleDataTypeSteeringWheel).to(equal(@"VEHICLEDATA_STEERINGWHEEL"));
- expect(SDLVehicleDataTypeElectronicParkBrakeStatus).to(equal(@"VEHICLEDATA_ELECTRONICPARKBRAKESTATUS"));
+ expect(SDLVehicleDataTypeTirePressure).to(equal(@"VEHICLEDATA_TIREPRESSURE"));
expect(SDLVehicleDataTypeTurnSignal).to(equal(@"VEHICLEDATA_TURNSIGNAL"));
- expect(SDLVehicleDataTypeCloudAppVehicleID).to(equal(@"VEHICLEDATA_CLOUDAPPVEHICLEID"));
+ expect(SDLVehicleDataTypeVIN).to(equal(@"VEHICLEDATA_VIN"));
+ expect(SDLVehicleDataTypeWindowStatus).to(equal(@"VEHICLEDATA_WINDOWSTATUS"));
+ expect(SDLVehicleDataTypeWiperStatus).to(equal(@"VEHICLEDATA_WIPERSTATUS"));
});
});
diff --git a/SmartDeviceLinkTests/RPCSpecs/NotificationSpecs/SDLOnSubtleAlertPressedSpec.m b/SmartDeviceLinkTests/RPCSpecs/NotificationSpecs/SDLOnSubtleAlertPressedSpec.m
new file mode 100644
index 000000000..e582242ed
--- /dev/null
+++ b/SmartDeviceLinkTests/RPCSpecs/NotificationSpecs/SDLOnSubtleAlertPressedSpec.m
@@ -0,0 +1,29 @@
+//
+// SDLOnSubtleAlertPressedSpec.m
+// SmartDeviceLinkTests
+//
+// Created by Nicole on 7/28/20.
+// Copyright © 2020 smartdevicelink. All rights reserved.
+//
+
+#import <Quick/Quick.h>
+#import <Nimble/Nimble.h>
+
+#import "SDLOnSubtleAlertPressed.h"
+#import "SDLRPCParameterNames.h"
+#import "SDLRPCFunctionNames.h"
+
+QuickSpecBegin(SDLOnSubtleAlertPressedSpec)
+
+describe(@"Getter/Setter Tests", ^{
+ __block SDLOnSubtleAlertPressed *testOnSubtleAlertPressed = nil;
+
+ it(@"Should init correctly", ^{
+ testOnSubtleAlertPressed = [[SDLOnSubtleAlertPressed alloc] init];
+
+ expect(testOnSubtleAlertPressed).toNot(beNil());
+ });
+});
+
+QuickSpecEnd
+
diff --git a/SmartDeviceLinkTests/RPCSpecs/NotificationSpecs/SDLOnUpdateFileSpec.m b/SmartDeviceLinkTests/RPCSpecs/NotificationSpecs/SDLOnUpdateFileSpec.m
new file mode 100644
index 000000000..c39c671b5
--- /dev/null
+++ b/SmartDeviceLinkTests/RPCSpecs/NotificationSpecs/SDLOnUpdateFileSpec.m
@@ -0,0 +1,74 @@
+//
+// SDLOnUpdateFileSpec.m
+// SmartDeviceLinkTests
+//
+// Created by Joel Fischer on 7/30/20.
+// Copyright © 2020 smartdevicelink. All rights reserved.
+//
+
+#import <Foundation/Foundation.h>
+
+#import <Quick/Quick.h>
+#import <Nimble/Nimble.h>
+
+#import "SDLRPCParameterNames.h"
+#import "SDLOnUpdateFile.h"
+
+QuickSpecBegin(SDLOnUpdateFileSpec)
+
+__block SDLOnUpdateFile *testRPC = nil;
+__block NSString *testFileName = nil;
+
+beforeEach(^{
+ testFileName = @"test file name";
+});
+
+describe(@"when initializing with init", ^{
+ beforeEach(^{
+ testRPC = [[SDLOnUpdateFile alloc] init];
+ });
+
+ it(@"should have no data", ^{
+ expect(testRPC.fileName).to(beNil());
+ });
+
+ describe(@"when getting/setting parameters", ^{
+ beforeEach(^{
+ testRPC.fileName = testFileName;
+ });
+
+ it(@"should properly get/set the data", ^{
+ expect(testRPC.fileName).to(equal(testFileName));
+ });
+ });
+});
+
+describe(@"when initializing with a dictionary", ^{
+ beforeEach(^{
+ NSDictionary *testDict = @{
+ SDLRPCParameterNameNotification: @{
+ SDLRPCParameterNameParameters: @{
+ SDLRPCParameterNameFileName: testFileName
+ }
+ }
+ };
+
+ testRPC = [[SDLOnUpdateFile alloc] initWithDictionary:testDict];
+ });
+
+ it(@"should properly get/set the data", ^{
+ expect(testRPC.fileName).to(equal(testFileName));
+ });
+});
+
+describe(@"when initializing with initWithFileName:", ^{
+ beforeEach(^{
+ testRPC = [[SDLOnUpdateFile alloc] initWithFileName:testFileName];
+ });
+
+ it(@"should properly get/set the data", ^{
+ expect(testRPC.fileName).to(equal(testFileName));
+ });
+});
+
+QuickSpecEnd
diff --git a/SmartDeviceLinkTests/RPCSpecs/NotificationSpecs/SDLOnUpdateSubMenuSpec.m b/SmartDeviceLinkTests/RPCSpecs/NotificationSpecs/SDLOnUpdateSubMenuSpec.m
new file mode 100644
index 000000000..fd845f0a0
--- /dev/null
+++ b/SmartDeviceLinkTests/RPCSpecs/NotificationSpecs/SDLOnUpdateSubMenuSpec.m
@@ -0,0 +1,88 @@
+//
+// SDLOnUpdateSubMenuSpec.m
+// SmartDeviceLinkTests
+//
+// Created by Joel Fischer on 7/30/20.
+// Copyright © 2020 smartdevicelink. All rights reserved.
+//
+
+#import <Foundation/Foundation.h>
+
+#import <Quick/Quick.h>
+#import <Nimble/Nimble.h>
+
+#import "SDLRPCParameterNames.h"
+#import "SDLOnUpdateSubMenu.h"
+
+QuickSpecBegin(SDLOnUpdateSubMenuSpec)
+
+__block SDLOnUpdateSubMenu *testRPC = nil;
+__block UInt32 testMenuID = 32;
+__block NSNumber<SDLBool> *testUpdateSubCells = @YES;
+
+describe(@"when initializing with init", ^{
+ beforeEach(^{
+ testRPC = [[SDLOnUpdateSubMenu alloc] init];
+ });
+
+ it(@"should have no data", ^{
+ expect(testRPC.menuID).to(beFalsy());
+ expect(testRPC.updateSubCells).to(beFalsy());
+ });
+
+ describe(@"when getting/setting parameters", ^{
+ beforeEach(^{
+ testRPC.menuID = @(testMenuID);
+ testRPC.updateSubCells = testUpdateSubCells;
+ });
+
+ it(@"should properly get/set the data", ^{
+ expect(testRPC.menuID).to(equal(@(testMenuID)));
+ expect(testRPC.updateSubCells).to(equal(testUpdateSubCells));
+ });
+ });
+});
+
+describe(@"when initializing with a dictionary", ^{
+ beforeEach(^{
+ NSDictionary *testDict = @{
+ SDLRPCParameterNameNotification: @{
+ SDLRPCParameterNameParameters: @{
+ SDLRPCParameterNameMenuID: @(testMenuID),
+ SDLRPCParameterNameUpdateSubCells: testUpdateSubCells
+ }
+ }
+ };
+
+ testRPC = [[SDLOnUpdateSubMenu alloc] initWithDictionary:testDict];
+ });
+
+ it(@"should properly get/set the data", ^{
+ expect(testRPC.menuID).to(equal(@(testMenuID)));
+ expect(testRPC.updateSubCells).to(equal(testUpdateSubCells));
+ });
+});
+
+describe(@"when initializing with initWithMenuID:", ^{
+ beforeEach(^{
+ testRPC = [[SDLOnUpdateSubMenu alloc] initWithMenuID:testMenuID];
+ });
+
+ it(@"should properly get/set the data", ^{
+ expect(testRPC.menuID).to(equal(@(testMenuID)));
+ expect(testRPC.updateSubCells).to(beNil());
+ });
+});
+
+describe(@"when initializing with initWithMenuID:updateSubCells:", ^{
+ beforeEach(^{
+ testRPC = [[SDLOnUpdateSubMenu alloc] initWithMenuID:testMenuID updateSubCells:testUpdateSubCells];
+ });
+
+ it(@"should properly get/set the data", ^{
+ expect(testRPC.menuID).to(equal(@(testMenuID)));
+ expect(testRPC.updateSubCells).to(equal(testUpdateSubCells));
+ });
+});
+
+QuickSpecEnd
diff --git a/SmartDeviceLinkTests/RPCSpecs/NotificationSpecs/SDLOnVehicleDataSpec.m b/SmartDeviceLinkTests/RPCSpecs/NotificationSpecs/SDLOnVehicleDataSpec.m
index c2f9afbf2..67d5cd911 100644
--- a/SmartDeviceLinkTests/RPCSpecs/NotificationSpecs/SDLOnVehicleDataSpec.m
+++ b/SmartDeviceLinkTests/RPCSpecs/NotificationSpecs/SDLOnVehicleDataSpec.m
@@ -12,219 +12,320 @@
#import "SDLRPCParameterNames.h"
#import "SDLRPCFunctionNames.h"
-
QuickSpecBegin(SDLOnVehicleDataSpec)
+// set up all test constants
+SDLGPSData* gps = [[SDLGPSData alloc] init];
+SDLTireStatus* tirePressure = [[SDLTireStatus alloc] init];
+SDLBeltStatus* beltStatus = [[SDLBeltStatus alloc] init];
+SDLBodyInformation* bodyInformation = [[SDLBodyInformation alloc] init];
+SDLDeviceStatus* deviceStatus = [[SDLDeviceStatus alloc] init];
+SDLHeadLampStatus* headLampStatus = [[SDLHeadLampStatus alloc] init];
+SDLECallInfo* eCallInfo = [[SDLECallInfo alloc] init];
+SDLAirbagStatus* airbagStatus = [[SDLAirbagStatus alloc] init];
+SDLEmergencyEvent* emergencyEvent = [[SDLEmergencyEvent alloc] init];
+SDLClusterModeStatus* clusterModeStatus = [[SDLClusterModeStatus alloc] init];
+SDLMyKey* myKey = [[SDLMyKey alloc] init];
+SDLFuelRange* fuelRange = [[SDLFuelRange alloc] init];
+NSArray<SDLFuelRange *> *fuelRangeArray = @[fuelRange, fuelRange];
+NSString *const vin = @"6574839201a";
+NSString *const cloudAppVehicleID = @"cloud-6f56054e-d633-11ea-999a-14109fcf4b5b";
+const float speed = 123.45;
+const NSUInteger rpm = 3599;
+const float fuelLevel = 34.45;
+SDLComponentVolumeStatus fuelLevel_State = SDLComponentVolumeStatusLow;
+const float instantFuelConsumption = 45.67;
+const float externalTemperature = 56.67;
+SDLTurnSignal turnSignal = SDLTurnSignalLeft;
+SDLPRNDL prndl = SDLPRNDLReverse;
+const NSUInteger odometer = 100999;
+SDLVehicleDataEventStatus driverBraking = SDLVehicleDataEventStatusYes;
+SDLWiperStatus wiperStatus = SDLWiperStatusWash;
+const float steeringWheelAngle = 359.99;
+const float engineTorque = 999.123;
+const float accPedalPosition = 35.88;
+const float engineOilLife = 98.76;
+SDLElectronicParkBrakeStatus electronicParkBrakeStatus = SDLElectronicParkBrakeStatusTransition;
+NSArray<SDLWindowStatus *> *windowStatus = @[[[SDLWindowStatus alloc] init], [[SDLWindowStatus alloc] init]];
+const BOOL handsOffSteering = YES;
+SDLGearStatus *gearStatus = [[SDLGearStatus alloc] initWithUserSelectedGear:SDLPRNDLDrive actualGear:SDLPRNDLPark transmissionType:SDLTransmissionTypeAutomatic];
-describe(@"Getter/Setter Tests", ^ {
- __block SDLGPSData* gps = nil;
- __block SDLTireStatus* tires = nil;
- __block SDLBeltStatus* belt = nil;
- __block SDLBodyInformation* body = nil;
- __block SDLDeviceStatus* device = nil;
- __block SDLHeadLampStatus* headLamp = nil;
- __block SDLECallInfo* eCall = nil;
- __block SDLAirbagStatus* airbag = nil;
- __block SDLEmergencyEvent* event = nil;
- __block SDLClusterModeStatus* clusterMode = nil;
- __block SDLMyKey* myKey = nil;
- __block SDLFuelRange* fuelRange = nil;
- __block NSString* cloudAppVehicleID = nil;
+describe(@"getter/setter tests", ^{
+ context(@"init and assign", ^{
+ SDLOnVehicleData* testResponse = [[SDLOnVehicleData alloc] init];
+ testResponse.accPedalPosition = @(accPedalPosition);
+ testResponse.airbagStatus = airbagStatus;
+ testResponse.beltStatus = beltStatus;
+ testResponse.bodyInformation = bodyInformation;
+ testResponse.cloudAppVehicleID = cloudAppVehicleID;
+ testResponse.clusterModeStatus = clusterModeStatus;
+ testResponse.deviceStatus = deviceStatus;
+ testResponse.driverBraking = driverBraking;
+ testResponse.eCallInfo = eCallInfo;
+ testResponse.electronicParkBrakeStatus = electronicParkBrakeStatus;
+ testResponse.emergencyEvent = emergencyEvent;
+ testResponse.engineOilLife = @(engineOilLife);
+ testResponse.engineTorque = @(engineTorque);
+ testResponse.externalTemperature = @(externalTemperature);
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
+ testResponse.fuelLevel = @(fuelLevel);
+ testResponse.fuelLevel_State = fuelLevel_State;
+#pragma clang diagnostic pop
+ testResponse.fuelRange = fuelRangeArray;
+ testResponse.gearStatus = gearStatus;
+ testResponse.gps = gps;
+ testResponse.handsOffSteering = @(handsOffSteering);
+ testResponse.headLampStatus = headLampStatus;
+ testResponse.instantFuelConsumption = @(instantFuelConsumption);
+ testResponse.myKey = myKey;
+ testResponse.odometer = @(odometer);
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
+ testResponse.prndl = prndl;
+#pragma clang diagnostic pop
+ testResponse.rpm = @(rpm);
+ testResponse.speed = @(speed);
+ testResponse.steeringWheelAngle = @(steeringWheelAngle);
+ testResponse.tirePressure = tirePressure;
+ testResponse.turnSignal = turnSignal;
+ testResponse.vin = vin;
+ testResponse.windowStatus = windowStatus;
+ testResponse.wiperStatus = wiperStatus;
- beforeEach(^{
- gps = [[SDLGPSData alloc] init];
- tires = [[SDLTireStatus alloc] init];
- belt = [[SDLBeltStatus alloc] init];
- body = [[SDLBodyInformation alloc] init];
- device = [[SDLDeviceStatus alloc] init];
- headLamp = [[SDLHeadLampStatus alloc] init];
- eCall = [[SDLECallInfo alloc] init];
- airbag = [[SDLAirbagStatus alloc] init];
- event = [[SDLEmergencyEvent alloc] init];
- clusterMode = [[SDLClusterModeStatus alloc] init];
- myKey = [[SDLMyKey alloc] init];
- fuelRange = [[SDLFuelRange alloc] init];
- cloudAppVehicleID = @"testCloudAppVehicleID";
+ it(@"expect all properties to be set properly", ^{
+ expect(testResponse.accPedalPosition).to(equal(@(accPedalPosition)));
+ expect(testResponse.airbagStatus).to(equal(airbagStatus));
+ expect(testResponse.beltStatus).to(equal(beltStatus));
+ expect(testResponse.bodyInformation).to(equal(bodyInformation));
+ expect(testResponse.cloudAppVehicleID).to(equal(cloudAppVehicleID));
+ expect(testResponse.clusterModeStatus).to(equal(clusterModeStatus));
+ expect(testResponse.deviceStatus).to(equal(deviceStatus));
+ expect(testResponse.driverBraking).to(equal(driverBraking));
+ expect(testResponse.eCallInfo).to(equal(eCallInfo));
+ expect(testResponse.electronicParkBrakeStatus).to(equal(electronicParkBrakeStatus));
+ expect(testResponse.emergencyEvent).to(equal(emergencyEvent));
+ expect(testResponse.engineOilLife).to(equal(@(engineOilLife)));
+ expect(testResponse.engineTorque).to(equal(@(engineTorque)));
+ expect(testResponse.externalTemperature).to(equal(@(externalTemperature)));
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
+ expect(testResponse.fuelLevel).to(equal(@(fuelLevel)));
+ expect(testResponse.fuelLevel_State).to(equal(fuelLevel_State));
+#pragma clang diagnostic pop
+ expect(testResponse.fuelRange).to(equal(fuelRangeArray));
+ expect(testResponse.gearStatus).to(equal(gearStatus));
+ expect(testResponse.gps).to(equal(gps));
+ expect(testResponse.handsOffSteering).to(equal(@(handsOffSteering)));
+ expect(testResponse.headLampStatus).to(equal(headLampStatus));
+ expect(testResponse.instantFuelConsumption).to(equal(@(instantFuelConsumption)));
+ expect(testResponse.myKey).to(equal(myKey));
+ expect(testResponse.odometer).to(equal(@(odometer)));
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
+ expect(testResponse.prndl).to(equal(prndl));
+#pragma clang diagnostic pop
+ expect(testResponse.rpm).to(equal(@(rpm)));
+ expect(testResponse.speed).to(equal(@(speed)));
+ expect(testResponse.steeringWheelAngle).to(equal(@(steeringWheelAngle)));
+ expect(testResponse.tirePressure).to(equal(tirePressure));
+ expect(testResponse.turnSignal).to(equal(turnSignal));
+ expect(testResponse.vin).to(equal(vin));
+ expect(testResponse.windowStatus).to(equal(windowStatus));
+ expect(testResponse.wiperStatus).to(equal(wiperStatus));
+ });
});
- it(@"should correctly initialize with init", ^ {
- SDLOnVehicleData* testNotification = [[SDLOnVehicleData alloc] init];
-
- testNotification.accPedalPosition = @99.99999999;
- testNotification.airbagStatus = airbag;
- testNotification.beltStatus = belt;
- testNotification.bodyInformation = body;
- testNotification.cloudAppVehicleID = cloudAppVehicleID;
- testNotification.clusterModeStatus = clusterMode;
- testNotification.deviceStatus = device;
- testNotification.driverBraking = SDLVehicleDataEventStatusYes;
- testNotification.eCallInfo = eCall;
- testNotification.electronicParkBrakeStatus = SDLElectronicParkBrakeStatusDriveActive;
- testNotification.emergencyEvent = event;
- testNotification.engineOilLife = @34.45;
- testNotification.engineTorque = @-200.124;
- testNotification.externalTemperature = @-10;
- testNotification.fuelLevel = @10.3;
- testNotification.fuelLevel_State = SDLComponentVolumeStatusAlert;
- testNotification.fuelRange = @[fuelRange, fuelRange];
- testNotification.gps = gps;
- testNotification.headLampStatus = headLamp;
- testNotification.instantFuelConsumption = @4000.63;
- testNotification.myKey = myKey;
- testNotification.odometer = @100050;
- testNotification.prndl = SDLPRNDLDrive;
- testNotification.rpm = @4242;
- testNotification.speed = @70.1;
- testNotification.steeringWheelAngle = @0.000000001;
- testNotification.tirePressure = tires;
- testNotification.turnSignal = SDLTurnSignalRight;
- testNotification.vin = @"222222222722";
- testNotification.wiperStatus = SDLWiperStatusStalled;
-
- expect(testNotification.accPedalPosition).to(equal(@99.99999999));
- expect(testNotification.airbagStatus).to(equal(airbag));
- expect(testNotification.beltStatus).to(equal(belt));
- expect(testNotification.bodyInformation).to(equal(body));
- expect(testNotification.cloudAppVehicleID).to(equal(cloudAppVehicleID));
- expect(testNotification.clusterModeStatus).to(equal(clusterMode));
- expect(testNotification.deviceStatus).to(equal(device));
- expect(testNotification.driverBraking).to(equal(SDLVehicleDataEventStatusYes));
- expect(testNotification.eCallInfo).to(equal(eCall));
- expect(testNotification.electronicParkBrakeStatus).to(equal(SDLElectronicParkBrakeStatusDriveActive));
- expect(testNotification.emergencyEvent).to(equal(event));
- expect(testNotification.engineOilLife).to(equal(@34.45));
- expect(testNotification.engineTorque).to(equal(@-200.124));
- expect(testNotification.externalTemperature).to(equal(@-10));
- expect(testNotification.fuelLevel).to(equal(@10.3));
- expect(testNotification.fuelLevel_State).to(equal(SDLComponentVolumeStatusAlert));
- expect(testNotification.fuelRange).to(equal(@[fuelRange, fuelRange]));
- expect(testNotification.gps).to(equal(gps));
- expect(testNotification.headLampStatus).to(equal(headLamp));
- expect(testNotification.instantFuelConsumption).to(equal(@4000.63));
- expect(testNotification.myKey).to(equal(myKey));
- expect(testNotification.odometer).to(equal(@100050));
- expect(testNotification.prndl).to(equal(SDLPRNDLDrive));
- expect(testNotification.rpm).to(equal(@4242));
- expect(testNotification.speed).to(equal(@70.1));
- expect(testNotification.steeringWheelAngle).to(equal(@0.000000001));
- expect(testNotification.tirePressure).to(equal(tires));
- expect(testNotification.turnSignal).to(equal(SDLTurnSignalRight));
- expect(testNotification.vin).to(equal(@"222222222722"));
- expect(testNotification.wiperStatus).to(equal(SDLWiperStatusStalled));
- });
-
- it(@"Should get correctly when initialized", ^ {
+ context(@"initWithDictionary:", ^{
NSDictionary* dict = @{SDLRPCParameterNameNotification:
- @{SDLRPCParameterNameParameters:
- @{SDLRPCParameterNameAccelerationPedalPosition:@99.99999999,
- SDLRPCParameterNameAirbagStatus:airbag,
- SDLRPCParameterNameBeltStatus:belt,
- SDLRPCParameterNameBodyInformation:body,
- SDLRPCParameterNameCloudAppVehicleID:cloudAppVehicleID,
- SDLRPCParameterNameClusterModeStatus:clusterMode,
- SDLRPCParameterNameDeviceStatus:device,
- SDLRPCParameterNameDriverBraking:SDLVehicleDataEventStatusYes,
- SDLRPCParameterNameECallInfo:eCall,
- SDLRPCParameterNameElectronicParkBrakeStatus:SDLElectronicParkBrakeStatusDriveActive,
- SDLRPCParameterNameEmergencyEvent:event,
- SDLRPCParameterNameEngineOilLife:@45.1,
- SDLRPCParameterNameEngineTorque:@-200.124,
- SDLRPCParameterNameExternalTemperature:@-10,
- SDLRPCParameterNameFuelLevel:@10.3,
- SDLRPCParameterNameFuelLevelState:SDLComponentVolumeStatusAlert,
- SDLRPCParameterNameFuelRange:@[fuelRange],
- SDLRPCParameterNameGPS:gps,
- SDLRPCParameterNameHeadLampStatus:headLamp,
- SDLRPCParameterNameInstantFuelConsumption:@4000.63,
- SDLRPCParameterNameMyKey:myKey,
- SDLRPCParameterNameOdometer:@100050,
- SDLRPCParameterNamePRNDL:SDLPRNDLDrive,
- SDLRPCParameterNameRPM:@4242,
- SDLRPCParameterNameSpeed:@70.1,
- SDLRPCParameterNameSteeringWheelAngle:@0.000000001,
- SDLRPCParameterNameTirePressure:tires,
- SDLRPCParameterNameTurnSignal:SDLTurnSignalOff,
- SDLRPCParameterNameVIN:@"222222222722",
- SDLRPCParameterNameWiperStatus:SDLWiperStatusStalled},
- SDLRPCParameterNameOperationName:SDLRPCFunctionNameOnVehicleData}};
+ @{SDLRPCParameterNameParameters:@{
+ SDLRPCParameterNameAccelerationPedalPosition:@(accPedalPosition),
+ SDLRPCParameterNameAirbagStatus:airbagStatus,
+ SDLRPCParameterNameBeltStatus:beltStatus,
+ SDLRPCParameterNameBodyInformation:bodyInformation,
+ SDLRPCParameterNameCloudAppVehicleID:cloudAppVehicleID,
+ SDLRPCParameterNameClusterModeStatus:clusterModeStatus,
+ SDLRPCParameterNameDeviceStatus:deviceStatus,
+ SDLRPCParameterNameDriverBraking:driverBraking,
+ SDLRPCParameterNameECallInfo:eCallInfo,
+ SDLRPCParameterNameElectronicParkBrakeStatus:electronicParkBrakeStatus,
+ SDLRPCParameterNameEmergencyEvent:emergencyEvent,
+ SDLRPCParameterNameEngineOilLife:@(engineOilLife),
+ SDLRPCParameterNameEngineTorque:@(engineTorque),
+ SDLRPCParameterNameExternalTemperature:@(externalTemperature),
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
- SDLOnVehicleData* testNotification = [[SDLOnVehicleData alloc] initWithDictionary:dict];
+ SDLRPCParameterNameFuelLevel:@(fuelLevel),
+ SDLRPCParameterNameFuelLevelState:fuelLevel_State,
#pragma clang diagnostic pop
-
- expect(testNotification.accPedalPosition).to(equal(@99.99999999));
- expect(testNotification.airbagStatus).to(equal(airbag));
- expect(testNotification.beltStatus).to(equal(belt));
- expect(testNotification.bodyInformation).to(equal(body));
- expect(testNotification.cloudAppVehicleID).to(equal(cloudAppVehicleID));
- expect(testNotification.clusterModeStatus).to(equal(clusterMode));
- expect(testNotification.deviceStatus).to(equal(device));
- expect(testNotification.driverBraking).to(equal(SDLVehicleDataEventStatusYes));
- expect(testNotification.eCallInfo).to(equal(eCall));
- expect(testNotification.electronicParkBrakeStatus).to(equal(SDLElectronicParkBrakeStatusDriveActive));
- expect(testNotification.emergencyEvent).to(equal(event));
- expect(testNotification.engineOilLife).to(equal(@45.1));
- expect(testNotification.engineTorque).to(equal(@-200.124));
- expect(testNotification.externalTemperature).to(equal(@-10));
- expect(testNotification.fuelLevel).to(equal(@10.3));
- expect(testNotification.fuelLevel_State).to(equal(SDLComponentVolumeStatusAlert));
- expect(testNotification.fuelRange).to(equal(@[fuelRange]));
- expect(testNotification.gps).to(equal(gps));
- expect(testNotification.headLampStatus).to(equal(headLamp));
- expect(testNotification.instantFuelConsumption).to(equal(@4000.63));
- expect(testNotification.myKey).to(equal(myKey));
- expect(testNotification.odometer).to(equal(@100050));
- expect(testNotification.prndl).to(equal(SDLPRNDLDrive));
- expect(testNotification.rpm).to(equal(@4242));
- expect(testNotification.speed).to(equal(@70.1));
- expect(testNotification.steeringWheelAngle).to(equal(@0.000000001));
- expect(testNotification.tirePressure).to(equal(tires));
- expect(testNotification.turnSignal).to(equal(SDLTurnSignalOff));
- expect(testNotification.vin).to(equal(@"222222222722"));
- expect(testNotification.wiperStatus).to(equal(SDLWiperStatusStalled));
- });
-
- it(@"Should return nil if not set", ^ {
- SDLOnVehicleData* testNotification = [[SDLOnVehicleData alloc] init];
-
- expect(testNotification.accPedalPosition).to(beNil());
- expect(testNotification.airbagStatus).to(beNil());
- expect(testNotification.beltStatus).to(beNil());
- expect(testNotification.bodyInformation).to(beNil());
- expect(testNotification.cloudAppVehicleID).to(beNil());
- expect(testNotification.clusterModeStatus).to(beNil());
- expect(testNotification.deviceStatus).to(beNil());
- expect(testNotification.driverBraking).to(beNil());
- expect(testNotification.eCallInfo).to(beNil());
- expect(testNotification.electronicParkBrakeStatus).to(beNil());
- expect(testNotification.emergencyEvent).to(beNil());
- expect(testNotification.engineOilLife).to(beNil());
- expect(testNotification.engineTorque).to(beNil());
- expect(testNotification.externalTemperature).to(beNil());
- expect(testNotification.fuelLevel).to(beNil());
- expect(testNotification.fuelLevel_State).to(beNil());
- expect(testNotification.fuelRange).to(beNil());
- expect(testNotification.gps).to(beNil());
- expect(testNotification.headLampStatus).to(beNil());
- expect(testNotification.instantFuelConsumption).to(beNil());
- expect(testNotification.myKey).to(beNil());
- expect(testNotification.odometer).to(beNil());
- expect(testNotification.prndl).to(beNil());
- expect(testNotification.rpm).to(beNil());
- expect(testNotification.speed).to(beNil());
- expect(testNotification.steeringWheelAngle).to(beNil());
- expect(testNotification.tirePressure).to(beNil());
- expect(testNotification.turnSignal).to(beNil());
- expect(testNotification.vin).to(beNil());
- expect(testNotification.wiperStatus).to(beNil());
+ SDLRPCParameterNameFuelRange:fuelRangeArray,
+ SDLRPCParameterNameGearStatus:gearStatus,
+ SDLRPCParameterNameGPS:gps,
+ SDLRPCParameterNameHandsOffSteering:@(handsOffSteering),
+ SDLRPCParameterNameHeadLampStatus:headLampStatus,
+ SDLRPCParameterNameInstantFuelConsumption:@(instantFuelConsumption),
+ SDLRPCParameterNameMyKey:myKey,
+ SDLRPCParameterNameOdometer:@(odometer),
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
+ SDLRPCParameterNamePRNDL:prndl,
+#pragma clang diagnostic pop
+ SDLRPCParameterNameRPM:@(rpm),
+ SDLRPCParameterNameSpeed:@(speed),
+ SDLRPCParameterNameSteeringWheelAngle:@(steeringWheelAngle),
+ SDLRPCParameterNameTirePressure:tirePressure,
+ SDLRPCParameterNameTurnSignal:turnSignal,
+ SDLRPCParameterNameVIN:vin,
+ SDLRPCParameterNameWindowStatus:windowStatus,
+ SDLRPCParameterNameWiperStatus:wiperStatus,
+ },
+ SDLRPCParameterNameOperationName:SDLRPCFunctionNameOnVehicleData}};
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
+ SDLOnVehicleData* testResponse = [[SDLOnVehicleData alloc] initWithDictionary:dict];
+#pragma clang diagnostic pop
+
+ it(@"expect all properties to be set properly", ^{
+ expect(testResponse.accPedalPosition).to(equal(@(accPedalPosition)));
+ expect(testResponse.airbagStatus).to(equal(airbagStatus));
+ expect(testResponse.beltStatus).to(equal(beltStatus));
+ expect(testResponse.bodyInformation).to(equal(bodyInformation));
+ expect(testResponse.cloudAppVehicleID).to(equal(cloudAppVehicleID));
+ expect(testResponse.clusterModeStatus).to(equal(clusterModeStatus));
+ expect(testResponse.deviceStatus).to(equal(deviceStatus));
+ expect(testResponse.driverBraking).to(equal(driverBraking));
+ expect(testResponse.eCallInfo).to(equal(eCallInfo));
+ expect(testResponse.electronicParkBrakeStatus).to(equal(electronicParkBrakeStatus));
+ expect(testResponse.emergencyEvent).to(equal(emergencyEvent));
+ expect(testResponse.engineOilLife).to(equal(@(engineOilLife)));
+ expect(testResponse.engineTorque).to(equal(@(engineTorque)));
+ expect(testResponse.externalTemperature).to(equal(@(externalTemperature)));
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
+ expect(testResponse.fuelLevel).to(equal(@(fuelLevel)));
+ expect(testResponse.fuelLevel_State).to(equal(fuelLevel_State));
+#pragma clang diagnostic pop
+ expect(testResponse.fuelRange).to(equal(fuelRangeArray));
+ expect(testResponse.gearStatus).to(equal(gearStatus));
+ expect(testResponse.gps).to(equal(gps));
+ expect(testResponse.handsOffSteering).to(equal(@(handsOffSteering)));
+ expect(testResponse.headLampStatus).to(equal(headLampStatus));
+ expect(testResponse.instantFuelConsumption).to(equal(@(instantFuelConsumption)));
+ expect(testResponse.myKey).to(equal(myKey));
+ expect(testResponse.odometer).to(equal(@(odometer)));
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
+ expect(testResponse.prndl).to(equal(prndl));
+#pragma clang diagnostic pop
+ expect(testResponse.rpm).to(equal(@(rpm)));
+ expect(testResponse.speed).to(equal(@(speed)));
+ expect(testResponse.steeringWheelAngle).to(equal(@(steeringWheelAngle)));
+ expect(testResponse.tirePressure).to(equal(tirePressure));
+ expect(testResponse.turnSignal).to(equal(turnSignal));
+ expect(testResponse.vin).to(equal(vin));
+ expect(testResponse.windowStatus).to(equal(windowStatus));
+ expect(testResponse.wiperStatus).to(equal(wiperStatus));
+ });
});
- it(@"Should set and get generic Network Signal Data", ^{
- SDLOnVehicleData *testRequest = [[SDLOnVehicleData alloc] init];
+ context(@"init", ^{
+ SDLOnVehicleData* testResponse = [[SDLOnVehicleData alloc] init];
+ it(@"expect all properties to be nil", ^{
+ expect(testResponse.accPedalPosition).to(beNil());
+ expect(testResponse.airbagStatus).to(beNil());
+ expect(testResponse.beltStatus).to(beNil());
+ expect(testResponse.bodyInformation).to(beNil());
+ expect(testResponse.cloudAppVehicleID).to(beNil());
+ expect(testResponse.clusterModeStatus).to(beNil());
+ expect(testResponse.deviceStatus).to(beNil());
+ expect(testResponse.driverBraking).to(beNil());
+ expect(testResponse.eCallInfo).to(beNil());
+ expect(testResponse.electronicParkBrakeStatus).to(beNil());
+ expect(testResponse.emergencyEvent).to(beNil());
+ expect(testResponse.engineOilLife).to(beNil());
+ expect(testResponse.engineTorque).to(beNil());
+ expect(testResponse.externalTemperature).to(beNil());
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
+ expect(testResponse.fuelLevel).to(beNil());
+ expect(testResponse.fuelLevel_State).to(beNil());
+#pragma clang diagnostic pop
+ expect(testResponse.fuelRange).to(beNil());
+ expect(testResponse.gearStatus).to(beNil());
+ expect(testResponse.gps).to(beNil());
+ expect(testResponse.handsOffSteering).to(beNil());
+ expect(testResponse.headLampStatus).to(beNil());
+ expect(testResponse.instantFuelConsumption).to(beNil());
+ expect(testResponse.myKey).to(beNil());
+ expect(testResponse.odometer).to(beNil());
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
+ expect(testResponse.prndl).to(beNil());
+#pragma clang diagnostic pop
+ expect(testResponse.rpm).to(beNil());
+ expect(testResponse.speed).to(beNil());
+ expect(testResponse.steeringWheelAngle).to(beNil());
+ expect(testResponse.tirePressure).to(beNil());
+ expect(testResponse.turnSignal).to(beNil());
+ expect(testResponse.vin).to(beNil());
+ expect(testResponse.windowStatus).to(beNil());
+ expect(testResponse.wiperStatus).to(beNil());
+ });
+ });
- [testRequest setOEMCustomVehicleData:@"customVehicleData" withVehicleDataState:@"oemVehicleData"];
+ context(@"initWithGps:speed:rpm:instantFuelConsumption:fuelRange:externalTemperature:turnSignal:vin:gearStatus:tirePressure:odometer:beltStatus:bodyInformation:deviceStatus:driverBraking:wiperStatus:headLampStatus:engineTorque:accPedalPosition:steeringWheelAngle:engineOilLife:electronicParkBrakeStatus:cloudAppVehicleID:eCallInfo:airbagStatus:emergencyEvent:clusterModeStatus:myKey:handsOffSteering:windowStatus:", ^{
+ SDLOnVehicleData* testResponse = [[SDLOnVehicleData alloc] initWithGps:gps speed:speed rpm:@(rpm) instantFuelConsumption:instantFuelConsumption fuelRange:fuelRangeArray externalTemperature:externalTemperature turnSignal:turnSignal vin:vin gearStatus:gearStatus tirePressure:tirePressure odometer:@(odometer) beltStatus:beltStatus bodyInformation:bodyInformation deviceStatus:deviceStatus driverBraking:driverBraking wiperStatus:wiperStatus headLampStatus:headLampStatus engineTorque:engineTorque accPedalPosition:accPedalPosition steeringWheelAngle:steeringWheelAngle engineOilLife:engineOilLife electronicParkBrakeStatus:electronicParkBrakeStatus cloudAppVehicleID:cloudAppVehicleID eCallInfo:eCallInfo airbagStatus:airbagStatus emergencyEvent:emergencyEvent clusterModeStatus:clusterModeStatus myKey:myKey handsOffSteering:@(handsOffSteering) windowStatus:windowStatus];
- expect([testRequest getOEMCustomVehicleData:@"customVehicleData"]).to(equal(@"oemVehicleData"));
+ it(@"expect all properties to be set properly", ^{
+ expect(testResponse.accPedalPosition).to(equal(@(accPedalPosition)));
+ expect(testResponse.airbagStatus).to(equal(airbagStatus));
+ expect(testResponse.beltStatus).to(equal(beltStatus));
+ expect(testResponse.bodyInformation).to(equal(bodyInformation));
+ expect(testResponse.cloudAppVehicleID).to(equal(cloudAppVehicleID));
+ expect(testResponse.clusterModeStatus).to(equal(clusterModeStatus));
+ expect(testResponse.deviceStatus).to(equal(deviceStatus));
+ expect(testResponse.driverBraking).to(equal(driverBraking));
+ expect(testResponse.eCallInfo).to(equal(eCallInfo));
+ expect(testResponse.electronicParkBrakeStatus).to(equal(electronicParkBrakeStatus));
+ expect(testResponse.emergencyEvent).to(equal(emergencyEvent));
+ expect(testResponse.engineOilLife).to(equal(@(engineOilLife)));
+ expect(testResponse.engineTorque).to(equal(@(engineTorque)));
+ expect(testResponse.externalTemperature).to(equal(@(externalTemperature)));
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
+ expect(testResponse.fuelLevel).to(beNil());
+ expect(testResponse.fuelLevel_State).to(beNil());
+#pragma clang diagnostic pop
+ expect(testResponse.fuelRange).to(equal(fuelRangeArray));
+ expect(testResponse.gearStatus).to(equal(gearStatus));
+ expect(testResponse.gps).to(equal(gps));
+ expect(testResponse.handsOffSteering).to(equal(handsOffSteering));
+ expect(testResponse.headLampStatus).to(equal(headLampStatus));
+ expect(testResponse.instantFuelConsumption).to(equal(@(instantFuelConsumption)));
+ expect(testResponse.myKey).to(equal(myKey));
+ expect(testResponse.odometer).to(equal(@(odometer)));
+ #pragma clang diagnostic push
+ #pragma clang diagnostic ignored "-Wdeprecated-declarations"
+ expect(testResponse.prndl).to(beNil());
+ #pragma clang diagnostic pop
+ expect(testResponse.gearStatus).to(equal(gearStatus));
+ expect(testResponse.rpm).to(equal(@(rpm)));
+ expect(testResponse.speed).to(equal(@(speed)));
+ expect(testResponse.steeringWheelAngle).to(equal(@(steeringWheelAngle)));
+ expect(testResponse.tirePressure).to(equal(tirePressure));
+ expect(testResponse.turnSignal).to(equal(turnSignal));
+ expect(testResponse.vin).to(equal(vin));
+ expect(testResponse.windowStatus).to(equal(windowStatus));
+ expect(testResponse.wiperStatus).to(equal(wiperStatus));
+ });
+ });
+ context(@"init and set OEM Custom Vehicle Data", ^{
+ SDLOnVehicleData *testResponse = [[SDLOnVehicleData alloc] init];
+ [testResponse setOEMCustomVehicleData:@"customVehicleData" withVehicleDataState:@"oemVehicleData"];
+
+ it(@"expect OEM Custom Vehicle Data to be set properly", ^{
+ expect([testResponse getOEMCustomVehicleData:@"customVehicleData"]).to(equal(@"oemVehicleData"));
+ });
});
});
diff --git a/SmartDeviceLinkTests/RPCSpecs/RequestSpecs/SDLAddSubMenuSpec.m b/SmartDeviceLinkTests/RPCSpecs/RequestSpecs/SDLAddSubMenuSpec.m
index 5c5e98547..17ce72c6c 100644
--- a/SmartDeviceLinkTests/RPCSpecs/RequestSpecs/SDLAddSubMenuSpec.m
+++ b/SmartDeviceLinkTests/RPCSpecs/RequestSpecs/SDLAddSubMenuSpec.m
@@ -21,18 +21,33 @@ describe(@"Getter/Setter Tests", ^ {
__block NSString *menuName = @"Welcome to the menu";
__block SDLImage *image = nil;
__block SDLMenuLayout testLayout = SDLMenuLayoutList;
+ __block NSNumber *parentID = @44;
beforeEach(^{
image = [[SDLImage alloc] initWithName:@"Test" isTemplate:false];
});
it(@"should correctly initialize with initWithId:menuName:", ^{
+ #pragma clang diagnostic push
+ #pragma clang diagnostic ignored "-Wdeprecated-declarations"
SDLAddSubMenu *testRequest = [[SDLAddSubMenu alloc] initWithId:menuId menuName:menuName];
+ #pragma clang diagnostic pop
expect(testRequest.menuID).to(equal(@(menuId)));
expect(testRequest.position).to(beNil());
expect(testRequest.menuName).to(equal(menuName));
expect(testRequest.menuIcon).to(beNil());
+ expect(testRequest.parentID).to(beNil());
+ });
+
+ it(@"should correctly initialize with initWithMenuID:menuName:", ^{
+ SDLAddSubMenu *testRequest = [[SDLAddSubMenu alloc] initWithMenuID:menuId menuName:menuName];
+
+ expect(testRequest.menuID).to(equal(@(menuId)));
+ expect(testRequest.position).to(beNil());
+ expect(testRequest.menuName).to(equal(menuName));
+ expect(testRequest.menuIcon).to(beNil());
+ expect(testRequest.parentID).to(beNil());
});
it(@"should correctly initialize with initWithId:menuName:position:", ^{
@@ -44,6 +59,7 @@ describe(@"Getter/Setter Tests", ^ {
expect(testRequest.position).to(equal(@(position)));
expect(testRequest.menuName).to(equal(menuName));
expect(testRequest.menuIcon).to(beNil());
+ expect(testRequest.parentID).to(beNil());
#pragma clang diagnostic pop
});
@@ -56,17 +72,33 @@ describe(@"Getter/Setter Tests", ^ {
expect(testRequest.position).to(equal(@(position)));
expect(testRequest.menuName).to(equal(menuName));
expect(testRequest.menuIcon).to(equal(image));
+ expect(testRequest.parentID).to(beNil());
#pragma clang diagnostic pop
});
it(@"should correctly initialize with initWithId:menuName:menuLayout:menuIcon:position:", ^{
+ #pragma clang diagnostic push
+ #pragma clang diagnostic ignored "-Wdeprecated-declarations"
SDLAddSubMenu *testRequest = [[SDLAddSubMenu alloc] initWithId:menuId menuName:menuName menuLayout:testLayout menuIcon:image position:position];
+ #pragma clang diagnostic pop
expect(testRequest.menuID).to(equal(@(menuId)));
expect(testRequest.position).to(equal(@(position)));
expect(testRequest.menuName).to(equal(menuName));
expect(testRequest.menuIcon).to(equal(image));
expect(testRequest.menuLayout).to(equal(testLayout));
+ expect(testRequest.parentID).to(beNil());
+ });
+
+ it(@"should correctly initialize with initWithMenuID:menuName:menuLayout:menuIcon:position:parentID:", ^{
+ SDLAddSubMenu *testRequest = [[SDLAddSubMenu alloc] initWithMenuID:menuId menuName:menuName position:@(position) menuIcon:image menuLayout:testLayout parentID:parentID];
+
+ expect(testRequest.menuID).to(equal(@(menuId)));
+ expect(testRequest.position).to(equal(@(position)));
+ expect(testRequest.menuName).to(equal(menuName));
+ expect(testRequest.menuIcon).to(equal(image));
+ expect(testRequest.menuLayout).to(equal(testLayout));
+ expect(testRequest.parentID).to(equal(parentID));
});
it(@"Should set and get correctly", ^ {
@@ -88,13 +120,14 @@ describe(@"Getter/Setter Tests", ^ {
it(@"Should get correctly when initialized", ^ {
NSMutableDictionary<NSString *, id> *dict = [@{SDLRPCParameterNameRequest:
@{SDLRPCParameterNameParameters:
- @{SDLRPCParameterNameMenuId:@4345645,
- SDLRPCParameterNamePosition:@27,
- SDLRPCParameterNameMenuName:@"Welcome to the menu",
+ @{SDLRPCParameterNameMenuID: @(menuId),
+ SDLRPCParameterNamePosition: @(position),
+ SDLRPCParameterNameMenuName: menuName,
SDLRPCParameterNameMenuIcon: @{
- SDLRPCParameterNameValue: @"Test"
- },
- SDLRPCParameterNameMenuLayout: testLayout
+ SDLRPCParameterNameValue: image.value
+ },
+ SDLRPCParameterNameMenuLayout: testLayout,
+ SDLRPCParameterNameParentID: parentID
},
SDLRPCParameterNameOperationName:SDLRPCFunctionNameAddSubMenu}} mutableCopy];
#pragma clang diagnostic push
diff --git a/SmartDeviceLinkTests/RPCSpecs/RequestSpecs/SDLCancelInteractionSpec.m b/SmartDeviceLinkTests/RPCSpecs/RequestSpecs/SDLCancelInteractionSpec.m
index c36c5de29..f8f1be402 100644
--- a/SmartDeviceLinkTests/RPCSpecs/RequestSpecs/SDLCancelInteractionSpec.m
+++ b/SmartDeviceLinkTests/RPCSpecs/RequestSpecs/SDLCancelInteractionSpec.m
@@ -103,6 +103,13 @@ describe(@"Getter/Setter Tests", ^{
expect(testRequest.cancelID).to(equal(testCancelID));
});
+ it(@"Should initialize correctly with initWithSubtleAlertCancelID:", ^{
+ testRequest = [[SDLCancelInteraction alloc] initWithSubtleAlertCancelID:testCancelID];
+
+ expect(testRequest.functionID).to(equal([SDLFunctionID.sharedInstance functionIdForName:SDLRPCFunctionNameSubtleAlert]));
+ expect(testRequest.cancelID).to(equal(testCancelID));
+ });
+
it(@"Should initialize correctly with alert:", ^{
testRequest = [SDLCancelInteraction alert];
@@ -130,6 +137,13 @@ describe(@"Getter/Setter Tests", ^{
expect(testRequest.functionID).to(equal([SDLFunctionID.sharedInstance functionIdForName:SDLRPCFunctionNamePerformInteraction]));
expect(testRequest.cancelID).to(beNil());
});
+
+ it(@"Should initialize correctly with subtleAlert:", ^{
+ testRequest = [SDLCancelInteraction subtleAlert];
+
+ expect(testRequest.functionID).to(equal([SDLFunctionID.sharedInstance functionIdForName:SDLRPCFunctionNameSubtleAlert]));
+ expect(testRequest.cancelID).to(beNil());
+ });
});
afterEach(^{
diff --git a/SmartDeviceLinkTests/RPCSpecs/RequestSpecs/SDLDeleteSubMenuSpec.m b/SmartDeviceLinkTests/RPCSpecs/RequestSpecs/SDLDeleteSubMenuSpec.m
index 1a71c63f8..494988a7b 100755
--- a/SmartDeviceLinkTests/RPCSpecs/RequestSpecs/SDLDeleteSubMenuSpec.m
+++ b/SmartDeviceLinkTests/RPCSpecs/RequestSpecs/SDLDeleteSubMenuSpec.m
@@ -26,7 +26,7 @@ describe(@"Getter/Setter Tests", ^ {
it(@"Should get correctly when initialized", ^ {
NSMutableDictionary<NSString *, id> *dict = [@{SDLRPCParameterNameRequest:
@{SDLRPCParameterNameParameters:
- @{SDLRPCParameterNameMenuId:@25614},
+ @{SDLRPCParameterNameMenuID:@25614},
SDLRPCParameterNameOperationName:SDLRPCFunctionNameDeleteSubMenu}} mutableCopy];
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
diff --git a/SmartDeviceLinkTests/RPCSpecs/RequestSpecs/SDLGetFileSpec.m b/SmartDeviceLinkTests/RPCSpecs/RequestSpecs/SDLGetFileSpec.m
index ba594e259..9f795546c 100644
--- a/SmartDeviceLinkTests/RPCSpecs/RequestSpecs/SDLGetFileSpec.m
+++ b/SmartDeviceLinkTests/RPCSpecs/RequestSpecs/SDLGetFileSpec.m
@@ -47,7 +47,7 @@ describe(@"Getter/Setter Tests", ^{
it(@"Should initialize correctly with a dictionary", ^{
NSDictionary *dict = @{SDLRPCParameterNameRequest:@{
SDLRPCParameterNameParameters:@{
- SDLRPCParameterNameFilename:testFileName,
+ SDLRPCParameterNameFileName:testFileName,
SDLRPCParameterNameAppServiceId:testAppServiceId,
SDLRPCParameterNameFileType:testFileType,
SDLRPCParameterNameOffset:@(testOffset),
diff --git a/SmartDeviceLinkTests/RPCSpecs/RequestSpecs/SDLGetVehicleDataSpec.m b/SmartDeviceLinkTests/RPCSpecs/RequestSpecs/SDLGetVehicleDataSpec.m
index bcf32d76c..f2199bf2e 100644
--- a/SmartDeviceLinkTests/RPCSpecs/RequestSpecs/SDLGetVehicleDataSpec.m
+++ b/SmartDeviceLinkTests/RPCSpecs/RequestSpecs/SDLGetVehicleDataSpec.m
@@ -14,294 +14,425 @@
QuickSpecBegin(SDLGetVehicleDataSpec)
-describe(@"Getter/Setter Tests", ^ {
- it(@"Should set and get correctly", ^ {
+describe(@"getter/setter tests", ^{
+ context(@"init and assign", ^{
SDLGetVehicleData* testRequest = [[SDLGetVehicleData alloc] init];
-
testRequest.accPedalPosition = @YES;
- testRequest.airbagStatus = @NO;
- testRequest.beltStatus = @NO;
+ testRequest.airbagStatus = @YES;
+ testRequest.beltStatus = @YES;
testRequest.bodyInformation = @YES;
testRequest.cloudAppVehicleID = @YES;
- testRequest.clusterModeStatus = @NO;
- testRequest.deviceStatus = @NO;
+ testRequest.clusterModeStatus = @YES;
+ testRequest.deviceStatus = @YES;
testRequest.driverBraking = @YES;
testRequest.eCallInfo = @YES;
testRequest.electronicParkBrakeStatus = @YES;
testRequest.emergencyEvent = @YES;
testRequest.engineOilLife = @YES;
- testRequest.engineTorque = @NO;
+ testRequest.engineTorque = @YES;
testRequest.externalTemperature = @YES;
- testRequest.fuelLevel = @NO;
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
+ testRequest.fuelLevel = @YES;
testRequest.fuelLevel_State = @YES;
+#pragma clang diagnostic pop
testRequest.fuelRange = @YES;
- testRequest.gps = @NO;
+ testRequest.gearStatus = @YES;
+ testRequest.gps = @YES;
+ testRequest.handsOffSteering = @YES;
testRequest.headLampStatus = @YES;
- testRequest.instantFuelConsumption = @NO;
+ testRequest.instantFuelConsumption = @YES;
testRequest.myKey = @YES;
testRequest.odometer = @YES;
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
testRequest.prndl = @YES;
+#pragma clang diagnostic pop
testRequest.rpm = @YES;
- testRequest.speed = @NO;
- testRequest.steeringWheelAngle = @NO;
- testRequest.tirePressure = @NO;
+ testRequest.speed = @YES;
+ testRequest.steeringWheelAngle = @YES;
+ testRequest.tirePressure = @YES;
testRequest.turnSignal = @YES;
- testRequest.wiperStatus = @NO;
+ testRequest.windowStatus = @YES;
+ testRequest.wiperStatus = @YES;
- expect(testRequest.accPedalPosition).to(equal(@YES));
- expect(testRequest.airbagStatus).to(equal(@NO));
- expect(testRequest.beltStatus).to(equal(@NO));
- expect(testRequest.bodyInformation).to(equal(@YES));
- expect(testRequest.cloudAppVehicleID).to(equal(@YES));
- expect(testRequest.clusterModeStatus).to(equal(@NO));
- expect(testRequest.deviceStatus).to(equal(@NO));
- expect(testRequest.driverBraking).to(equal(@YES));
- expect(testRequest.eCallInfo).to(equal(@YES));
- expect(testRequest.electronicParkBrakeStatus).to(equal(@YES));
- expect(testRequest.emergencyEvent).to(equal(@YES));
- expect(testRequest.engineOilLife).to(equal(@YES));
- expect(testRequest.engineTorque).to(equal(@NO));
- expect(testRequest.externalTemperature).to(equal(@YES));
- expect(testRequest.fuelLevel).to(equal(@NO));
- expect(testRequest.fuelLevel_State).to(equal(@YES));
- expect(testRequest.fuelRange).to(equal(@YES));
- expect(testRequest.gps).to(equal(@NO));
- expect(testRequest.headLampStatus).to(equal(@YES));
- expect(testRequest.instantFuelConsumption).to(equal(@NO));
- expect(testRequest.myKey).to(equal(@YES));
- expect(testRequest.odometer).to(equal(@YES));
- expect(testRequest.prndl).to(equal(@YES));
- expect(testRequest.rpm).to(equal(@YES));
- expect(testRequest.speed).to(equal(@NO));
- expect(testRequest.steeringWheelAngle).to(equal(@NO));
- expect(testRequest.tirePressure).to(equal(@NO));
- expect(testRequest.turnSignal).to(equal(@YES));
- expect(testRequest.wiperStatus).to(equal(@NO));
+ it(@"expect all properties to be set properly", ^{
+ expect(testRequest.accPedalPosition).to(equal(@YES));
+ expect(testRequest.airbagStatus).to(equal(@YES));
+ expect(testRequest.beltStatus).to(equal(@YES));
+ expect(testRequest.bodyInformation).to(equal(@YES));
+ expect(testRequest.cloudAppVehicleID).to(equal(@YES));
+ expect(testRequest.clusterModeStatus).to(equal(@YES));
+ expect(testRequest.deviceStatus).to(equal(@YES));
+ expect(testRequest.driverBraking).to(equal(@YES));
+ expect(testRequest.eCallInfo).to(equal(@YES));
+ expect(testRequest.electronicParkBrakeStatus).to(equal(@YES));
+ expect(testRequest.emergencyEvent).to(equal(@YES));
+ expect(testRequest.engineOilLife).to(equal(@YES));
+ expect(testRequest.engineTorque).to(equal(@YES));
+ expect(testRequest.externalTemperature).to(equal(@YES));
+ expect(testRequest.fuelRange).to(equal(@YES));
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
+ expect(testRequest.fuelLevel).to(equal(@YES));
+ expect(testRequest.fuelLevel_State).to(equal(@YES));
+#pragma clang diagnostic pop
+ expect(testRequest.gearStatus).to(equal(@YES));
+ expect(testRequest.gps).to(equal(@YES));
+ expect(testRequest.handsOffSteering).to(equal(@YES));
+ expect(testRequest.headLampStatus).to(equal(@YES));
+ expect(testRequest.instantFuelConsumption).to(equal(@YES));
+ expect(testRequest.myKey).to(equal(@YES));
+ expect(testRequest.odometer).to(equal(@YES));
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
+ expect(testRequest.prndl).to(equal(@YES));
+#pragma clang diagnostic pop
+ expect(testRequest.rpm).to(equal(@YES));
+ expect(testRequest.speed).to(equal(@YES));
+ expect(testRequest.steeringWheelAngle).to(equal(@YES));
+ expect(testRequest.tirePressure).to(equal(@YES));
+ expect(testRequest.turnSignal).to(equal(@YES));
+ expect(testRequest.windowStatus).to(equal(@YES));
+ expect(testRequest.wiperStatus).to(equal(@YES));
+ });
});
- it(@"Should get correctly when initialized", ^ {
+ context(@"initWithDictionary:", ^{
NSDictionary<NSString *, id> *dict = @{SDLRPCParameterNameRequest:
- @{SDLRPCParameterNameParameters:
- @{SDLRPCParameterNameAccelerationPedalPosition:@YES,
- SDLRPCParameterNameAirbagStatus:@YES,
- SDLRPCParameterNameBeltStatus:@YES,
- SDLRPCParameterNameBodyInformation:@YES,
- SDLRPCParameterNameCloudAppVehicleID:@YES,
- SDLRPCParameterNameClusterModeStatus:@YES,
- SDLRPCParameterNameDeviceStatus:@YES,
- SDLRPCParameterNameDriverBraking:@YES,
- SDLRPCParameterNameECallInfo:@YES,
- SDLRPCParameterNameElectronicParkBrakeStatus:@YES,
- SDLRPCParameterNameEmergencyEvent:@NO,
- SDLRPCParameterNameEngineOilLife:@YES,
- SDLRPCParameterNameEngineTorque:@YES,
- SDLRPCParameterNameExternalTemperature:@NO,
- SDLRPCParameterNameFuelLevel:@YES,
- SDLRPCParameterNameFuelLevelState:@YES,
- SDLRPCParameterNameFuelRange:@YES,
- SDLRPCParameterNameGPS:@YES,
- SDLRPCParameterNameHeadLampStatus:@YES,
- SDLRPCParameterNameInstantFuelConsumption:@YES,
- SDLRPCParameterNameMyKey:@YES,
- SDLRPCParameterNameOdometer:@YES,
- SDLRPCParameterNamePRNDL:@YES,
- SDLRPCParameterNameRPM:@YES,
- SDLRPCParameterNameSpeed:@YES,
- SDLRPCParameterNameSteeringWheelAngle:@NO,
- SDLRPCParameterNameTirePressure:@YES,
- SDLRPCParameterNameTurnSignal:@NO,
- SDLRPCParameterNameWiperStatus:@YES},
- SDLRPCParameterNameOperationName:SDLRPCFunctionNameGetVehicleData}};
+ @{SDLRPCParameterNameParameters:@{
+ SDLRPCParameterNameAccelerationPedalPosition:@YES,
+ SDLRPCParameterNameAirbagStatus:@YES,
+ SDLRPCParameterNameBeltStatus:@YES,
+ SDLRPCParameterNameBodyInformation:@YES,
+ SDLRPCParameterNameCloudAppVehicleID:@YES,
+ SDLRPCParameterNameClusterModeStatus:@YES,
+ SDLRPCParameterNameDeviceStatus:@YES,
+ SDLRPCParameterNameDriverBraking:@YES,
+ SDLRPCParameterNameECallInfo:@YES,
+ SDLRPCParameterNameElectronicParkBrakeStatus:@YES,
+ SDLRPCParameterNameEmergencyEvent:@YES,
+ SDLRPCParameterNameEngineOilLife:@YES,
+ SDLRPCParameterNameEngineTorque:@YES,
+ SDLRPCParameterNameExternalTemperature:@YES,
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
+ SDLRPCParameterNameFuelLevel:@YES,
+ SDLRPCParameterNameFuelLevelState:@YES,
+#pragma clang diagnostic pop
+ SDLRPCParameterNameFuelRange:@YES,
+ SDLRPCParameterNameGearStatus:@YES,
+ SDLRPCParameterNameGPS:@YES,
+ SDLRPCParameterNameHandsOffSteering:@YES,
+ SDLRPCParameterNameHeadLampStatus:@YES,
+ SDLRPCParameterNameInstantFuelConsumption:@YES,
+ SDLRPCParameterNameMyKey:@YES,
+ SDLRPCParameterNameOdometer:@YES,
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
+ SDLRPCParameterNamePRNDL:@YES,
+#pragma clang diagnostic pop
+ SDLRPCParameterNameRPM:@YES,
+ SDLRPCParameterNameSpeed:@YES,
+ SDLRPCParameterNameSteeringWheelAngle:@YES,
+ SDLRPCParameterNameTirePressure:@YES,
+ SDLRPCParameterNameTurnSignal:@YES,
+ SDLRPCParameterNameWindowStatus:@YES,
+ SDLRPCParameterNameWiperStatus:@YES,
+ },
+ SDLRPCParameterNameOperationName:SDLRPCFunctionNameGetVehicleData}};
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
SDLGetVehicleData* testRequest = [[SDLGetVehicleData alloc] initWithDictionary:dict];
#pragma clang diagnostic pop
-
- expect(testRequest.accPedalPosition).to(equal(@YES));
- expect(testRequest.airbagStatus).to(equal(@YES));
- expect(testRequest.beltStatus).to(equal(@YES));
- expect(testRequest.bodyInformation).to(equal(@YES));
- expect(testRequest.cloudAppVehicleID).to(equal(@YES));
- expect(testRequest.clusterModeStatus).to(equal(@YES));
- expect(testRequest.deviceStatus).to(equal(@YES));
- expect(testRequest.driverBraking).to(equal(@YES));
- expect(testRequest.eCallInfo).to(equal(@YES));
- expect(testRequest.electronicParkBrakeStatus).to(equal(@YES));
- expect(testRequest.emergencyEvent).to(equal(@NO));
- expect(testRequest.engineOilLife).to(equal(@YES));
- expect(testRequest.engineTorque).to(equal(@YES));
- expect(testRequest.externalTemperature).to(equal(@NO));
- expect(testRequest.fuelLevel).to(equal(@YES));
- expect(testRequest.fuelLevel_State).to(equal(@YES));
- expect(testRequest.fuelRange).to(equal(@YES));
- expect(testRequest.gps).to(equal(@YES));
- expect(testRequest.headLampStatus).to(equal(@YES));
- expect(testRequest.instantFuelConsumption).to(equal(@YES));
- expect(testRequest.myKey).to(equal(@YES));
- expect(testRequest.odometer).to(equal(@YES));
- expect(testRequest.prndl).to(equal(@YES));
- expect(testRequest.rpm).to(equal(@YES));
- expect(testRequest.speed).to(equal(@YES));
- expect(testRequest.steeringWheelAngle).to(equal(@NO));
- expect(testRequest.tirePressure).to(equal(@YES));
- expect(testRequest.turnSignal).to(equal(@NO));
- expect(testRequest.wiperStatus).to(equal(@YES));
+
+ it(@"expect all properties to be set properly", ^{
+ expect(testRequest.accPedalPosition).to(equal(@YES));
+ expect(testRequest.airbagStatus).to(equal(@YES));
+ expect(testRequest.beltStatus).to(equal(@YES));
+ expect(testRequest.bodyInformation).to(equal(@YES));
+ expect(testRequest.cloudAppVehicleID).to(equal(@YES));
+ expect(testRequest.clusterModeStatus).to(equal(@YES));
+ expect(testRequest.deviceStatus).to(equal(@YES));
+ expect(testRequest.driverBraking).to(equal(@YES));
+ expect(testRequest.eCallInfo).to(equal(@YES));
+ expect(testRequest.electronicParkBrakeStatus).to(equal(@YES));
+ expect(testRequest.emergencyEvent).to(equal(@YES));
+ expect(testRequest.engineOilLife).to(equal(@YES));
+ expect(testRequest.engineTorque).to(equal(@YES));
+ expect(testRequest.externalTemperature).to(equal(@YES));
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
+ expect(testRequest.fuelLevel).to(equal(@YES));
+ expect(testRequest.fuelLevel_State).to(equal(@YES));
+#pragma clang diagnostic pop
+ expect(testRequest.fuelRange).to(equal(@YES));
+ expect(testRequest.gearStatus).to(equal(@YES));
+ expect(testRequest.gps).to(equal(@YES));
+ expect(testRequest.handsOffSteering).to(equal(@YES));
+ expect(testRequest.headLampStatus).to(equal(@YES));
+ expect(testRequest.instantFuelConsumption).to(equal(@YES));
+ expect(testRequest.myKey).to(equal(@YES));
+ expect(testRequest.odometer).to(equal(@YES));
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
+ expect(testRequest.prndl).to(equal(@YES));
+#pragma clang diagnostic pop
+ expect(testRequest.rpm).to(equal(@YES));
+ expect(testRequest.speed).to(equal(@YES));
+ expect(testRequest.steeringWheelAngle).to(equal(@YES));
+ expect(testRequest.tirePressure).to(equal(@YES));
+ expect(testRequest.turnSignal).to(equal(@YES));
+ expect(testRequest.windowStatus).to(equal(@YES));
+ expect(testRequest.wiperStatus).to(equal(@YES));
+ });
});
});
describe(@"initializers", ^{
context(@"init", ^{
SDLGetVehicleData* testRequest = [[SDLGetVehicleData alloc] init];
-
- expect(testRequest.accPedalPosition).to(beNil());
- expect(testRequest.airbagStatus).to(beNil());
- expect(testRequest.beltStatus).to(beNil());
- expect(testRequest.bodyInformation).to(beNil());
- expect(testRequest.cloudAppVehicleID).to(beNil());
- expect(testRequest.clusterModeStatus).to(beNil());
- expect(testRequest.deviceStatus).to(beNil());
- expect(testRequest.driverBraking).to(beNil());
- expect(testRequest.eCallInfo).to(beNil());
- expect(testRequest.electronicParkBrakeStatus).to(beNil());
- expect(testRequest.emergencyEvent).to(beNil());
- expect(testRequest.engineOilLife).to(beNil());
- expect(testRequest.engineTorque).to(beNil());
- expect(testRequest.externalTemperature).to(beNil());
- expect(testRequest.fuelLevel).to(beNil());
- expect(testRequest.fuelLevel_State).to(beNil());
- expect(testRequest.fuelRange).to(beNil());
- expect(testRequest.gps).to(beNil());
- expect(testRequest.headLampStatus).to(beNil());
- expect(testRequest.instantFuelConsumption).to(beNil());
- expect(testRequest.myKey).to(beNil());
- expect(testRequest.odometer).to(beNil());
- expect(testRequest.prndl).to(beNil());
- expect(testRequest.rpm).to(beNil());
- expect(testRequest.speed).to(beNil());
- expect(testRequest.steeringWheelAngle).to(beNil());
- expect(testRequest.tirePressure).to(beNil());
- expect(testRequest.turnSignal).to(beNil());
- expect(testRequest.wiperStatus).to(beNil());
+ it(@"expect all properties to be nil", ^{
+ expect(testRequest.accPedalPosition).to(beNil());
+ expect(testRequest.airbagStatus).to(beNil());
+ expect(testRequest.beltStatus).to(beNil());
+ expect(testRequest.bodyInformation).to(beNil());
+ expect(testRequest.cloudAppVehicleID).to(beNil());
+ expect(testRequest.clusterModeStatus).to(beNil());
+ expect(testRequest.deviceStatus).to(beNil());
+ expect(testRequest.driverBraking).to(beNil());
+ expect(testRequest.eCallInfo).to(beNil());
+ expect(testRequest.electronicParkBrakeStatus).to(beNil());
+ expect(testRequest.emergencyEvent).to(beNil());
+ expect(testRequest.engineOilLife).to(beNil());
+ expect(testRequest.engineTorque).to(beNil());
+ expect(testRequest.externalTemperature).to(beNil());
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
+ expect(testRequest.fuelLevel).to(beNil());
+ expect(testRequest.fuelLevel_State).to(beNil());
+#pragma clang diagnostic pop
+ expect(testRequest.fuelRange).to(beNil());
+ expect(testRequest.gearStatus).to(beNil());
+ expect(testRequest.gps).to(beNil());
+ expect(testRequest.handsOffSteering).to(beNil());
+ expect(testRequest.headLampStatus).to(beNil());
+ expect(testRequest.instantFuelConsumption).to(beNil());
+ expect(testRequest.myKey).to(beNil());
+ expect(testRequest.odometer).to(beNil());
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
+ expect(testRequest.prndl).to(beNil());
+#pragma clang diagnostic pop
+ expect(testRequest.rpm).to(beNil());
+ expect(testRequest.speed).to(beNil());
+ expect(testRequest.steeringWheelAngle).to(beNil());
+ expect(testRequest.tirePressure).to(beNil());
+ expect(testRequest.turnSignal).to(beNil());
+ expect(testRequest.windowStatus).to(beNil());
+ expect(testRequest.wiperStatus).to(beNil());
+ });
});
- context(@"initWithAccelerationPedalPosition:airbagStatus:beltStatus:bodyInformation:clusterModeStatus:deviceStatus:driverBraking:eCallInfo:emergencyEvent:engineTorque:externalTemperature:fuelLevel:fuelLevelState:gps:headLampStatus:instantFuelConsumption:myKey:odometer:prndl:rpm:speed:steeringWheelAngle:tirePressure:wiperStatus:", ^{
- #pragma clang diagnostic push
- #pragma clang diagnostic ignored "-Wdeprecated-declarations"
- SDLGetVehicleData *testRequest = [[SDLGetVehicleData alloc] initWithAccelerationPedalPosition:YES airbagStatus:NO beltStatus:YES bodyInformation:YES clusterModeStatus:YES deviceStatus:YES driverBraking:YES eCallInfo:YES emergencyEvent:YES engineTorque:YES externalTemperature:YES fuelLevel:YES fuelLevelState:YES gps:YES headLampStatus:YES instantFuelConsumption:YES myKey:YES odometer:YES prndl:YES rpm:YES speed:YES steeringWheelAngle:YES tirePressure:YES vin:YES wiperStatus:YES];
+ context(@"initWithAccelerationPedalPosition:airbagStatus:beltStatus:bodyInformation:clusterModeStatus:deviceStatus:driverBraking:eCallInfo:emergencyEvent:engineTorque:externalTemperature:fuelLevel:fuelLevelState:gps:headLampStatus:instantFuelConsumption:myKey:odometer:prndl:rpm:speed:steeringWheelAngle:tirePressure:wiperStatus:windowStatus:", ^{
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
+ SDLGetVehicleData *testRequest = [[SDLGetVehicleData alloc] initWithAccelerationPedalPosition:YES airbagStatus:YES beltStatus:YES bodyInformation:YES clusterModeStatus:YES deviceStatus:YES driverBraking:YES eCallInfo:YES emergencyEvent:YES engineTorque:YES externalTemperature:YES fuelLevel:YES fuelLevelState:YES gps:YES headLampStatus:YES instantFuelConsumption:YES myKey:YES odometer:YES prndl:YES rpm:YES speed:YES steeringWheelAngle:YES tirePressure:YES vin:YES wiperStatus:YES];
+#pragma clang diagnostic pop
- expect(testRequest.accPedalPosition).to(equal(@YES));
- expect(testRequest.airbagStatus).to(equal(@NO));
- expect(testRequest.beltStatus).to(equal(@YES));
- expect(testRequest.bodyInformation).to(equal(@YES));
- expect(testRequest.cloudAppVehicleID).to(equal(@NO));
- expect(testRequest.clusterModeStatus).to(equal(@YES));
- expect(testRequest.deviceStatus).to(equal(@YES));
- expect(testRequest.driverBraking).to(equal(@YES));
- expect(testRequest.eCallInfo).to(equal(@YES));
- expect(testRequest.electronicParkBrakeStatus).to(equal(@NO));
- expect(testRequest.emergencyEvent).to(equal(@YES));
- expect(testRequest.engineOilLife).to(equal(@NO));
- expect(testRequest.engineTorque).to(equal(@YES));
- expect(testRequest.externalTemperature).to(equal(@YES));
- expect(testRequest.fuelLevel).to(equal(@YES));
- expect(testRequest.fuelLevel_State).to(equal(@YES));
- expect(testRequest.fuelRange).to(equal(@NO));
- expect(testRequest.gps).to(equal(@YES));
- expect(testRequest.headLampStatus).to(equal(@YES));
- expect(testRequest.instantFuelConsumption).to(equal(@YES));
- expect(testRequest.myKey).to(equal(@YES));
- expect(testRequest.odometer).to(equal(@YES));
- expect(testRequest.prndl).to(equal(@YES));
- expect(testRequest.rpm).to(equal(@YES));
- expect(testRequest.speed).to(equal(@YES));
- expect(testRequest.steeringWheelAngle).to(equal(@YES));
- expect(testRequest.tirePressure).to(equal(@YES));
- expect(testRequest.turnSignal).to(equal(@NO));
- expect(testRequest.wiperStatus).to(equal(@YES));
- #pragma clang diagnostic pop
+ it(@"expect all properties to be set properly", ^{
+ expect(testRequest.accPedalPosition).to(equal(@YES));
+ expect(testRequest.airbagStatus).to(equal(@YES));
+ expect(testRequest.beltStatus).to(equal(@YES));
+ expect(testRequest.bodyInformation).to(equal(@YES));
+ expect(testRequest.cloudAppVehicleID).to(beNil());
+ expect(testRequest.clusterModeStatus).to(equal(@YES));
+ expect(testRequest.deviceStatus).to(equal(@YES));
+ expect(testRequest.driverBraking).to(equal(@YES));
+ expect(testRequest.eCallInfo).to(equal(@YES));
+ expect(testRequest.electronicParkBrakeStatus).to(beNil());
+ expect(testRequest.emergencyEvent).to(equal(@YES));
+ expect(testRequest.engineOilLife).to(beNil());
+ expect(testRequest.engineTorque).to(equal(@YES));
+ expect(testRequest.externalTemperature).to(equal(@YES));
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
+ expect(testRequest.fuelLevel).to(equal(@YES));
+ expect(testRequest.fuelLevel_State).to(equal(@YES));
+#pragma clang diagnostic pop
+ expect(testRequest.fuelRange).to(beNil());
+ expect(testRequest.gearStatus).to(beNil());
+ expect(testRequest.gps).to(equal(@YES));
+ expect(testRequest.handsOffSteering).to(beNil());
+ expect(testRequest.headLampStatus).to(equal(@YES));
+ expect(testRequest.instantFuelConsumption).to(equal(@YES));
+ expect(testRequest.myKey).to(equal(@YES));
+ expect(testRequest.odometer).to(equal(@YES));
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
+ expect(testRequest.prndl).to(equal(@YES));
+#pragma clang diagnostic pop
+ expect(testRequest.rpm).to(equal(@YES));
+ expect(testRequest.speed).to(equal(@YES));
+ expect(testRequest.steeringWheelAngle).to(equal(@YES));
+ expect(testRequest.tirePressure).to(equal(@YES));
+ expect(testRequest.turnSignal).to(beNil());
+ expect(testRequest.windowStatus).to(beNil());
+ expect(testRequest.wiperStatus).to(equal(@YES));
+ });
});
context(@"initWithAccelerationPedalPosition:airbagStatus:beltStatus:bodyInformation:clusterModeStatus:deviceStatus:driverBraking:eCallInfo:emergencyEvent:engineOilLife:engineTorque:externalTemperature:fuelLevel:fuelLevelState:gps:headLampStatus:instantFuelConsumption:myKey:odometer:prndl:rpm:speed:steeringWheelAngle:tirePressure:wiperStatus:", ^{
- #pragma clang diagnostic push
- #pragma clang diagnostic ignored "-Wdeprecated-declarations"
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
SDLGetVehicleData *testRequest = [[SDLGetVehicleData alloc] initWithAccelerationPedalPosition:YES airbagStatus:YES beltStatus:YES bodyInformation:YES clusterModeStatus:YES deviceStatus:YES driverBraking:YES eCallInfo:YES electronicParkBrakeStatus:YES emergencyEvent:YES engineOilLife:YES engineTorque:YES externalTemperature:YES fuelLevel:YES fuelLevelState:YES fuelRange:YES gps:YES headLampStatus:YES instantFuelConsumption:YES myKey:YES odometer:YES prndl:YES rpm:YES speed:YES steeringWheelAngle:YES tirePressure:YES turnSignal:YES vin:YES wiperStatus:YES];
+#pragma clang diagnostic pop
- expect(testRequest.accPedalPosition).to(equal(@YES));
- expect(testRequest.airbagStatus).to(equal(@YES));
- expect(testRequest.beltStatus).to(equal(@YES));
- expect(testRequest.bodyInformation).to(equal(@YES));
- expect(testRequest.cloudAppVehicleID).to(equal(@NO));
- expect(testRequest.clusterModeStatus).to(equal(@YES));
- expect(testRequest.deviceStatus).to(equal(@YES));
- expect(testRequest.driverBraking).to(equal(@YES));
- expect(testRequest.eCallInfo).to(equal(@YES));
- expect(testRequest.electronicParkBrakeStatus).to(equal(@YES));
- expect(testRequest.emergencyEvent).to(equal(@YES));
- expect(testRequest.engineOilLife).to(equal(@YES));
- expect(testRequest.engineTorque).to(equal(@YES));
- expect(testRequest.externalTemperature).to(equal(@YES));
- expect(testRequest.fuelLevel).to(equal(@YES));
- expect(testRequest.fuelLevel_State).to(equal(@YES));
- expect(testRequest.fuelRange).to(equal(@YES));
- expect(testRequest.gps).to(equal(@YES));
- expect(testRequest.headLampStatus).to(equal(@YES));
- expect(testRequest.instantFuelConsumption).to(equal(@YES));
- expect(testRequest.myKey).to(equal(@YES));
- expect(testRequest.odometer).to(equal(@YES));
- expect(testRequest.prndl).to(equal(@YES));
- expect(testRequest.rpm).to(equal(@YES));
- expect(testRequest.speed).to(equal(@YES));
- expect(testRequest.steeringWheelAngle).to(equal(@YES));
- expect(testRequest.tirePressure).to(equal(@YES));
- expect(testRequest.turnSignal).to(equal(@YES));
- expect(testRequest.wiperStatus).to(equal(@YES));
- #pragma clang diagnostic pop
+ it(@"expect all properties to be set properly", ^{
+ expect(testRequest.accPedalPosition).to(equal(@YES));
+ expect(testRequest.airbagStatus).to(equal(@YES));
+ expect(testRequest.beltStatus).to(equal(@YES));
+ expect(testRequest.bodyInformation).to(equal(@YES));
+ expect(testRequest.cloudAppVehicleID).to(beNil());
+ expect(testRequest.clusterModeStatus).to(equal(@YES));
+ expect(testRequest.deviceStatus).to(equal(@YES));
+ expect(testRequest.driverBraking).to(equal(@YES));
+ expect(testRequest.eCallInfo).to(equal(@YES));
+ expect(testRequest.electronicParkBrakeStatus).to(equal(@YES));
+ expect(testRequest.emergencyEvent).to(equal(@YES));
+ expect(testRequest.engineOilLife).to(equal(@YES));
+ expect(testRequest.engineTorque).to(equal(@YES));
+ expect(testRequest.externalTemperature).to(equal(@YES));
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
+ expect(testRequest.fuelLevel).to(equal(@YES));
+ expect(testRequest.fuelLevel_State).to(equal(@YES));
+#pragma clang diagnostic push
+ expect(testRequest.fuelRange).to(equal(@YES));
+ expect(testRequest.gearStatus).to(beNil());
+ expect(testRequest.gps).to(equal(@YES));
+ expect(testRequest.handsOffSteering).to(beNil());
+ expect(testRequest.headLampStatus).to(equal(@YES));
+ expect(testRequest.instantFuelConsumption).to(equal(@YES));
+ expect(testRequest.myKey).to(equal(@YES));
+ expect(testRequest.odometer).to(equal(@YES));
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
+ expect(testRequest.prndl).to(equal(@YES));
+#pragma clang diagnostic pop
+ expect(testRequest.rpm).to(equal(@YES));
+ expect(testRequest.speed).to(equal(@YES));
+ expect(testRequest.steeringWheelAngle).to(equal(@YES));
+ expect(testRequest.tirePressure).to(equal(@YES));
+ expect(testRequest.turnSignal).to(equal(@YES));
+ expect(testRequest.windowStatus).to(beNil());
+ expect(testRequest.wiperStatus).to(equal(@YES));
+ });
});
+
context(@"initWithAccelerationPedalPosition:airbagStatus:beltStatus:bodyInformation:cloudAppVehicleID:clusterModeStatus:deviceStatus:driverBraking:eCallInfo:emergencyEvent:engineOilLife:engineTorque:externalTemperature:fuelLevel:fuelLevelState:gps:headLampStatus:instantFuelConsumption:myKey:odometer:prndl:rpm:speed:steeringWheelAngle:tirePressure:wiperStatus:", ^{
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
SDLGetVehicleData *testRequest = [[SDLGetVehicleData alloc] initWithAccelerationPedalPosition:YES airbagStatus:YES beltStatus:YES bodyInformation:YES cloudAppVehicleID:YES clusterModeStatus:YES deviceStatus:YES driverBraking:YES eCallInfo:YES electronicParkBrakeStatus:YES emergencyEvent:YES engineOilLife:YES engineTorque:YES externalTemperature:YES fuelLevel:YES fuelLevelState:YES fuelRange:YES gps:YES headLampStatus:YES instantFuelConsumption:YES myKey:YES odometer:YES prndl:YES rpm:YES speed:YES steeringWheelAngle:YES tirePressure:YES turnSignal:YES vin:YES wiperStatus:YES];
+#pragma clang diagnostic pop
- expect(testRequest.accPedalPosition).to(equal(@YES));
- expect(testRequest.airbagStatus).to(equal(@YES));
- expect(testRequest.beltStatus).to(equal(@YES));
- expect(testRequest.bodyInformation).to(equal(@YES));
- expect(testRequest.cloudAppVehicleID).to(equal(@YES));
- expect(testRequest.clusterModeStatus).to(equal(@YES));
- expect(testRequest.deviceStatus).to(equal(@YES));
- expect(testRequest.driverBraking).to(equal(@YES));
- expect(testRequest.eCallInfo).to(equal(@YES));
- expect(testRequest.electronicParkBrakeStatus).to(equal(@YES));
- expect(testRequest.emergencyEvent).to(equal(@YES));
- expect(testRequest.engineOilLife).to(equal(@YES));
- expect(testRequest.engineTorque).to(equal(@YES));
- expect(testRequest.externalTemperature).to(equal(@YES));
- expect(testRequest.fuelLevel).to(equal(@YES));
- expect(testRequest.fuelLevel_State).to(equal(@YES));
- expect(testRequest.fuelRange).to(equal(@YES));
- expect(testRequest.gps).to(equal(@YES));
- expect(testRequest.headLampStatus).to(equal(@YES));
- expect(testRequest.instantFuelConsumption).to(equal(@YES));
- expect(testRequest.myKey).to(equal(@YES));
- expect(testRequest.odometer).to(equal(@YES));
- expect(testRequest.prndl).to(equal(@YES));
- expect(testRequest.rpm).to(equal(@YES));
- expect(testRequest.speed).to(equal(@YES));
- expect(testRequest.steeringWheelAngle).to(equal(@YES));
- expect(testRequest.tirePressure).to(equal(@YES));
- expect(testRequest.turnSignal).to(equal(@YES));
- expect(testRequest.wiperStatus).to(equal(@YES));
+ it(@"expect all properties to be set properly", ^{
+ expect(testRequest.accPedalPosition).to(equal(@YES));
+ expect(testRequest.airbagStatus).to(equal(@YES));
+ expect(testRequest.beltStatus).to(equal(@YES));
+ expect(testRequest.bodyInformation).to(equal(@YES));
+ expect(testRequest.cloudAppVehicleID).to(equal(@YES));
+ expect(testRequest.clusterModeStatus).to(equal(@YES));
+ expect(testRequest.deviceStatus).to(equal(@YES));
+ expect(testRequest.driverBraking).to(equal(@YES));
+ expect(testRequest.eCallInfo).to(equal(@YES));
+ expect(testRequest.electronicParkBrakeStatus).to(equal(@YES));
+ expect(testRequest.emergencyEvent).to(equal(@YES));
+ expect(testRequest.engineOilLife).to(equal(@YES));
+ expect(testRequest.engineTorque).to(equal(@YES));
+ expect(testRequest.externalTemperature).to(equal(@YES));
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
+ expect(testRequest.fuelLevel).to(equal(@YES));
+ expect(testRequest.fuelLevel_State).to(equal(@YES));
+#pragma clang diagnostic pop
+ expect(testRequest.fuelRange).to(equal(@YES));
+ expect(testRequest.gearStatus).to(beNil());
+ expect(testRequest.gps).to(equal(@YES));
+ expect(testRequest.handsOffSteering).to(beNil());
+ expect(testRequest.headLampStatus).to(equal(@YES));
+ expect(testRequest.instantFuelConsumption).to(equal(@YES));
+ expect(testRequest.myKey).to(equal(@YES));
+ expect(testRequest.odometer).to(equal(@YES));
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
+ expect(testRequest.prndl).to(equal(@YES));
+#pragma clang diagnostic pop
+ expect(testRequest.rpm).to(equal(@YES));
+ expect(testRequest.speed).to(equal(@YES));
+ expect(testRequest.steeringWheelAngle).to(equal(@YES));
+ expect(testRequest.tirePressure).to(equal(@YES));
+ expect(testRequest.turnSignal).to(equal(@YES));
+ expect(testRequest.windowStatus).to(beNil());
+ expect(testRequest.wiperStatus).to(equal(@YES));
+ });
});
- context(@"Should set and get Generic Network Signal Data", ^{
- SDLGetVehicleData *testRequest = [[SDLGetVehicleData alloc] init];
+ context(@"initWithGps:speed:rpm:instantFuelConsumption:fuelRange:externalTemperature:turnSignal:vin:gearStatus:tirePressure:odometer:beltStatus:bodyInformation:deviceStatus:driverBraking:wiperStatus:headLampStatus:engineTorque:accPedalPosition:steeringWheelAngle:engineOilLife:electronicParkBrakeStatus:cloudAppVehicleID:eCallInfo:airbagStatus:emergencyEvent:clusterModeStatus:myKey:handsOffSteering:windowStatus:", ^{
+ SDLGetVehicleData *testRequest = [[SDLGetVehicleData alloc] initWithGps:@YES speed:@YES rpm:@YES instantFuelConsumption:@YES fuelRange:@YES externalTemperature:@YES turnSignal:@YES vin:@YES gearStatus:@YES tirePressure:@YES odometer:@YES beltStatus:@YES bodyInformation:@YES deviceStatus:@YES driverBraking:@YES wiperStatus:@YES headLampStatus:@YES engineTorque:@YES accPedalPosition:@YES steeringWheelAngle:@YES engineOilLife:@YES electronicParkBrakeStatus:@YES cloudAppVehicleID:@YES eCallInfo:@YES airbagStatus:@YES emergencyEvent:@YES clusterModeStatus:@YES myKey:@YES handsOffSteering:@YES windowStatus:@YES];
+ it(@"expect all properties to be YES", ^{
+ expect(testRequest.accPedalPosition).to(equal(@YES));
+ expect(testRequest.airbagStatus).to(equal(@YES));
+ expect(testRequest.beltStatus).to(equal(@YES));
+ expect(testRequest.bodyInformation).to(equal(@YES));
+ expect(testRequest.cloudAppVehicleID).to(equal(@YES));
+ expect(testRequest.clusterModeStatus).to(equal(@YES));
+ expect(testRequest.deviceStatus).to(equal(@YES));
+ expect(testRequest.driverBraking).to(equal(@YES));
+ expect(testRequest.eCallInfo).to(equal(@YES));
+ expect(testRequest.electronicParkBrakeStatus).to(equal(@YES));
+ expect(testRequest.emergencyEvent).to(equal(@YES));
+ expect(testRequest.engineOilLife).to(equal(@YES));
+ expect(testRequest.engineTorque).to(equal(@YES));
+ expect(testRequest.externalTemperature).to(equal(@YES));
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
+ expect(testRequest.fuelLevel).to(beNil());
+ expect(testRequest.fuelLevel_State).to(beNil());
+#pragma clang diagnostic pop
+ expect(testRequest.fuelRange).to(equal(@YES));
+ expect(testRequest.gearStatus).to(equal(@YES));
+ expect(testRequest.gps).to(equal(@YES));
+ expect(testRequest.handsOffSteering).to(equal(@YES));
+ expect(testRequest.headLampStatus).to(equal(@YES));
+ expect(testRequest.instantFuelConsumption).to(equal(@YES));
+ expect(testRequest.myKey).to(equal(@YES));
+ expect(testRequest.odometer).to(equal(@YES));
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
+ expect(testRequest.prndl).to(beNil());
+#pragma clang diagnostic pop
+ expect(testRequest.rpm).to(equal(@YES));
+ expect(testRequest.speed).to(equal(@YES));
+ expect(testRequest.steeringWheelAngle).to(equal(@YES));
+ expect(testRequest.tirePressure).to(equal(@YES));
+ expect(testRequest.turnSignal).to(equal(@YES));
+ expect(testRequest.windowStatus).to(equal(@YES));
+ expect(testRequest.wiperStatus).to(equal(@YES));
+ });
+ });
+
+ context(@"should set OEM Custom Vehicle Data", ^{
+ SDLGetVehicleData* testRequest = [[SDLGetVehicleData alloc] init];
[testRequest setOEMCustomVehicleData:@"OEMCustomVehicleData" withVehicleDataState:NO];
[testRequest setOEMCustomVehicleData:@"OEMCustomVehicleData1" withVehicleDataState:YES];
- expect([testRequest getOEMCustomVehicleData:@"OEMCustomVehicleData"]).to(beFalse());
- expect([testRequest getOEMCustomVehicleData:@"OEMCustomVehicleData1"]).to(beTrue());
-
+ it(@"expect OEM Custom Vehicle Data to be set properly", ^{
+ expect([testRequest getOEMCustomVehicleData:@"OEMCustomVehicleData"]).to(equal(@NO));
+ expect([testRequest getOEMCustomVehicleData:@"OEMCustomVehicleData1"]).to(equal(@YES));
+ });
});
-
});
QuickSpecEnd
diff --git a/SmartDeviceLinkTests/RPCSpecs/RequestSpecs/SDLRegisterAppInterfaceSpec.m b/SmartDeviceLinkTests/RPCSpecs/RequestSpecs/SDLRegisterAppInterfaceSpec.m
index a867ecef6..9905b9ebf 100644
--- a/SmartDeviceLinkTests/RPCSpecs/RequestSpecs/SDLRegisterAppInterfaceSpec.m
+++ b/SmartDeviceLinkTests/RPCSpecs/RequestSpecs/SDLRegisterAppInterfaceSpec.m
@@ -49,9 +49,9 @@ describe(@"RegisterAppInterface Tests", ^{
__block SDLTemplateColorScheme *colorScheme = nil;
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
- __block SDLSyncMsgVersion *currentSyncMsgVersion = [[SDLSyncMsgVersion alloc] initWithMajorVersion:6 minorVersion:0 patchVersion:0];
+ __block SDLSyncMsgVersion *currentSyncMsgVersion = [[SDLSyncMsgVersion alloc] initWithMajorVersion:7 minorVersion:0 patchVersion:0];
#pragma clang diagnostic pop
- __block SDLMsgVersion * currentSDLMsgVersion = [[SDLMsgVersion alloc] initWithMajorVersion:6 minorVersion:0 patchVersion:0];
+ __block SDLMsgVersion * currentSDLMsgVersion = [[SDLMsgVersion alloc] initWithMajorVersion:7 minorVersion:0 patchVersion:0];
beforeEach(^{
testRegisterAppInterface = nil;
@@ -116,7 +116,7 @@ describe(@"RegisterAppInterface Tests", ^{
dict = @{SDLRPCParameterNameRequest:
@{SDLRPCParameterNameParameters:
@{SDLRPCParameterNameSyncMessageVersion:@{
- SDLRPCParameterNameMajorVersion: @6,
+ SDLRPCParameterNameMajorVersion: @7,
SDLRPCParameterNameMinorVersion: @0,
SDLRPCParameterNamePatchVersion: @0
},
diff --git a/SmartDeviceLinkTests/RPCSpecs/RequestSpecs/SDLShowAppMenuSpec.m b/SmartDeviceLinkTests/RPCSpecs/RequestSpecs/SDLShowAppMenuSpec.m
index 4557c014a..d88e335a9 100644
--- a/SmartDeviceLinkTests/RPCSpecs/RequestSpecs/SDLShowAppMenuSpec.m
+++ b/SmartDeviceLinkTests/RPCSpecs/RequestSpecs/SDLShowAppMenuSpec.m
@@ -30,7 +30,7 @@ describe(@"Getter/Setter Tests", ^ {
it(@"Should get correctly when initialized with dictonary", ^ {
NSDictionary<NSString *, id> *dict = [@{SDLRPCParameterNameRequest:
@{SDLRPCParameterNameParameters:
- @{SDLRPCParameterNameMenuId:@4345645,
+ @{SDLRPCParameterNameMenuID:@4345645,
},
SDLRPCParameterNameOperationName:SDLRPCFunctionNameShowAppMenu}} mutableCopy];
#pragma clang diagnostic push
diff --git a/SmartDeviceLinkTests/RPCSpecs/RequestSpecs/SDLSubscribeVehicleDataSpec.m b/SmartDeviceLinkTests/RPCSpecs/RequestSpecs/SDLSubscribeVehicleDataSpec.m
index b69336d23..6d8bfe532 100644
--- a/SmartDeviceLinkTests/RPCSpecs/RequestSpecs/SDLSubscribeVehicleDataSpec.m
+++ b/SmartDeviceLinkTests/RPCSpecs/RequestSpecs/SDLSubscribeVehicleDataSpec.m
@@ -14,292 +14,379 @@
QuickSpecBegin(SDLSubscribeVehicleDataSpec)
-describe(@"Getter/Setter Tests", ^ {
- it(@"Should set and get correctly", ^ {
+describe(@"getter/setter tests", ^{
+ context(@"init and assign", ^{
SDLSubscribeVehicleData* testRequest = [[SDLSubscribeVehicleData alloc] init];
-
testRequest.accPedalPosition = @YES;
- testRequest.airbagStatus = @NO;
- testRequest.beltStatus = @NO;
+ testRequest.airbagStatus = @YES;
+ testRequest.beltStatus = @YES;
testRequest.bodyInformation = @YES;
testRequest.cloudAppVehicleID = @YES;
- testRequest.clusterModeStatus = @NO;
- testRequest.deviceStatus = @NO;
+ testRequest.clusterModeStatus = @YES;
+ testRequest.deviceStatus = @YES;
testRequest.driverBraking = @YES;
testRequest.eCallInfo = @YES;
testRequest.electronicParkBrakeStatus = @YES;
testRequest.emergencyEvent = @YES;
testRequest.engineOilLife = @YES;
- testRequest.engineTorque = @NO;
+ testRequest.engineTorque = @YES;
testRequest.externalTemperature = @YES;
- testRequest.fuelLevel = @NO;
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
+ testRequest.fuelLevel = @YES;
testRequest.fuelLevel_State = @YES;
+#pragma clang diagnostic pop
testRequest.fuelRange = @YES;
+ testRequest.gearStatus = @YES;
testRequest.gps = @YES;
+ testRequest.handsOffSteering = @YES;
testRequest.headLampStatus = @YES;
- testRequest.instantFuelConsumption = @NO;
+ testRequest.instantFuelConsumption = @YES;
testRequest.myKey = @YES;
testRequest.odometer = @YES;
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
testRequest.prndl = @YES;
+#pragma clang diagnostic pop
testRequest.rpm = @YES;
- testRequest.speed = @NO;
- testRequest.steeringWheelAngle = @NO;
- testRequest.tirePressure = @NO;
+ testRequest.speed = @YES;
+ testRequest.steeringWheelAngle = @YES;
+ testRequest.tirePressure = @YES;
testRequest.turnSignal = @YES;
- testRequest.wiperStatus = @NO;
+ testRequest.windowStatus = @YES;
+ testRequest.wiperStatus = @YES;
- expect(testRequest.accPedalPosition).to(equal(@YES));
- expect(testRequest.airbagStatus).to(equal(@NO));
- expect(testRequest.beltStatus).to(equal(@NO));
- expect(testRequest.bodyInformation).to(equal(@YES));
- expect(testRequest.cloudAppVehicleID).to(equal(@YES));
- expect(testRequest.clusterModeStatus).to(equal(@NO));
- expect(testRequest.deviceStatus).to(equal(@NO));
- expect(testRequest.driverBraking).to(equal(@YES));
- expect(testRequest.eCallInfo).to(equal(@YES));
- expect(testRequest.electronicParkBrakeStatus).to(equal(@YES));
- expect(testRequest.emergencyEvent).to(equal(@YES));
- expect(testRequest.engineOilLife).to(equal(@YES));
- expect(testRequest.engineTorque).to(equal(@NO));
- expect(testRequest.externalTemperature).to(equal(@YES));
- expect(testRequest.fuelLevel).to(equal(@NO));
- expect(testRequest.fuelLevel_State).to(equal(@YES));
- expect(testRequest.fuelRange).to(equal(@YES));
- expect(testRequest.gps).to(equal(@YES));
- expect(testRequest.headLampStatus).to(equal(@YES));
- expect(testRequest.instantFuelConsumption).to(equal(@NO));
- expect(testRequest.myKey).to(equal(@YES));
- expect(testRequest.odometer).to(equal(@YES));
- expect(testRequest.prndl).to(equal(@YES));
- expect(testRequest.rpm).to(equal(@YES));
- expect(testRequest.speed).to(equal(@NO));
- expect(testRequest.steeringWheelAngle).to(equal(@NO));
- expect(testRequest.tirePressure).to(equal(@NO));
- expect(testRequest.turnSignal).to(equal(@YES));
- expect(testRequest.wiperStatus).to(equal(@NO));
+ it(@"expect all properties to be set properly", ^{
+ expect(testRequest.accPedalPosition).to(equal(@YES));
+ expect(testRequest.airbagStatus).to(equal(@YES));
+ expect(testRequest.beltStatus).to(equal(@YES));
+ expect(testRequest.bodyInformation).to(equal(@YES));
+ expect(testRequest.cloudAppVehicleID).to(equal(@YES));
+ expect(testRequest.clusterModeStatus).to(equal(@YES));
+ expect(testRequest.deviceStatus).to(equal(@YES));
+ expect(testRequest.driverBraking).to(equal(@YES));
+ expect(testRequest.eCallInfo).to(equal(@YES));
+ expect(testRequest.electronicParkBrakeStatus).to(equal(@YES));
+ expect(testRequest.emergencyEvent).to(equal(@YES));
+ expect(testRequest.engineOilLife).to(equal(@YES));
+ expect(testRequest.engineTorque).to(equal(@YES));
+ expect(testRequest.externalTemperature).to(equal(@YES));
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
+ expect(testRequest.fuelLevel).to(equal(@YES));
+ expect(testRequest.fuelLevel_State).to(equal(@YES));
+#pragma clang diagnostic pop
+ expect(testRequest.fuelRange).to(equal(@YES));
+ expect(testRequest.gearStatus).to(equal(@YES));
+ expect(testRequest.gps).to(equal(@YES));
+ expect(testRequest.handsOffSteering).to(equal(@YES));
+ expect(testRequest.headLampStatus).to(equal(@YES));
+ expect(testRequest.instantFuelConsumption).to(equal(@YES));
+ expect(testRequest.myKey).to(equal(@YES));
+ expect(testRequest.odometer).to(equal(@YES));
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
+ expect(testRequest.prndl).to(equal(@YES));
+#pragma clang diagnostic pop
+ expect(testRequest.gearStatus).to(equal(@YES));
+ expect(testRequest.rpm).to(equal(@YES));
+ expect(testRequest.speed).to(equal(@YES));
+ expect(testRequest.steeringWheelAngle).to(equal(@YES));
+ expect(testRequest.tirePressure).to(equal(@YES));
+ expect(testRequest.turnSignal).to(equal(@YES));
+ expect(testRequest.windowStatus).to(equal(@YES));
+ expect(testRequest.wiperStatus).to(equal(@YES));
+ });
});
- it(@"Should get correctly when initialized with a dictionary", ^ {
+ context(@"initWithDictionary:", ^{
NSDictionary<NSString *, id> *dict = @{SDLRPCParameterNameRequest:
- @{SDLRPCParameterNameParameters:
- @{SDLRPCParameterNameAccelerationPedalPosition:@YES,
- SDLRPCParameterNameAirbagStatus:@YES,
- SDLRPCParameterNameBeltStatus:@YES,
- SDLRPCParameterNameBodyInformation:@YES,
- SDLRPCParameterNameCloudAppVehicleID:@YES,
- SDLRPCParameterNameClusterModeStatus:@YES,
- SDLRPCParameterNameDeviceStatus:@YES,
- SDLRPCParameterNameDriverBraking:@YES,
- SDLRPCParameterNameECallInfo:@YES,
- SDLRPCParameterNameElectronicParkBrakeStatus: @YES,
- SDLRPCParameterNameEmergencyEvent:@NO,
- SDLRPCParameterNameEngineOilLife:@YES,
- SDLRPCParameterNameEngineTorque:@YES,
- SDLRPCParameterNameExternalTemperature:@NO,
- SDLRPCParameterNameFuelLevel:@YES,
- SDLRPCParameterNameFuelLevelState:@YES,
- SDLRPCParameterNameFuelRange:@YES,
- SDLRPCParameterNameGPS:@YES,
- SDLRPCParameterNameHeadLampStatus:@YES,
- SDLRPCParameterNameInstantFuelConsumption:@YES,
- SDLRPCParameterNameMyKey:@YES,
- SDLRPCParameterNameOdometer:@YES,
- SDLRPCParameterNamePRNDL:@YES,
- SDLRPCParameterNameRPM:@YES,
- SDLRPCParameterNameSpeed:@YES,
- SDLRPCParameterNameSteeringWheelAngle:@NO,
- SDLRPCParameterNameTirePressure:@YES,
- SDLRPCParameterNameTurnSignal:@NO,
- SDLRPCParameterNameWiperStatus:@NO},
+ @{SDLRPCParameterNameParameters:@{
+ SDLRPCParameterNameAccelerationPedalPosition:@YES,
+ SDLRPCParameterNameAirbagStatus:@YES,
+ SDLRPCParameterNameBeltStatus:@YES,
+ SDLRPCParameterNameBodyInformation:@YES,
+ SDLRPCParameterNameCloudAppVehicleID:@YES,
+ SDLRPCParameterNameClusterModeStatus:@YES,
+ SDLRPCParameterNameDeviceStatus:@YES,
+ SDLRPCParameterNameDriverBraking:@YES,
+ SDLRPCParameterNameECallInfo:@YES,
+ SDLRPCParameterNameElectronicParkBrakeStatus: @YES,
+ SDLRPCParameterNameEmergencyEvent:@YES,
+ SDLRPCParameterNameEngineOilLife:@YES,
+ SDLRPCParameterNameEngineTorque:@YES,
+ SDLRPCParameterNameExternalTemperature:@YES,
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
+ SDLRPCParameterNameFuelLevel:@YES,
+ SDLRPCParameterNameFuelLevelState:@YES,
+#pragma clang diagnostic pop
+ SDLRPCParameterNameFuelRange:@YES,
+ SDLRPCParameterNameGearStatus:@YES,
+ SDLRPCParameterNameGPS:@YES,
+ SDLRPCParameterNameHandsOffSteering:@YES,
+ SDLRPCParameterNameHeadLampStatus:@YES,
+ SDLRPCParameterNameInstantFuelConsumption:@YES,
+ SDLRPCParameterNameMyKey:@YES,
+ SDLRPCParameterNameOdometer:@YES,
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
+ SDLRPCParameterNamePRNDL:@YES,
+#pragma clang diagnostic pop
+ SDLRPCParameterNameRPM:@YES,
+ SDLRPCParameterNameSpeed:@YES,
+ SDLRPCParameterNameSteeringWheelAngle:@YES,
+ SDLRPCParameterNameTirePressure:@YES,
+ SDLRPCParameterNameTurnSignal:@YES,
+ SDLRPCParameterNameWindowStatus:@YES,
+ SDLRPCParameterNameWiperStatus:@YES,
+ },
SDLRPCParameterNameOperationName:SDLRPCFunctionNameSubscribeVehicleData}};
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
SDLSubscribeVehicleData* testRequest = [[SDLSubscribeVehicleData alloc] initWithDictionary:dict];
#pragma clang diagnostic pop
-
- expect(testRequest.accPedalPosition).to(equal(@YES));
- expect(testRequest.airbagStatus).to(equal(@YES));
- expect(testRequest.beltStatus).to(equal(@YES));
- expect(testRequest.bodyInformation).to(equal(@YES));
- expect(testRequest.cloudAppVehicleID).to(equal(@YES));
- expect(testRequest.clusterModeStatus).to(equal(@YES));
- expect(testRequest.deviceStatus).to(equal(@YES));
- expect(testRequest.driverBraking).to(equal(@YES));
- expect(testRequest.eCallInfo).to(equal(@YES));
- expect(testRequest.electronicParkBrakeStatus).to(equal(@YES));
- expect(testRequest.emergencyEvent).to(equal(@NO));
- expect(testRequest.engineOilLife).to(equal(@YES));
- expect(testRequest.engineTorque).to(equal(@YES));
- expect(testRequest.externalTemperature).to(equal(@NO));
- expect(testRequest.fuelLevel).to(equal(@YES));
- expect(testRequest.fuelLevel_State).to(equal(@YES));
- expect(testRequest.fuelRange).to(equal(@YES));
- expect(testRequest.gps).to(equal(@YES));
- expect(testRequest.headLampStatus).to(equal(@YES));
- expect(testRequest.instantFuelConsumption).to(equal(@YES));
- expect(testRequest.myKey).to(equal(@YES));
- expect(testRequest.odometer).to(equal(@YES));
- expect(testRequest.prndl).to(equal(@YES));
- expect(testRequest.rpm).to(equal(@YES));
- expect(testRequest.speed).to(equal(@YES));
- expect(testRequest.steeringWheelAngle).to(equal(@NO));
- expect(testRequest.tirePressure).to(equal(@YES));
- expect(testRequest.turnSignal).to(equal(@NO));
- expect(testRequest.wiperStatus).to(equal(@NO));
+
+ it(@"expect all properties to be set properly", ^{
+ expect(testRequest.accPedalPosition).to(equal(@YES));
+ expect(testRequest.airbagStatus).to(equal(@YES));
+ expect(testRequest.beltStatus).to(equal(@YES));
+ expect(testRequest.bodyInformation).to(equal(@YES));
+ expect(testRequest.cloudAppVehicleID).to(equal(@YES));
+ expect(testRequest.clusterModeStatus).to(equal(@YES));
+ expect(testRequest.deviceStatus).to(equal(@YES));
+ expect(testRequest.driverBraking).to(equal(@YES));
+ expect(testRequest.eCallInfo).to(equal(@YES));
+ expect(testRequest.electronicParkBrakeStatus).to(equal(@YES));
+ expect(testRequest.emergencyEvent).to(equal(@YES));
+ expect(testRequest.engineOilLife).to(equal(@YES));
+ expect(testRequest.engineTorque).to(equal(@YES));
+ expect(testRequest.externalTemperature).to(equal(@YES));
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
+ expect(testRequest.fuelLevel).to(equal(@YES));
+ expect(testRequest.fuelLevel_State).to(equal(@YES));
+#pragma clang diagnostic pop
+ expect(testRequest.fuelRange).to(equal(@YES));
+ expect(testRequest.gearStatus).to(equal(@YES));
+ expect(testRequest.gps).to(equal(@YES));
+ expect(testRequest.handsOffSteering).to(equal(@YES));
+ expect(testRequest.headLampStatus).to(equal(@YES));
+ expect(testRequest.instantFuelConsumption).to(equal(@YES));
+ expect(testRequest.myKey).to(equal(@YES));
+ expect(testRequest.odometer).to(equal(@YES));
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
+ expect(testRequest.prndl).to(equal(@YES));
+#pragma clang diagnostic pop
+ expect(testRequest.gearStatus).to(equal(@YES));
+ expect(testRequest.rpm).to(equal(@YES));
+ expect(testRequest.speed).to(equal(@YES));
+ expect(testRequest.steeringWheelAngle).to(equal(@YES));
+ expect(testRequest.tirePressure).to(equal(@YES));
+ expect(testRequest.turnSignal).to(equal(@YES));
+ expect(testRequest.windowStatus).to(equal(@YES));
+ expect(testRequest.wiperStatus).to(equal(@YES));
+ });
});
});
-describe(@"initializers", ^{
+describe(@"test initializers", ^{
context(@"init", ^{
SDLSubscribeVehicleData* testRequest = [[SDLSubscribeVehicleData alloc] init];
- expect(testRequest.accPedalPosition).to(beNil());
- expect(testRequest.airbagStatus).to(beNil());
- expect(testRequest.beltStatus).to(beNil());
- expect(testRequest.bodyInformation).to(beNil());
- expect(testRequest.cloudAppVehicleID).to(beNil());
- expect(testRequest.clusterModeStatus).to(beNil());
- expect(testRequest.deviceStatus).to(beNil());
- expect(testRequest.driverBraking).to(beNil());
- expect(testRequest.eCallInfo).to(beNil());
- expect(testRequest.electronicParkBrakeStatus).to(beNil());
- expect(testRequest.emergencyEvent).to(beNil());
- expect(testRequest.engineOilLife).to(beNil());
- expect(testRequest.engineTorque).to(beNil());
- expect(testRequest.externalTemperature).to(beNil());
- expect(testRequest.fuelLevel).to(beNil());
- expect(testRequest.fuelLevel_State).to(beNil());
- expect(testRequest.fuelRange).to(beNil());
- expect(testRequest.gps).to(beNil());
- expect(testRequest.headLampStatus).to(beNil());
- expect(testRequest.instantFuelConsumption).to(beNil());
- expect(testRequest.myKey).to(beNil());
- expect(testRequest.odometer).to(beNil());
- expect(testRequest.prndl).to(beNil());
- expect(testRequest.rpm).to(beNil());
- expect(testRequest.speed).to(beNil());
- expect(testRequest.steeringWheelAngle).to(beNil());
- expect(testRequest.tirePressure).to(beNil());
- expect(testRequest.turnSignal).to(beNil());
- expect(testRequest.wiperStatus).to(beNil());
+ it(@"expect all properties to be nil", ^{
+ expect(testRequest.accPedalPosition).to(beNil());
+ expect(testRequest.airbagStatus).to(beNil());
+ expect(testRequest.beltStatus).to(beNil());
+ expect(testRequest.bodyInformation).to(beNil());
+ expect(testRequest.cloudAppVehicleID).to(beNil());
+ expect(testRequest.clusterModeStatus).to(beNil());
+ expect(testRequest.deviceStatus).to(beNil());
+ expect(testRequest.driverBraking).to(beNil());
+ expect(testRequest.eCallInfo).to(beNil());
+ expect(testRequest.electronicParkBrakeStatus).to(beNil());
+ expect(testRequest.emergencyEvent).to(beNil());
+ expect(testRequest.engineOilLife).to(beNil());
+ expect(testRequest.engineTorque).to(beNil());
+ expect(testRequest.externalTemperature).to(beNil());
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
+ expect(testRequest.fuelLevel).to(beNil());
+ expect(testRequest.fuelLevel_State).to(beNil());
+#pragma clang diagnostic pop
+ expect(testRequest.fuelRange).to(beNil());
+ expect(testRequest.gearStatus).to(beNil());
+ expect(testRequest.gps).to(beNil());
+ expect(testRequest.handsOffSteering).to(beNil());
+ expect(testRequest.headLampStatus).to(beNil());
+ expect(testRequest.instantFuelConsumption).to(beNil());
+ expect(testRequest.myKey).to(beNil());
+ expect(testRequest.odometer).to(beNil());
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
+ expect(testRequest.prndl).to(beNil());
+#pragma clang diagnostic pop
+ expect(testRequest.rpm).to(beNil());
+ expect(testRequest.speed).to(beNil());
+ expect(testRequest.steeringWheelAngle).to(beNil());
+ expect(testRequest.tirePressure).to(beNil());
+ expect(testRequest.turnSignal).to(beNil());
+ expect(testRequest.windowStatus).to(beNil());
+ expect(testRequest.wiperStatus).to(beNil());
+ });
});
- context(@"initWithAccelerationPedalPosition:airbagStatus:beltStatus:bodyInformation:cloudAppVehicleID:clusterModeStatus:deviceStatus:driverBraking:eCallInfo:emergencyEvent:engineOilLife:engineTorque:externalTemperature:fuelLevel:fuelLevelState:gps:headLampStatus:instantFuelConsumption:myKey:odometer:prndl:rpm:speed:steeringWheelAngle:tirePressure:wiperStatus:", ^{
- SDLSubscribeVehicleData* testRequest = [[SDLSubscribeVehicleData alloc] initWithAccelerationPedalPosition:YES airbagStatus:YES beltStatus:YES bodyInformation:YES cloudAppVehicleID:YES clusterModeStatus:YES deviceStatus:YES driverBraking:YES eCallInfo:YES electronicParkBrakeStatus:YES emergencyEvent:YES engineOilLife:YES engineTorque:YES externalTemperature:YES fuelLevel:YES fuelLevelState:YES fuelRange:YES gps:YES headLampStatus:YES instantFuelConsumption:YES myKey:YES odometer:YES prndl:YES rpm:YES speed:YES steeringWheelAngle:YES tirePressure:YES turnSignal:YES wiperStatus:YES];
-
- expect(testRequest.accPedalPosition).to(equal(@YES));
- expect(testRequest.airbagStatus).to(equal(@YES));
- expect(testRequest.beltStatus).to(equal(@YES));
- expect(testRequest.bodyInformation).to(equal(@YES));
- expect(testRequest.cloudAppVehicleID).to(equal(@YES));
- expect(testRequest.clusterModeStatus).to(equal(@YES));
- expect(testRequest.deviceStatus).to(equal(@YES));
- expect(testRequest.driverBraking).to(equal(@YES));
- expect(testRequest.eCallInfo).to(equal(@YES));
- expect(testRequest.electronicParkBrakeStatus).to(equal(@YES));
- expect(testRequest.emergencyEvent).to(equal(@YES));
- expect(testRequest.engineOilLife).to(equal(@YES));
- expect(testRequest.engineTorque).to(equal(@YES));
- expect(testRequest.externalTemperature).to(equal(@YES));
- expect(testRequest.fuelLevel).to(equal(@YES));
- expect(testRequest.fuelLevel_State).to(equal(@YES));
- expect(testRequest.fuelRange).to(equal(@YES));
- expect(testRequest.gps).to(equal(@YES));
- expect(testRequest.headLampStatus).to(equal(@YES));
- expect(testRequest.instantFuelConsumption).to(equal(@YES));
- expect(testRequest.myKey).to(equal(@YES));
- expect(testRequest.odometer).to(equal(@YES));
- expect(testRequest.prndl).to(equal(@YES));
- expect(testRequest.rpm).to(equal(@YES));
- expect(testRequest.speed).to(equal(@YES));
- expect(testRequest.steeringWheelAngle).to(equal(@YES));
- expect(testRequest.tirePressure).to(equal(@YES));
- expect(testRequest.turnSignal).to(equal(@YES));
- expect(testRequest.wiperStatus).to(equal(@YES));
- });
context(@"initWithAccelerationPedalPosition:airbagStatus:beltStatus:bodyInformation:clusterModeStatus:deviceStatus:driverBraking:eCallInfo:emergencyEvent:engineOilLife:engineTorque:externalTemperature:fuelLevel:fuelLevelState:gps:headLampStatus:instantFuelConsumption:myKey:odometer:prndl:rpm:speed:steeringWheelAngle:tirePressure:wiperStatus:", ^{
- #pragma clang diagnostic push
- #pragma clang diagnostic ignored "-Wdeprecated-declarations"
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
SDLSubscribeVehicleData* testRequest = [[SDLSubscribeVehicleData alloc] initWithAccelerationPedalPosition:YES airbagStatus:YES beltStatus:YES bodyInformation:YES clusterModeStatus:YES deviceStatus:YES driverBraking:YES eCallInfo:YES electronicParkBrakeStatus:YES emergencyEvent:YES engineOilLife:YES engineTorque:YES externalTemperature:YES fuelLevel:YES fuelLevelState:YES fuelRange:YES gps:YES headLampStatus:YES instantFuelConsumption:YES myKey:YES odometer:YES prndl:YES rpm:YES speed:YES steeringWheelAngle:YES tirePressure:YES turnSignal:YES wiperStatus:YES];
+#pragma clang diagnostic pop
- expect(testRequest.accPedalPosition).to(equal(@YES));
- expect(testRequest.airbagStatus).to(equal(@YES));
- expect(testRequest.beltStatus).to(equal(@YES));
- expect(testRequest.bodyInformation).to(equal(@YES));
- expect(testRequest.cloudAppVehicleID).to(equal(@NO));
- expect(testRequest.clusterModeStatus).to(equal(@YES));
- expect(testRequest.deviceStatus).to(equal(@YES));
- expect(testRequest.driverBraking).to(equal(@YES));
- expect(testRequest.eCallInfo).to(equal(@YES));
- expect(testRequest.electronicParkBrakeStatus).to(equal(@YES));
- expect(testRequest.emergencyEvent).to(equal(@YES));
- expect(testRequest.engineOilLife).to(equal(@YES));
- expect(testRequest.engineTorque).to(equal(@YES));
- expect(testRequest.externalTemperature).to(equal(@YES));
- expect(testRequest.fuelLevel).to(equal(@YES));
- expect(testRequest.fuelLevel_State).to(equal(@YES));
- expect(testRequest.fuelRange).to(equal(@YES));
- expect(testRequest.gps).to(equal(@YES));
- expect(testRequest.headLampStatus).to(equal(@YES));
- expect(testRequest.instantFuelConsumption).to(equal(@YES));
- expect(testRequest.myKey).to(equal(@YES));
- expect(testRequest.odometer).to(equal(@YES));
- expect(testRequest.prndl).to(equal(@YES));
- expect(testRequest.rpm).to(equal(@YES));
- expect(testRequest.speed).to(equal(@YES));
- expect(testRequest.steeringWheelAngle).to(equal(@YES));
- expect(testRequest.tirePressure).to(equal(@YES));
- expect(testRequest.turnSignal).to(equal(@YES));
- expect(testRequest.wiperStatus).to(equal(@YES));
- #pragma clang diagnostic pop
+ it(@"expect all properties to be set properly", ^{
+ expect(testRequest.accPedalPosition).to(equal(@YES));
+ expect(testRequest.airbagStatus).to(equal(@YES));
+ expect(testRequest.beltStatus).to(equal(@YES));
+ expect(testRequest.bodyInformation).to(equal(@YES));
+ expect(testRequest.cloudAppVehicleID).to(beNil());
+ expect(testRequest.clusterModeStatus).to(equal(@YES));
+ expect(testRequest.deviceStatus).to(equal(@YES));
+ expect(testRequest.driverBraking).to(equal(@YES));
+ expect(testRequest.eCallInfo).to(equal(@YES));
+ expect(testRequest.electronicParkBrakeStatus).to(equal(@YES));
+ expect(testRequest.emergencyEvent).to(equal(@YES));
+ expect(testRequest.engineOilLife).to(equal(@YES));
+ expect(testRequest.engineTorque).to(equal(@YES));
+ expect(testRequest.externalTemperature).to(equal(@YES));
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
+ expect(testRequest.fuelLevel).to(equal(@YES));
+ expect(testRequest.fuelLevel_State).to(equal(@YES));
+#pragma clang diagnostic pop
+ expect(testRequest.fuelRange).to(equal(@YES));
+ expect(testRequest.gearStatus).to(beNil());
+ expect(testRequest.gps).to(equal(@YES));
+ expect(testRequest.handsOffSteering).to(beNil());
+ expect(testRequest.headLampStatus).to(equal(@YES));
+ expect(testRequest.instantFuelConsumption).to(equal(@YES));
+ expect(testRequest.myKey).to(equal(@YES));
+ expect(testRequest.odometer).to(equal(@YES));
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
+ expect(testRequest.prndl).to(equal(@YES));
+#pragma clang diagnostic pop
+ expect(testRequest.rpm).to(equal(@YES));
+ expect(testRequest.speed).to(equal(@YES));
+ expect(testRequest.steeringWheelAngle).to(equal(@YES));
+ expect(testRequest.tirePressure).to(equal(@YES));
+ expect(testRequest.turnSignal).to(equal(@YES));
+ expect(testRequest.windowStatus).to(beNil());
+ expect(testRequest.wiperStatus).to(equal(@YES));
+ });
});
-
+
context(@"initWithAccelerationPedalPosition:airbagStatus:beltStatus:bodyInformation:clusterModeStatus:deviceStatus:driverBraking:eCallInfo:emergencyEvent:engineTorque:externalTemperature:fuelLevel:fuelLevelState:gps:headLampStatus:instantFuelConsumption:myKey:odometer:prndl:rpm:speed:steeringWheelAngle:tirePressure:wiperStatus:", ^{
- #pragma clang diagnostic push
- #pragma clang diagnostic ignored "-Wdeprecated-declarations"
- SDLSubscribeVehicleData* testRequest = [[SDLSubscribeVehicleData alloc] initWithAccelerationPedalPosition:YES airbagStatus:YES beltStatus:YES bodyInformation:YES clusterModeStatus:YES deviceStatus:YES driverBraking:YES eCallInfo:YES emergencyEvent:YES engineTorque:YES externalTemperature:YES fuelLevel:YES fuelLevelState:NO gps:YES headLampStatus:YES instantFuelConsumption:YES myKey:YES odometer:YES prndl:YES rpm:YES speed:YES steeringWheelAngle:YES tirePressure:YES wiperStatus:YES];
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
+ SDLSubscribeVehicleData* testRequest = [[SDLSubscribeVehicleData alloc] initWithAccelerationPedalPosition:YES airbagStatus:YES beltStatus:YES bodyInformation:YES clusterModeStatus:YES deviceStatus:YES driverBraking:YES eCallInfo:YES emergencyEvent:YES engineTorque:YES externalTemperature:YES fuelLevel:YES fuelLevelState:YES gps:YES headLampStatus:YES instantFuelConsumption:YES myKey:YES odometer:YES prndl:YES rpm:YES speed:YES steeringWheelAngle:YES tirePressure:YES wiperStatus:YES];
+#pragma clang diagnostic pop
+
+ it(@"expect all properties to be set properly", ^{
+ expect(testRequest.accPedalPosition).to(equal(@YES));
+ expect(testRequest.airbagStatus).to(equal(@YES));
+ expect(testRequest.beltStatus).to(equal(@YES));
+ expect(testRequest.bodyInformation).to(equal(@YES));
+ expect(testRequest.cloudAppVehicleID).to(beNil());
+ expect(testRequest.clusterModeStatus).to(equal(@YES));
+ expect(testRequest.deviceStatus).to(equal(@YES));
+ expect(testRequest.driverBraking).to(equal(@YES));
+ expect(testRequest.eCallInfo).to(equal(@YES));
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
+ expect(testRequest.fuelLevel).to(equal(@YES));
+ expect(testRequest.fuelLevel_State).to(equal(@YES));
+#pragma clang diagnostic pop
+ expect(testRequest.fuelRange).to(beNil());
+ expect(testRequest.gearStatus).to(beNil());
+ expect(testRequest.gps).to(equal(@YES));
+ expect(testRequest.handsOffSteering).to(beNil());
+ expect(testRequest.electronicParkBrakeStatus).to(beNil());
+ expect(testRequest.emergencyEvent).to(equal(@YES));
+ expect(testRequest.engineOilLife).to(beNil());
+ expect(testRequest.engineTorque).to(equal(@YES));
+ expect(testRequest.externalTemperature).to(equal(@YES));
+ expect(testRequest.headLampStatus).to(equal(@YES));
+ expect(testRequest.instantFuelConsumption).to(equal(@YES));
+ expect(testRequest.myKey).to(equal(@YES));
+ expect(testRequest.odometer).to(equal(@YES));
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
+ expect(testRequest.prndl).to(equal(@YES));
+#pragma clang diagnostic pop
+ expect(testRequest.rpm).to(equal(@YES));
+ expect(testRequest.speed).to(equal(@YES));
+ expect(testRequest.steeringWheelAngle).to(equal(@YES));
+ expect(testRequest.tirePressure).to(equal(@YES));
+ expect(testRequest.turnSignal).to(beNil());
+ expect(testRequest.windowStatus).to(beNil());
+ expect(testRequest.wiperStatus).to(equal(@YES));
+ });
+ });
+
+ context(@"initWithGps:speed:rpm:instantFuelConsumption:fuelRange:externalTemperature:turnSignal:gearStatus:tirePressure:odometer:beltStatus:bodyInformation:deviceStatus:driverBraking:wiperStatus:headLampStatus:engineTorque:accPedalPosition:steeringWheelAngle:engineOilLife:electronicParkBrakeStatus:cloudAppVehicleID:eCallInfo:airbagStatus:emergencyEvent:clusterModeStatus:myKey:handsOffSteering:windowStatus:", ^{
+ SDLSubscribeVehicleData* testRequest = [[SDLSubscribeVehicleData alloc] initWithGps:@YES speed:@YES rpm:@YES instantFuelConsumption:@YES fuelRange:@YES externalTemperature:@YES turnSignal:@YES gearStatus:@YES tirePressure:@YES odometer:@YES beltStatus:@YES bodyInformation:@YES deviceStatus:@YES driverBraking:@YES wiperStatus:@YES headLampStatus:@YES engineTorque:@YES accPedalPosition:@YES steeringWheelAngle:@YES engineOilLife:@YES electronicParkBrakeStatus:@YES cloudAppVehicleID:@YES eCallInfo:@YES airbagStatus:@YES emergencyEvent:@YES clusterModeStatus:@YES myKey:@YES handsOffSteering:@YES windowStatus:@YES];
- expect(testRequest.accPedalPosition).to(equal(@YES));
- expect(testRequest.airbagStatus).to(equal(@YES));
- expect(testRequest.beltStatus).to(equal(@YES));
- expect(testRequest.bodyInformation).to(equal(@YES));
- expect(testRequest.cloudAppVehicleID).to(equal(@NO));
- expect(testRequest.clusterModeStatus).to(equal(@YES));
- expect(testRequest.deviceStatus).to(equal(@YES));
- expect(testRequest.driverBraking).to(equal(@YES));
- expect(testRequest.eCallInfo).to(equal(@YES));
- expect(testRequest.electronicParkBrakeStatus).to(equal(@NO));
- expect(testRequest.emergencyEvent).to(equal(@YES));
- expect(testRequest.engineOilLife).to(equal(@NO));
- expect(testRequest.engineTorque).to(equal(@YES));
- expect(testRequest.externalTemperature).to(equal(@YES));
- expect(testRequest.fuelLevel).to(equal(@YES));
- expect(testRequest.fuelLevel_State).to(equal(@NO));
- expect(testRequest.fuelRange).to(equal(@NO));
- expect(testRequest.gps).to(equal(@YES));
- expect(testRequest.headLampStatus).to(equal(@YES));
- expect(testRequest.instantFuelConsumption).to(equal(@YES));
- expect(testRequest.myKey).to(equal(@YES));
- expect(testRequest.odometer).to(equal(@YES));
- expect(testRequest.prndl).to(equal(@YES));
- expect(testRequest.rpm).to(equal(@YES));
- expect(testRequest.speed).to(equal(@YES));
- expect(testRequest.steeringWheelAngle).to(equal(@YES));
- expect(testRequest.tirePressure).to(equal(@YES));
- expect(testRequest.turnSignal).to(equal(@NO));
- expect(testRequest.wiperStatus).to(equal(@YES));
- #pragma clang diagnostic pop
+ it(@"expect all properties to be set properly", ^{
+ expect(testRequest.accPedalPosition).to(equal(@YES));
+ expect(testRequest.airbagStatus).to(equal(@YES));
+ expect(testRequest.beltStatus).to(equal(@YES));
+ expect(testRequest.bodyInformation).to(equal(@YES));
+ expect(testRequest.cloudAppVehicleID).to(equal(@YES));
+ expect(testRequest.clusterModeStatus).to(equal(@YES));
+ expect(testRequest.deviceStatus).to(equal(@YES));
+ expect(testRequest.driverBraking).to(equal(@YES));
+ expect(testRequest.eCallInfo).to(equal(@YES));
+ expect(testRequest.electronicParkBrakeStatus).to(equal(@YES));
+ expect(testRequest.emergencyEvent).to(equal(@YES));
+ expect(testRequest.engineOilLife).to(equal(@YES));
+ expect(testRequest.engineTorque).to(equal(@YES));
+ expect(testRequest.externalTemperature).to(equal(@YES));
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
+ expect(testRequest.fuelLevel).to(beNil());
+ expect(testRequest.fuelLevel_State).to(beNil());
+#pragma clang diagnostic pop
+ expect(testRequest.fuelRange).to(equal(@YES));
+ expect(testRequest.gearStatus).to(equal(@YES));
+ expect(testRequest.gps).to(equal(@YES));
+ expect(testRequest.handsOffSteering).to(equal(@YES));
+ expect(testRequest.headLampStatus).to(equal(@YES));
+ expect(testRequest.instantFuelConsumption).to(equal(@YES));
+ expect(testRequest.myKey).to(equal(@YES));
+ expect(testRequest.odometer).to(equal(@YES));
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
+ expect(testRequest.prndl).to(beNil());
+#pragma clang diagnostic pop
+ expect(testRequest.rpm).to(equal(@YES));
+ expect(testRequest.speed).to(equal(@YES));
+ expect(testRequest.steeringWheelAngle).to(equal(@YES));
+ expect(testRequest.tirePressure).to(equal(@YES));
+ expect(testRequest.turnSignal).to(equal(@YES));
+ expect(testRequest.windowStatus).to(equal(@YES));
+ expect(testRequest.wiperStatus).to(equal(@YES));
+ });
});
- context(@"Should set and get Generic Network Signal Data", ^{
+ context(@"should set OEM Custom Vehicle Data", ^{
SDLSubscribeVehicleData *testRequest = [[SDLSubscribeVehicleData alloc] init];
-
[testRequest setOEMCustomVehicleData:@"customVehicleData" withVehicleDataState:NO];
[testRequest setOEMCustomVehicleData:@"customVehicleData1" withVehicleDataState:YES];
- expect([testRequest getOEMCustomVehicleData:@"customVehicleData"]).to(beFalse());
- expect([testRequest getOEMCustomVehicleData:@"customVehicleData1"]).to(beTrue());
-
+ it(@"expect OEM Custom Vehicle Data to be set properly", ^{
+ expect([testRequest getOEMCustomVehicleData:@"customVehicleData"]).to(equal(@NO));
+ expect([testRequest getOEMCustomVehicleData:@"customVehicleData1"]).to(equal(@YES));
+ });
});
});
diff --git a/SmartDeviceLinkTests/RPCSpecs/RequestSpecs/SDLSubtleAlertSpec.m b/SmartDeviceLinkTests/RPCSpecs/RequestSpecs/SDLSubtleAlertSpec.m
new file mode 100644
index 000000000..e91352d48
--- /dev/null
+++ b/SmartDeviceLinkTests/RPCSpecs/RequestSpecs/SDLSubtleAlertSpec.m
@@ -0,0 +1,107 @@
+//
+// SDLSubtleAlertSpec.m
+// SmartDeviceLinkTests
+//
+// Created by Nicole on 7/28/20.
+// Copyright © 2020 smartdevicelink. All rights reserved.
+//
+
+#import <Quick/Quick.h>
+#import <Nimble/Nimble.h>
+
+#import "SDLImage.h"
+#import "SDLRPCParameterNames.h"
+#import "SDLRPCFunctionNames.h"
+#import "SDLSoftButton.h"
+#import "SDLSubtleAlert.h"
+#import "SDLTTSChunk.h"
+
+QuickSpecBegin(SDLSubtleAlertSpec)
+
+describe(@"Getter/Setter Tests", ^{
+ __block SDLSubtleAlert *testSubtleAlert = nil;
+ __block NSString *testAlertText1 = nil;
+ __block NSString *testAlertText2 = nil;
+ __block SDLImage *testAlertIcon = nil;
+ __block NSArray<SDLTTSChunk *> *testTTSChunks = nil;
+ __block int testDuration = 5600;
+ __block NSArray<SDLSoftButton *> *testSoftButtons = nil;
+ __block int testCancelID = 34;
+
+ beforeEach(^{
+ testAlertText1 = @"test alert text 1";
+ testAlertText2 = @"test alert text 2";
+ testAlertIcon = [[SDLImage alloc] initWithStaticIconName:SDLStaticIconNameKey];
+ testTTSChunks = [SDLTTSChunk textChunksFromString:@"alert text"];
+ testSoftButtons = @[[[SDLSoftButton alloc] init]];
+ });
+
+ it(@"Should set and get correctly", ^{
+ testSubtleAlert = [[SDLSubtleAlert alloc] init];
+ testSubtleAlert.alertText1 = testAlertText1;
+ testSubtleAlert.alertText2 = testAlertText2;
+ testSubtleAlert.alertIcon = testAlertIcon;
+ testSubtleAlert.ttsChunks = testTTSChunks;
+ testSubtleAlert.duration = @(testDuration);
+ testSubtleAlert.softButtons = testSoftButtons;
+ testSubtleAlert.cancelID = @(testCancelID);
+
+ expect(testSubtleAlert.alertText1).to(equal(testAlertText1));
+ expect(testSubtleAlert.alertText2).to(equal(testAlertText2));
+ expect(testSubtleAlert.alertIcon).to(equal(testAlertIcon));
+ expect(testSubtleAlert.ttsChunks).to(equal(testTTSChunks));
+ expect(testSubtleAlert.duration).to(equal(testDuration));
+ expect(testSubtleAlert.softButtons).to(equal(testSoftButtons));
+ expect(testSubtleAlert.cancelID).to(equal(testCancelID));
+ });
+
+ it(@"Should initialize correctly with a dictionary", ^{
+ NSDictionary *dict = @{SDLRPCParameterNameRequest:@{
+ SDLRPCParameterNameParameters:@{
+ SDLRPCParameterNameAlertText1:testAlertText1,
+ SDLRPCParameterNameAlertText2:testAlertText2,
+ SDLRPCParameterNameAlertIcon:testAlertIcon,
+ SDLRPCParameterNameTTSChunks:testTTSChunks,
+ SDLRPCParameterNameDuration:@(testDuration),
+ SDLRPCParameterNameSoftButtons:testSoftButtons,
+ SDLRPCParameterNameCancelID:@(testCancelID)
+ },
+ SDLRPCParameterNameOperationName:SDLRPCFunctionNameSubtleAlert}};
+ testSubtleAlert = [[SDLSubtleAlert alloc] initWithDictionary:dict];
+
+ expect(testSubtleAlert.alertText1).to(equal(testAlertText1));
+ expect(testSubtleAlert.alertText2).to(equal(testAlertText2));
+ expect(testSubtleAlert.alertIcon).to(equal(testAlertIcon));
+ expect(testSubtleAlert.ttsChunks).to(equal(testTTSChunks));
+ expect(testSubtleAlert.duration).to(equal(testDuration));
+ expect(testSubtleAlert.softButtons).to(equal(testSoftButtons));
+ expect(testSubtleAlert.cancelID).to(equal(testCancelID));
+ });
+
+ it(@"Should initialize correctly with initWithAlertText1:alertText2:alertIcon:ttsChunks:duration:softButtons:cancelID:", ^{
+ testSubtleAlert = [[SDLSubtleAlert alloc] initWithAlertText1:testAlertText1 alertText2:testAlertText2 alertIcon:testAlertIcon ttsChunks:testTTSChunks duration:@(testDuration) softButtons:testSoftButtons cancelID:@(testCancelID)];
+
+ expect(testSubtleAlert.alertText1).to(equal(testAlertText1));
+ expect(testSubtleAlert.alertText2).to(equal(testAlertText2));
+ expect(testSubtleAlert.alertIcon).to(equal(testAlertIcon));
+ expect(testSubtleAlert.ttsChunks).to(equal(testTTSChunks));
+ expect(testSubtleAlert.duration).to(equal(testDuration));
+ expect(testSubtleAlert.softButtons).to(equal(testSoftButtons));
+ expect(testSubtleAlert.cancelID).to(equal(testCancelID));
+ });
+
+ it(@"Should return nil if not set", ^{
+ testSubtleAlert = [[SDLSubtleAlert alloc] init];
+
+ expect(testSubtleAlert.alertText1).to(beNil());
+ expect(testSubtleAlert.alertText2).to(beNil());
+ expect(testSubtleAlert.alertIcon).to(beNil());
+ expect(testSubtleAlert.ttsChunks).to(beNil());
+ expect(testSubtleAlert.duration).to(beNil());
+ expect(testSubtleAlert.softButtons).to(beNil());
+ expect(testSubtleAlert.cancelID).to(beNil());
+ });
+});
+
+QuickSpecEnd
+
diff --git a/SmartDeviceLinkTests/RPCSpecs/RequestSpecs/SDLSystemRequestSpec.m b/SmartDeviceLinkTests/RPCSpecs/RequestSpecs/SDLSystemRequestSpec.m
index 19954c463..ea86ebb89 100644
--- a/SmartDeviceLinkTests/RPCSpecs/RequestSpecs/SDLSystemRequestSpec.m
+++ b/SmartDeviceLinkTests/RPCSpecs/RequestSpecs/SDLSystemRequestSpec.m
@@ -26,7 +26,7 @@ describe(@"Getter/Setter Tests", ^ {
@{SDLRPCParameterNameParameters:
@{SDLRPCParameterNameRequestType:SDLRequestTypeAuthenticationRequest,
SDLRPCParameterNameRequestSubType: testSubType,
- SDLRPCParameterNameFilename:testFileName},
+ SDLRPCParameterNameFileName:testFileName},
SDLRPCParameterNameOperationName:SDLRPCFunctionNameSystemRequest}} mutableCopy];
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
diff --git a/SmartDeviceLinkTests/RPCSpecs/RequestSpecs/SDLUnsubscribeVehicleDataSpec.m b/SmartDeviceLinkTests/RPCSpecs/RequestSpecs/SDLUnsubscribeVehicleDataSpec.m
index 9795f6a29..697d1d265 100644
--- a/SmartDeviceLinkTests/RPCSpecs/RequestSpecs/SDLUnsubscribeVehicleDataSpec.m
+++ b/SmartDeviceLinkTests/RPCSpecs/RequestSpecs/SDLUnsubscribeVehicleDataSpec.m
@@ -14,10 +14,9 @@
QuickSpecBegin(SDLUnsubscribeVehicleDataSpec)
-describe(@"Getter/Setter Tests", ^ {
- it(@"Should set and get correctly", ^ {
+describe(@"getter/setter tests", ^{
+ context(@"init and assign", ^{
SDLUnsubscribeVehicleData* testRequest = [[SDLUnsubscribeVehicleData alloc] init];
-
testRequest.accPedalPosition = @YES;
testRequest.airbagStatus = @YES;
testRequest.beltStatus = @YES;
@@ -32,272 +31,406 @@ describe(@"Getter/Setter Tests", ^ {
testRequest.engineOilLife = @YES;
testRequest.engineTorque = @YES;
testRequest.externalTemperature = @YES;
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
testRequest.fuelLevel = @YES;
testRequest.fuelLevel_State = @YES;
+#pragma clang diagnostic pop
testRequest.fuelRange = @YES;
+ testRequest.gearStatus = @YES;
testRequest.gps = @YES;
+ testRequest.handsOffSteering = @YES;
testRequest.headLampStatus = @YES;
testRequest.instantFuelConsumption = @YES;
testRequest.myKey = @YES;
testRequest.odometer = @YES;
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
testRequest.prndl = @YES;
+#pragma clang diagnostic pop
testRequest.rpm = @YES;
testRequest.speed = @YES;
testRequest.steeringWheelAngle = @YES;
testRequest.tirePressure = @YES;
- testRequest.turnSignal = @NO;
+ testRequest.turnSignal = @YES;
+ testRequest.windowStatus = @YES;
testRequest.wiperStatus = @YES;
- expect(testRequest.accPedalPosition).to(equal(@YES));
- expect(testRequest.airbagStatus).to(equal(@YES));
- expect(testRequest.beltStatus).to(equal(@YES));
- expect(testRequest.bodyInformation).to(equal(@YES));
- expect(testRequest.cloudAppVehicleID).to(equal(@YES));
- expect(testRequest.clusterModeStatus).to(equal(@YES));
- expect(testRequest.deviceStatus).to(equal(@YES));
- expect(testRequest.driverBraking).to(equal(@YES));
- expect(testRequest.eCallInfo).to(equal(@YES));
- expect(testRequest.electronicParkBrakeStatus).to(equal(@YES));
- expect(testRequest.emergencyEvent).to(equal(@YES));
- expect(testRequest.engineOilLife).to(equal(@YES));
- expect(testRequest.engineTorque).to(equal(@YES));
- expect(testRequest.externalTemperature).to(equal(@YES));
- expect(testRequest.fuelLevel).to(equal(@YES));
- expect(testRequest.fuelLevel_State).to(equal(@YES));
- expect(testRequest.fuelRange).to(equal(@YES));
- expect(testRequest.gps).to(equal(@YES));
- expect(testRequest.headLampStatus).to(equal(@YES));
- expect(testRequest.instantFuelConsumption).to(equal(@YES));
- expect(testRequest.myKey).to(equal(@YES));
- expect(testRequest.odometer).to(equal(@YES));
- expect(testRequest.prndl).to(equal(@YES));
- expect(testRequest.rpm).to(equal(@YES));
- expect(testRequest.speed).to(equal(@YES));
- expect(testRequest.steeringWheelAngle).to(equal(@YES));
- expect(testRequest.tirePressure).to(equal(@YES));
- expect(testRequest.turnSignal).to(equal(@NO));
- expect(testRequest.wiperStatus).to(equal(@YES));
+ it(@"expect all properties to be set properly", ^{
+ expect(testRequest.accPedalPosition).to(equal(@YES));
+ expect(testRequest.airbagStatus).to(equal(@YES));
+ expect(testRequest.beltStatus).to(equal(@YES));
+ expect(testRequest.bodyInformation).to(equal(@YES));
+ expect(testRequest.cloudAppVehicleID).to(equal(@YES));
+ expect(testRequest.clusterModeStatus).to(equal(@YES));
+ expect(testRequest.deviceStatus).to(equal(@YES));
+ expect(testRequest.driverBraking).to(equal(@YES));
+ expect(testRequest.eCallInfo).to(equal(@YES));
+ expect(testRequest.electronicParkBrakeStatus).to(equal(@YES));
+ expect(testRequest.emergencyEvent).to(equal(@YES));
+ expect(testRequest.engineOilLife).to(equal(@YES));
+ expect(testRequest.engineTorque).to(equal(@YES));
+ expect(testRequest.externalTemperature).to(equal(@YES));
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
+ expect(testRequest.fuelLevel).to(equal(@YES));
+ expect(testRequest.fuelLevel_State).to(equal(@YES));
+#pragma clang diagnostic pop
+ expect(testRequest.fuelRange).to(equal(@YES));
+ expect(testRequest.gearStatus).to(equal(@YES));
+ expect(testRequest.gps).to(equal(@YES));
+ expect(testRequest.handsOffSteering).to(equal(@YES));
+ expect(testRequest.headLampStatus).to(equal(@YES));
+ expect(testRequest.instantFuelConsumption).to(equal(@YES));
+ expect(testRequest.myKey).to(equal(@YES));
+ expect(testRequest.odometer).to(equal(@YES));
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
+ expect(testRequest.prndl).to(equal(@YES));
+#pragma clang diagnostic pop
+ expect(testRequest.rpm).to(equal(@YES));
+ expect(testRequest.speed).to(equal(@YES));
+ expect(testRequest.steeringWheelAngle).to(equal(@YES));
+ expect(testRequest.tirePressure).to(equal(@YES));
+ expect(testRequest.turnSignal).to(equal(@YES));
+ expect(testRequest.wiperStatus).to(equal(@YES));
+ });
});
- it(@"Should get correctly when initialized with a dictionary", ^ {
+ context(@"initWithDictionary:", ^{
NSDictionary<NSString *, id> *dict = @{SDLRPCParameterNameRequest:
- @{SDLRPCParameterNameParameters:
- @{SDLRPCParameterNameAccelerationPedalPosition:@YES,
- SDLRPCParameterNameAirbagStatus:@YES,
- SDLRPCParameterNameBeltStatus:@YES,
- SDLRPCParameterNameBodyInformation:@YES,
- SDLRPCParameterNameCloudAppVehicleID:@YES,
- SDLRPCParameterNameClusterModeStatus:@YES,
- SDLRPCParameterNameDeviceStatus:@YES,
- SDLRPCParameterNameDriverBraking:@YES,
- SDLRPCParameterNameECallInfo:@YES,
- SDLRPCParameterNameElectronicParkBrakeStatus: @YES,
- SDLRPCParameterNameEmergencyEvent:@YES,
- SDLRPCParameterNameEngineOilLife:@YES,
- SDLRPCParameterNameEngineTorque:@YES,
- SDLRPCParameterNameExternalTemperature:@YES,
- SDLRPCParameterNameFuelLevel:@YES,
- SDLRPCParameterNameFuelLevelState:@YES,
- SDLRPCParameterNameFuelRange:@YES,
- SDLRPCParameterNameGPS:@YES,
- SDLRPCParameterNameHeadLampStatus:@YES,
- SDLRPCParameterNameInstantFuelConsumption:@YES,
- SDLRPCParameterNameMyKey:@YES,
- SDLRPCParameterNameOdometer:@YES,
- SDLRPCParameterNamePRNDL:@YES,
- SDLRPCParameterNameRPM:@YES,
- SDLRPCParameterNameSpeed:@YES,
- SDLRPCParameterNameSteeringWheelAngle:@YES,
- SDLRPCParameterNameTirePressure:@YES,
- SDLRPCParameterNameTurnSignal:@YES,
- SDLRPCParameterNameWiperStatus:@YES},
- SDLRPCParameterNameOperationName:SDLRPCFunctionNameUnsubscribeVehicleData}};
+ @{SDLRPCParameterNameParameters:@{
+ SDLRPCParameterNameAccelerationPedalPosition:@YES,
+ SDLRPCParameterNameAirbagStatus:@YES,
+ SDLRPCParameterNameBeltStatus:@YES,
+ SDLRPCParameterNameBodyInformation:@YES,
+ SDLRPCParameterNameCloudAppVehicleID:@YES,
+ SDLRPCParameterNameClusterModeStatus:@YES,
+ SDLRPCParameterNameDeviceStatus:@YES,
+ SDLRPCParameterNameDriverBraking:@YES,
+ SDLRPCParameterNameECallInfo:@YES,
+ SDLRPCParameterNameElectronicParkBrakeStatus: @YES,
+ SDLRPCParameterNameEmergencyEvent:@YES,
+ SDLRPCParameterNameEngineOilLife:@YES,
+ SDLRPCParameterNameEngineTorque:@YES,
+ SDLRPCParameterNameExternalTemperature:@YES,
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
+ SDLRPCParameterNameFuelLevel:@YES,
+ SDLRPCParameterNameFuelLevelState:@YES,
+#pragma clang diagnostic pop
+ SDLRPCParameterNameFuelRange:@YES,
+ SDLRPCParameterNameGearStatus:@YES,
+ SDLRPCParameterNameGPS:@YES,
+ SDLRPCParameterNameHandsOffSteering:@YES,
+ SDLRPCParameterNameHeadLampStatus:@YES,
+ SDLRPCParameterNameInstantFuelConsumption:@YES,
+ SDLRPCParameterNameMyKey:@YES,
+ SDLRPCParameterNameOdometer:@YES,
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
+ SDLRPCParameterNamePRNDL:@YES,
+#pragma clang diagnostic pop
+ SDLRPCParameterNameRPM:@YES,
+ SDLRPCParameterNameSpeed:@YES,
+ SDLRPCParameterNameSteeringWheelAngle:@YES,
+ SDLRPCParameterNameTirePressure:@YES,
+ SDLRPCParameterNameTurnSignal:@YES,
+ SDLRPCParameterNameWindowStatus:@YES,
+ SDLRPCParameterNameWiperStatus:@YES,
+ },
+ SDLRPCParameterNameOperationName:SDLRPCFunctionNameUnsubscribeVehicleData}};
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
SDLUnsubscribeVehicleData* testRequest = [[SDLUnsubscribeVehicleData alloc] initWithDictionary:dict];
#pragma clang diagnostic pop
-
- expect(testRequest.accPedalPosition).to(equal(@YES));
- expect(testRequest.airbagStatus).to(equal(@YES));
- expect(testRequest.beltStatus).to(equal(@YES));
- expect(testRequest.bodyInformation).to(equal(@YES));
- expect(testRequest.cloudAppVehicleID).to(equal(@YES));
- expect(testRequest.clusterModeStatus).to(equal(@YES));
- expect(testRequest.deviceStatus).to(equal(@YES));
- expect(testRequest.driverBraking).to(equal(@YES));
- expect(testRequest.eCallInfo).to(equal(@YES));
- expect(testRequest.electronicParkBrakeStatus).to(equal(@YES));
- expect(testRequest.emergencyEvent).to(equal(@YES));
- expect(testRequest.engineOilLife).to(equal(@YES));
- expect(testRequest.engineTorque).to(equal(@YES));
- expect(testRequest.externalTemperature).to(equal(@YES));
- expect(testRequest.fuelLevel).to(equal(@YES));
- expect(testRequest.fuelLevel_State).to(equal(@YES));
- expect(testRequest.fuelRange).to(equal(@YES));
- expect(testRequest.gps).to(equal(@YES));
- expect(testRequest.headLampStatus).to(equal(@YES));
- expect(testRequest.instantFuelConsumption).to(equal(@YES));
- expect(testRequest.myKey).to(equal(@YES));
- expect(testRequest.odometer).to(equal(@YES));
- expect(testRequest.prndl).to(equal(@YES));
- expect(testRequest.rpm).to(equal(@YES));
- expect(testRequest.speed).to(equal(@YES));
- expect(testRequest.steeringWheelAngle).to(equal(@YES));
- expect(testRequest.tirePressure).to(equal(@YES));
- expect(testRequest.turnSignal).to(equal(@YES));
- expect(testRequest.wiperStatus).to(equal(@YES));
+
+ it(@"expect all properties to be set properly", ^{
+ expect(testRequest.accPedalPosition).to(equal(@YES));
+ expect(testRequest.airbagStatus).to(equal(@YES));
+ expect(testRequest.beltStatus).to(equal(@YES));
+ expect(testRequest.bodyInformation).to(equal(@YES));
+ expect(testRequest.cloudAppVehicleID).to(equal(@YES));
+ expect(testRequest.clusterModeStatus).to(equal(@YES));
+ expect(testRequest.deviceStatus).to(equal(@YES));
+ expect(testRequest.driverBraking).to(equal(@YES));
+ expect(testRequest.eCallInfo).to(equal(@YES));
+ expect(testRequest.electronicParkBrakeStatus).to(equal(@YES));
+ expect(testRequest.emergencyEvent).to(equal(@YES));
+ expect(testRequest.engineOilLife).to(equal(@YES));
+ expect(testRequest.engineTorque).to(equal(@YES));
+ expect(testRequest.externalTemperature).to(equal(@YES));
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
+ expect(testRequest.fuelLevel).to(equal(@YES));
+ expect(testRequest.fuelLevel_State).to(equal(@YES));
+#pragma clang diagnostic pop
+ expect(testRequest.fuelRange).to(equal(@YES));
+ expect(testRequest.gearStatus).to(equal(@YES));
+ expect(testRequest.gps).to(equal(@YES));
+ expect(testRequest.handsOffSteering).to(equal(@YES));
+ expect(testRequest.headLampStatus).to(equal(@YES));
+ expect(testRequest.instantFuelConsumption).to(equal(@YES));
+ expect(testRequest.myKey).to(equal(@YES));
+ expect(testRequest.odometer).to(equal(@YES));
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
+ expect(testRequest.prndl).to(equal(@YES));
+#pragma clang diagnostic pop
+ expect(testRequest.rpm).to(equal(@YES));
+ expect(testRequest.speed).to(equal(@YES));
+ expect(testRequest.steeringWheelAngle).to(equal(@YES));
+ expect(testRequest.tirePressure).to(equal(@YES));
+ expect(testRequest.turnSignal).to(equal(@YES));
+ expect(testRequest.windowStatus).to(equal(@YES));
+ expect(testRequest.wiperStatus).to(equal(@YES));
+ });
});
});
-describe(@"initializers", ^{
+describe(@"test initializers", ^{
context(@"init", ^{
SDLUnsubscribeVehicleData *testRequest = [[SDLUnsubscribeVehicleData alloc] init];
- expect(testRequest.accPedalPosition).to(beNil());
- expect(testRequest.airbagStatus).to(beNil());
- expect(testRequest.beltStatus).to(beNil());
- expect(testRequest.bodyInformation).to(beNil());
- expect(testRequest.cloudAppVehicleID).to(beNil());
- expect(testRequest.clusterModeStatus).to(beNil());
- expect(testRequest.deviceStatus).to(beNil());
- expect(testRequest.driverBraking).to(beNil());
- expect(testRequest.eCallInfo).to(beNil());
- expect(testRequest.electronicParkBrakeStatus).to(beNil());
- expect(testRequest.emergencyEvent).to(beNil());
- expect(testRequest.engineOilLife).to(beNil());
- expect(testRequest.engineTorque).to(beNil());
- expect(testRequest.externalTemperature).to(beNil());
- expect(testRequest.fuelLevel).to(beNil());
- expect(testRequest.fuelLevel_State).to(beNil());
- expect(testRequest.fuelRange).to(beNil());
- expect(testRequest.gps).to(beNil());
- expect(testRequest.headLampStatus).to(beNil());
- expect(testRequest.instantFuelConsumption).to(beNil());
- expect(testRequest.myKey).to(beNil());
- expect(testRequest.odometer).to(beNil());
- expect(testRequest.prndl).to(beNil());
- expect(testRequest.rpm).to(beNil());
- expect(testRequest.speed).to(beNil());
- expect(testRequest.steeringWheelAngle).to(beNil());
- expect(testRequest.tirePressure).to(beNil());
- expect(testRequest.turnSignal).to(beNil());
- expect(testRequest.wiperStatus).to(beNil());
+ it(@"expect all properties to be nil", ^{
+ expect(testRequest.accPedalPosition).to(beNil());
+ expect(testRequest.airbagStatus).to(beNil());
+ expect(testRequest.beltStatus).to(beNil());
+ expect(testRequest.bodyInformation).to(beNil());
+ expect(testRequest.cloudAppVehicleID).to(beNil());
+ expect(testRequest.clusterModeStatus).to(beNil());
+ expect(testRequest.deviceStatus).to(beNil());
+ expect(testRequest.driverBraking).to(beNil());
+ expect(testRequest.eCallInfo).to(beNil());
+ expect(testRequest.electronicParkBrakeStatus).to(beNil());
+ expect(testRequest.emergencyEvent).to(beNil());
+ expect(testRequest.engineOilLife).to(beNil());
+ expect(testRequest.engineTorque).to(beNil());
+ expect(testRequest.externalTemperature).to(beNil());
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
+ expect(testRequest.fuelLevel).to(beNil());
+ expect(testRequest.fuelLevel_State).to(beNil());
+#pragma clang diagnostic pop
+ expect(testRequest.fuelRange).to(beNil());
+ expect(testRequest.gearStatus).to(beNil());
+ expect(testRequest.gps).to(beNil());
+ expect(testRequest.handsOffSteering).to(beNil());
+ expect(testRequest.headLampStatus).to(beNil());
+ expect(testRequest.instantFuelConsumption).to(beNil());
+ expect(testRequest.myKey).to(beNil());
+ expect(testRequest.odometer).to(beNil());
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
+ expect(testRequest.prndl).to(beNil());
+#pragma clang diagnostic pop
+ expect(testRequest.rpm).to(beNil());
+ expect(testRequest.speed).to(beNil());
+ expect(testRequest.steeringWheelAngle).to(beNil());
+ expect(testRequest.tirePressure).to(beNil());
+ expect(testRequest.turnSignal).to(beNil());
+ expect(testRequest.windowStatus).to(beNil());
+ expect(testRequest.wiperStatus).to(beNil());
+ });
+ });
+
+ context(@"initWithAccelerationPedalPosition:airbagStatus:beltStatus:bodyInformation:clusterModeStatus:deviceStatus:driverBraking:eCallInfo:electronicParkBrakeStatus:emergencyEvent:engineOilLife:engineTorque:externalTemperature:fuelLevel:fuelLevelState:fuelRange:gps:headLampStatus:instantFuelConsumption:myKey:odometer:prndl:rpm:speed:steeringWheelAngle:tirePressure:turnSignal:wiperStatus:", ^{
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
+ SDLUnsubscribeVehicleData *testRequest = [[SDLUnsubscribeVehicleData alloc] initWithAccelerationPedalPosition:YES airbagStatus:YES beltStatus:YES bodyInformation:YES clusterModeStatus:YES deviceStatus:YES driverBraking:YES eCallInfo:YES electronicParkBrakeStatus:YES emergencyEvent:YES engineOilLife:YES engineTorque:YES externalTemperature:YES fuelLevel:YES fuelLevelState:YES fuelRange:YES gps:YES headLampStatus:YES instantFuelConsumption:YES myKey:YES odometer:YES prndl:YES rpm:YES speed:YES steeringWheelAngle:YES tirePressure:YES turnSignal:YES wiperStatus:YES];
+#pragma clang diagnostic pop
+
+ it(@"expect all properties to be set properly", ^{
+ expect(testRequest.accPedalPosition).to(equal(@YES));
+ expect(testRequest.airbagStatus).to(equal(@YES));
+ expect(testRequest.beltStatus).to(equal(@YES));
+ expect(testRequest.bodyInformation).to(equal(@YES));
+ expect(testRequest.cloudAppVehicleID).to(beNil());
+ expect(testRequest.clusterModeStatus).to(equal(@YES));
+ expect(testRequest.deviceStatus).to(equal(@YES));
+ expect(testRequest.driverBraking).to(equal(@YES));
+ expect(testRequest.eCallInfo).to(equal(@YES));
+ expect(testRequest.electronicParkBrakeStatus).to(equal(@YES));
+ expect(testRequest.emergencyEvent).to(equal(@YES));
+ expect(testRequest.engineOilLife).to(equal(@YES));
+ expect(testRequest.engineTorque).to(equal(@YES));
+ expect(testRequest.externalTemperature).to(equal(@YES));
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
+ expect(testRequest.fuelLevel).to(equal(@YES));
+ expect(testRequest.fuelLevel_State).to(equal(@YES));
+#pragma clang diagnostic push
+ expect(testRequest.fuelRange).to(equal(@YES));
+ expect(testRequest.gearStatus).to(beNil());
+ expect(testRequest.gps).to(equal(@YES));
+ expect(testRequest.handsOffSteering).to(beNil());
+ expect(testRequest.headLampStatus).to(equal(@YES));
+ expect(testRequest.instantFuelConsumption).to(equal(@YES));
+ expect(testRequest.myKey).to(equal(@YES));
+ expect(testRequest.odometer).to(equal(@YES));
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
+ expect(testRequest.prndl).to(equal(@YES));
+#pragma clang diagnostic pop
+ expect(testRequest.rpm).to(equal(@YES));
+ expect(testRequest.speed).to(equal(@YES));
+ expect(testRequest.steeringWheelAngle).to(equal(@YES));
+ expect(testRequest.tirePressure).to(equal(@YES));
+ expect(testRequest.turnSignal).to(equal(@YES));
+ expect(testRequest.windowStatus).to(beNil());
+ expect(testRequest.wiperStatus).to(equal(@YES));
+ });
});
- context(@"initWithAccelerationPedalPosition:airbagStatus:beltStatus:bodyInformation:cloudAppVehicleID:clusterModeStatus:deviceStatus:driverBraking:eCallInfo:electronicParkBrakeStatus:emergencyEvent:engineOilLife:engineTorque:externalTemperature:fuelLevel:fuelLevelState:gps:headLampStatus:instantFuelConsumption:myKey:odometer:prndl:rpm:speed:steeringWheelAngle:tirePressure:turnSignal:wiperStatus:", ^{
+
+context(@"initWithAccelerationPedalPosition:airbagStatus:beltStatus:bodyInformation:cloudAppVehicleID:clusterModeStatus:deviceStatus:driverBraking:eCallInfo:electronicParkBrakeStatus:emergencyEvent:engineOilLife:engineTorque:externalTemperature:fuelLevel:fuelLevelState:fuelRange:gps:headLampStatus:instantFuelConsumption:myKey:odometer:prndl:rpm:speed:steeringWheelAngle:tirePressure:turnSignal:wiperStatus:", ^{
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
SDLUnsubscribeVehicleData *testRequest = [[SDLUnsubscribeVehicleData alloc] initWithAccelerationPedalPosition:YES airbagStatus:YES beltStatus:YES bodyInformation:YES cloudAppVehicleID:YES clusterModeStatus:YES deviceStatus:YES driverBraking:YES eCallInfo:YES electronicParkBrakeStatus:YES emergencyEvent:YES engineOilLife:YES engineTorque:YES externalTemperature:YES fuelLevel:YES fuelLevelState:YES fuelRange:YES gps:YES headLampStatus:YES instantFuelConsumption:YES myKey:YES odometer:YES prndl:YES rpm:YES speed:YES steeringWheelAngle:YES tirePressure:YES turnSignal:YES wiperStatus:YES];
+#pragma clang diagnostic pop
- expect(testRequest.accPedalPosition).to(equal(@YES));
- expect(testRequest.airbagStatus).to(equal(@YES));
- expect(testRequest.beltStatus).to(equal(@YES));
- expect(testRequest.bodyInformation).to(equal(@YES));
- expect(testRequest.cloudAppVehicleID).to(equal(@YES));
- expect(testRequest.clusterModeStatus).to(equal(@YES));
- expect(testRequest.deviceStatus).to(equal(@YES));
- expect(testRequest.driverBraking).to(equal(@YES));
- expect(testRequest.eCallInfo).to(equal(@YES));
- expect(testRequest.electronicParkBrakeStatus).to(equal(@YES));
- expect(testRequest.emergencyEvent).to(equal(@YES));
- expect(testRequest.engineOilLife).to(equal(@YES));
- expect(testRequest.engineTorque).to(equal(@YES));
- expect(testRequest.externalTemperature).to(equal(@YES));
- expect(testRequest.fuelLevel).to(equal(@YES));
- expect(testRequest.fuelLevel_State).to(equal(@YES));
- expect(testRequest.fuelRange).to(equal(@YES));
- expect(testRequest.gps).to(equal(@YES));
- expect(testRequest.headLampStatus).to(equal(@YES));
- expect(testRequest.instantFuelConsumption).to(equal(@YES));
- expect(testRequest.myKey).to(equal(@YES));
- expect(testRequest.odometer).to(equal(@YES));
- expect(testRequest.prndl).to(equal(@YES));
- expect(testRequest.rpm).to(equal(@YES));
- expect(testRequest.speed).to(equal(@YES));
- expect(testRequest.steeringWheelAngle).to(equal(@YES));
- expect(testRequest.tirePressure).to(equal(@YES));
- expect(testRequest.turnSignal).to(equal(@YES));
- expect(testRequest.wiperStatus).to(equal(@YES));
+ it(@"expect all properties to be set properly", ^{
+ expect(testRequest.accPedalPosition).to(equal(@YES));
+ expect(testRequest.airbagStatus).to(equal(@YES));
+ expect(testRequest.beltStatus).to(equal(@YES));
+ expect(testRequest.bodyInformation).to(equal(@YES));
+ expect(testRequest.cloudAppVehicleID).to(equal(@YES));
+ expect(testRequest.clusterModeStatus).to(equal(@YES));
+ expect(testRequest.deviceStatus).to(equal(@YES));
+ expect(testRequest.driverBraking).to(equal(@YES));
+ expect(testRequest.eCallInfo).to(equal(@YES));
+ expect(testRequest.electronicParkBrakeStatus).to(equal(@YES));
+ expect(testRequest.emergencyEvent).to(equal(@YES));
+ expect(testRequest.engineOilLife).to(equal(@YES));
+ expect(testRequest.engineTorque).to(equal(@YES));
+ expect(testRequest.externalTemperature).to(equal(@YES));
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
+ expect(testRequest.fuelLevel).to(equal(@YES));
+ expect(testRequest.fuelLevel_State).to(equal(@YES));
+#pragma clang diagnostic push
+ expect(testRequest.fuelRange).to(equal(@YES));
+ expect(testRequest.gearStatus).to(beNil());
+ expect(testRequest.gps).to(equal(@YES));
+ expect(testRequest.handsOffSteering).to(beNil());
+ expect(testRequest.headLampStatus).to(equal(@YES));
+ expect(testRequest.instantFuelConsumption).to(equal(@YES));
+ expect(testRequest.myKey).to(equal(@YES));
+ expect(testRequest.odometer).to(equal(@YES));
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
+ expect(testRequest.prndl).to(equal(@YES));
+#pragma clang diagnostic pop
+ expect(testRequest.rpm).to(equal(@YES));
+ expect(testRequest.speed).to(equal(@YES));
+ expect(testRequest.steeringWheelAngle).to(equal(@YES));
+ expect(testRequest.tirePressure).to(equal(@YES));
+ expect(testRequest.turnSignal).to(equal(@YES));
+ expect(testRequest.wiperStatus).to(equal(@YES));
+ });
});
- context(@"initWithAccelerationPedalPosition:airbagStatus:beltStatus:bodyInformation:clusterModeStatus:deviceStatus:driverBraking:eCallInfo:electronicParkBrakeStatus:emergencyEvent:engineOilLife:engineTorque:externalTemperature:fuelLevel:fuelLevelState:gps:headLampStatus:instantFuelConsumption:myKey:odometer:prndl:rpm:speed:steeringWheelAngle:tirePressure:turnSignal:wiperStatus:", ^{
- #pragma clang diagnostic push
- #pragma clang diagnostic ignored "-Wdeprecated-declarations"
- SDLUnsubscribeVehicleData *testRequest = [[SDLUnsubscribeVehicleData alloc] initWithAccelerationPedalPosition:YES airbagStatus:YES beltStatus:YES bodyInformation:YES clusterModeStatus:YES deviceStatus:YES driverBraking:YES eCallInfo:YES electronicParkBrakeStatus:YES emergencyEvent:YES engineOilLife:YES engineTorque:YES externalTemperature:YES fuelLevel:YES fuelLevelState:YES fuelRange:YES gps:YES headLampStatus:YES instantFuelConsumption:YES myKey:YES odometer:YES prndl:YES rpm:YES speed:YES steeringWheelAngle:YES tirePressure:YES turnSignal:YES wiperStatus:YES];
- expect(testRequest.accPedalPosition).to(equal(@YES));
- expect(testRequest.airbagStatus).to(equal(@YES));
- expect(testRequest.beltStatus).to(equal(@YES));
- expect(testRequest.bodyInformation).to(equal(@YES));
- expect(testRequest.cloudAppVehicleID).to(equal(@NO));
- expect(testRequest.clusterModeStatus).to(equal(@YES));
- expect(testRequest.deviceStatus).to(equal(@YES));
- expect(testRequest.driverBraking).to(equal(@YES));
- expect(testRequest.eCallInfo).to(equal(@YES));
- expect(testRequest.electronicParkBrakeStatus).to(equal(@YES));
- expect(testRequest.emergencyEvent).to(equal(@YES));
- expect(testRequest.engineOilLife).to(equal(@YES));
- expect(testRequest.engineTorque).to(equal(@YES));
- expect(testRequest.externalTemperature).to(equal(@YES));
- expect(testRequest.fuelLevel).to(equal(@YES));
- expect(testRequest.fuelLevel_State).to(equal(@YES));
- expect(testRequest.fuelRange).to(equal(@YES));
- expect(testRequest.gps).to(equal(@YES));
- expect(testRequest.headLampStatus).to(equal(@YES));
- expect(testRequest.instantFuelConsumption).to(equal(@YES));
- expect(testRequest.myKey).to(equal(@YES));
- expect(testRequest.odometer).to(equal(@YES));
- expect(testRequest.prndl).to(equal(@YES));
- expect(testRequest.rpm).to(equal(@YES));
- expect(testRequest.speed).to(equal(@YES));
- expect(testRequest.steeringWheelAngle).to(equal(@YES));
- expect(testRequest.tirePressure).to(equal(@YES));
- expect(testRequest.turnSignal).to(equal(@YES));
- expect(testRequest.wiperStatus).to(equal(@YES));
- #pragma clang diagnostic pop
+ context (@"initWithAccelerationPedalPosition:airbagStatus:beltStatus:bodyInformation:clusterModeStatus:deviceStatus:driverBraking:eCallInfo:emergencyEvent:engineTorque:externalTemperature:fuelLevel:fuelLevelState:gps:headLampStatus:instantFuelConsumption:myKey:odometer:prndl:rpm:speed:steeringWheelAngle:tirePressure:wiperStatus:", ^{
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
+ SDLUnsubscribeVehicleData *testRequest = [[SDLUnsubscribeVehicleData alloc] initWithAccelerationPedalPosition:YES airbagStatus:YES beltStatus:YES bodyInformation:YES clusterModeStatus:YES deviceStatus:YES driverBraking:YES eCallInfo:YES emergencyEvent:YES engineTorque:YES externalTemperature:YES fuelLevel:YES fuelLevelState:YES gps:YES headLampStatus:YES instantFuelConsumption:YES myKey:YES odometer:YES prndl:YES rpm:YES speed:YES steeringWheelAngle:YES tirePressure:YES wiperStatus:YES];
+#pragma clang diagnostic pop
+
+ it(@"expect all properties to be set properly", ^{
+ expect(testRequest.accPedalPosition).to(equal(@YES));
+ expect(testRequest.airbagStatus).to(equal(@YES));
+ expect(testRequest.beltStatus).to(equal(@YES));
+ expect(testRequest.bodyInformation).to(equal(@YES));
+ expect(testRequest.cloudAppVehicleID).to(beNil());
+ expect(testRequest.clusterModeStatus).to(equal(@YES));
+ expect(testRequest.deviceStatus).to(equal(@YES));
+ expect(testRequest.driverBraking).to(equal(@YES));
+ expect(testRequest.eCallInfo).to(equal(@YES));
+ expect(testRequest.electronicParkBrakeStatus).to(beNil());
+ expect(testRequest.emergencyEvent).to(equal(@YES));
+ expect(testRequest.engineOilLife).to(beNil());
+ expect(testRequest.engineTorque).to(equal(@YES));
+ expect(testRequest.externalTemperature).to(equal(@YES));
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
+ expect(testRequest.fuelLevel).to(equal(@YES));
+ expect(testRequest.fuelLevel_State).to(equal(@YES));
+#pragma clang diagnostic push
+ expect(testRequest.fuelRange).to(beNil());
+ expect(testRequest.gearStatus).to(beNil());
+ expect(testRequest.gps).to(equal(@YES));
+ expect(testRequest.handsOffSteering).to(beNil());
+ expect(testRequest.headLampStatus).to(equal(@YES));
+ expect(testRequest.instantFuelConsumption).to(equal(@YES));
+ expect(testRequest.myKey).to(equal(@YES));
+ expect(testRequest.odometer).to(equal(@YES));
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
+ expect(testRequest.prndl).to(equal(@YES));
+#pragma clang diagnostic pop
+ expect(testRequest.rpm).to(equal(@YES));
+ expect(testRequest.speed).to(equal(@YES));
+ expect(testRequest.steeringWheelAngle).to(equal(@YES));
+ expect(testRequest.tirePressure).to(equal(@YES));
+ expect(testRequest.turnSignal).to(beNil());
+ expect(testRequest.windowStatus).to(beNil());
+ expect(testRequest.wiperStatus).to(equal(@YES));
+ });
});
- context(@"initWithAccelerationPedalPosition:airbagStatus:beltStatus:bodyInformation:clusterModeStatus:deviceStatus:driverBraking:eCallInfo:emergencyEvent:engineTorque:externalTemperature:fuelLevel:fuelLevelState:gps:headLampStatus:instantFuelConsumption:myKey:odometer:prndl:rpm:speed:steeringWheelAngle:tirePressure:wiperStatus:", ^{
- #pragma clang diagnostic push
- #pragma clang diagnostic ignored "-Wdeprecated-declarations"
- SDLUnsubscribeVehicleData *testRequest = [[SDLUnsubscribeVehicleData alloc] initWithAccelerationPedalPosition:YES airbagStatus:YES beltStatus:YES bodyInformation:YES clusterModeStatus:YES deviceStatus:YES driverBraking:YES eCallInfo:YES emergencyEvent:YES engineTorque:YES externalTemperature:YES fuelLevel:YES fuelLevelState:YES gps:YES headLampStatus:NO instantFuelConsumption:YES myKey:YES odometer:YES prndl:YES rpm:YES speed:YES steeringWheelAngle:YES tirePressure:YES wiperStatus:YES];
+ context (@"initWithGps:speed:rpm:instantFuelConsumption:fuelRange:externalTemperature:turnSignal:gearStatus:tirePressure:odometer:beltStatus:bodyInformation:deviceStatus:driverBraking:wiperStatus:headLampStatus:engineTorque:accPedalPosition:steeringWheelAngle:engineOilLife:electronicParkBrakeStatus:cloudAppVehicleID:eCallInfo:airbagStatus:emergencyEvent:clusterModeStatus:myKey:handsOffSteering:windowStatus:", ^{
+ SDLUnsubscribeVehicleData *testRequest = [[SDLUnsubscribeVehicleData alloc] initWithGps:@YES speed:@YES rpm:@YES instantFuelConsumption:@YES fuelRange:@YES externalTemperature:@YES turnSignal:@YES gearStatus:@YES tirePressure:@YES odometer:@YES beltStatus:@YES bodyInformation:@YES deviceStatus:@YES driverBraking:@YES wiperStatus:@YES headLampStatus:@YES engineTorque:@YES accPedalPosition:@YES steeringWheelAngle:@YES engineOilLife:@YES electronicParkBrakeStatus:@YES cloudAppVehicleID:@YES eCallInfo:@YES airbagStatus:@YES emergencyEvent:@YES clusterModeStatus:@YES myKey:@YES handsOffSteering:@YES windowStatus:@YES];
- expect(testRequest.accPedalPosition).to(equal(@YES));
- expect(testRequest.airbagStatus).to(equal(@YES));
- expect(testRequest.beltStatus).to(equal(@YES));
- expect(testRequest.bodyInformation).to(equal(@YES));
- expect(testRequest.clusterModeStatus).to(equal(@YES));
- expect(testRequest.deviceStatus).to(equal(@YES));
- expect(testRequest.driverBraking).to(equal(@YES));
- expect(testRequest.eCallInfo).to(equal(@YES));
- expect(testRequest.electronicParkBrakeStatus).to(equal(@NO));
- expect(testRequest.emergencyEvent).to(equal(@YES));
- expect(testRequest.engineOilLife).to(equal(@NO));
- expect(testRequest.engineTorque).to(equal(@YES));
- expect(testRequest.externalTemperature).to(equal(@YES));
- expect(testRequest.fuelLevel).to(equal(@YES));
- expect(testRequest.fuelLevel_State).to(equal(@YES));
- expect(testRequest.fuelRange).to(equal(@NO));
- expect(testRequest.gps).to(equal(@YES));
- expect(testRequest.headLampStatus).to(equal(@NO));
- expect(testRequest.instantFuelConsumption).to(equal(@YES));
- expect(testRequest.myKey).to(equal(@YES));
- expect(testRequest.odometer).to(equal(@YES));
- expect(testRequest.prndl).to(equal(@YES));
- expect(testRequest.rpm).to(equal(@YES));
- expect(testRequest.speed).to(equal(@YES));
- expect(testRequest.steeringWheelAngle).to(equal(@YES));
- expect(testRequest.tirePressure).to(equal(@YES));
- expect(testRequest.turnSignal).to(equal(@NO));
- expect(testRequest.wiperStatus).to(equal(@YES));
- #pragma clang diagnostic pop
+ it(@"expect all properties to be set properly", ^{
+ expect(testRequest.accPedalPosition).to(equal(@YES));
+ expect(testRequest.airbagStatus).to(equal(@YES));
+ expect(testRequest.beltStatus).to(equal(@YES));
+ expect(testRequest.bodyInformation).to(equal(@YES));
+ expect(testRequest.cloudAppVehicleID).to(equal(@YES));
+ expect(testRequest.clusterModeStatus).to(equal(@YES));
+ expect(testRequest.deviceStatus).to(equal(@YES));
+ expect(testRequest.driverBraking).to(equal(@YES));
+ expect(testRequest.eCallInfo).to(equal(@YES));
+ expect(testRequest.electronicParkBrakeStatus).to(equal(@YES));
+ expect(testRequest.emergencyEvent).to(equal(@YES));
+ expect(testRequest.engineOilLife).to(equal(@YES));
+ expect(testRequest.engineTorque).to(equal(@YES));
+ expect(testRequest.externalTemperature).to(equal(@YES));
+ #pragma clang diagnostic push
+ #pragma clang diagnostic ignored "-Wdeprecated-declarations"
+ expect(testRequest.fuelLevel).to(beNil());
+ expect(testRequest.fuelLevel_State).to(beNil());
+ #pragma clang diagnostic push
+ expect(testRequest.fuelRange).to(equal(@YES));
+ expect(testRequest.gearStatus).to(equal(@YES));
+ expect(testRequest.gps).to(equal(@YES));
+ expect(testRequest.handsOffSteering).to(equal(@YES));
+ expect(testRequest.headLampStatus).to(equal(@YES));
+ expect(testRequest.instantFuelConsumption).to(equal(@YES));
+ expect(testRequest.myKey).to(equal(@YES));
+ expect(testRequest.odometer).to(equal(@YES));
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
+ expect(testRequest.prndl).to(beNil());
+#pragma clang diagnostic pop
+ expect(testRequest.rpm).to(equal(@YES));
+ expect(testRequest.speed).to(equal(@YES));
+ expect(testRequest.steeringWheelAngle).to(equal(@YES));
+ expect(testRequest.tirePressure).to(equal(@YES));
+ expect(testRequest.turnSignal).to(equal(@YES));
+ expect(testRequest.windowStatus).to(equal(@YES));
+ expect(testRequest.wiperStatus).to(equal(@YES));
+ });
});
- context(@"Should set and get Generic Network Signal Data", ^{
+ context(@"should set OEM Custom Vehicle Data", ^{
SDLUnsubscribeVehicleData *testRequest = [[SDLUnsubscribeVehicleData alloc] init];
-
[testRequest setOEMCustomVehicleData:@"customVehicleData" withVehicleDataState:NO];
[testRequest setOEMCustomVehicleData:@"customVehicleData1" withVehicleDataState:YES];
- expect([testRequest getOEMCustomVehicleData:@"customVehicleData"]).to(beFalse());
- expect([testRequest getOEMCustomVehicleData:@"customVehicleData1"]).to(beTrue());
-
+ it(@"expect OEM Custom Vehicle Data to be set properly", ^{
+ expect([testRequest getOEMCustomVehicleData:@"customVehicleData"]).to(equal(@NO));
+ expect([testRequest getOEMCustomVehicleData:@"customVehicleData1"]).to(equal(@YES));
+ });
});
});
diff --git a/SmartDeviceLinkTests/RPCSpecs/ResponseSpecs/SDLGetVehicleDataResponseSpec.m b/SmartDeviceLinkTests/RPCSpecs/ResponseSpecs/SDLGetVehicleDataResponseSpec.m
index 72df4207b..cdf61e1c9 100644
--- a/SmartDeviceLinkTests/RPCSpecs/ResponseSpecs/SDLGetVehicleDataResponseSpec.m
+++ b/SmartDeviceLinkTests/RPCSpecs/ResponseSpecs/SDLGetVehicleDataResponseSpec.m
@@ -14,219 +14,317 @@
QuickSpecBegin(SDLGetVehicleDataResponseSpec)
+// set up test constants
+SDLGPSData* gps = [[SDLGPSData alloc] init];
+SDLTireStatus* tirePressure = [[SDLTireStatus alloc] init];
+SDLBeltStatus* beltStatus = [[SDLBeltStatus alloc] init];
+SDLBodyInformation* bodyInformation = [[SDLBodyInformation alloc] init];
+SDLDeviceStatus* deviceStatus = [[SDLDeviceStatus alloc] init];
+SDLHeadLampStatus* headLampStatus = [[SDLHeadLampStatus alloc] init];
+SDLECallInfo* eCallInfo = [[SDLECallInfo alloc] init];
+SDLAirbagStatus* airbagStatus = [[SDLAirbagStatus alloc] init];
+SDLEmergencyEvent* emergencyEvent = [[SDLEmergencyEvent alloc] init];
+SDLClusterModeStatus* clusterModeStatus = [[SDLClusterModeStatus alloc] init];
+SDLMyKey* myKey = [[SDLMyKey alloc] init];
+SDLFuelRange* fuelRangeItem = [[SDLFuelRange alloc] init];
+NSArray<SDLFuelRange *>* fuelRangeArray = @[fuelRangeItem, fuelRangeItem];
+NSString *const vin = @"6574839201a";
+NSString *const cloudAppVehicleID = @"cloudAppVehicleID";
+SDLGearStatus* gearStatus = [[SDLGearStatus alloc] init];
+const float accPedalPosition = 99.01;
+SDLVehicleDataEventStatus driverBraking = SDLVehicleDataEventStatusNoEvent;
+const float engineOilLife = 23.34;
+const float engineTorque = 34.45;
+const float externalTemperature = 45.56;
+const float fuelLevel = 56.67;
+SDLComponentVolumeStatus fuelLevel_State = SDLComponentVolumeStatusFault;
+const float instantFuelConsumption = 67.78;
+const NSUInteger odometer = 100500;
+SDLPRNDL prndl = SDLPRNDLPark;
+const NSInteger rpm = 3501;
+const float speed = 120.01;
+const float steeringWheelAngle = -180.5;
+SDLTurnSignal turnSignal = SDLTurnSignalBoth;
+SDLWiperStatus wiperStatus = SDLWiperStatusAutomaticHigh;
+SDLElectronicParkBrakeStatus electronicParkBrakeStatus = SDLElectronicParkBrakeStatusTransition;
+const BOOL handsOffSteering = YES;
+NSArray<SDLWindowStatus *> *windowStatus = @[[[SDLWindowStatus alloc] init], [[SDLWindowStatus alloc] init]];
-describe(@"Getter/Setter Tests", ^ {
- __block SDLGPSData* gps = nil;
- __block SDLTireStatus* tires = nil;
- __block SDLBeltStatus* belt = nil;
- __block SDLBodyInformation* body = nil;
- __block SDLDeviceStatus* device = nil;
- __block SDLHeadLampStatus* headLamp = nil;
- __block SDLECallInfo* eCall = nil;
- __block SDLAirbagStatus* airbag = nil;
- __block SDLEmergencyEvent* event = nil;
- __block SDLClusterModeStatus* clusterMode = nil;
- __block SDLMyKey* myKey = nil;
- __block SDLFuelRange* fuelRange = nil;
- __block NSString* vin = nil;
- __block NSString* cloudAppVehicleID = nil;
-
- beforeEach(^{
- gps = [[SDLGPSData alloc] init];
- tires = [[SDLTireStatus alloc] init];
- belt = [[SDLBeltStatus alloc] init];
- body = [[SDLBodyInformation alloc] init];
- device = [[SDLDeviceStatus alloc] init];
- headLamp = [[SDLHeadLampStatus alloc] init];
- eCall = [[SDLECallInfo alloc] init];
- airbag = [[SDLAirbagStatus alloc] init];
- event = [[SDLEmergencyEvent alloc] init];
- clusterMode = [[SDLClusterModeStatus alloc] init];
- myKey = [[SDLMyKey alloc] init];
- fuelRange = [[SDLFuelRange alloc] init];
- vin = @"6574839201a";
- cloudAppVehicleID = @"cloudAppVehicleID";
- });
-
- it(@"Should set and get correctly", ^ {
+describe(@"getter/setter tests", ^{
+ context(@"init and assign", ^{
SDLGetVehicleDataResponse* testResponse = [[SDLGetVehicleDataResponse alloc] init];
-
- testResponse.accPedalPosition = @0;
- testResponse.airbagStatus = airbag;
- testResponse.beltStatus = belt;
- testResponse.bodyInformation = body;
+ testResponse.accPedalPosition = @(accPedalPosition);
+ testResponse.airbagStatus = airbagStatus;
+ testResponse.beltStatus = beltStatus;
+ testResponse.bodyInformation = bodyInformation;
testResponse.cloudAppVehicleID = cloudAppVehicleID;
- testResponse.clusterModeStatus = clusterMode;
- testResponse.deviceStatus = device;
- testResponse.driverBraking = SDLVehicleDataEventStatusNoEvent;
- testResponse.eCallInfo = eCall;
- testResponse.electronicParkBrakeStatus = SDLElectronicParkBrakeStatusDriveActive;
- testResponse.emergencyEvent = event;
- testResponse.engineOilLife = @56.3;
- testResponse.engineTorque = @630.4;
- testResponse.externalTemperature = @0;
- testResponse.fuelLevel = @99.9999;
- testResponse.fuelLevel_State = SDLComponentVolumeStatusFault;
- testResponse.fuelRange = @[fuelRange, fuelRange];
+ testResponse.clusterModeStatus = clusterModeStatus;
+ testResponse.deviceStatus = deviceStatus;
+ testResponse.driverBraking = driverBraking;
+ testResponse.eCallInfo = eCallInfo;
+ testResponse.electronicParkBrakeStatus = electronicParkBrakeStatus;
+ testResponse.emergencyEvent = emergencyEvent;
+ testResponse.engineOilLife = @(engineOilLife);
+ testResponse.engineTorque = @(engineTorque);
+ testResponse.externalTemperature = @(externalTemperature);
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
+ testResponse.fuelLevel = @(fuelLevel);
+ testResponse.fuelLevel_State = fuelLevel_State;
+#pragma clang diagnostic pop
+ testResponse.fuelRange = fuelRangeArray;
+ testResponse.gearStatus = gearStatus;
testResponse.gps = gps;
- testResponse.headLampStatus = headLamp;
- testResponse.instantFuelConsumption = @40.7;
+ testResponse.handsOffSteering = @(handsOffSteering);
+ testResponse.headLampStatus = headLampStatus;
+ testResponse.instantFuelConsumption = @(instantFuelConsumption);
testResponse.myKey = myKey;
- testResponse.odometer = @70000;
- testResponse.prndl = SDLPRNDLPark;
- testResponse.rpm = @3;
- testResponse.speed = @100;
- testResponse.steeringWheelAngle = @-1500;
- testResponse.tirePressure = tires;
- testResponse.turnSignal = SDLTurnSignalBoth;
+ testResponse.odometer = @(odometer);
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
+ testResponse.prndl = prndl;
+#pragma clang diagnostic pop
+ testResponse.rpm = @(rpm);
+ testResponse.speed = @(speed);
+ testResponse.steeringWheelAngle = @(steeringWheelAngle);
+ testResponse.tirePressure = tirePressure;
+ testResponse.turnSignal = turnSignal;
testResponse.vin = vin;
- testResponse.wiperStatus = SDLWiperStatusAutomaticHigh;
+ testResponse.windowStatus = windowStatus;
+ testResponse.wiperStatus = wiperStatus;
- expect(testResponse.accPedalPosition).to(equal(@0));
- expect(testResponse.airbagStatus).to(equal(airbag));
- expect(testResponse.beltStatus).to(equal(belt));
- expect(testResponse.bodyInformation).to(equal(body));
- expect(testResponse.cloudAppVehicleID).to(equal(cloudAppVehicleID));
- expect(testResponse.clusterModeStatus).to(equal(clusterMode));
- expect(testResponse.deviceStatus).to(equal(device));
- expect(testResponse.driverBraking).to(equal(SDLVehicleDataEventStatusNoEvent));
- expect(testResponse.eCallInfo).to(equal(eCall));
- expect(testResponse.electronicParkBrakeStatus).to(equal(SDLElectronicParkBrakeStatusDriveActive));
- expect(testResponse.emergencyEvent).to(equal(event));
- expect(testResponse.engineOilLife).to(equal(@56.3));
- expect(testResponse.engineTorque).to(equal(@630.4));
- expect(testResponse.externalTemperature).to(equal(@0));
- expect(testResponse.fuelLevel).to(equal(@99.9999));
- expect(testResponse.fuelLevel_State).to(equal(SDLComponentVolumeStatusFault));
- expect(testResponse.fuelRange).to(equal(@[fuelRange, fuelRange]));
- expect(testResponse.gps).to(equal(gps));
- expect(testResponse.headLampStatus).to(equal(headLamp));
- expect(testResponse.instantFuelConsumption).to(equal(@40.7));
- expect(testResponse.myKey).to(equal(myKey));
- expect(testResponse.odometer).to(equal(@70000));
- expect(testResponse.prndl).to(equal(SDLPRNDLPark));
- expect(testResponse.rpm).to(equal(@3));
- expect(testResponse.speed).to(equal(@100));
- expect(testResponse.steeringWheelAngle).to(equal(@-1500));
- expect(testResponse.tirePressure).to(equal(tires));
- expect(testResponse.turnSignal).to(equal(SDLTurnSignalBoth));
- expect(testResponse.vin).to(equal(vin));
- expect(testResponse.wiperStatus).to(equal(SDLWiperStatusAutomaticHigh));
+ it(@"expect all properties to be set properly", ^{
+ expect(testResponse.accPedalPosition).to(equal(@(accPedalPosition)));
+ expect(testResponse.airbagStatus).to(equal(airbagStatus));
+ expect(testResponse.beltStatus).to(equal(beltStatus));
+ expect(testResponse.bodyInformation).to(equal(bodyInformation));
+ expect(testResponse.cloudAppVehicleID).to(equal(cloudAppVehicleID));
+ expect(testResponse.clusterModeStatus).to(equal(clusterModeStatus));
+ expect(testResponse.deviceStatus).to(equal(deviceStatus));
+ expect(testResponse.driverBraking).to(equal(driverBraking));
+ expect(testResponse.eCallInfo).to(equal(eCallInfo));
+ expect(testResponse.electronicParkBrakeStatus).to(equal(electronicParkBrakeStatus));
+ expect(testResponse.emergencyEvent).to(equal(emergencyEvent));
+ expect(testResponse.engineOilLife).to(equal(@(engineOilLife)));
+ expect(testResponse.engineTorque).to(equal(@(engineTorque)));
+ expect(testResponse.externalTemperature).to(equal(@(externalTemperature)));
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
+ expect(testResponse.fuelLevel).to(equal(@(fuelLevel)));
+ expect(testResponse.fuelLevel_State).to(equal(fuelLevel_State));
+#pragma clang diagnostic pop
+ expect(testResponse.fuelRange).to(equal(fuelRangeArray));
+ expect(testResponse.gearStatus).to(equal(gearStatus));
+ expect(testResponse.gps).to(equal(gps));
+ expect(testResponse.handsOffSteering).to(equal(handsOffSteering));
+ expect(testResponse.headLampStatus).to(equal(headLampStatus));
+ expect(testResponse.instantFuelConsumption).to(equal(@(instantFuelConsumption)));
+ expect(testResponse.myKey).to(equal(myKey));
+ expect(testResponse.odometer).to(equal(@(odometer)));
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
+ expect(testResponse.prndl).to(equal(prndl));
+#pragma clang diagnostic pop
+ expect(testResponse.rpm).to(equal(@(rpm)));
+ expect(testResponse.speed).to(equal(@(speed)));
+ expect(testResponse.steeringWheelAngle).to(equal(@(steeringWheelAngle)));
+ expect(testResponse.tirePressure).to(equal(tirePressure));
+ expect(testResponse.turnSignal).to(equal(turnSignal));
+ expect(testResponse.vin).to(equal(vin));
+ expect(testResponse.windowStatus).to(equal(windowStatus));
+ expect(testResponse.wiperStatus).to(equal(wiperStatus));
+ });
});
-
- it(@"Should get correctly when initialized", ^ {
- NSMutableDictionary* dict = [@{SDLRPCParameterNameNotification:
- @{SDLRPCParameterNameParameters:
- @{
- SDLRPCParameterNameAccelerationPedalPosition:@0,
- SDLRPCParameterNameAirbagStatus:airbag,
- SDLRPCParameterNameBeltStatus:belt,
- SDLRPCParameterNameBodyInformation:body,
- SDLRPCParameterNameCloudAppVehicleID:cloudAppVehicleID,
- SDLRPCParameterNameClusterModeStatus:clusterMode,
- SDLRPCParameterNameDeviceStatus:device,
- SDLRPCParameterNameDriverBraking:SDLVehicleDataEventStatusNoEvent,
- SDLRPCParameterNameECallInfo:eCall,
- SDLRPCParameterNameElectronicParkBrakeStatus:SDLElectronicParkBrakeStatusDriveActive,
- SDLRPCParameterNameEmergencyEvent:event,
- SDLRPCParameterNameEngineOilLife:@23.22,
- SDLRPCParameterNameEngineTorque:@630.4,
- SDLRPCParameterNameExternalTemperature:@0,
- SDLRPCParameterNameFuelLevel:@99.9999,
- SDLRPCParameterNameFuelLevelState:SDLComponentVolumeStatusFault,
- SDLRPCParameterNameFuelRange:@[fuelRange],
- SDLRPCParameterNameGPS:gps,
- SDLRPCParameterNameHeadLampStatus:headLamp,
- SDLRPCParameterNameInstantFuelConsumption:@40.7,
- SDLRPCParameterNameMyKey:myKey,
- SDLRPCParameterNameOdometer:@70000,
- SDLRPCParameterNamePRNDL:SDLPRNDLPark,
- SDLRPCParameterNameRPM:@3,
- SDLRPCParameterNameSpeed:@100,
- SDLRPCParameterNameSteeringWheelAngle:@-1500,
- SDLRPCParameterNameTirePressure:tires,
- SDLRPCParameterNameTurnSignal:SDLTurnSignalOff,
- SDLRPCParameterNameVIN:vin,
- SDLRPCParameterNameWiperStatus:SDLWiperStatusAutomaticHigh},
- SDLRPCParameterNameOperationName:SDLRPCFunctionNameGetVehicleData}} mutableCopy];
+
+ context(@"initWithDictionary:", ^{
+ NSDictionary* dict = @{SDLRPCParameterNameNotification:
+ @{SDLRPCParameterNameParameters:@{
+ SDLRPCParameterNameAccelerationPedalPosition:@(accPedalPosition),
+ SDLRPCParameterNameAirbagStatus:airbagStatus,
+ SDLRPCParameterNameBeltStatus:beltStatus,
+ SDLRPCParameterNameBodyInformation:bodyInformation,
+ SDLRPCParameterNameCloudAppVehicleID:cloudAppVehicleID,
+ SDLRPCParameterNameClusterModeStatus:clusterModeStatus,
+ SDLRPCParameterNameDeviceStatus:deviceStatus,
+ SDLRPCParameterNameDriverBraking:driverBraking,
+ SDLRPCParameterNameECallInfo:eCallInfo,
+ SDLRPCParameterNameElectronicParkBrakeStatus:electronicParkBrakeStatus,
+ SDLRPCParameterNameEmergencyEvent:emergencyEvent,
+ SDLRPCParameterNameEngineOilLife:@(engineOilLife),
+ SDLRPCParameterNameEngineTorque:@(engineTorque),
+ SDLRPCParameterNameExternalTemperature:@(externalTemperature),
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
+ SDLRPCParameterNameFuelLevel:@(fuelLevel),
+ SDLRPCParameterNameFuelLevelState:fuelLevel_State,
+#pragma clang diagnostic pop
+ SDLRPCParameterNameFuelRange:fuelRangeArray,
+ SDLRPCParameterNameGearStatus:gearStatus,
+ SDLRPCParameterNameGPS:gps,
+ SDLRPCParameterNameHandsOffSteering:@(handsOffSteering),
+ SDLRPCParameterNameHeadLampStatus:headLampStatus,
+ SDLRPCParameterNameInstantFuelConsumption:@(instantFuelConsumption),
+ SDLRPCParameterNameMyKey:myKey,
+ SDLRPCParameterNameOdometer:@(odometer),
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
+ SDLRPCParameterNamePRNDL:prndl,
+#pragma clang diagnostic pop
+ SDLRPCParameterNameRPM:@(rpm),
+ SDLRPCParameterNameSpeed:@(speed),
+ SDLRPCParameterNameSteeringWheelAngle:@(steeringWheelAngle),
+ SDLRPCParameterNameTirePressure:tirePressure,
+ SDLRPCParameterNameTurnSignal:turnSignal,
+ SDLRPCParameterNameVIN:vin,
+ SDLRPCParameterNameWindowStatus:windowStatus,
+ SDLRPCParameterNameWiperStatus:wiperStatus,
+ },
+ SDLRPCParameterNameOperationName:SDLRPCFunctionNameGetVehicleData}};
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
SDLGetVehicleDataResponse* testResponse = [[SDLGetVehicleDataResponse alloc] initWithDictionary:dict];
#pragma clang diagnostic pop
- expect(testResponse.accPedalPosition).to(equal(@0));
- expect(testResponse.airbagStatus).to(equal(airbag));
- expect(testResponse.beltStatus).to(equal(belt));
- expect(testResponse.bodyInformation).to(equal(body));
- expect(testResponse.cloudAppVehicleID).to(equal(cloudAppVehicleID));
- expect(testResponse.clusterModeStatus).to(equal(clusterMode));
- expect(testResponse.deviceStatus).to(equal(device));
- expect(testResponse.driverBraking).to(equal(SDLVehicleDataEventStatusNoEvent));
- expect(testResponse.eCallInfo).to(equal(eCall));
- expect(testResponse.electronicParkBrakeStatus).to(equal(SDLElectronicParkBrakeStatusDriveActive));
- expect(testResponse.emergencyEvent).to(equal(event));
- expect(testResponse.engineOilLife).to(equal(@23.22));
- expect(testResponse.engineTorque).to(equal(@630.4));
- expect(testResponse.externalTemperature).to(equal(@0));
- expect(testResponse.fuelLevel).to(equal(@99.9999));
- expect(testResponse.fuelLevel_State).to(equal(SDLComponentVolumeStatusFault));
- expect(testResponse.fuelRange).to(equal(@[fuelRange]));
- expect(testResponse.gps).to(equal(gps));
- expect(testResponse.headLampStatus).to(equal(headLamp));
- expect(testResponse.instantFuelConsumption).to(equal(@40.7));
- expect(testResponse.myKey).to(equal(myKey));
- expect(testResponse.odometer).to(equal(@70000));
- expect(testResponse.prndl).to(equal(SDLPRNDLPark));
- expect(testResponse.rpm).to(equal(@3));
- expect(testResponse.speed).to(equal(@100));
- expect(testResponse.steeringWheelAngle).to(equal(@-1500));
- expect(testResponse.tirePressure).to(equal(tires));
- expect(testResponse.turnSignal).to(equal(SDLTurnSignalOff));
- expect(testResponse.vin).to(equal(vin));
- expect(testResponse.wiperStatus).to(equal(SDLWiperStatusAutomaticHigh));
+ it(@"expect all properties to be set properly", ^{
+ expect(testResponse.accPedalPosition).to(equal(@(accPedalPosition)));
+ expect(testResponse.airbagStatus).to(equal(airbagStatus));
+ expect(testResponse.beltStatus).to(equal(beltStatus));
+ expect(testResponse.bodyInformation).to(equal(bodyInformation));
+ expect(testResponse.cloudAppVehicleID).to(equal(cloudAppVehicleID));
+ expect(testResponse.clusterModeStatus).to(equal(clusterModeStatus));
+ expect(testResponse.deviceStatus).to(equal(deviceStatus));
+ expect(testResponse.driverBraking).to(equal(driverBraking));
+ expect(testResponse.eCallInfo).to(equal(eCallInfo));
+ expect(testResponse.electronicParkBrakeStatus).to(equal(electronicParkBrakeStatus));
+ expect(testResponse.emergencyEvent).to(equal(emergencyEvent));
+ expect(testResponse.engineOilLife).to(equal(@(engineOilLife)));
+ expect(testResponse.engineTorque).to(equal(@(engineTorque)));
+ expect(testResponse.externalTemperature).to(equal(@(externalTemperature)));
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
+ expect(testResponse.fuelLevel).to(equal(@(fuelLevel)));
+ expect(testResponse.fuelLevel_State).to(equal(fuelLevel_State));
+#pragma clang diagnostic pop
+ expect(testResponse.fuelRange).to(equal(fuelRangeArray));
+ expect(testResponse.gearStatus).to(equal(gearStatus));
+ expect(testResponse.gps).to(equal(gps));
+ expect(testResponse.handsOffSteering).to(equal(@(handsOffSteering)));
+ expect(testResponse.headLampStatus).to(equal(headLampStatus));
+ expect(testResponse.instantFuelConsumption).to(equal(@(instantFuelConsumption)));
+ expect(testResponse.myKey).to(equal(myKey));
+ expect(testResponse.odometer).to(equal(@(odometer)));
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
+ expect(testResponse.prndl).to(equal(prndl));
+#pragma clang diagnostic pop
+ expect(testResponse.rpm).to(equal(@(rpm)));
+ expect(testResponse.speed).to(equal(@(speed)));
+ expect(testResponse.steeringWheelAngle).to(equal(@(steeringWheelAngle)));
+ expect(testResponse.tirePressure).to(equal(tirePressure));
+ expect(testResponse.turnSignal).to(equal(turnSignal));
+ expect(testResponse.vin).to(equal(vin));
+ expect(testResponse.windowStatus).to(equal(windowStatus));
+ expect(testResponse.wiperStatus).to(equal(wiperStatus));
+ });
});
-
- it(@"Should return nil if not set", ^ {
+
+ context(@"init", ^{
SDLGetVehicleDataResponse* testResponse = [[SDLGetVehicleDataResponse alloc] init];
-
- expect(testResponse.accPedalPosition).to(beNil());
- expect(testResponse.airbagStatus).to(beNil());
- expect(testResponse.beltStatus).to(beNil());
- expect(testResponse.bodyInformation).to(beNil());
- expect(testResponse.cloudAppVehicleID).to(beNil());
- expect(testResponse.clusterModeStatus).to(beNil());
- expect(testResponse.deviceStatus).to(beNil());
- expect(testResponse.driverBraking).to(beNil());
- expect(testResponse.eCallInfo).to(beNil());
- expect(testResponse.electronicParkBrakeStatus).to(beNil());
- expect(testResponse.emergencyEvent).to(beNil());
- expect(testResponse.engineOilLife).to(beNil());
- expect(testResponse.engineTorque).to(beNil());
- expect(testResponse.externalTemperature).to(beNil());
- expect(testResponse.fuelLevel).to(beNil());
- expect(testResponse.fuelLevel_State).to(beNil());
- expect(testResponse.fuelRange).to(beNil());
- expect(testResponse.gps).to(beNil());
- expect(testResponse.headLampStatus).to(beNil());
- expect(testResponse.instantFuelConsumption).to(beNil());
- expect(testResponse.myKey).to(beNil());
- expect(testResponse.odometer).to(beNil());
- expect(testResponse.prndl).to(beNil());
- expect(testResponse.rpm).to(beNil());
- expect(testResponse.speed).to(beNil());
- expect(testResponse.steeringWheelAngle).to(beNil());
- expect(testResponse.tirePressure).to(beNil());
- expect(testResponse.turnSignal).to(beNil());
- expect(testResponse.vin).to(beNil());
- expect(testResponse.wiperStatus).to(beNil());
+ it(@"expect all properties to be nil", ^{
+ expect(testResponse.accPedalPosition).to(beNil());
+ expect(testResponse.airbagStatus).to(beNil());
+ expect(testResponse.beltStatus).to(beNil());
+ expect(testResponse.bodyInformation).to(beNil());
+ expect(testResponse.cloudAppVehicleID).to(beNil());
+ expect(testResponse.clusterModeStatus).to(beNil());
+ expect(testResponse.deviceStatus).to(beNil());
+ expect(testResponse.driverBraking).to(beNil());
+ expect(testResponse.eCallInfo).to(beNil());
+ expect(testResponse.electronicParkBrakeStatus).to(beNil());
+ expect(testResponse.emergencyEvent).to(beNil());
+ expect(testResponse.engineOilLife).to(beNil());
+ expect(testResponse.engineTorque).to(beNil());
+ expect(testResponse.externalTemperature).to(beNil());
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
+ expect(testResponse.fuelLevel).to(beNil());
+ expect(testResponse.fuelLevel_State).to(beNil());
+#pragma clang diagnostic pop
+ expect(testResponse.fuelRange).to(beNil());
+ expect(testResponse.gearStatus).to(beNil());
+ expect(testResponse.gps).to(beNil());
+ expect(testResponse.handsOffSteering).to(beNil());
+ expect(testResponse.headLampStatus).to(beNil());
+ expect(testResponse.instantFuelConsumption).to(beNil());
+ expect(testResponse.myKey).to(beNil());
+ expect(testResponse.odometer).to(beNil());
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
+ expect(testResponse.prndl).to(beNil());
+#pragma clang diagnostic push
+ expect(testResponse.rpm).to(beNil());
+ expect(testResponse.speed).to(beNil());
+ expect(testResponse.steeringWheelAngle).to(beNil());
+ expect(testResponse.tirePressure).to(beNil());
+ expect(testResponse.turnSignal).to(beNil());
+ expect(testResponse.vin).to(beNil());
+ expect(testResponse.windowStatus).to(beNil());
+ expect(testResponse.wiperStatus).to(beNil());
+ });
});
- it(@"Should set and get Generic Network Signal Data", ^{
- SDLGetVehicleDataResponse *testRequest = [[SDLGetVehicleDataResponse alloc] init];
+ context(@"initWithGps:speed:rpm:instantFuelConsumption:fuelRange:externalTemperature:turnSignal:vin:gearStatus:tirePressure:odometer:beltStatus:bodyInformation:deviceStatus:driverBraking:wiperStatus:headLampStatus:engineTorque:accPedalPosition:steeringWheelAngle:engineOilLife:electronicParkBrakeStatus:cloudAppVehicleID:eCallInfo:airbagStatus:emergencyEvent:clusterModeStatus:myKey:handsOffSteering:windowStatus:", ^{
+ SDLGetVehicleDataResponse *testResponse = [[SDLGetVehicleDataResponse alloc] initWithGps:gps speed:speed rpm:@(rpm) instantFuelConsumption:instantFuelConsumption fuelRange:fuelRangeArray externalTemperature:externalTemperature turnSignal:turnSignal vin:vin gearStatus:gearStatus tirePressure:tirePressure odometer:@(odometer) beltStatus:beltStatus bodyInformation:bodyInformation deviceStatus:deviceStatus driverBraking:driverBraking wiperStatus:wiperStatus headLampStatus:headLampStatus engineTorque:engineTorque accPedalPosition:accPedalPosition steeringWheelAngle:steeringWheelAngle engineOilLife:engineOilLife electronicParkBrakeStatus:electronicParkBrakeStatus cloudAppVehicleID:cloudAppVehicleID eCallInfo:eCallInfo airbagStatus:airbagStatus emergencyEvent:emergencyEvent clusterModeStatus:clusterModeStatus myKey:myKey handsOffSteering:@(handsOffSteering) windowStatus:windowStatus];
+ it(@"should set all properties properly", ^{
+ expect(testResponse.accPedalPosition).to(equal(@(accPedalPosition)));
+ expect(testResponse.airbagStatus).to(equal(airbagStatus));
+ expect(testResponse.beltStatus).to(equal(beltStatus));
+ expect(testResponse.bodyInformation).to(equal(bodyInformation));
+ expect(testResponse.cloudAppVehicleID).to(equal(cloudAppVehicleID));
+ expect(testResponse.clusterModeStatus).to(equal(clusterModeStatus));
+ expect(testResponse.deviceStatus).to(equal(deviceStatus));
+ expect(testResponse.driverBraking).to(equal(driverBraking));
+ expect(testResponse.eCallInfo).to(equal(eCallInfo));
+ expect(testResponse.electronicParkBrakeStatus).to(equal(electronicParkBrakeStatus));
+ expect(testResponse.emergencyEvent).to(equal(emergencyEvent));
+ expect(testResponse.engineOilLife).to(equal(@(engineOilLife)));
+ expect(testResponse.engineTorque).to(equal(@(engineTorque)));
+ expect(testResponse.externalTemperature).to(equal(@(externalTemperature)));
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
+ expect(testResponse.fuelLevel).to(beNil());
+ expect(testResponse.fuelLevel_State).to(beNil());
+#pragma clang diagnostic pop
+ expect(testResponse.fuelRange).to(equal(fuelRangeArray));
+ expect(testResponse.gearStatus).to(equal(gearStatus));
+ expect(testResponse.gps).to(equal(gps));
+ expect(testResponse.handsOffSteering).to(equal(@(handsOffSteering)));
+ expect(testResponse.headLampStatus).to(equal(headLampStatus));
+ expect(testResponse.instantFuelConsumption).to(equal(@(instantFuelConsumption)));
+ expect(testResponse.myKey).to(equal(myKey));
+ expect(testResponse.odometer).to(equal(@(odometer)));
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
+ expect(testResponse.prndl).to(beNil());
+#pragma clang diagnostic pop
+ expect(testResponse.rpm).to(equal(@(rpm)));
+ expect(testResponse.speed).to(equal(@(speed)));
+ expect(testResponse.steeringWheelAngle).to(equal(@(steeringWheelAngle)));
+ expect(testResponse.tirePressure).to(equal(tirePressure));
+ expect(testResponse.turnSignal).to(equal(turnSignal));
+ expect(testResponse.vin).to(equal(vin));
+ expect(testResponse.windowStatus).to(equal(windowStatus));
+ expect(testResponse.wiperStatus).to(equal(wiperStatus));
+ });
+ });
- [testRequest setOEMCustomVehicleData:@"customVehicleData" withVehicleDataState:@"oemVehicleData"];
-
- expect([testRequest getOEMCustomVehicleData:@"customVehicleData"]).to(equal(@"oemVehicleData"));
+ context(@"init and set OEM Custom Vehicle Data", ^{
+ SDLGetVehicleDataResponse *testResponse = [[SDLGetVehicleDataResponse alloc] init];
+ [testResponse setOEMCustomVehicleData:@"customVehicleData" withVehicleDataState:@"oemVehicleData"];
+
+ it(@"expect OEM Custom Vehicle Data to be set properly", ^{
+ expect([testResponse getOEMCustomVehicleData:@"customVehicleData"]).to(equal(@"oemVehicleData"));
+ });
});
});
diff --git a/SmartDeviceLinkTests/RPCSpecs/ResponseSpecs/SDLSubscribeVehicleDataResponseSpec.m b/SmartDeviceLinkTests/RPCSpecs/ResponseSpecs/SDLSubscribeVehicleDataResponseSpec.m
index 1b8dc5b6d..88253eb18 100644
--- a/SmartDeviceLinkTests/RPCSpecs/ResponseSpecs/SDLSubscribeVehicleDataResponseSpec.m
+++ b/SmartDeviceLinkTests/RPCSpecs/ResponseSpecs/SDLSubscribeVehicleDataResponseSpec.m
@@ -20,11 +20,9 @@ QuickSpecBegin(SDLSubscribeVehicleDataResponseSpec)
SDLVehicleDataResult* vehicleDataResult = [[SDLVehicleDataResult alloc] init];
SDLVehicleDataResult* customOEMvehicleDataResult = [[SDLVehicleDataResult alloc] initWithCustomOEMDataType:@"customOEMVehicleData" resultCode:SDLVehicleDataResultCodeSuccess];
-
-describe(@"Getter/Setter Tests", ^ {
- it(@"Should set and get correctly", ^ {
+describe(@"getter/setter tests", ^{
+ context(@"init and assign", ^{
SDLSubscribeVehicleDataResponse* testResponse = [[SDLSubscribeVehicleDataResponse alloc] init];
-
testResponse.accPedalPosition = vehicleDataResult;
testResponse.airbagStatus = vehicleDataResult;
testResponse.beltStatus = vehicleDataResult;
@@ -39,162 +37,260 @@ describe(@"Getter/Setter Tests", ^ {
testResponse.engineOilLife = vehicleDataResult;
testResponse.engineTorque = vehicleDataResult;
testResponse.externalTemperature = vehicleDataResult;
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
testResponse.fuelLevel = vehicleDataResult;
testResponse.fuelLevel_State = vehicleDataResult;
+#pragma clang diagnostic pop
testResponse.fuelRange = vehicleDataResult;
+ testResponse.gearStatus = vehicleDataResult;
testResponse.gps = vehicleDataResult;
+ testResponse.handsOffSteering = vehicleDataResult;
testResponse.headLampStatus = vehicleDataResult;
testResponse.instantFuelConsumption = vehicleDataResult;
testResponse.myKey = vehicleDataResult;
testResponse.odometer = vehicleDataResult;
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
testResponse.prndl = vehicleDataResult;
+#pragma clang diagnostic pop
testResponse.rpm = vehicleDataResult;
testResponse.speed = vehicleDataResult;
testResponse.steeringWheelAngle = vehicleDataResult;
testResponse.tirePressure = vehicleDataResult;
testResponse.turnSignal = vehicleDataResult;
+ testResponse.windowStatus = vehicleDataResult;
testResponse.wiperStatus = vehicleDataResult;
- expect(testResponse.accPedalPosition).to(equal(vehicleDataResult));
- expect(testResponse.airbagStatus).to(equal(vehicleDataResult));
- expect(testResponse.beltStatus).to(equal(vehicleDataResult));
- expect(testResponse.bodyInformation).to(equal(vehicleDataResult));
- expect(testResponse.cloudAppVehicleID).to(equal(vehicleDataResult));
- expect(testResponse.clusterModes).to(equal(vehicleDataResult));
- expect(testResponse.deviceStatus).to(equal(vehicleDataResult));
- expect(testResponse.driverBraking).to(equal(vehicleDataResult));
- expect(testResponse.eCallInfo).to(equal(vehicleDataResult));
- expect(testResponse.electronicParkBrakeStatus).to(equal(vehicleDataResult));
- expect(testResponse.emergencyEvent).to(equal(vehicleDataResult));
- expect(testResponse.engineOilLife).to(equal(vehicleDataResult));
- expect(testResponse.engineTorque).to(equal(vehicleDataResult));
- expect(testResponse.externalTemperature).to(equal(vehicleDataResult));
- expect(testResponse.fuelLevel).to(equal(vehicleDataResult));
- expect(testResponse.fuelLevel_State).to(equal(vehicleDataResult));
- expect(testResponse.fuelRange).to(equal(vehicleDataResult));
- expect(testResponse.gps).to(equal(vehicleDataResult));
- expect(testResponse.headLampStatus).to(equal(vehicleDataResult));
- expect(testResponse.instantFuelConsumption).to(equal(vehicleDataResult));
- expect(testResponse.myKey).to(equal(vehicleDataResult));
- expect(testResponse.odometer).to(equal(vehicleDataResult));
- expect(testResponse.prndl).to(equal(vehicleDataResult));
- expect(testResponse.rpm).to(equal(vehicleDataResult));
- expect(testResponse.speed).to(equal(vehicleDataResult));
- expect(testResponse.steeringWheelAngle).to(equal(vehicleDataResult));
- expect(testResponse.tirePressure).to(equal(vehicleDataResult));
- expect(testResponse.turnSignal).to(equal(vehicleDataResult));
- expect(testResponse.wiperStatus).to(equal(vehicleDataResult));
+ it(@"expect all properties to be set properly", ^{
+ expect(testResponse.accPedalPosition).to(equal(vehicleDataResult));
+ expect(testResponse.airbagStatus).to(equal(vehicleDataResult));
+ expect(testResponse.beltStatus).to(equal(vehicleDataResult));
+ expect(testResponse.bodyInformation).to(equal(vehicleDataResult));
+ expect(testResponse.cloudAppVehicleID).to(equal(vehicleDataResult));
+ expect(testResponse.clusterModes).to(equal(vehicleDataResult));
+ expect(testResponse.deviceStatus).to(equal(vehicleDataResult));
+ expect(testResponse.driverBraking).to(equal(vehicleDataResult));
+ expect(testResponse.eCallInfo).to(equal(vehicleDataResult));
+ expect(testResponse.electronicParkBrakeStatus).to(equal(vehicleDataResult));
+ expect(testResponse.emergencyEvent).to(equal(vehicleDataResult));
+ expect(testResponse.engineOilLife).to(equal(vehicleDataResult));
+ expect(testResponse.engineTorque).to(equal(vehicleDataResult));
+ expect(testResponse.externalTemperature).to(equal(vehicleDataResult));
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
+ expect(testResponse.fuelLevel).to(equal(vehicleDataResult));
+ expect(testResponse.fuelLevel_State).to(equal(vehicleDataResult));
+#pragma clang diagnostic pop
+ expect(testResponse.fuelRange).to(equal(vehicleDataResult));
+ expect(testResponse.gearStatus).to(equal(vehicleDataResult));
+ expect(testResponse.gps).to(equal(vehicleDataResult));
+ expect(testResponse.handsOffSteering).to(equal(vehicleDataResult));
+ expect(testResponse.headLampStatus).to(equal(vehicleDataResult));
+ expect(testResponse.instantFuelConsumption).to(equal(vehicleDataResult));
+ expect(testResponse.myKey).to(equal(vehicleDataResult));
+ expect(testResponse.odometer).to(equal(vehicleDataResult));
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
+ expect(testResponse.prndl).to(equal(vehicleDataResult));
+#pragma clang diagnostic pop
+ expect(testResponse.rpm).to(equal(vehicleDataResult));
+ expect(testResponse.speed).to(equal(vehicleDataResult));
+ expect(testResponse.steeringWheelAngle).to(equal(vehicleDataResult));
+ expect(testResponse.tirePressure).to(equal(vehicleDataResult));
+ expect(testResponse.turnSignal).to(equal(vehicleDataResult));
+ expect(testResponse.windowStatus).to(equal(vehicleDataResult));
+ expect(testResponse.wiperStatus).to(equal(vehicleDataResult));
+ });
});
- it(@"Should get correctly when initialized", ^ {
+ context(@"initWithDictionary:", ^{
NSDictionary<NSString *, id> *dict = @{SDLRPCParameterNameResponse:
- @{SDLRPCParameterNameParameters:
- @{SDLRPCParameterNameAccelerationPedalPosition:vehicleDataResult,
- SDLRPCParameterNameAirbagStatus:vehicleDataResult,
- SDLRPCParameterNameBeltStatus:vehicleDataResult,
- SDLRPCParameterNameBodyInformation:vehicleDataResult,
- SDLRPCParameterNameCloudAppVehicleID:vehicleDataResult,
- SDLRPCParameterNameClusterModes:vehicleDataResult,
- SDLRPCParameterNameDeviceStatus:vehicleDataResult,
- SDLRPCParameterNameDriverBraking:vehicleDataResult,
- SDLRPCParameterNameECallInfo:vehicleDataResult,
- SDLRPCParameterNameElectronicParkBrakeStatus:vehicleDataResult,
- SDLRPCParameterNameEmergencyEvent:vehicleDataResult,
- SDLRPCParameterNameEngineOilLife:vehicleDataResult,
- SDLRPCParameterNameEngineTorque:vehicleDataResult,
- SDLRPCParameterNameExternalTemperature:vehicleDataResult,
- SDLRPCParameterNameFuelLevel:vehicleDataResult,
- SDLRPCParameterNameFuelLevelState:vehicleDataResult,
- SDLRPCParameterNameFuelRange:vehicleDataResult,
- SDLRPCParameterNameGPS:vehicleDataResult,
- SDLRPCParameterNameHeadLampStatus:vehicleDataResult,
- SDLRPCParameterNameInstantFuelConsumption:vehicleDataResult,
- SDLRPCParameterNameMyKey:vehicleDataResult,
- SDLRPCParameterNameOdometer:vehicleDataResult,
- SDLRPCParameterNamePRNDL:vehicleDataResult,
- SDLRPCParameterNameRPM:vehicleDataResult,
- SDLRPCParameterNameSpeed:vehicleDataResult,
- SDLRPCParameterNameSteeringWheelAngle:vehicleDataResult,
- SDLRPCParameterNameTirePressure:vehicleDataResult,
- SDLRPCParameterNameTurnSignal:vehicleDataResult,
- SDLRPCParameterNameWiperStatus:vehicleDataResult},
- SDLRPCParameterNameOperationName:SDLRPCFunctionNameSubscribeVehicleData}};
+ @{SDLRPCParameterNameParameters:@{
+ SDLRPCParameterNameAccelerationPedalPosition:vehicleDataResult,
+ SDLRPCParameterNameAirbagStatus:vehicleDataResult,
+ SDLRPCParameterNameBeltStatus:vehicleDataResult,
+ SDLRPCParameterNameBodyInformation:vehicleDataResult,
+ SDLRPCParameterNameCloudAppVehicleID:vehicleDataResult,
+ SDLRPCParameterNameClusterModes:vehicleDataResult,
+ SDLRPCParameterNameDeviceStatus:vehicleDataResult,
+ SDLRPCParameterNameDriverBraking:vehicleDataResult,
+ SDLRPCParameterNameECallInfo:vehicleDataResult,
+ SDLRPCParameterNameElectronicParkBrakeStatus:vehicleDataResult,
+ SDLRPCParameterNameEmergencyEvent:vehicleDataResult,
+ SDLRPCParameterNameEngineOilLife:vehicleDataResult,
+ SDLRPCParameterNameEngineTorque:vehicleDataResult,
+ SDLRPCParameterNameExternalTemperature:vehicleDataResult,
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
+ SDLRPCParameterNameFuelLevel:vehicleDataResult,
+ SDLRPCParameterNameFuelLevelState:vehicleDataResult,
+#pragma clang diagnostic pop
+ SDLRPCParameterNameFuelRange:vehicleDataResult,
+ SDLRPCParameterNameGearStatus:vehicleDataResult,
+ SDLRPCParameterNameGPS:vehicleDataResult,
+ SDLRPCParameterNameHeadLampStatus:vehicleDataResult,
+ SDLRPCParameterNameInstantFuelConsumption:vehicleDataResult,
+ SDLRPCParameterNameMyKey:vehicleDataResult,
+ SDLRPCParameterNameOdometer:vehicleDataResult,
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
+ SDLRPCParameterNamePRNDL:vehicleDataResult,
+#pragma clang diagnostic pop
+ SDLRPCParameterNameRPM:vehicleDataResult,
+ SDLRPCParameterNameSpeed:vehicleDataResult,
+ SDLRPCParameterNameSteeringWheelAngle:vehicleDataResult,
+ SDLRPCParameterNameTirePressure:vehicleDataResult,
+ SDLRPCParameterNameTurnSignal:vehicleDataResult,
+ SDLRPCParameterNameWiperStatus:vehicleDataResult,
+ SDLRPCParameterNameWindowStatus:vehicleDataResult,
+ SDLRPCParameterNameHandsOffSteering:vehicleDataResult
+ },
+ SDLRPCParameterNameOperationName:SDLRPCFunctionNameSubscribeVehicleData}};
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
SDLSubscribeVehicleDataResponse* testResponse = [[SDLSubscribeVehicleDataResponse alloc] initWithDictionary:dict];
#pragma clang diagnostic pop
-
- expect(testResponse.accPedalPosition).to(equal(vehicleDataResult));
- expect(testResponse.airbagStatus).to(equal(vehicleDataResult));
- expect(testResponse.beltStatus).to(equal(vehicleDataResult));
- expect(testResponse.bodyInformation).to(equal(vehicleDataResult));
- expect(testResponse.cloudAppVehicleID).to(equal(vehicleDataResult));
- expect(testResponse.clusterModes).to(equal(vehicleDataResult));
- expect(testResponse.deviceStatus).to(equal(vehicleDataResult));
- expect(testResponse.driverBraking).to(equal(vehicleDataResult));
- expect(testResponse.eCallInfo).to(equal(vehicleDataResult));
- expect(testResponse.electronicParkBrakeStatus).to(equal(vehicleDataResult));
- expect(testResponse.emergencyEvent).to(equal(vehicleDataResult));
- expect(testResponse.engineOilLife).to(equal(vehicleDataResult));
- expect(testResponse.engineTorque).to(equal(vehicleDataResult));
- expect(testResponse.externalTemperature).to(equal(vehicleDataResult));
- expect(testResponse.fuelLevel).to(equal(vehicleDataResult));
- expect(testResponse.fuelLevel_State).to(equal(vehicleDataResult));
- expect(testResponse.fuelRange).to(equal(vehicleDataResult));
- expect(testResponse.gps).to(equal(vehicleDataResult));
- expect(testResponse.headLampStatus).to(equal(vehicleDataResult));
- expect(testResponse.instantFuelConsumption).to(equal(vehicleDataResult));
- expect(testResponse.myKey).to(equal(vehicleDataResult));
- expect(testResponse.odometer).to(equal(vehicleDataResult));
- expect(testResponse.prndl).to(equal(vehicleDataResult));
- expect(testResponse.rpm).to(equal(vehicleDataResult));
- expect(testResponse.speed).to(equal(vehicleDataResult));
- expect(testResponse.steeringWheelAngle).to(equal(vehicleDataResult));
- expect(testResponse.tirePressure).to(equal(vehicleDataResult));
- expect(testResponse.turnSignal).to(equal(vehicleDataResult));
- expect(testResponse.wiperStatus).to(equal(vehicleDataResult));
+
+ it(@"expect all properties to be set properly", ^{
+ expect(testResponse.accPedalPosition).to(equal(vehicleDataResult));
+ expect(testResponse.airbagStatus).to(equal(vehicleDataResult));
+ expect(testResponse.beltStatus).to(equal(vehicleDataResult));
+ expect(testResponse.bodyInformation).to(equal(vehicleDataResult));
+ expect(testResponse.cloudAppVehicleID).to(equal(vehicleDataResult));
+ expect(testResponse.clusterModes).to(equal(vehicleDataResult));
+ expect(testResponse.deviceStatus).to(equal(vehicleDataResult));
+ expect(testResponse.driverBraking).to(equal(vehicleDataResult));
+ expect(testResponse.eCallInfo).to(equal(vehicleDataResult));
+ expect(testResponse.electronicParkBrakeStatus).to(equal(vehicleDataResult));
+ expect(testResponse.emergencyEvent).to(equal(vehicleDataResult));
+ expect(testResponse.engineOilLife).to(equal(vehicleDataResult));
+ expect(testResponse.engineTorque).to(equal(vehicleDataResult));
+ expect(testResponse.externalTemperature).to(equal(vehicleDataResult));
+ #pragma clang diagnostic push
+ #pragma clang diagnostic ignored "-Wdeprecated-declarations"
+ expect(testResponse.fuelLevel).to(equal(vehicleDataResult));
+ expect(testResponse.fuelLevel_State).to(equal(vehicleDataResult));
+ #pragma clang diagnostic pop
+ expect(testResponse.fuelRange).to(equal(vehicleDataResult));
+ expect(testResponse.gearStatus).to(equal(vehicleDataResult));
+ expect(testResponse.gps).to(equal(vehicleDataResult));
+ expect(testResponse.handsOffSteering).to(equal(vehicleDataResult));
+ expect(testResponse.headLampStatus).to(equal(vehicleDataResult));
+ expect(testResponse.instantFuelConsumption).to(equal(vehicleDataResult));
+ expect(testResponse.myKey).to(equal(vehicleDataResult));
+ expect(testResponse.odometer).to(equal(vehicleDataResult));
+ #pragma clang diagnostic push
+ #pragma clang diagnostic ignored "-Wdeprecated-declarations"
+ expect(testResponse.prndl).to(equal(vehicleDataResult));
+ #pragma clang diagnostic pop
+ expect(testResponse.rpm).to(equal(vehicleDataResult));
+ expect(testResponse.speed).to(equal(vehicleDataResult));
+ expect(testResponse.steeringWheelAngle).to(equal(vehicleDataResult));
+ expect(testResponse.tirePressure).to(equal(vehicleDataResult));
+ expect(testResponse.turnSignal).to(equal(vehicleDataResult));
+ expect(testResponse.windowStatus).to(equal(vehicleDataResult));
+ expect(testResponse.wiperStatus).to(equal(vehicleDataResult));
+ });
});
- it(@"Should return nil if not set", ^ {
+ context(@"init", ^{
SDLSubscribeVehicleDataResponse* testResponse = [[SDLSubscribeVehicleDataResponse alloc] init];
-
- expect(testResponse.accPedalPosition).to(beNil());
- expect(testResponse.airbagStatus).to(beNil());
- expect(testResponse.beltStatus).to(beNil());
- expect(testResponse.bodyInformation).to(beNil());
- expect(testResponse.cloudAppVehicleID).to(beNil());
- expect(testResponse.clusterModes).to(beNil());
- expect(testResponse.deviceStatus).to(beNil());
- expect(testResponse.driverBraking).to(beNil());
- expect(testResponse.eCallInfo).to(beNil());
- expect(testResponse.electronicParkBrakeStatus).to(beNil());
- expect(testResponse.emergencyEvent).to(beNil());
- expect(testResponse.engineOilLife).to(beNil());
- expect(testResponse.engineTorque).to(beNil());
- expect(testResponse.externalTemperature).to(beNil());
- expect(testResponse.fuelLevel).to(beNil());
- expect(testResponse.fuelLevel_State).to(beNil());
- expect(testResponse.fuelRange).to(beNil());
- expect(testResponse.gps).to(beNil());
- expect(testResponse.headLampStatus).to(beNil());
- expect(testResponse.instantFuelConsumption).to(beNil());
- expect(testResponse.myKey).to(beNil());
- expect(testResponse.odometer).to(beNil());
- expect(testResponse.prndl).to(beNil());
- expect(testResponse.rpm).to(beNil());
- expect(testResponse.speed).to(beNil());
- expect(testResponse.steeringWheelAngle).to(beNil());
- expect(testResponse.tirePressure).to(beNil());
- expect(testResponse.turnSignal).to(beNil());
- expect(testResponse.wiperStatus).to(beNil());
+
+ it(@"expect all properties to be nil", ^{
+ expect(testResponse.accPedalPosition).to(beNil());
+ expect(testResponse.airbagStatus).to(beNil());
+ expect(testResponse.beltStatus).to(beNil());
+ expect(testResponse.bodyInformation).to(beNil());
+ expect(testResponse.cloudAppVehicleID).to(beNil());
+ expect(testResponse.clusterModes).to(beNil());
+ expect(testResponse.deviceStatus).to(beNil());
+ expect(testResponse.driverBraking).to(beNil());
+ expect(testResponse.eCallInfo).to(beNil());
+ expect(testResponse.electronicParkBrakeStatus).to(beNil());
+ expect(testResponse.emergencyEvent).to(beNil());
+ expect(testResponse.engineOilLife).to(beNil());
+ expect(testResponse.engineTorque).to(beNil());
+ expect(testResponse.externalTemperature).to(beNil());
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
+ expect(testResponse.fuelLevel).to(beNil());
+ expect(testResponse.fuelLevel_State).to(beNil());
+#pragma clang diagnostic pop
+ expect(testResponse.fuelRange).to(beNil());
+ expect(testResponse.gearStatus).to(beNil());
+ expect(testResponse.gps).to(beNil());
+ expect(testResponse.handsOffSteering).to(beNil());
+ expect(testResponse.headLampStatus).to(beNil());
+ expect(testResponse.instantFuelConsumption).to(beNil());
+ expect(testResponse.myKey).to(beNil());
+ expect(testResponse.odometer).to(beNil());
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
+ expect(testResponse.prndl).to(beNil());
+#pragma clang diagnostic pop
+ expect(testResponse.rpm).to(beNil());
+ expect(testResponse.speed).to(beNil());
+ expect(testResponse.steeringWheelAngle).to(beNil());
+ expect(testResponse.tirePressure).to(beNil());
+ expect(testResponse.turnSignal).to(beNil());
+ expect(testResponse.windowStatus).to(beNil());
+ expect(testResponse.wiperStatus).to(beNil());
+ });
});
- it(@"Should set and get Generic Network Signal Data", ^{
- SDLSubscribeVehicleDataResponse *testRequest = [[SDLSubscribeVehicleDataResponse alloc] init];
+ context(@"initWithGps:speed:rpm:instantFuelConsumption:fuelRange:externalTemperature:turnSignal:gearStatus:tirePressure:odometer:beltStatus:bodyInformation:deviceStatus:driverBraking:wiperStatus:headLampStatus:engineTorque:accPedalPosition:steeringWheelAngle:engineOilLife:electronicParkBrakeStatus:cloudAppVehicleID:eCallInfo:airbagStatus:emergencyEvent:clusterModes:myKey:handsOffSteering:windowStatus:", ^{
+ SDLSubscribeVehicleDataResponse *testResponse = [[SDLSubscribeVehicleDataResponse alloc] initWithGps:vehicleDataResult speed:vehicleDataResult rpm:vehicleDataResult instantFuelConsumption:vehicleDataResult fuelRange:vehicleDataResult externalTemperature:vehicleDataResult turnSignal:vehicleDataResult gearStatus:vehicleDataResult tirePressure:vehicleDataResult odometer:vehicleDataResult beltStatus:vehicleDataResult bodyInformation:vehicleDataResult deviceStatus:vehicleDataResult driverBraking:vehicleDataResult wiperStatus:vehicleDataResult headLampStatus:vehicleDataResult engineTorque:vehicleDataResult accPedalPosition:vehicleDataResult steeringWheelAngle:vehicleDataResult engineOilLife:vehicleDataResult electronicParkBrakeStatus:vehicleDataResult cloudAppVehicleID:vehicleDataResult eCallInfo:vehicleDataResult airbagStatus:vehicleDataResult emergencyEvent:vehicleDataResult clusterModes:vehicleDataResult myKey:vehicleDataResult handsOffSteering:vehicleDataResult windowStatus:vehicleDataResult];
- [testRequest setOEMCustomVehicleData:@"customOEMVehicleData" withVehicleDataState:customOEMvehicleDataResult];
+ it(@"expect all properties to be set properly", ^{
+ expect(testResponse.accPedalPosition).to(equal(vehicleDataResult));
+ expect(testResponse.airbagStatus).to(equal(vehicleDataResult));
+ expect(testResponse.beltStatus).to(equal(vehicleDataResult));
+ expect(testResponse.bodyInformation).to(equal(vehicleDataResult));
+ expect(testResponse.cloudAppVehicleID).to(equal(vehicleDataResult));
+ expect(testResponse.clusterModes).to(equal(vehicleDataResult));
+ expect(testResponse.deviceStatus).to(equal(vehicleDataResult));
+ expect(testResponse.driverBraking).to(equal(vehicleDataResult));
+ expect(testResponse.eCallInfo).to(equal(vehicleDataResult));
+ expect(testResponse.electronicParkBrakeStatus).to(equal(vehicleDataResult));
+ expect(testResponse.emergencyEvent).to(equal(vehicleDataResult));
+ expect(testResponse.engineOilLife).to(equal(vehicleDataResult));
+ expect(testResponse.engineTorque).to(equal(vehicleDataResult));
+ expect(testResponse.externalTemperature).to(equal(vehicleDataResult));
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
+ expect(testResponse.fuelLevel).to(beNil());
+ expect(testResponse.fuelLevel_State).to(beNil());
+#pragma clang diagnostic pop
+ expect(testResponse.fuelRange).to(equal(vehicleDataResult));
+ expect(testResponse.gearStatus).to(equal(vehicleDataResult));
+ expect(testResponse.gps).to(equal(vehicleDataResult));
+ expect(testResponse.handsOffSteering).to(equal(vehicleDataResult));
+ expect(testResponse.headLampStatus).to(equal(vehicleDataResult));
+ expect(testResponse.instantFuelConsumption).to(equal(vehicleDataResult));
+ expect(testResponse.myKey).to(equal(vehicleDataResult));
+ expect(testResponse.odometer).to(equal(vehicleDataResult));
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
+ expect(testResponse.prndl).to(beNil());
+#pragma clang diagnostic push
+ expect(testResponse.rpm).to(equal(vehicleDataResult));
+ expect(testResponse.speed).to(equal(vehicleDataResult));
+ expect(testResponse.steeringWheelAngle).to(equal(vehicleDataResult));
+ expect(testResponse.tirePressure).to(equal(vehicleDataResult));
+ expect(testResponse.turnSignal).to(equal(vehicleDataResult));
+ expect(testResponse.windowStatus).to(equal(vehicleDataResult));
+ expect(testResponse.wiperStatus).to(equal(vehicleDataResult));
+ });
+ });
+
+ context(@"should set OEM Custom Vehicle Data", ^{
+ SDLSubscribeVehicleDataResponse* testResponse = [[SDLSubscribeVehicleDataResponse alloc] init];
+ [testResponse setOEMCustomVehicleData:@"customOEMVehicleData" withVehicleDataState:customOEMvehicleDataResult];
- expect([testRequest getOEMCustomVehicleData:@"customOEMVehicleData"]).to(equal(customOEMvehicleDataResult));
+ it(@"expect OEM Custom Vehicle Data to be set properly", ^{
+ expect([testResponse getOEMCustomVehicleData:@"customOEMVehicleData"]).to(equal(customOEMvehicleDataResult));
+ });
});
});
diff --git a/SmartDeviceLinkTests/RPCSpecs/ResponseSpecs/SDLSubtleAlertResponseSpec.m b/SmartDeviceLinkTests/RPCSpecs/ResponseSpecs/SDLSubtleAlertResponseSpec.m
new file mode 100644
index 000000000..71cda2959
--- /dev/null
+++ b/SmartDeviceLinkTests/RPCSpecs/ResponseSpecs/SDLSubtleAlertResponseSpec.m
@@ -0,0 +1,54 @@
+//
+// SDLSubtleAlertResponseSpec.m
+// SmartDeviceLinkTests
+//
+// Created by Nicole on 7/28/20.
+// Copyright © 2020 smartdevicelink. All rights reserved.
+//
+
+#import <Quick/Quick.h>
+#import <Nimble/Nimble.h>
+
+#import "SDLRPCFunctionNames.h"
+#import "SDLRPCParameterNames.h"
+#import "SDLSubtleAlertResponse.h"
+
+QuickSpecBegin(SDLSubtleAlertResponseSpec)
+
+describe(@"Getter/Setter Tests", ^{
+ __block SDLSubtleAlertResponse *testSubtleAlertResponse = nil;
+ __block int testTryAgainTime = 6;
+
+ it(@"Should set and get correctly", ^{
+ testSubtleAlertResponse = [[SDLSubtleAlertResponse alloc] init];
+ testSubtleAlertResponse.tryAgainTime = @(testTryAgainTime);
+
+ expect(testSubtleAlertResponse.tryAgainTime).to(equal(testTryAgainTime));
+ });
+
+ it(@"Should get correctly when initialized with a dictionary", ^{
+ NSDictionary *dict = @{SDLRPCParameterNameResponse:@{
+ SDLRPCParameterNameParameters:@{
+ SDLRPCParameterNameTryAgainTime:@(testTryAgainTime)
+ },
+ SDLRPCParameterNameOperationName:SDLRPCFunctionNameSubtleAlert}};
+ testSubtleAlertResponse = [[SDLSubtleAlertResponse alloc] initWithDictionary:dict];
+
+ expect(testSubtleAlertResponse.tryAgainTime).to(equal(testTryAgainTime));
+ });
+
+ it(@"Should get correctly when initialized with initWithTryAgainTime:", ^{
+ testSubtleAlertResponse = [[SDLSubtleAlertResponse alloc] initWithTryAgainTime:@(testTryAgainTime)];
+
+ expect(testSubtleAlertResponse.tryAgainTime).to(equal(testTryAgainTime));
+ });
+
+ it(@"Should return nil if not set", ^{
+ testSubtleAlertResponse = [[SDLSubtleAlertResponse alloc] init];
+
+ expect(testSubtleAlertResponse.tryAgainTime).to(beNil());
+ });
+});
+
+QuickSpecEnd
+
diff --git a/SmartDeviceLinkTests/RPCSpecs/ResponseSpecs/SDLUnsubscribeVehicleDataResponseSpec.m b/SmartDeviceLinkTests/RPCSpecs/ResponseSpecs/SDLUnsubscribeVehicleDataResponseSpec.m
index 3f6302e4b..a0047604c 100644
--- a/SmartDeviceLinkTests/RPCSpecs/ResponseSpecs/SDLUnsubscribeVehicleDataResponseSpec.m
+++ b/SmartDeviceLinkTests/RPCSpecs/ResponseSpecs/SDLUnsubscribeVehicleDataResponseSpec.m
@@ -19,181 +19,276 @@ QuickSpecBegin(SDLUnsubscribeVehicleDataResponseSpec)
SDLVehicleDataResult* vehicleDataResult = [[SDLVehicleDataResult alloc] init];
SDLVehicleDataResult* customOEMvehicleDataResult = [[SDLVehicleDataResult alloc] initWithCustomOEMDataType:@"customOEMVehicleData" resultCode:SDLVehicleDataResultCodeSuccess];
-describe(@"Getter/Setter Tests", ^ {
- it(@"Should set and get correctly", ^ {
+describe(@"getter/setter tests", ^{
+ context(@"init", ^{
SDLUnsubscribeVehicleDataResponse* testResponse = [[SDLUnsubscribeVehicleDataResponse alloc] init];
-
- testResponse.gps = vehicleDataResult;
- testResponse.speed = vehicleDataResult;
- testResponse.rpm = vehicleDataResult;
- testResponse.fuelLevel = vehicleDataResult;
- testResponse.fuelLevel_State = vehicleDataResult;
- testResponse.fuelRange = vehicleDataResult;
- testResponse.instantFuelConsumption = vehicleDataResult;
- testResponse.externalTemperature = vehicleDataResult;
- testResponse.prndl = vehicleDataResult;
- testResponse.tirePressure = vehicleDataResult;
- testResponse.odometer = vehicleDataResult;
+ testResponse.accPedalPosition = vehicleDataResult;
+ testResponse.airbagStatus = vehicleDataResult;
testResponse.beltStatus = vehicleDataResult;
testResponse.bodyInformation = vehicleDataResult;
+ testResponse.cloudAppVehicleID = vehicleDataResult;
+ testResponse.clusterModes = vehicleDataResult;
testResponse.deviceStatus = vehicleDataResult;
testResponse.driverBraking = vehicleDataResult;
- testResponse.wiperStatus = vehicleDataResult;
- testResponse.headLampStatus = vehicleDataResult;
- testResponse.engineOilLife = vehicleDataResult;
- testResponse.engineTorque = vehicleDataResult;
- testResponse.accPedalPosition = vehicleDataResult;
- testResponse.steeringWheelAngle = vehicleDataResult;
testResponse.eCallInfo = vehicleDataResult;
- testResponse.airbagStatus = vehicleDataResult;
+ testResponse.electronicParkBrakeStatus = vehicleDataResult;
testResponse.emergencyEvent = vehicleDataResult;
- testResponse.clusterModes = vehicleDataResult;
+ testResponse.engineOilLife = vehicleDataResult;
+ testResponse.engineTorque = vehicleDataResult;
+ testResponse.externalTemperature = vehicleDataResult;
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
+ testResponse.fuelLevel = vehicleDataResult;
+ testResponse.fuelLevel_State = vehicleDataResult;
+#pragma clang diagnostic pop
+ testResponse.fuelRange = vehicleDataResult;
+ testResponse.gearStatus = vehicleDataResult;
+ testResponse.gps = vehicleDataResult;
+ testResponse.handsOffSteering = vehicleDataResult;
+ testResponse.headLampStatus = vehicleDataResult;
+ testResponse.instantFuelConsumption = vehicleDataResult;
testResponse.myKey = vehicleDataResult;
- testResponse.electronicParkBrakeStatus = vehicleDataResult;
+ testResponse.odometer = vehicleDataResult;
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
+#pragma clang diagnostic push
+ testResponse.prndl = vehicleDataResult;
+#pragma clang diagnostic pop
+ testResponse.rpm = vehicleDataResult;
+ testResponse.speed = vehicleDataResult;
+ testResponse.steeringWheelAngle = vehicleDataResult;
+ testResponse.tirePressure = vehicleDataResult;
testResponse.turnSignal = vehicleDataResult;
- testResponse.cloudAppVehicleID = vehicleDataResult;
-
- expect(testResponse.gps).to(equal(vehicleDataResult));
- expect(testResponse.speed).to(equal(vehicleDataResult));
- expect(testResponse.rpm).to(equal(vehicleDataResult));
- expect(testResponse.fuelLevel).to(equal(vehicleDataResult));
- expect(testResponse.fuelLevel_State).to(equal(vehicleDataResult));
- expect(testResponse.fuelRange).to(equal(vehicleDataResult));
- expect(testResponse.instantFuelConsumption).to(equal(vehicleDataResult));
- expect(testResponse.externalTemperature).to(equal(vehicleDataResult));
- expect(testResponse.prndl).to(equal(vehicleDataResult));
- expect(testResponse.tirePressure).to(equal(vehicleDataResult));
- expect(testResponse.odometer).to(equal(vehicleDataResult));
- expect(testResponse.beltStatus).to(equal(vehicleDataResult));
- expect(testResponse.bodyInformation).to(equal(vehicleDataResult));
- expect(testResponse.deviceStatus).to(equal(vehicleDataResult));
- expect(testResponse.driverBraking).to(equal(vehicleDataResult));
- expect(testResponse.wiperStatus).to(equal(vehicleDataResult));
- expect(testResponse.headLampStatus).to(equal(vehicleDataResult));
- expect(testResponse.engineOilLife).to(equal(vehicleDataResult));
- expect(testResponse.engineTorque).to(equal(vehicleDataResult));
- expect(testResponse.accPedalPosition).to(equal(vehicleDataResult));
- expect(testResponse.steeringWheelAngle).to(equal(vehicleDataResult));
- expect(testResponse.eCallInfo).to(equal(vehicleDataResult));
- expect(testResponse.airbagStatus).to(equal(vehicleDataResult));
- expect(testResponse.emergencyEvent).to(equal(vehicleDataResult));
- expect(testResponse.clusterModes).to(equal(vehicleDataResult));
- expect(testResponse.myKey).to(equal(vehicleDataResult));
- expect(testResponse.electronicParkBrakeStatus).to(equal(vehicleDataResult));
- expect(testResponse.turnSignal).to(equal(vehicleDataResult));
- expect(testResponse.cloudAppVehicleID).to(equal(vehicleDataResult));
+ testResponse.windowStatus = vehicleDataResult;
+ testResponse.wiperStatus = vehicleDataResult;
+
+ it(@"expect all properties to be set properly", ^{
+ expect(testResponse.accPedalPosition).to(equal(vehicleDataResult));
+ expect(testResponse.airbagStatus).to(equal(vehicleDataResult));
+ expect(testResponse.beltStatus).to(equal(vehicleDataResult));
+ expect(testResponse.bodyInformation).to(equal(vehicleDataResult));
+ expect(testResponse.cloudAppVehicleID).to(equal(vehicleDataResult));
+ expect(testResponse.clusterModes).to(equal(vehicleDataResult));
+ expect(testResponse.deviceStatus).to(equal(vehicleDataResult));
+ expect(testResponse.driverBraking).to(equal(vehicleDataResult));
+ expect(testResponse.eCallInfo).to(equal(vehicleDataResult));
+ expect(testResponse.electronicParkBrakeStatus).to(equal(vehicleDataResult));
+ expect(testResponse.emergencyEvent).to(equal(vehicleDataResult));
+ expect(testResponse.engineOilLife).to(equal(vehicleDataResult));
+ expect(testResponse.engineTorque).to(equal(vehicleDataResult));
+ expect(testResponse.externalTemperature).to(equal(vehicleDataResult));
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
+ expect(testResponse.fuelLevel).to(equal(vehicleDataResult));
+ expect(testResponse.fuelLevel_State).to(equal(vehicleDataResult));
+#pragma clang diagnostic pop
+ expect(testResponse.fuelRange).to(equal(vehicleDataResult));
+ expect(testResponse.gearStatus).to(equal(vehicleDataResult));
+ expect(testResponse.gps).to(equal(vehicleDataResult));
+ expect(testResponse.handsOffSteering).to(equal(vehicleDataResult));
+ expect(testResponse.headLampStatus).to(equal(vehicleDataResult));
+ expect(testResponse.instantFuelConsumption).to(equal(vehicleDataResult));
+ expect(testResponse.myKey).to(equal(vehicleDataResult));
+ expect(testResponse.odometer).to(equal(vehicleDataResult));
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
+#pragma clang diagnostic push
+ expect(testResponse.prndl).to(equal(vehicleDataResult));
+#pragma clang diagnostic pop
+ expect(testResponse.rpm).to(equal(vehicleDataResult));
+ expect(testResponse.speed).to(equal(vehicleDataResult));
+ expect(testResponse.steeringWheelAngle).to(equal(vehicleDataResult));
+ expect(testResponse.tirePressure).to(equal(vehicleDataResult));
+ expect(testResponse.turnSignal).to(equal(vehicleDataResult));
+ expect(testResponse.windowStatus).to(equal(vehicleDataResult));
+ expect(testResponse.wiperStatus).to(equal(vehicleDataResult));
+ });
});
- it(@"Should get correctly when initialized", ^ {
- NSMutableDictionary<NSString *, id> *dict = [@{SDLRPCParameterNameResponse:
- @{SDLRPCParameterNameParameters:
- @{SDLRPCParameterNameGPS:vehicleDataResult,
- SDLRPCParameterNameSpeed:vehicleDataResult,
- SDLRPCParameterNameRPM:vehicleDataResult,
- SDLRPCParameterNameFuelLevel:vehicleDataResult,
- SDLRPCParameterNameFuelLevelState:vehicleDataResult,
- SDLRPCParameterNameFuelRange:vehicleDataResult,
- SDLRPCParameterNameInstantFuelConsumption:vehicleDataResult,
- SDLRPCParameterNameExternalTemperature:vehicleDataResult,
- SDLRPCParameterNamePRNDL:vehicleDataResult,
- SDLRPCParameterNameTirePressure:vehicleDataResult,
- SDLRPCParameterNameOdometer:vehicleDataResult,
- SDLRPCParameterNameBeltStatus:vehicleDataResult,
- SDLRPCParameterNameBodyInformation:vehicleDataResult,
- SDLRPCParameterNameDeviceStatus:vehicleDataResult,
- SDLRPCParameterNameDriverBraking:vehicleDataResult,
- SDLRPCParameterNameWiperStatus:vehicleDataResult,
- SDLRPCParameterNameHeadLampStatus:vehicleDataResult,
- SDLRPCParameterNameEngineOilLife:vehicleDataResult,
- SDLRPCParameterNameEngineTorque:vehicleDataResult,
- SDLRPCParameterNameAccelerationPedalPosition:vehicleDataResult,
- SDLRPCParameterNameSteeringWheelAngle:vehicleDataResult,
- SDLRPCParameterNameECallInfo:vehicleDataResult,
- SDLRPCParameterNameAirbagStatus:vehicleDataResult,
- SDLRPCParameterNameEmergencyEvent:vehicleDataResult,
- SDLRPCParameterNameClusterModes:vehicleDataResult,
- SDLRPCParameterNameMyKey:vehicleDataResult,
- SDLRPCParameterNameElectronicParkBrakeStatus:vehicleDataResult,
- SDLRPCParameterNameTurnSignal:vehicleDataResult,
- SDLRPCParameterNameCloudAppVehicleID:vehicleDataResult
- },
- SDLRPCParameterNameOperationName:SDLRPCFunctionNameUnsubscribeVehicleData}} mutableCopy];
+ context(@"initWithDictionary:", ^{
+ NSDictionary<NSString *, id> *dict = @{SDLRPCParameterNameResponse:
+ @{SDLRPCParameterNameParameters:@{
+ SDLRPCParameterNameAccelerationPedalPosition:vehicleDataResult,
+ SDLRPCParameterNameAirbagStatus:vehicleDataResult,
+ SDLRPCParameterNameBeltStatus:vehicleDataResult,
+ SDLRPCParameterNameBodyInformation:vehicleDataResult,
+ SDLRPCParameterNameCloudAppVehicleID:vehicleDataResult,
+ SDLRPCParameterNameClusterModes:vehicleDataResult,
+ SDLRPCParameterNameDeviceStatus:vehicleDataResult,
+ SDLRPCParameterNameDriverBraking:vehicleDataResult,
+ SDLRPCParameterNameECallInfo:vehicleDataResult,
+ SDLRPCParameterNameElectronicParkBrakeStatus:vehicleDataResult,
+ SDLRPCParameterNameEmergencyEvent:vehicleDataResult,
+ SDLRPCParameterNameEngineOilLife:vehicleDataResult,
+ SDLRPCParameterNameEngineTorque:vehicleDataResult,
+ SDLRPCParameterNameExternalTemperature:vehicleDataResult,
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
+ SDLRPCParameterNameFuelLevel:vehicleDataResult,
+ SDLRPCParameterNameFuelLevelState:vehicleDataResult,
+#pragma clang diagnostic pop
+ SDLRPCParameterNameFuelRange:vehicleDataResult,
+ SDLRPCParameterNameGPS:vehicleDataResult,
+ SDLRPCParameterNameGearStatus:vehicleDataResult,
+ SDLRPCParameterNameHandsOffSteering:vehicleDataResult,
+ SDLRPCParameterNameHeadLampStatus:vehicleDataResult,
+ SDLRPCParameterNameInstantFuelConsumption:vehicleDataResult,
+ SDLRPCParameterNameMyKey:vehicleDataResult,
+ SDLRPCParameterNameOdometer:vehicleDataResult,
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
+ SDLRPCParameterNamePRNDL:vehicleDataResult,
+#pragma clang diagnostic pop
+ SDLRPCParameterNameRPM:vehicleDataResult,
+ SDLRPCParameterNameSpeed:vehicleDataResult,
+ SDLRPCParameterNameSteeringWheelAngle:vehicleDataResult,
+ SDLRPCParameterNameTirePressure:vehicleDataResult,
+ SDLRPCParameterNameTurnSignal:vehicleDataResult,
+ SDLRPCParameterNameWindowStatus:vehicleDataResult,
+ SDLRPCParameterNameWiperStatus:vehicleDataResult,
+ },
+ SDLRPCParameterNameOperationName:SDLRPCFunctionNameUnsubscribeVehicleData}};
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
SDLUnsubscribeVehicleDataResponse* testResponse = [[SDLUnsubscribeVehicleDataResponse alloc] initWithDictionary:dict];
#pragma clang diagnostic pop
-
- expect(testResponse.gps).to(equal(vehicleDataResult));
- expect(testResponse.speed).to(equal(vehicleDataResult));
- expect(testResponse.rpm).to(equal(vehicleDataResult));
- expect(testResponse.fuelLevel).to(equal(vehicleDataResult));
- expect(testResponse.fuelLevel_State).to(equal(vehicleDataResult));
- expect(testResponse.fuelRange).to(equal(vehicleDataResult));
- expect(testResponse.instantFuelConsumption).to(equal(vehicleDataResult));
- expect(testResponse.externalTemperature).to(equal(vehicleDataResult));
- expect(testResponse.prndl).to(equal(vehicleDataResult));
- expect(testResponse.tirePressure).to(equal(vehicleDataResult));
- expect(testResponse.odometer).to(equal(vehicleDataResult));
- expect(testResponse.beltStatus).to(equal(vehicleDataResult));
- expect(testResponse.bodyInformation).to(equal(vehicleDataResult));
- expect(testResponse.deviceStatus).to(equal(vehicleDataResult));
- expect(testResponse.driverBraking).to(equal(vehicleDataResult));
- expect(testResponse.wiperStatus).to(equal(vehicleDataResult));
- expect(testResponse.headLampStatus).to(equal(vehicleDataResult));
- expect(testResponse.engineOilLife).to(equal(vehicleDataResult));
- expect(testResponse.engineTorque).to(equal(vehicleDataResult));
- expect(testResponse.accPedalPosition).to(equal(vehicleDataResult));
- expect(testResponse.steeringWheelAngle).to(equal(vehicleDataResult));
- expect(testResponse.eCallInfo).to(equal(vehicleDataResult));
- expect(testResponse.airbagStatus).to(equal(vehicleDataResult));
- expect(testResponse.emergencyEvent).to(equal(vehicleDataResult));
- expect(testResponse.clusterModes).to(equal(vehicleDataResult));
- expect(testResponse.myKey).to(equal(vehicleDataResult));
- expect(testResponse.electronicParkBrakeStatus).to(equal(vehicleDataResult));
- expect(testResponse.turnSignal).to(equal(vehicleDataResult));
- expect(testResponse.cloudAppVehicleID).to(equal(vehicleDataResult));
+
+ it(@"expect all properties to be set properly", ^{
+ expect(testResponse.accPedalPosition).to(equal(vehicleDataResult));
+ expect(testResponse.airbagStatus).to(equal(vehicleDataResult));
+ expect(testResponse.beltStatus).to(equal(vehicleDataResult));
+ expect(testResponse.bodyInformation).to(equal(vehicleDataResult));
+ expect(testResponse.cloudAppVehicleID).to(equal(vehicleDataResult));
+ expect(testResponse.clusterModes).to(equal(vehicleDataResult));
+ expect(testResponse.deviceStatus).to(equal(vehicleDataResult));
+ expect(testResponse.driverBraking).to(equal(vehicleDataResult));
+ expect(testResponse.eCallInfo).to(equal(vehicleDataResult));
+ expect(testResponse.electronicParkBrakeStatus).to(equal(vehicleDataResult));
+ expect(testResponse.emergencyEvent).to(equal(vehicleDataResult));
+ expect(testResponse.engineOilLife).to(equal(vehicleDataResult));
+ expect(testResponse.engineTorque).to(equal(vehicleDataResult));
+ expect(testResponse.externalTemperature).to(equal(vehicleDataResult));
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
+ expect(testResponse.fuelLevel).to(equal(vehicleDataResult));
+ expect(testResponse.fuelLevel_State).to(equal(vehicleDataResult));
+#pragma clang diagnostic pop
+ expect(testResponse.fuelRange).to(equal(vehicleDataResult));
+ expect(testResponse.gearStatus).to(equal(vehicleDataResult));
+ expect(testResponse.gps).to(equal(vehicleDataResult));
+ expect(testResponse.handsOffSteering).to(equal(vehicleDataResult));
+ expect(testResponse.headLampStatus).to(equal(vehicleDataResult));
+ expect(testResponse.instantFuelConsumption).to(equal(vehicleDataResult));
+ expect(testResponse.myKey).to(equal(vehicleDataResult));
+ expect(testResponse.odometer).to(equal(vehicleDataResult));
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
+#pragma clang diagnostic push
+ expect(testResponse.prndl).to(equal(vehicleDataResult));
+#pragma clang diagnostic pop
+ expect(testResponse.rpm).to(equal(vehicleDataResult));
+ expect(testResponse.speed).to(equal(vehicleDataResult));
+ expect(testResponse.steeringWheelAngle).to(equal(vehicleDataResult));
+ expect(testResponse.tirePressure).to(equal(vehicleDataResult));
+ expect(testResponse.turnSignal).to(equal(vehicleDataResult));
+ expect(testResponse.windowStatus).to(equal(vehicleDataResult));
+ expect(testResponse.wiperStatus).to(equal(vehicleDataResult));
+ });
});
- it(@"Should return nil if not set", ^ {
+ context(@"init", ^{
SDLUnsubscribeVehicleDataResponse* testResponse = [[SDLUnsubscribeVehicleDataResponse alloc] init];
-
- expect(testResponse.gps).to(beNil());
- expect(testResponse.speed).to(beNil());
- expect(testResponse.rpm).to(beNil());
- expect(testResponse.fuelLevel).to(beNil());
- expect(testResponse.fuelLevel_State).to(beNil());
- expect(testResponse.fuelRange).to(beNil());
- expect(testResponse.instantFuelConsumption).to(beNil());
- expect(testResponse.externalTemperature).to(beNil());
- expect(testResponse.prndl).to(beNil());
- expect(testResponse.tirePressure).to(beNil());
- expect(testResponse.odometer).to(beNil());
- expect(testResponse.beltStatus).to(beNil());
- expect(testResponse.bodyInformation).to(beNil());
- expect(testResponse.deviceStatus).to(beNil());
- expect(testResponse.driverBraking).to(beNil());
- expect(testResponse.wiperStatus).to(beNil());
- expect(testResponse.headLampStatus).to(beNil());
- expect(testResponse.engineOilLife).to(beNil());
- expect(testResponse.engineTorque).to(beNil());
- expect(testResponse.accPedalPosition).to(beNil());
- expect(testResponse.steeringWheelAngle).to(beNil());
- expect(testResponse.eCallInfo).to(beNil());
- expect(testResponse.airbagStatus).to(beNil());
- expect(testResponse.emergencyEvent).to(beNil());
- expect(testResponse.clusterModes).to(beNil());
- expect(testResponse.myKey).to(beNil());
- expect(testResponse.electronicParkBrakeStatus).to(beNil());
- expect(testResponse.turnSignal).to(beNil());
- expect(testResponse.cloudAppVehicleID).to(beNil());
+
+ it(@"expect all properties to be nil", ^{
+ expect(testResponse.accPedalPosition).to(beNil());
+ expect(testResponse.airbagStatus).to(beNil());
+ expect(testResponse.beltStatus).to(beNil());
+ expect(testResponse.bodyInformation).to(beNil());
+ expect(testResponse.cloudAppVehicleID).to(beNil());
+ expect(testResponse.clusterModes).to(beNil());
+ expect(testResponse.deviceStatus).to(beNil());
+ expect(testResponse.driverBraking).to(beNil());
+ expect(testResponse.eCallInfo).to(beNil());
+ expect(testResponse.electronicParkBrakeStatus).to(beNil());
+ expect(testResponse.emergencyEvent).to(beNil());
+ expect(testResponse.engineOilLife).to(beNil());
+ expect(testResponse.engineTorque).to(beNil());
+ expect(testResponse.externalTemperature).to(beNil());
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
+ expect(testResponse.fuelLevel).to(beNil());
+ expect(testResponse.fuelLevel_State).to(beNil());
+#pragma clang diagnostic pop
+ expect(testResponse.fuelRange).to(beNil());
+ expect(testResponse.gearStatus).to(beNil());
+ expect(testResponse.gps).to(beNil());
+ expect(testResponse.handsOffSteering).to(beNil());
+ expect(testResponse.headLampStatus).to(beNil());
+ expect(testResponse.instantFuelConsumption).to(beNil());
+ expect(testResponse.myKey).to(beNil());
+ expect(testResponse.odometer).to(beNil());
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
+#pragma clang diagnostic push
+ expect(testResponse.prndl).to(beNil());
+#pragma clang diagnostic pop
+ expect(testResponse.rpm).to(beNil());
+ expect(testResponse.speed).to(beNil());
+ expect(testResponse.steeringWheelAngle).to(beNil());
+ expect(testResponse.tirePressure).to(beNil());
+ expect(testResponse.windowStatus).to(beNil());
+ expect(testResponse.turnSignal).to(beNil());
+ });
});
+
+ context(@"initWithGps:speed:rpm:instantFuelConsumption:fuelRange:externalTemperature:turnSignal:gearStatus:tirePressure:odometer:beltStatus:bodyInformation:deviceStatus:driverBraking:wiperStatus:headLampStatus:engineTorque:accPedalPosition:steeringWheelAngle:engineOilLife:electronicParkBrakeStatus:cloudAppVehicleID:eCallInfo:airbagStatus:emergencyEvent:clusterModes:myKey:handsOffSteering:windowStatus:", ^{
+ SDLUnsubscribeVehicleDataResponse* testResponse = [[SDLUnsubscribeVehicleDataResponse alloc] initWithGps:vehicleDataResult speed:vehicleDataResult rpm:vehicleDataResult instantFuelConsumption:vehicleDataResult fuelRange:vehicleDataResult externalTemperature:vehicleDataResult turnSignal:vehicleDataResult gearStatus:vehicleDataResult tirePressure:vehicleDataResult odometer:vehicleDataResult beltStatus:vehicleDataResult bodyInformation:vehicleDataResult deviceStatus:vehicleDataResult driverBraking:vehicleDataResult wiperStatus:vehicleDataResult headLampStatus:vehicleDataResult engineTorque:vehicleDataResult accPedalPosition:vehicleDataResult steeringWheelAngle:vehicleDataResult engineOilLife:vehicleDataResult electronicParkBrakeStatus:vehicleDataResult cloudAppVehicleID:vehicleDataResult eCallInfo:vehicleDataResult airbagStatus:vehicleDataResult emergencyEvent:vehicleDataResult clusterModes:vehicleDataResult myKey:vehicleDataResult handsOffSteering:vehicleDataResult windowStatus:vehicleDataResult];
- it(@"Should set and get Generic Network Signal Data", ^{
- SDLUnsubscribeVehicleDataResponse *testRequest = [[SDLUnsubscribeVehicleDataResponse alloc] init];
+ it(@"expect all properties to be set properly", ^{
+ expect(testResponse.accPedalPosition).to(equal(vehicleDataResult));
+ expect(testResponse.airbagStatus).to(equal(vehicleDataResult));
+ expect(testResponse.beltStatus).to(equal(vehicleDataResult));
+ expect(testResponse.bodyInformation).to(equal(vehicleDataResult));
+ expect(testResponse.cloudAppVehicleID).to(equal(vehicleDataResult));
+ expect(testResponse.clusterModes).to(equal(vehicleDataResult));
+ expect(testResponse.deviceStatus).to(equal(vehicleDataResult));
+ expect(testResponse.driverBraking).to(equal(vehicleDataResult));
+ expect(testResponse.eCallInfo).to(equal(vehicleDataResult));
+ expect(testResponse.electronicParkBrakeStatus).to(equal(vehicleDataResult));
+ expect(testResponse.emergencyEvent).to(equal(vehicleDataResult));
+ expect(testResponse.engineOilLife).to(equal(vehicleDataResult));
+ expect(testResponse.engineTorque).to(equal(vehicleDataResult));
+ expect(testResponse.externalTemperature).to(equal(vehicleDataResult));
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
+ expect(testResponse.fuelLevel).to(beNil());
+ expect(testResponse.fuelLevel_State).to(beNil());
+#pragma clang diagnostic pop
+ expect(testResponse.fuelRange).to(equal(vehicleDataResult));
+ expect(testResponse.gearStatus).to(equal(vehicleDataResult));
+ expect(testResponse.gps).to(equal(vehicleDataResult));
+ expect(testResponse.handsOffSteering).to(equal(vehicleDataResult));
+ expect(testResponse.headLampStatus).to(equal(vehicleDataResult));
+ expect(testResponse.instantFuelConsumption).to(equal(vehicleDataResult));
+ expect(testResponse.myKey).to(equal(vehicleDataResult));
+ expect(testResponse.odometer).to(equal(vehicleDataResult));
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
+#pragma clang diagnostic push
+ expect(testResponse.prndl).to(beNil());
+#pragma clang diagnostic pop
+ expect(testResponse.rpm).to(equal(vehicleDataResult));
+ expect(testResponse.speed).to(equal(vehicleDataResult));
+ expect(testResponse.steeringWheelAngle).to(equal(vehicleDataResult));
+ expect(testResponse.tirePressure).to(equal(vehicleDataResult));
+ expect(testResponse.turnSignal).to(equal(vehicleDataResult));
+ expect(testResponse.windowStatus).to(equal(vehicleDataResult));
+ expect(testResponse.wiperStatus).to(equal(vehicleDataResult));
+ });
+ });
- [testRequest setOEMCustomVehicleData:@"customOEMVehicleData" withVehicleDataState:customOEMvehicleDataResult];
+ context(@"should set OEM Custom Vehicle Data", ^{
+ SDLUnsubscribeVehicleDataResponse *testRequest = [[SDLUnsubscribeVehicleDataResponse alloc] init];
+ [testRequest setOEMCustomVehicleData:@"customOEMVehicleData" withVehicleDataState:customOEMvehicleDataResult];
- expect([testRequest getOEMCustomVehicleData:@"customOEMVehicleData"]).to(equal(customOEMvehicleDataResult));
+ it(@"expect OEM Custom Vehicle Data to be set properly", ^{
+ expect([testRequest getOEMCustomVehicleData:@"customOEMVehicleData"]).to(equal(customOEMvehicleDataResult));
+ });
});
});
diff --git a/SmartDeviceLinkTests/RPCSpecs/StructSpecs/SDLDriverDistractionCapabilitySpec.m b/SmartDeviceLinkTests/RPCSpecs/StructSpecs/SDLDriverDistractionCapabilitySpec.m
new file mode 100644
index 000000000..bd04b06ba
--- /dev/null
+++ b/SmartDeviceLinkTests/RPCSpecs/StructSpecs/SDLDriverDistractionCapabilitySpec.m
@@ -0,0 +1,60 @@
+//
+// SDLDriverDistractionCapabilitySpec.m
+// SmartDeviceLinkTests
+//
+// Created by Joel Fischer on 7/27/20.
+// Copyright © 2020 smartdevicelink. All rights reserved.
+//
+
+#import <Quick/Quick.h>
+#import <Nimble/Nimble.h>
+
+#import "SDLDriverDistractionCapability.h"
+#import "SDLRPCParameterNames.h"
+
+QuickSpecBegin(SDLDriverDistractionCapabilitySpec)
+
+describe(@"the driver distraction capability struct", ^{
+ __block SDLDriverDistractionCapability *testCapability = nil;
+ __block NSNumber *testMenuLength = @2;
+ __block NSNumber *testSubmenuDepth = @4;
+
+ beforeEach(^{
+ testCapability = [[SDLDriverDistractionCapability alloc] init];
+ });
+
+ describe(@"Getter/Setter Tests", ^ {
+ it(@"Should set and get correctly", ^ {
+ testCapability.menuLength = testMenuLength;
+ testCapability.subMenuDepth = testSubmenuDepth;
+
+ expect(testCapability.menuLength).to(equal(testMenuLength));
+ expect(testCapability.subMenuDepth).to(equal(testSubmenuDepth));
+ });
+
+ it(@"Should get correctly when initialized", ^ {
+ NSDictionary *dict = @{
+ SDLRPCParameterNameMenuLength: testMenuLength,
+ SDLRPCParameterNameSubMenuDepth: testSubmenuDepth
+ };
+ testCapability = [[SDLDriverDistractionCapability alloc] initWithDictionary:dict];
+
+ expect(testCapability.menuLength).to(equal(testMenuLength));
+ expect(testCapability.subMenuDepth).to(equal(testSubmenuDepth));
+ });
+
+ it(@"Should return nil if not set", ^ {
+ expect(testCapability.menuLength).to(beNil());
+ expect(testCapability.subMenuDepth).to(beNil());
+ });
+
+ it(@"should properly init with initWithMenuLength:subMenuDepth:", ^{
+ testCapability = [[SDLDriverDistractionCapability alloc] initWithMenuLength:testMenuLength subMenuDepth:testSubmenuDepth];
+
+ expect(testCapability.menuLength).to(equal(testMenuLength));
+ expect(testCapability.subMenuDepth).to(equal(testSubmenuDepth));
+ });
+ });
+});
+
+QuickSpecEnd
diff --git a/SmartDeviceLinkTests/RPCSpecs/StructSpecs/SDLDynamicUpdateCapabilitiesSpec.m b/SmartDeviceLinkTests/RPCSpecs/StructSpecs/SDLDynamicUpdateCapabilitiesSpec.m
new file mode 100644
index 000000000..7d2f5eb99
--- /dev/null
+++ b/SmartDeviceLinkTests/RPCSpecs/StructSpecs/SDLDynamicUpdateCapabilitiesSpec.m
@@ -0,0 +1,75 @@
+//
+// SDLDynamicUpdateCapabilitiesSpec.m
+// SmartDeviceLinkTests
+//
+// Created by Joel Fischer on 7/30/20.
+// Copyright © 2020 smartdevicelink. All rights reserved.
+//
+
+#import <Foundation/Foundation.h>
+
+#import <Quick/Quick.h>
+#import <Nimble/Nimble.h>
+
+#import "SDLDynamicUpdateCapabilities.h"
+
+#import "SDLImageFieldName.h"
+#import "SDLRPCParameterNames.h"
+
+QuickSpecBegin(SDLDynamicUpdateCapabilitiesSpec)
+
+__block SDLDynamicUpdateCapabilities *testStruct = nil;
+__block NSArray<SDLImageFieldName> *testImageFields = @[SDLImageFieldNameCommandIcon, SDLImageFieldNameSubMenuIcon];
+__block NSNumber<SDLBool> *testSupportsDynamicSubmenus = @YES;
+
+describe(@"when initializing with init", ^{
+ beforeEach(^{
+ testStruct = [[SDLDynamicUpdateCapabilities alloc] init];
+ });
+
+ it(@"should have no data", ^{
+ expect(testStruct.supportedDynamicImageFieldNames).to(beNil());
+ expect(testStruct.supportsDynamicSubMenus).to(beNil());
+ });
+
+ describe(@"when getting/setting parameters", ^{
+ beforeEach(^{
+ testStruct.supportedDynamicImageFieldNames = @[SDLImageFieldNameCommandIcon, SDLImageFieldNameSubMenuIcon];
+ testStruct.supportsDynamicSubMenus = testSupportsDynamicSubmenus;
+ });
+
+ it(@"should properly get/set the data", ^{
+ expect(testStruct.supportedDynamicImageFieldNames).to(equal(testImageFields));
+ expect(testStruct.supportsDynamicSubMenus).to(equal(testSupportsDynamicSubmenus));
+ });
+ });
+});
+
+describe(@"when initializing with a dictionary", ^{
+ beforeEach(^{
+ NSDictionary *testDict = @{
+ SDLRPCParameterNameSupportedDynamicImageFieldNames: testImageFields,
+ SDLRPCParameterNameSupportsDynamicSubMenus: testSupportsDynamicSubmenus
+ };
+
+ testStruct = [[SDLDynamicUpdateCapabilities alloc] initWithDictionary:testDict];
+ });
+
+ it(@"should properly get/set the data", ^{
+ expect(testStruct.supportedDynamicImageFieldNames).to(equal(testImageFields));
+ expect(testStruct.supportsDynamicSubMenus).to(equal(testSupportsDynamicSubmenus));
+ });
+});
+
+describe(@"when initializing with initWithSupportedDynamicImageFieldNames:supportsDynamicSubMenus:", ^{
+ beforeEach(^{
+ testStruct = [[SDLDynamicUpdateCapabilities alloc] initWithSupportedDynamicImageFieldNames:testImageFields supportsDynamicSubMenus:testSupportsDynamicSubmenus];
+ });
+
+ it(@"should properly get/set the data", ^{
+ expect(testStruct.supportedDynamicImageFieldNames).to(equal(testImageFields));
+ expect(testStruct.supportsDynamicSubMenus).to(equal(testSupportsDynamicSubmenus));
+ });
+});
+
+QuickSpecEnd
diff --git a/SmartDeviceLinkTests/RPCSpecs/StructSpecs/SDLFuelRangeSpec.m b/SmartDeviceLinkTests/RPCSpecs/StructSpecs/SDLFuelRangeSpec.m
index faad50b3b..bb4f31e36 100644
--- a/SmartDeviceLinkTests/RPCSpecs/StructSpecs/SDLFuelRangeSpec.m
+++ b/SmartDeviceLinkTests/RPCSpecs/StructSpecs/SDLFuelRangeSpec.m
@@ -15,36 +15,80 @@
#import "SDLRPCParameterNames.h"
QuickSpecBegin(SDLFuelRangeSpec)
+const float fuelLevel = 123.45f;
+const float fuelCapacity = 34.56f;
+const float range = 23.0f;
+SDLFuelType type = SDLFuelTypeDiesel;
+SDLComponentVolumeStatus levelState = SDLComponentVolumeStatusAlert;
+SDLCapacityUnit capacityUnit = SDLCapacityUnitKilowatthours;
-describe(@"Getter/Setter Tests", ^ {
- it(@"Should set and get correctly", ^ {
+describe(@"getter/setter tests", ^{
+ context(@"init and assign", ^{
SDLFuelRange *testStruct = [[SDLFuelRange alloc] init];
-
- testStruct.type = SDLFuelTypeDiesel;
- testStruct.range = @45;
-
- expect(testStruct.type).to(equal(SDLFuelTypeDiesel));
- expect(testStruct.range).to(equal(@45));
+ testStruct.type = type;
+ testStruct.range = @(range);
+ testStruct.level = @(fuelLevel);
+ testStruct.levelState = levelState;
+ testStruct.capacity = @(fuelCapacity);
+ testStruct.capacityUnit = capacityUnit;
+
+ it(@"expect all properties to be set properly", ^{
+ expect(testStruct.type).to(equal(type));
+ expect(testStruct.range).to(equal(@(range)));
+ expect(testStruct.level).to(equal(fuelLevel));
+ expect(testStruct.levelState).to(equal(levelState));
+ expect(testStruct.capacity).to(equal(fuelCapacity));
+ expect(testStruct.capacityUnit).to(equal(capacityUnit));
+ });
});
- it(@"Should get correctly when initialized", ^ {
- NSDictionary *dict = @{SDLRPCParameterNameType:SDLFuelTypeLPG,
- SDLRPCParameterNameRange:@23
+ context(@"should get correctly when initialized with dictionary", ^{
+ NSDictionary *dict = @{SDLRPCParameterNameType:type,
+ SDLRPCParameterNameRange:@(range),
+ SDLRPCParameterNameLevel:@(fuelLevel),
+ SDLRPCParameterNameLevelState:levelState,
+ SDLRPCParameterNameCapacity:@(fuelCapacity),
+ SDLRPCParameterNameCapacityUnit:capacityUnit
};
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
SDLFuelRange *testStruct = [[SDLFuelRange alloc] initWithDictionary:dict];
#pragma clang diagnostic pop
- expect(testStruct.type).to(equal(SDLFuelTypeLPG));
- expect(testStruct.range).to(equal(@23));
+ it(@"expect all properties to be set properly", ^{
+ expect(testStruct.type).to(equal(type));
+ expect(testStruct.range).to(equal(@(range)));
+ expect(testStruct.level).to(equal(fuelLevel));
+ expect(testStruct.levelState).to(equal(levelState));
+ expect(testStruct.capacity).to(equal(fuelCapacity));
+ expect(testStruct.capacityUnit).to(equal(capacityUnit));
+ });
});
- it(@"Should return nil if not set", ^ {
+ context(@"init", ^{
SDLFuelRange *testStruct = [[SDLFuelRange alloc] init];
- expect(testStruct.type).to(beNil());
- expect(testStruct.range).to(beNil());
+ it(@"expect all properties to be nil", ^{
+ expect(testStruct.type).to(beNil());
+ expect(testStruct.range).to(beNil());
+ expect(testStruct.level).to(beNil());
+ expect(testStruct.levelState).to(beNil());
+ expect(testStruct.capacity).to(beNil());
+ expect(testStruct.capacityUnit).to(beNil());
+ });
+ });
+
+ context(@"initWithType:range:level:levelState:capacity:capacityUnit:", ^{
+ SDLFuelRange *testStruct = [[SDLFuelRange alloc] initWithType:type range:range level:fuelLevel levelState:levelState capacity:fuelCapacity capacityUnit:capacityUnit];
+
+ it(@"expect all properties to be set properly", ^{
+ expect(testStruct.type).to(equal(type));
+ expect(testStruct.range).to(equal(@(range)));
+ expect(testStruct.level).to(equal(fuelLevel));
+ expect(testStruct.levelState).to(equal(levelState));
+ expect(testStruct.capacity).to(equal(fuelCapacity));
+ expect(testStruct.capacityUnit).to(equal(capacityUnit));
+ });
});
});
diff --git a/SmartDeviceLinkTests/RPCSpecs/StructSpecs/SDLGearStatusSpec.m b/SmartDeviceLinkTests/RPCSpecs/StructSpecs/SDLGearStatusSpec.m
new file mode 100644
index 000000000..990185f1e
--- /dev/null
+++ b/SmartDeviceLinkTests/RPCSpecs/StructSpecs/SDLGearStatusSpec.m
@@ -0,0 +1,48 @@
+//
+// SDLGearStatusSpec.m
+// SmartDeviceLinkTests
+//
+
+#import <Quick/Quick.h>
+#import <Nimble/Nimble.h>
+#import "SDLGearStatus.h"
+#import "SDLRPCParameterNames.h"
+
+QuickSpecBegin(SDLGearStatusSpec)
+
+describe(@"getter/setter tests", ^{
+ context(@"initWithUserSelectedGear:actualGear:transmissionType:", ^{
+ SDLGearStatus* testStruct = [[SDLGearStatus alloc] initWithUserSelectedGear:SDLPRNDLNinth actualGear:SDLPRNDLTenth transmissionType:SDLTransmissionTypeAutomatic];
+ it(@"expect all properties to be set properly", ^{
+ expect(testStruct.userSelectedGear).to(equal(SDLPRNDLNinth));
+ expect(testStruct.actualGear).to(equal(SDLPRNDLTenth));
+ expect(testStruct.transmissionType).to(equal(SDLTransmissionTypeAutomatic));
+ });
+ });
+
+ context(@"initWithDictionary", ^{
+ NSDictionary<NSString *, id> *dict = @{SDLRPCParameterNameUserSelectedGear:SDLPRNDLNinth,
+ SDLRPCParameterNameActualGear:SDLPRNDLTenth,
+ SDLRPCParameterNameTransmissionType:SDLTransmissionTypeAutomatic};
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
+ SDLGearStatus* testStruct = [[SDLGearStatus alloc] initWithDictionary:dict];
+#pragma clang diagnostic pop
+ it(@"should get correctly when initialized", ^{
+ expect(testStruct.userSelectedGear).to(equal(SDLPRNDLNinth));
+ expect(testStruct.actualGear).to(equal(SDLPRNDLTenth));
+ expect(testStruct.transmissionType).to(equal(SDLTransmissionTypeAutomatic));
+ });
+ });
+
+ context(@"init", ^{
+ SDLGearStatus* testStruct = [[SDLGearStatus alloc] init];
+ it(@"should return nil if not set", ^{
+ expect(testStruct.userSelectedGear).to(beNil());
+ expect(testStruct.actualGear).to(beNil());
+ expect(testStruct.transmissionType).to(beNil());
+ });
+ });
+});
+
+QuickSpecEnd
diff --git a/SmartDeviceLinkTests/RPCSpecs/StructSpecs/SDLHMICapabilitiesSpec.m b/SmartDeviceLinkTests/RPCSpecs/StructSpecs/SDLHMICapabilitiesSpec.m
index 8ecd92e6c..c5c18cd6a 100644
--- a/SmartDeviceLinkTests/RPCSpecs/StructSpecs/SDLHMICapabilitiesSpec.m
+++ b/SmartDeviceLinkTests/RPCSpecs/StructSpecs/SDLHMICapabilitiesSpec.m
@@ -19,9 +19,11 @@ describe(@"SDLHMICapabilities struct", ^{
__block NSNumber *someVideoStreamState = @NO;
__block NSNumber *someRemoteControlState = @YES;
__block NSNumber *someAppServicesState = @YES;
-
+ __block NSNumber *someDisplaysState = @YES;
+ __block NSNumber *someSeatLocationState = @NO;
+ __block NSNumber *someDriverDistractionState = @NO;
- context(@"When initialized with properties", ^{
+ context(@"when initialized with properties", ^{
beforeEach(^{
testStruct = [[SDLHMICapabilities alloc] init];
testStruct.phoneCall = somePhoneCallState;
@@ -29,6 +31,9 @@ describe(@"SDLHMICapabilities struct", ^{
testStruct.videoStreaming = someVideoStreamState;
testStruct.remoteControl = someRemoteControlState;
testStruct.appServices = someAppServicesState;
+ testStruct.displays = someDisplaysState;
+ testStruct.seatLocation = someSeatLocationState;
+ testStruct.driverDistraction = someDriverDistractionState;
});
it(@"should properly set properties", ^{
@@ -37,22 +42,26 @@ describe(@"SDLHMICapabilities struct", ^{
expect(testStruct.videoStreaming).to(equal(someVideoStreamState));
expect(testStruct.remoteControl).to(equal(someRemoteControlState));
expect(testStruct.appServices).to(equal(someAppServicesState));
+ expect(testStruct.displays).to(equal(someDisplaysState));
+ expect(testStruct.seatLocation).to(equal(someSeatLocationState));
+ expect(testStruct.driverDistraction).to(equal(someDriverDistractionState));
});
});
- context(@"When initialized with a dictionary", ^{
+ context(@"when initialized with a dictionary", ^{
beforeEach(^{
NSDictionary<NSString *, NSNumber *> *structInitDict = @{
SDLRPCParameterNameNavigation: someNavigationState,
SDLRPCParameterNamePhoneCall: somePhoneCallState,
SDLRPCParameterNameVideoStreaming: someVideoStreamState,
SDLRPCParameterNameRemoteControl: someRemoteControlState,
- SDLRPCParameterNameAppServices: someAppServicesState
+ SDLRPCParameterNameAppServices: someAppServicesState,
+ SDLRPCParameterNameDisplays: someDisplaysState,
+ SDLRPCParameterNameSeatLocation: someSeatLocationState,
+ SDLRPCParameterNameDriverDistraction: someDriverDistractionState
};
-#pragma clang diagnostic push
-#pragma clang diagnostic ignored "-Wdeprecated-declarations"
- testStruct = [[SDLHMICapabilities alloc] initWithDictionary:[structInitDict mutableCopy]];
-#pragma clang diagnostic pop
+
+ testStruct = [[SDLHMICapabilities alloc] initWithDictionary:structInitDict];
});
it(@"should properly set properties", ^{
@@ -61,20 +70,44 @@ describe(@"SDLHMICapabilities struct", ^{
expect(testStruct.videoStreaming).to(equal(someVideoStreamState));
expect(testStruct.remoteControl).to(equal(someRemoteControlState));
expect(testStruct.appServices).to(equal(someAppServicesState));
+ expect(testStruct.displays).to(equal(someDisplaysState));
+ expect(testStruct.seatLocation).to(equal(someSeatLocationState));
+ expect(testStruct.driverDistraction).to(equal(someDriverDistractionState));
});
});
- context(@"When not initialized", ^{
- beforeEach(^{
- testStruct = nil;
+ context(@"when initialized", ^{
+ context(@"with no parameters", ^{
+ beforeEach(^{
+ testStruct = [[SDLHMICapabilities alloc] init];
+ });
+
+ it(@"properties should be nil", ^{
+ expect(testStruct.phoneCall).to(beNil());
+ expect(testStruct.navigation).to(beNil());
+ expect(testStruct.videoStreaming).to(beNil());
+ expect(testStruct.remoteControl).to(beNil());
+ expect(testStruct.displays).to(beNil());
+ expect(testStruct.seatLocation).to(beNil());
+ expect(testStruct.appServices).to(beNil());
+ });
});
-
- it(@"properties should be nil", ^{
- expect(testStruct.phoneCall).to(beNil());
- expect(testStruct.navigation).to(beNil());
- expect(testStruct.videoStreaming).to(beNil());
- expect(testStruct.remoteControl).to(beNil());
- expect(testStruct.appServices).to(beNil());
+
+ context(@"with initWithNavigation:phoneCall:videoStreaming:remoteControl:appServices:displays:seatLocation:driverDistraction:", ^{
+ beforeEach(^{
+ testStruct = [[SDLHMICapabilities alloc] initWithNavigation:someNavigationState phoneCall:somePhoneCallState videoStreaming:someVideoStreamState remoteControl:someRemoteControlState appServices:someAppServicesState displays:someDisplaysState seatLocation:someSeatLocationState driverDistraction:someDriverDistractionState];
+ });
+
+ it(@"properties should be nil", ^{
+ expect(testStruct.phoneCall).to(equal(somePhoneCallState));
+ expect(testStruct.navigation).to(equal(someNavigationState));
+ expect(testStruct.videoStreaming).to(equal(someVideoStreamState));
+ expect(testStruct.remoteControl).to(equal(someRemoteControlState));
+ expect(testStruct.appServices).to(equal(someAppServicesState));
+ expect(testStruct.displays).to(equal(someDisplaysState));
+ expect(testStruct.seatLocation).to(equal(someSeatLocationState));
+ expect(testStruct.driverDistraction).to(equal(someDriverDistractionState));
+ });
});
});
});
diff --git a/SmartDeviceLinkTests/RPCSpecs/StructSpecs/SDLMenuParamsSpec.m b/SmartDeviceLinkTests/RPCSpecs/StructSpecs/SDLMenuParamsSpec.m
index 95af8629e..2736f3500 100644
--- a/SmartDeviceLinkTests/RPCSpecs/StructSpecs/SDLMenuParamsSpec.m
+++ b/SmartDeviceLinkTests/RPCSpecs/StructSpecs/SDLMenuParamsSpec.m
@@ -27,9 +27,9 @@ describe(@"Initialization tests", ^{
});
it(@"should properly initialize initWithDictionary", ^{
- NSMutableDictionary* dict = [@{SDLRPCParameterNameParentId:@(testParentId),
+ NSDictionary *dict = @{SDLRPCParameterNameParentID:@(testParentId),
SDLRPCParameterNamePosition:@(testPosition),
- SDLRPCParameterNameMenuName:testMenuName} mutableCopy];
+ SDLRPCParameterNameMenuName:testMenuName};
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
SDLMenuParams* testStruct = [[SDLMenuParams alloc] initWithDictionary:dict];
diff --git a/SmartDeviceLinkTests/RPCSpecs/StructSpecs/SDLSystemCapabilitySpec.m b/SmartDeviceLinkTests/RPCSpecs/StructSpecs/SDLSystemCapabilitySpec.m
index d41f553b6..68bd020f0 100755
--- a/SmartDeviceLinkTests/RPCSpecs/StructSpecs/SDLSystemCapabilitySpec.m
+++ b/SmartDeviceLinkTests/RPCSpecs/StructSpecs/SDLSystemCapabilitySpec.m
@@ -6,17 +6,18 @@
#import "SDLSystemCapability.h"
#import "SDLAppServicesCapabilities.h"
+#import "SDLDriverDistractionCapability.h"
#import "SDLImageResolution.h"
#import "SDLNavigationCapability.h"
#import "SDLPhoneCapability.h"
-#import "SDLSystemCapabilityType.h"
#import "SDLRemoteControlCapabilities.h"
#import "SDLRPCParameterNames.h"
+#import "SDLSeatLocationCapability.h"
+#import "SDLSystemCapabilityType.h"
#import "SDLVideoStreamingCapability.h"
#import "SDLVideoStreamingCodec.h"
#import "SDLVideoStreamingFormat.h"
#import "SDLVideoStreamingProtocol.h"
-#import "SDLSeatLocationCapability.h"
#import "SDLRPCParameterNames.h"
@@ -29,6 +30,7 @@ describe(@"Getter/Setter Tests", ^ {
__block SDLRemoteControlCapabilities *testRemoteControlCapabilities = nil;
__block SDLVideoStreamingCapability *testVideoStreamingCapability = nil;
__block SDLSeatLocationCapability *testSeatLocationCapability = nil;
+ __block SDLDriverDistractionCapability *testDriverDistractionCapability = nil;
beforeEach(^{
testAppServicesCapabilities = [[SDLAppServicesCapabilities alloc] initWithAppServices:nil];
@@ -37,6 +39,7 @@ describe(@"Getter/Setter Tests", ^ {
testRemoteControlCapabilities = [[SDLRemoteControlCapabilities alloc] initWithClimateControlCapabilities:nil radioControlCapabilities:nil buttonCapabilities:nil seatControlCapabilities:nil audioControlCapabilities:nil hmiSettingsControlCapabilities:nil lightControlCapabilities:nil];
testVideoStreamingCapability = [[SDLVideoStreamingCapability alloc] initWithPreferredResolution:[[SDLImageResolution alloc] initWithWidth:50 height:50] maxBitrate:5 supportedFormats:@[] hapticDataSupported:false diagonalScreenSize:23 pixelPerInch:119 scale:1.4];
testSeatLocationCapability = [[SDLSeatLocationCapability alloc] init];
+ testDriverDistractionCapability = [[SDLDriverDistractionCapability alloc] initWithMenuLength:@2 subMenuDepth:@4];
});
it(@"Should set and get correctly", ^ {
@@ -48,6 +51,7 @@ describe(@"Getter/Setter Tests", ^ {
testStruct.videoStreamingCapability = testVideoStreamingCapability;
testStruct.remoteControlCapability = testRemoteControlCapabilities;
testStruct.seatLocationCapability = testSeatLocationCapability;
+ testStruct.driverDistractionCapability = testDriverDistractionCapability;
expect(testStruct.systemCapabilityType).to(equal(SDLSystemCapabilityTypeNavigation));
expect(testStruct.appServicesCapabilities).to(equal(testAppServicesCapabilities));
@@ -56,17 +60,19 @@ describe(@"Getter/Setter Tests", ^ {
expect(testStruct.videoStreamingCapability).to(equal(testVideoStreamingCapability));
expect(testStruct.remoteControlCapability).to(equal(testRemoteControlCapabilities));
expect(testStruct.seatLocationCapability).to(equal(testSeatLocationCapability));
+ expect(testStruct.driverDistractionCapability).to(equal(testDriverDistractionCapability));
});
it(@"Should get correctly when initialized with a dictionary", ^ {
NSDictionary *dict = @{
- SDLRPCParameterNameSystemCapabilityType:SDLSystemCapabilityTypeNavigation,
- SDLRPCParameterNameAppServicesCapabilities:testAppServicesCapabilities,
- SDLRPCParameterNameNavigationCapability:testNavigationCapability,
- SDLRPCParameterNamePhoneCapability:testPhoneCapability,
- SDLRPCParameterNameRemoteControlCapability:testRemoteControlCapabilities,
- SDLRPCParameterNameVideoStreamingCapability:testVideoStreamingCapability,
- SDLRPCParameterNameSeatLocationCapability:testSeatLocationCapability
+ SDLRPCParameterNameSystemCapabilityType: SDLSystemCapabilityTypeNavigation,
+ SDLRPCParameterNameAppServicesCapabilities: testAppServicesCapabilities,
+ SDLRPCParameterNameNavigationCapability: testNavigationCapability,
+ SDLRPCParameterNamePhoneCapability: testPhoneCapability,
+ SDLRPCParameterNameRemoteControlCapability: testRemoteControlCapabilities,
+ SDLRPCParameterNameVideoStreamingCapability: testVideoStreamingCapability,
+ SDLRPCParameterNameSeatLocationCapability: testSeatLocationCapability,
+ SDLRPCParameterNameDriverDistractionCapability: testDriverDistractionCapability
};
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
@@ -80,6 +86,7 @@ describe(@"Getter/Setter Tests", ^ {
expect(testStruct.remoteControlCapability).to(equal(testRemoteControlCapabilities));
expect(testStruct.videoStreamingCapability).to(equal(testVideoStreamingCapability));
expect(testStruct.seatLocationCapability).to(equal(testSeatLocationCapability));
+ expect(testStruct.driverDistractionCapability).to(equal(testDriverDistractionCapability));
});
it(@"Should return nil if not set", ^ {
@@ -92,6 +99,7 @@ describe(@"Getter/Setter Tests", ^ {
expect(testStruct.videoStreamingCapability).to(beNil());
expect(testStruct.remoteControlCapability).to(beNil());
expect(testStruct.seatLocationCapability).to(beNil());
+ expect(testStruct.driverDistractionCapability).to(beNil());
});
it(@"should initialize correctly with initWithAppServicesCapabilities:", ^{
@@ -104,6 +112,7 @@ describe(@"Getter/Setter Tests", ^ {
expect(testStruct.remoteControlCapability).to(beNil());
expect(testStruct.videoStreamingCapability).to(beNil());
expect(testStruct.seatLocationCapability).to(beNil());
+ expect(testStruct.driverDistractionCapability).to(beNil());
});
it(@"should initialize correctly with initWithPhoneCapability:", ^{
@@ -117,6 +126,7 @@ describe(@"Getter/Setter Tests", ^ {
expect(testStruct.remoteControlCapability).to(beNil());
expect(testStruct.videoStreamingCapability).to(beNil());
expect(testStruct.seatLocationCapability).to(beNil());
+ expect(testStruct.driverDistractionCapability).to(beNil());
});
it(@"should initialize correctly with initWithNavigationCapability:", ^{
@@ -130,6 +140,7 @@ describe(@"Getter/Setter Tests", ^ {
expect(testStruct.remoteControlCapability).to(beNil());
expect(testStruct.videoStreamingCapability).to(beNil());
expect(testStruct.seatLocationCapability).to(beNil());
+ expect(testStruct.driverDistractionCapability).to(beNil());
});
it(@"should initialize correctly with initWithVideoStreamingCapability:", ^{
@@ -160,6 +171,7 @@ describe(@"Getter/Setter Tests", ^ {
expect(testStruct.remoteControlCapability).to(beNil());
expect(testStruct.videoStreamingCapability).to(equal(testVidStruct));
expect(testStruct.seatLocationCapability).to(beNil());
+ expect(testStruct.driverDistractionCapability).to(beNil());
});
it(@"should initialize correctly with initWithRemoteControlCapability:", ^{
@@ -172,6 +184,7 @@ describe(@"Getter/Setter Tests", ^ {
expect(testStruct.remoteControlCapability).to(equal(testRemoteControlCapabilities));
expect(testStruct.videoStreamingCapability).to(beNil());
expect(testStruct.seatLocationCapability).to(beNil());
+ expect(testStruct.driverDistractionCapability).to(beNil());
});
it(@"should initialize correctly with initWithSeatLocationCapability:", ^{
@@ -184,6 +197,20 @@ describe(@"Getter/Setter Tests", ^ {
expect(testStruct.remoteControlCapability).to(beNil());
expect(testStruct.videoStreamingCapability).to(beNil());
expect(testStruct.seatLocationCapability).to(equal(testSeatLocationCapability));
+ expect(testStruct.driverDistractionCapability).to(beNil());
+ });
+
+ it(@"should initialize correctly with initWithDriverDistractionCapability:", ^{
+ SDLSystemCapability *testStruct = [[SDLSystemCapability alloc] initWithDriverDistractionCapability:testDriverDistractionCapability];
+
+ expect(testStruct.systemCapabilityType).to(equal(SDLSystemCapabilityTypeDriverDistraction));
+ expect(testStruct.appServicesCapabilities).to(beNil());
+ expect(testStruct.navigationCapability).to(beNil());
+ expect(testStruct.phoneCapability).to(beNil());
+ expect(testStruct.remoteControlCapability).to(beNil());
+ expect(testStruct.videoStreamingCapability).to(beNil());
+ expect(testStruct.seatLocationCapability).to(beNil());
+ expect(testStruct.driverDistractionCapability).to(equal(testDriverDistractionCapability));
});
});
diff --git a/SmartDeviceLinkTests/RPCSpecs/StructSpecs/SDLTextFieldSpec.m b/SmartDeviceLinkTests/RPCSpecs/StructSpecs/SDLTextFieldSpec.m
index fcde49e1e..d8b6e8983 100644
--- a/SmartDeviceLinkTests/RPCSpecs/StructSpecs/SDLTextFieldSpec.m
+++ b/SmartDeviceLinkTests/RPCSpecs/StructSpecs/SDLTextFieldSpec.m
@@ -18,7 +18,7 @@ QuickSpecBegin(SDLTextFieldSpec)
describe(@"Getter/Setter Tests", ^ {
__block SDLTextFieldName testName = SDLTextFieldNameETA;
- __block SDLCharacterSet testCharacterSet = SDLCharacterSetCID1;
+ __block SDLCharacterSet testCharacterSet = SDLCharacterSetUtf8;
__block NSUInteger testWidth = 100;
__block NSUInteger testRows = 4;
diff --git a/SmartDeviceLinkTests/RPCSpecs/StructSpecs/SDLWindowCapabilitySpec.m b/SmartDeviceLinkTests/RPCSpecs/StructSpecs/SDLWindowCapabilitySpec.m
index 94eecde90..e8c2514b4 100644
--- a/SmartDeviceLinkTests/RPCSpecs/StructSpecs/SDLWindowCapabilitySpec.m
+++ b/SmartDeviceLinkTests/RPCSpecs/StructSpecs/SDLWindowCapabilitySpec.m
@@ -6,25 +6,32 @@
#import <Nimble/Nimble.h>
#import "SDLWindowCapability.h"
-#import "SDLRPCParameterNames.h"
-#import "SDLTextField.h"
-#import "SDLTextFieldName.h"
+
+#import "SDLButtonCapabilities.h"
+#import "SDLDynamicUpdateCapabilities.h"
#import "SDLImageField.h"
#import "SDLImageType.h"
-#import "SDLButtonCapabilities.h"
+#import "SDLRPCParameterNames.h"
#import "SDLSoftButtonCapabilities.h"
+#import "SDLTextField.h"
+#import "SDLTextFieldName.h"
QuickSpecBegin(SDLWindowCapabilitySpec)
+__block SDLWindowCapability *testStruct = nil;
+
+__block SDLTextField* testTextField = nil;
+__block SDLImageField *testImageField = nil;
+__block SDLButtonCapabilities *testButtonCapabilities = nil;
+__block SDLSoftButtonCapabilities *testSoftButtonsCapabilities = nil;
+__block SDLImageType testImageType = nil;
+__block NSString *testTextName = nil;
+__block NSString *testImageName = nil;
+__block NSString *testTemplateAvailable = nil;
+__block SDLMenuLayout testMenuLayout = SDLMenuLayoutTiles;
+__block SDLDynamicUpdateCapabilities *testDynamicUpdates = nil;
+
describe(@"Getter/Setter Tests", ^ {
- __block SDLTextField* testTextField = nil;
- __block SDLImageField *testImageField = nil;
- __block SDLButtonCapabilities *testButtonCapabilities = nil;
- __block SDLSoftButtonCapabilities *testSoftButtonscapabilities = nil;
- __block SDLImageType testImageType = nil;
- __block NSString *testTextName = nil;
- __block NSString *testImageName = nil;
-
beforeEach(^{
testImageType = SDLImageTypeDynamic;
testTextName = @"test Text field";
@@ -41,20 +48,25 @@ describe(@"Getter/Setter Tests", ^ {
testButtonCapabilities.longPressAvailable = @YES;
testButtonCapabilities.upDownAvailable = @YES;
- testSoftButtonscapabilities = [[SDLSoftButtonCapabilities alloc] init];
- testSoftButtonscapabilities.imageSupported = @YES;
+ testSoftButtonsCapabilities = [[SDLSoftButtonCapabilities alloc] init];
+ testSoftButtonsCapabilities.imageSupported = @YES;
+
+ testTemplateAvailable = @"myTemplate";
+ testDynamicUpdates = [[SDLDynamicUpdateCapabilities alloc] initWithSupportedDynamicImageFieldNames:@[SDLImageFieldNameSubMenuIcon] supportsDynamicSubMenus:@YES];
});
it(@"Should set and get correctly", ^ {
- SDLWindowCapability* testStruct = testStruct = [[SDLWindowCapability alloc] init];
+ testStruct = [[SDLWindowCapability alloc] init];
testStruct.windowID = @444;
testStruct.numCustomPresetsAvailable = @10;
testStruct.textFields = @[testTextField];
testStruct.imageFields = @[testImageField];
testStruct.imageTypeSupported = @[testImageType];
testStruct.buttonCapabilities = @[testButtonCapabilities];
- testStruct.softButtonCapabilities = @[testSoftButtonscapabilities];
- testStruct.menuLayoutsAvailable = @[SDLMenuLayoutTiles];
+ testStruct.softButtonCapabilities = @[testSoftButtonsCapabilities];
+ testStruct.menuLayoutsAvailable = @[testMenuLayout];
+ testStruct.templatesAvailable = @[testTemplateAvailable];
+ testStruct.dynamicUpdateCapabilities = testDynamicUpdates;
expect(testStruct.windowID).to(equal(@444));
expect(testStruct.textFields.firstObject.name).to(equal(SDLTextFieldNameTertiaryText));
@@ -65,9 +77,43 @@ describe(@"Getter/Setter Tests", ^ {
expect(testStruct.buttonCapabilities.firstObject.longPressAvailable).to(equal(@YES));
expect(testStruct.buttonCapabilities.firstObject.name).to(equal(SDLButtonNameOk));
expect(testStruct.softButtonCapabilities.firstObject.imageSupported).to(equal(@YES));
- expect(testStruct.menuLayoutsAvailable).to(equal(@[SDLMenuLayoutTiles]));
+ expect(testStruct.menuLayoutsAvailable).to(equal(@[testMenuLayout]));
+ expect(testStruct.templatesAvailable).to(equal(@[testTemplateAvailable]));
+ expect(testStruct.dynamicUpdateCapabilities).to(equal(testDynamicUpdates));
+ });
+});
+
+describe(@"initializing with ", ^{
+ beforeEach(^{
+ testStruct = [[SDLWindowCapability alloc] initWithWindowID:@444 textFields:@[testTextField] imageFields:@[testImageField] imageTypeSupported:@[testImageType] templatesAvailable:@[testTemplateAvailable] numCustomPresetsAvailable:@10 buttonCapabilities:@[testButtonCapabilities] softButtonCapabilities:@[testSoftButtonsCapabilities] menuLayoutsAvailable:@[testMenuLayout] dynamicUpdateCapabilities:testDynamicUpdates];
+ });
+
+ it(@"Should set and get correctly", ^ {
+ testStruct = [[SDLWindowCapability alloc] init];
+ testStruct.windowID = @444;
+ testStruct.numCustomPresetsAvailable = @10;
+ testStruct.textFields = @[testTextField];
+ testStruct.imageFields = @[testImageField];
+ testStruct.imageTypeSupported = @[testImageType];
+ testStruct.buttonCapabilities = @[testButtonCapabilities];
+ testStruct.softButtonCapabilities = @[testSoftButtonsCapabilities];
+ testStruct.menuLayoutsAvailable = @[testMenuLayout];
+ testStruct.templatesAvailable = @[testTemplateAvailable];
+ testStruct.dynamicUpdateCapabilities = testDynamicUpdates;
+
+ expect(testStruct.windowID).to(equal(@444));
+ expect(testStruct.textFields.firstObject.name).to(equal(SDLTextFieldNameTertiaryText));
+ expect(testStruct.imageFields.firstObject.name).to(equal(testImageName));
+ expect(testStruct.numCustomPresetsAvailable).to(equal(@10));
+ expect(testStruct.buttonCapabilities.firstObject.name).to(equal(SDLButtonNameOk));
+ expect(testStruct.buttonCapabilities.firstObject.shortPressAvailable).to(equal(@YES));
+ expect(testStruct.buttonCapabilities.firstObject.longPressAvailable).to(equal(@YES));
+ expect(testStruct.buttonCapabilities.firstObject.name).to(equal(SDLButtonNameOk));
+ expect(testStruct.softButtonCapabilities.firstObject.imageSupported).to(equal(@YES));
+ expect(testStruct.menuLayoutsAvailable).to(equal(@[testMenuLayout]));
+ expect(testStruct.templatesAvailable).to(equal(@[testTemplateAvailable]));
+ expect(testStruct.dynamicUpdateCapabilities).to(equal(testDynamicUpdates));
});
-
});
QuickSpecEnd
diff --git a/SmartDeviceLinkTests/RPCSpecs/StructSpecs/SDLWindowStateSpec.m b/SmartDeviceLinkTests/RPCSpecs/StructSpecs/SDLWindowStateSpec.m
new file mode 100644
index 000000000..efed67b35
--- /dev/null
+++ b/SmartDeviceLinkTests/RPCSpecs/StructSpecs/SDLWindowStateSpec.m
@@ -0,0 +1,50 @@
+//
+// SDLWindowStateSpec.m
+// SmartDeviceLinkTests
+//
+
+#import <Foundation/Foundation.h>
+#import <Nimble/Nimble.h>
+#import <Quick/Quick.h>
+#import "SDLRPCParameterNames.h"
+#import "SDLWindowState.h"
+
+QuickSpecBegin(SDLWindowStateSpec)
+
+const UInt8 approximatePosition = 13;
+const UInt8 deviation = 42;
+
+describe(@"getter/setter tests", ^{
+ context(@"initWithApproximatePosition:deviation:", ^{
+ SDLWindowState *testStruct = [[SDLWindowState alloc] initWithApproximatePosition:approximatePosition deviation:deviation];
+
+ it(@"expect all properties to be set properly", ^{
+ expect(testStruct.approximatePosition).to(equal(approximatePosition));
+ expect(testStruct.deviation).to(equal(deviation));
+ });
+ });
+
+ context(@"initWithDictionary:", ^{
+ NSDictionary *dict = @{SDLRPCParameterNameDeviation:@(deviation), SDLRPCParameterNameApproximatePosition:@(approximatePosition)};
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
+ SDLWindowState *testStruct = [[SDLWindowState alloc] initWithDictionary:dict];
+#pragma clang diagnostic pop
+
+ it(@"expect all properties to be set properly", ^{
+ expect(testStruct.approximatePosition).to(equal(approximatePosition));
+ expect(testStruct.deviation).to(equal(deviation));
+ });
+ });
+
+ context(@"init", ^{
+ SDLWindowState *testStruct = [[SDLWindowState alloc] init];
+
+ it(@"should return nil if not set", ^{
+ expect(testStruct.approximatePosition).to(beNil());
+ expect(testStruct.deviation).to(beNil());
+ });
+ });
+});
+
+QuickSpecEnd
diff --git a/SmartDeviceLinkTests/RPCSpecs/StructSpecs/SDLWindowStatusSpec.m b/SmartDeviceLinkTests/RPCSpecs/StructSpecs/SDLWindowStatusSpec.m
new file mode 100644
index 000000000..5214de55c
--- /dev/null
+++ b/SmartDeviceLinkTests/RPCSpecs/StructSpecs/SDLWindowStatusSpec.m
@@ -0,0 +1,56 @@
+//
+// SDLWindowStatusSpec.m
+// SmartDeviceLinkTests
+//
+
+#import <Foundation/Foundation.h>
+#import <Nimble/Nimble.h>
+#import <Quick/Quick.h>
+#import "SDLGrid.h"
+#import "SDLRPCParameterNames.h"
+#import "SDLWindowState.h"
+#import "SDLWindowStatus.h"
+
+const UInt8 approximatePosition = 13;
+const UInt8 deviation = 42;
+
+QuickSpecBegin(SDLWindowStatusSpec)
+
+describe(@"getter/setter tests", ^{
+ context(@"initWithLocation:state", ^{
+ SDLWindowState *state = [[SDLWindowState alloc] initWithApproximatePosition:approximatePosition deviation:deviation];
+ SDLGrid *location = [[SDLGrid alloc] init];
+ SDLWindowStatus *testStruct = [[SDLWindowStatus alloc] initWithLocation:location state:state];
+
+ it(@"expect all properties to be set properly", ^{
+ expect(testStruct.location).to(equal(location));
+ expect(testStruct.state).to(equal(state));
+ });
+ });
+
+ context(@"initWithDictionary:", ^{
+ SDLWindowState *state = [[SDLWindowState alloc] initWithApproximatePosition:approximatePosition deviation:deviation];
+ SDLGrid *location = [[SDLGrid alloc] init];
+ NSDictionary *dict = @{SDLRPCParameterNameLocation:location, SDLRPCParameterNameState:state};
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
+ SDLWindowStatus *testStruct = [[SDLWindowStatus alloc] initWithDictionary:dict];
+#pragma clang diagnostic pop
+
+ it(@"expect all properties to be set properly", ^{
+ expect(testStruct.location).to(equal(location));
+ expect(testStruct.state).to(equal(state));
+ });
+ });
+
+ context(@"init", ^{
+ SDLWindowStatus *testStruct = [[SDLWindowStatus alloc] init];
+
+ it(@"should return nil if not set", ^{
+ expect(testStruct.location).to(beNil());
+ expect(testStruct.state).to(beNil());
+ });
+ });
+});
+
+QuickSpecEnd
diff --git a/SmartDeviceLinkTests/SDLSystemCapabilityManagerSpec.m b/SmartDeviceLinkTests/SDLSystemCapabilityManagerSpec.m
index ad77dea1d..798a1499a 100644
--- a/SmartDeviceLinkTests/SDLSystemCapabilityManagerSpec.m
+++ b/SmartDeviceLinkTests/SDLSystemCapabilityManagerSpec.m
@@ -64,6 +64,7 @@ typedef NSString * SDLServiceID;
@property (nullable, strong, nonatomic, readwrite) SDLVideoStreamingCapability *videoStreamingCapability;
@property (nullable, strong, nonatomic, readwrite) SDLRemoteControlCapabilities *remoteControlCapability;
@property (nullable, strong, nonatomic, readwrite) SDLSeatLocationCapability *seatLocationCapability;
+@property (nullable, strong, nonatomic, readwrite) SDLDriverDistractionCapability *driverDistractionCapability;
@property (nullable, strong, nonatomic) NSMutableDictionary<SDLServiceID, SDLAppServiceCapability *> *appServicesCapabilitiesDictionary;
@@ -104,7 +105,7 @@ describe(@"System capability manager", ^{
#pragma clang diagnostic pop
SDLTextField *textField = [[SDLTextField alloc] init];
textField.name = SDLTextFieldNameMainField1;
- textField.characterSet = SDLCharacterSetCID1;
+ textField.characterSet = SDLCharacterSetUtf8;
textField.width = @(123);
textField.rows = @(1);
testDisplayCapabilities.textFields = @[textField];
@@ -172,6 +173,7 @@ describe(@"System capability manager", ^{
expect(testSystemCapabilityManager.remoteControlCapability).to(beNil());
expect(testSystemCapabilityManager.appServicesCapabilities).to(beNil());
expect(testSystemCapabilityManager.seatLocationCapability).to(beNil());
+ expect(testSystemCapabilityManager.driverDistractionCapability).to(beNil());
expect(testSystemCapabilityManager.currentHMILevel).to(equal(SDLHMILevelNone));
});
@@ -911,6 +913,7 @@ describe(@"System capability manager", ^{
expect(testSystemCapabilityManager.videoStreamingCapability).to(beNil());
expect(testSystemCapabilityManager.remoteControlCapability).to(beNil());
expect(testSystemCapabilityManager.appServicesCapabilities).to(beNil());
+ expect(testSystemCapabilityManager.driverDistractionCapability).to(beNil());
expect(testSystemCapabilityManager.seatLocationCapability).to(beNil());
});
});
diff --git a/SmartDeviceLink_Example/SubscribeButtonManager.m b/SmartDeviceLink_Example/SubscribeButtonManager.m
index 80512a7b2..cbe819288 100644
--- a/SmartDeviceLink_Example/SubscribeButtonManager.m
+++ b/SmartDeviceLink_Example/SubscribeButtonManager.m
@@ -56,8 +56,7 @@ NS_ASSUME_NONNULL_BEGIN
alertMessage = [NSString stringWithFormat:@"%@ long pressed", buttonName];
}
- SDLAlert *alert = [AlertManager alertWithMessageAndCloseButton:alertMessage textField2:nil iconName:nil];
- [self.sdlManager sendRPC:alert];
+ [AlertManager sendAlertWithManager:self.sdlManager image:nil textField1:alertMessage textField2:nil];
}
+ (NSArray<SDLButtonName> *)sdlex_allPresetButtons {
diff --git a/SmartDeviceLink_Example/SubscribeButtonManager.swift b/SmartDeviceLink_Example/SubscribeButtonManager.swift
index 6567d9e64..1bf128c1d 100644
--- a/SmartDeviceLink_Example/SubscribeButtonManager.swift
+++ b/SmartDeviceLink_Example/SubscribeButtonManager.swift
@@ -38,16 +38,13 @@ class SubscribeButtonManager: NSObject {
guard let buttonPress = buttonPress else { return }
- let alert: SDLAlert
let buttonNameString = buttonName.rawValue.rawValue
switch buttonPress.buttonPressMode {
case .short:
- alert = AlertManager.alertWithMessageAndCloseButton("\(buttonNameString) short pressed")
+ AlertManager.sendAlert(textField1: "\(buttonNameString) short pressed", sdlManager: sdlManager)
case .long:
- alert = AlertManager.alertWithMessageAndCloseButton("\(buttonNameString) long pressed")
+ AlertManager.sendAlert(textField1: "\(buttonNameString) long pressed", sdlManager: sdlManager)
default: fatalError()
}
-
- sdlManager.send(alert)
}
}
diff --git a/generator/templates/base_struct_function.m.jinja2 b/generator/templates/base_struct_function.m.jinja2
index 30bb2e976..ee17b5ccf 100644
--- a/generator/templates/base_struct_function.m.jinja2
+++ b/generator/templates/base_struct_function.m.jinja2
@@ -25,7 +25,7 @@ NS_ASSUME_NONNULL_BEGIN
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
{%- endif %}
- (instancetype)initWith{{c.init}} {
- self = [{{ 'self' if c.self else 'super' }} init{{ 'With' + c.self if c.self and c.self is string }}];
+ self = [self init{{ 'With' + c.self if c.self and c.self is string }}];
if (!self) {
return nil;
}
diff --git a/generator/transformers/common_producer.py b/generator/transformers/common_producer.py
index ac7bc6167..13b56fd11 100644
--- a/generator/transformers/common_producer.py
+++ b/generator/transformers/common_producer.py
@@ -32,7 +32,7 @@ class InterfaceProducerCommon(ABC):
'origin constructor_argument constructor_prefix deprecated mandatory since '
'method_suffix of_class type_native type_sdl modifier for_name description '
'constructor_argument_override')
- self.constructor_named = namedtuple('constructor', 'init self arguments all deprecated')
+ self.constructor_named = namedtuple('constructor', 'init self arguments all')
self.argument_named = namedtuple('argument', 'origin constructor_argument variable deprecated')
self.names = self.struct_names + tuple(map(lambda e: self._replace_sync(e), enum_names))
@@ -147,7 +147,7 @@ class InterfaceProducerCommon(ABC):
return name[:1].lower() + name[1:]
@staticmethod
- def extract_description(data, length: int = 113) -> list:
+ def extract_description(data, length: int = 2048) -> list:
"""
Evaluate, align and delete @TODO
:param data: list with description
@@ -175,7 +175,7 @@ class InterfaceProducerCommon(ABC):
def parentheses(self, item):
"""
Used for wrapping appropriate initiator (constructor) parameter with '@({})'
- :param item: named tup[le with initiator (constructor) parameter
+ :param item: named tuple with initiator (constructor) parameter
:return: wrapped parameter
"""
if re.match(r'\w*Int\d+|BOOL|float|double', item.type_native) or \
@@ -215,8 +215,10 @@ class InterfaceProducerCommon(ABC):
"""
mandatory = []
not_mandatory = []
- deprecated = any([m.deprecated for m in data.values() if getattr(m, 'deprecated', False)])
for param in data.values():
+ if param.deprecated:
+ # Omit deprecated parameters from the constructors
+ continue
if param.mandatory:
mandatory.append(param)
else:
@@ -225,13 +227,11 @@ class InterfaceProducerCommon(ABC):
result = []
if mandatory:
mandatory = self.extract_constructor(mandatory, True)
- mandatory['deprecated'] = deprecated
else:
mandatory = OrderedDict()
if not_mandatory:
not_mandatory = self.extract_constructor(not_mandatory, False)
- not_mandatory['deprecated'] = deprecated
if mandatory:
not_mandatory['init'] = '{} {}'.format(mandatory['init'], self.minimize_first(not_mandatory['init']))
not_mandatory['all'] = mandatory['arguments'] + not_mandatory['arguments']
@@ -337,9 +337,57 @@ class InterfaceProducerCommon(ABC):
'mandatory': param.is_mandatory,
'deprecated': json.loads(param.deprecated.lower()) if param.deprecated else False,
'modifier': 'strong'}
- if isinstance(param.param_type, (Integer, Float, String)):
- data['description'].append(json.dumps(vars(param.param_type), sort_keys=True))
+ if isinstance(param.param_type, (Integer, Float, String, Array)):
+ data['description'].append(self.create_param_descriptor(param.param_type, OrderedDict()))
data.update(self.extract_type(param))
data.update(self.param_origin_change(param.name))
return self.param_named(**data)
+
+ def create_param_descriptor(self, param_type, parameterItems):
+ """
+ Recursively creates a documentation string of all the descriptors for a parameter (e.g. {"string_min_length": 1, string_max_length": 500}). The parameters should be returned in the same order they were added to the parameterItems dictionary
+ :param param_type: param_type from the initial Model
+ :param parameterItems: Ordered dictionary that stores each of the parameter's descriptors
+ :return: All the descriptor params from param_type concatenated into one string
+ """
+ # The key is a descriptor (i.e. max_value) and value is the associated value (i.e. 100). Some values will be dictionaries that have to be parsed to get additional descriptors (e.g. the value for an array of strings' data type will be sub-dictionary describing the min_length, max_length, and default value for the strings used in the array)
+ for key, value in param_type.__dict__.items():
+ # If a value contains a dictionary, recurse until all the descriptors have been found. Once a descriptor (i.e. `max_size`) has been found along with its associated value (i.e. 100), add the descriptor/value pair to the parameterItems dictionary
+ if hasattr(value, '__dict__'):
+ if isinstance(value, Enum) or isinstance(value, Struct):
+ # Skip adding documentation for the data type if it is a struct or enum. This is unnecessary as each enum or struct has its own documentation
+ continue
+ else:
+ self.create_param_descriptor(value, parameterItems)
+ else:
+ if key == 'default_value' and value is None:
+ # Do not add the default_value key/value pair unless it has been explicitly set in the RPC Spec
+ continue
+ else:
+ parameterDescriptor = self.update_param_descriptor(key)
+ parameterItems[parameterDescriptor] = value
+
+ return json.dumps(parameterItems, sort_keys=False)
+
+ def update_param_descriptor(self, parameterName):
+ """
+ Updates the parameter's descriptor name for clarity. This is helpful for array documentation as the descriptors can contain both the size of the array and the size of the array's data type
+ :param parameterName: The name of the parameter
+ :return: All the descriptor params from param_type concatenated into one string
+ """
+ if parameterName == 'min_size':
+ return 'array_min_size'
+ elif parameterName == 'max_size':
+ return 'array_max_size'
+ elif parameterName == 'min_length':
+ return 'string_min_length'
+ elif parameterName == 'max_length':
+ return 'string_max_length'
+ elif parameterName == 'max_value':
+ return 'num_max_value'
+ elif parameterName == 'min_value':
+ return 'num_min_value'
+ else:
+ return parameterName
+