summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorleonid lokhmatov, Luxoft <zaqqqqqqqq@gmail.com>2020-08-27 18:36:40 +0300
committerleonid lokhmatov, Luxoft <zaqqqqqqqq@gmail.com>2020-08-27 18:36:40 +0300
commite9e1d6143af4fea1725b66636439017c79bcccaa (patch)
tree39c926dda18a24fb6bc9992e28a789b372c05527
parent4d936bd0496538994a403143a0c20731bd7ee18b (diff)
parente5975a4c8f0b9109b42e3192cd5ac3d576ae0f6c (diff)
downloadsdl_ios-e9e1d6143af4fea1725b66636439017c79bcccaa.tar.gz
0261 'New vehicle data WindowStatus': Merge branch 'develop' into this [0261], conflicts resolved
# Conflicts: # SmartDeviceLink/SDLGetVehicleDataResponse.h # SmartDeviceLink/SDLVehicleDataType.m # SmartDeviceLinkTests/RPCSpecs/NotificationSpecs/SDLOnVehicleDataSpec.m # SmartDeviceLinkTests/RPCSpecs/RequestSpecs/SDLGetVehicleDataSpec.m # SmartDeviceLinkTests/RPCSpecs/RequestSpecs/SDLSubscribeVehicleDataSpec.m # SmartDeviceLinkTests/RPCSpecs/RequestSpecs/SDLUnsubscribeVehicleDataSpec.m # SmartDeviceLinkTests/RPCSpecs/ResponseSpecs/SDLGetVehicleDataResponseSpec.m # SmartDeviceLinkTests/RPCSpecs/ResponseSpecs/SDLSubscribeVehicleDataResponseSpec.m # SmartDeviceLinkTests/RPCSpecs/ResponseSpecs/SDLUnsubscribeVehicleDataResponseSpec.m
-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.m24
-rw-r--r--Example Apps/Example ObjC/VehicleDataManager.m10
-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.swift26
-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.h31
-rw-r--r--Example Apps/Shared/AppConstants.m33
-rw-r--r--SmartDeviceLink-iOS.podspec6
-rw-r--r--SmartDeviceLink-iOS.xcodeproj/project.pbxproj72
-rw-r--r--SmartDeviceLink.podspec6
-rw-r--r--SmartDeviceLink/SDLAddSubMenu.m4
-rw-r--r--SmartDeviceLink/SDLCancelInteraction.h55
-rw-r--r--SmartDeviceLink/SDLCancelInteraction.m46
-rw-r--r--SmartDeviceLink/SDLDeleteSubMenu.m4
-rw-r--r--SmartDeviceLink/SDLDynamicUpdateCapabilities.h63
-rw-r--r--SmartDeviceLink/SDLDynamicUpdateCapabilities.m71
-rw-r--r--SmartDeviceLink/SDLFunctionID.m4
-rw-r--r--SmartDeviceLink/SDLGearStatus.h3
-rw-r--r--SmartDeviceLink/SDLGetFile.m4
-rw-r--r--SmartDeviceLink/SDLGetVehicleData.h13
-rw-r--r--SmartDeviceLink/SDLGetVehicleDataResponse.h15
-rw-r--r--SmartDeviceLink/SDLImageFieldName.h49
-rw-r--r--SmartDeviceLink/SDLImageFieldName.m35
-rw-r--r--SmartDeviceLink/SDLLifecycleProtocolHandler.m5
-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.h11
-rw-r--r--SmartDeviceLink/SDLPRNDL.h6
-rw-r--r--SmartDeviceLink/SDLRPCFunctionNames.h12
-rw-r--r--SmartDeviceLink/SDLRPCFunctionNames.m4
-rw-r--r--SmartDeviceLink/SDLRPCParameterNames.h45
-rw-r--r--SmartDeviceLink/SDLRPCParameterNames.m10
-rw-r--r--SmartDeviceLink/SDLShowAppMenu.m4
-rw-r--r--SmartDeviceLink/SDLSubscribeVehicleData.h11
-rw-r--r--SmartDeviceLink/SDLSubscribeVehicleDataResponse.h15
-rw-r--r--SmartDeviceLink/SDLSubtleAlert.h103
-rw-r--r--SmartDeviceLink/SDLSubtleAlert.m130
-rw-r--r--SmartDeviceLink/SDLSubtleAlertResponse.h56
-rw-r--r--SmartDeviceLink/SDLSubtleAlertResponse.m73
-rw-r--r--SmartDeviceLink/SDLSystemRequest.m4
-rw-r--r--SmartDeviceLink/SDLTextFieldName.h55
-rw-r--r--SmartDeviceLink/SDLTextFieldName.m37
-rw-r--r--SmartDeviceLink/SDLTransmissionType.h4
-rw-r--r--SmartDeviceLink/SDLUnsubscribeVehicleData.h13
-rw-r--r--SmartDeviceLink/SDLUnsubscribeVehicleDataResponse.h15
-rw-r--r--SmartDeviceLink/SDLVehicleDataType.h5
-rw-r--r--SmartDeviceLink/SDLVehicleDataType.m2
-rw-r--r--SmartDeviceLink/SDLWindowCapability.h66
-rw-r--r--SmartDeviceLink/SDLWindowCapability.m67
-rw-r--r--SmartDeviceLink/SmartDeviceLink.h50
-rw-r--r--SmartDeviceLinkTests/ProtocolSpecs/SDLFunctionIDSpec.m2
-rw-r--r--SmartDeviceLinkTests/RPCSpecs/EnumSpecs/SDLImageFieldNameSpec.m2
-rw-r--r--SmartDeviceLinkTests/RPCSpecs/EnumSpecs/SDLTextFieldNameSpec.m3
-rw-r--r--SmartDeviceLinkTests/RPCSpecs/EnumSpecs/SDLVehicleDataTypeSpec.m2
-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.m5
-rw-r--r--SmartDeviceLinkTests/RPCSpecs/RequestSpecs/SDLAddSubMenuSpec.m2
-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.m13
-rw-r--r--SmartDeviceLinkTests/RPCSpecs/RequestSpecs/SDLShowAppMenuSpec.m2
-rw-r--r--SmartDeviceLinkTests/RPCSpecs/RequestSpecs/SDLSubscribeVehicleDataSpec.m6
-rw-r--r--SmartDeviceLinkTests/RPCSpecs/RequestSpecs/SDLSubtleAlertSpec.m107
-rw-r--r--SmartDeviceLinkTests/RPCSpecs/RequestSpecs/SDLSystemRequestSpec.m2
-rw-r--r--SmartDeviceLinkTests/RPCSpecs/RequestSpecs/SDLUnsubscribeVehicleDataSpec.m10
-rw-r--r--SmartDeviceLinkTests/RPCSpecs/ResponseSpecs/SDLGetVehicleDataResponseSpec.m7
-rw-r--r--SmartDeviceLinkTests/RPCSpecs/ResponseSpecs/SDLSubscribeVehicleDataResponseSpec.m3
-rw-r--r--SmartDeviceLinkTests/RPCSpecs/ResponseSpecs/SDLSubtleAlertResponseSpec.m54
-rw-r--r--SmartDeviceLinkTests/RPCSpecs/ResponseSpecs/SDLUnsubscribeVehicleDataResponseSpec.m3
-rw-r--r--SmartDeviceLinkTests/RPCSpecs/StructSpecs/SDLDynamicUpdateCapabilitiesSpec.m75
-rw-r--r--SmartDeviceLinkTests/RPCSpecs/StructSpecs/SDLWindowCapabilitySpec.m84
-rw-r--r--SmartDeviceLink_Example/SubscribeButtonManager.m3
-rw-r--r--SmartDeviceLink_Example/SubscribeButtonManager.swift7
-rw-r--r--generator/transformers/common_producer.py62
91 files changed, 2449 insertions, 370 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 6ed1f1f2c..7d572a658 100644
--- a/Example Apps/Example ObjC/MenuManager.m
+++ b/Example Apps/Example ObjC/MenuManager.m
@@ -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 51a83f145..e7a8b0079 100644
--- a/Example Apps/Example ObjC/VehicleDataManager.m
+++ b/Example Apps/Example ObjC/VehicleDataManager.m
@@ -138,7 +138,7 @@ 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;
}
@@ -154,7 +154,7 @@ NS_ASSUME_NONNULL_BEGIN
[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;
}
@@ -184,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]];
@@ -277,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;
}
@@ -285,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 397fa38b2..3981bc7fa 100644
--- a/Example Apps/Example Swift/MenuManager.swift
+++ b/Example Apps/Example Swift/MenuManager.swift
@@ -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 8f2e27fb6..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;
@@ -124,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 9ef0c0e8b..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";
@@ -121,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 30ce50ab1..ab29f5b45 100644
--- a/SmartDeviceLink-iOS.podspec
+++ b/SmartDeviceLink-iOS.podspec
@@ -110,6 +110,7 @@ s.public_header_files = [
'SmartDeviceLink/SDLDistanceUnit.h',
'SmartDeviceLink/SDLDriverDistractionCapability.h',
'SmartDeviceLink/SDLDriverDistractionState.h',
+'SmartDeviceLink/SDLDynamicUpdateCapabilities.h',
'SmartDeviceLink/SDLECallConfirmationStatus.h',
'SmartDeviceLink/SDLECallInfo.h',
'SmartDeviceLink/SDLElectronicParkBrakeStatus.h',
@@ -252,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',
@@ -378,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',
diff --git a/SmartDeviceLink-iOS.xcodeproj/project.pbxproj b/SmartDeviceLink-iOS.xcodeproj/project.pbxproj
index a2e00374e..ae70e6fd9 100644
--- a/SmartDeviceLink-iOS.xcodeproj/project.pbxproj
+++ b/SmartDeviceLink-iOS.xcodeproj/project.pbxproj
@@ -441,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, ); }; };
@@ -1425,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 */; };
@@ -2204,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>"; };
@@ -3222,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>"; };
@@ -3753,6 +3789,7 @@
162E82341A9BDE8A00906325 /* SDLOnLockScreenStatusSpec.m */,
162E82351A9BDE8A00906325 /* SDLOnPermissionsChangeSpec.m */,
1EAA470D2032BF1D000FE74B /* SDLOnRCStatusSpec.m */,
+ 889D0B9D24D07FF8008AD494 /* SDLOnSubtleAlertPressedSpec.m */,
162E82361A9BDE8A00906325 /* SDLOnSyncPDataSpec.m */,
88A5E7F3220B57F900495E8A /* SDLOnSystemCapabilityUpdatedSpec.m */,
162E82371A9BDE8A00906325 /* SDLOnSystemRequestSpec.m */,
@@ -3760,6 +3797,8 @@
162E82391A9BDE8A00906325 /* SDLOnTouchEventSpec.m */,
162E823A1A9BDE8A00906325 /* SDLOnVehicleDataSpec.m */,
DA9F7E9F1DCC05D200ACAE48 /* SDLOnWaypointChangeSpec.m */,
+ 4AC68FB924D33B7A0073FF67 /* SDLOnUpdateFileSpec.m */,
+ 4AC68FBB24D33E5D0073FF67 /* SDLOnUpdateSubMenuSpec.m */,
);
path = NotificationSpecs;
sourceTree = "<group>";
@@ -3824,6 +3863,7 @@
162E825D1A9BDE8A00906325 /* SDLSubscribeButtonSpec.m */,
162E825E1A9BDE8A00906325 /* SDLSubscribeVehicleDataSpec.m */,
DA9F7EA31DCC05EE00ACAE48 /* SDLSubscribeWaypointsSpec.m */,
+ 889D0B9724D06E52008AD494 /* SDLSubtleAlertSpec.m */,
162E825F1A9BDE8A00906325 /* SDLSyncPDataSpec.m */,
162E82601A9BDE8A00906325 /* SDLSystemRequestSpec.m */,
162E82611A9BDE8A00906325 /* SDLUnregisterAppInterfaceSpec.m */,
@@ -3898,6 +3938,7 @@
162E82861A9BDE8A00906325 /* SDLSubscribeButtonResponseSpec.m */,
162E82871A9BDE8A00906325 /* SDLSubscribeVehicleDataResponseSpec.m */,
DA9F7EA91DCC061A00ACAE48 /* SDLSubscribeWaypointsResponseSpec.m */,
+ 889D0B9524D065EE008AD494 /* SDLSubtleAlertResponseSpec.m */,
162E82881A9BDE8A00906325 /* SDLSyncPDataResponseSpec.m */,
162E82891A9BDE8A00906325 /* SDLSystemRequestResponseSpec.m */,
162E828A1A9BDE8A00906325 /* SDLUnregisterAppInterfaceResponseSpec.m */,
@@ -3942,6 +3983,7 @@
9FA0D00522DF06D3009CF344 /* SDLDisplayCapabilitySpec.m */,
162E82991A9BDE8A00906325 /* SDLDisplayCapabilitiesSpec.m */,
4A1B036E24CF484E008C6B13 /* SDLDriverDistractionCapabilitySpec.m */,
+ 4AC68FBD24D340400073FF67 /* SDLDynamicUpdateCapabilitiesSpec.m */,
162E829A1A9BDE8A00906325 /* SDLECallInfoSpec.m */,
162E829B1A9BDE8A00906325 /* SDLEmergencyEventSpec.m */,
88B3BFA120DA911E00943565 /* SDLFuelRangeSpec.m */,
@@ -4717,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 */,
@@ -4852,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 */,
@@ -4925,6 +4971,8 @@
5D61FAA41A84238A00846EE7 /* SDLDisplayCapabilities.m */,
4A1B036B24CF43CD008C6B13 /* SDLDriverDistractionCapability.h */,
4A1B036A24CF43CD008C6B13 /* SDLDriverDistractionCapability.m */,
+ 4A899D3C24D335F8007BDD9F /* SDLDynamicUpdateCapabilities.h */,
+ 4A899D3D24D335F8007BDD9F /* SDLDynamicUpdateCapabilities.m */,
5D61FAAB1A84238A00846EE7 /* SDLECallInfo.h */,
5D61FAAC1A84238A00846EE7 /* SDLECallInfo.m */,
5D61FAAD1A84238A00846EE7 /* SDLEmergencyEvent.h */,
@@ -5400,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 */,
@@ -5410,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 */,
@@ -6819,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 */,
@@ -6906,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 */,
@@ -6968,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 */,
@@ -7075,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 */,
@@ -7085,6 +7143,7 @@
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 */,
@@ -7201,6 +7260,7 @@
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 */,
@@ -7615,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 */,
@@ -7665,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 */,
@@ -7714,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 */,
@@ -7740,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 */,
@@ -7979,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 */,
@@ -8042,6 +8107,7 @@
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 */,
@@ -8380,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 */,
@@ -8403,6 +8470,7 @@
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 */,
@@ -8451,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 */,
@@ -8523,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 */,
@@ -8533,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 eede54d29..cc51e1ea7 100644
--- a/SmartDeviceLink.podspec
+++ b/SmartDeviceLink.podspec
@@ -114,6 +114,7 @@ sdefault.public_header_files = [
'SmartDeviceLink/SDLDistanceUnit.h',
'SmartDeviceLink/SDLDriverDistractionCapability.h',
'SmartDeviceLink/SDLDriverDistractionState.h',
+'SmartDeviceLink/SDLDynamicUpdateCapabilities.h',
'SmartDeviceLink/SDLECallConfirmationStatus.h',
'SmartDeviceLink/SDLECallInfo.h',
'SmartDeviceLink/SDLElectronicParkBrakeStatus.h',
@@ -256,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',
@@ -382,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',
diff --git a/SmartDeviceLink/SDLAddSubMenu.m b/SmartDeviceLink/SDLAddSubMenu.m
index 91dbc11ba..3e0b0bdd0 100644
--- a/SmartDeviceLink/SDLAddSubMenu.m
+++ b/SmartDeviceLink/SDLAddSubMenu.m
@@ -104,12 +104,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];
}
- (void)setPosition:(nullable NSNumber<SDLInt> *)position {
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/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/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/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
index 6d79582ac..d4f1500b7 100644
--- a/SmartDeviceLink/SDLGearStatus.h
+++ b/SmartDeviceLink/SDLGearStatus.h
@@ -36,6 +36,9 @@
NS_ASSUME_NONNULL_BEGIN
+/**
+ * @since SDL 7.0.0
+ */
@interface SDLGearStatus : SDLRPCStruct
/**
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 05735c121..d2f96e924 100644
--- a/SmartDeviceLink/SDLGetVehicleData.h
+++ b/SmartDeviceLink/SDLGetVehicleData.h
@@ -160,8 +160,10 @@ NS_ASSUME_NONNULL_BEGIN
- (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;
/**
- * A boolean value. If true, requests Gear Status data.
- */
+ * See GearStatus
+ *
+ * @since SDL 7.0
+*/
@property (strong, nonatomic, nullable) NSNumber<SDLBool> *gearStatus;
/**
@@ -210,8 +212,11 @@ NS_ASSUME_NONNULL_BEGIN
@property (nullable, strong, nonatomic) NSNumber<SDLBool> *vin;
/**
- * A boolean value. If true, requests PRNDL data.
- */
+ * 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");
/**
diff --git a/SmartDeviceLink/SDLGetVehicleDataResponse.h b/SmartDeviceLink/SDLGetVehicleDataResponse.h
index 15ebd687f..7e87b23f9 100644
--- a/SmartDeviceLink/SDLGetVehicleDataResponse.h
+++ b/SmartDeviceLink/SDLGetVehicleDataResponse.h
@@ -74,8 +74,10 @@ NS_ASSUME_NONNULL_BEGIN
- (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;
/**
- * The Gear Status
- */
+ * See GearStatus
+ *
+ * @since SDL 7.0
+*/
@property (strong, nonatomic, nullable) SDLGearStatus *gearStatus;
/**
@@ -126,9 +128,12 @@ NS_ASSUME_NONNULL_BEGIN
@property (nullable, strong, nonatomic) NSString *vin;
/**
- The current gear shift state of the user's vehicle
- */
-@property (strong, nonatomic, nullable) SDLPRNDL prndl __deprecated_msg("use gearStatus.actualGear instead on 7.0+ RPC version connections");
+ * 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
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/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/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 44f3fd593..8f566574a 100644
--- a/SmartDeviceLink/SDLOnVehicleData.h
+++ b/SmartDeviceLink/SDLOnVehicleData.h
@@ -74,8 +74,10 @@ NS_ASSUME_NONNULL_BEGIN
- (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;
/**
- The car current Gear Status
- */
+ * See GearStatus
+ *
+ * @since SDL 7.0
+*/
@property (nullable, strong, nonatomic) SDLGearStatus *gearStatus;
/**
@@ -126,7 +128,10 @@ NS_ASSUME_NONNULL_BEGIN
@property (nullable, strong, nonatomic) NSString *vin;
/**
- The current gear shift state of the user's vehicle. Please use gearStatus instead.
+ * See PRNDL. This parameter is deprecated and it is now covered in `gearStatus`
+ *
+ * @deprecated
+ * @since SDL 7.0.0
*/
@property (strong, nonatomic, nullable) SDLPRNDL prndl __deprecated_msg("use gearStatus.actualGear instead on 7.0+ RPC version connections");
diff --git a/SmartDeviceLink/SDLPRNDL.h b/SmartDeviceLink/SDLPRNDL.h
index 8439f3032..4ab8032a3 100644
--- a/SmartDeviceLink/SDLPRNDL.h
+++ b/SmartDeviceLink/SDLPRNDL.h
@@ -48,7 +48,8 @@ extern SDLPRNDL const SDLPRNDLFirst;
/**
* Ninth gear
- */
+ * @since SDL 7.0
+*/
extern SDLPRNDL const SDLPRNDLNinth;
/**
@@ -58,7 +59,8 @@ extern SDLPRNDL const SDLPRNDLSecond;
/**
* Tenth gear
- */
+ * @since SDL 7.0
+*/
extern SDLPRNDL const SDLPRNDLTenth;
/**
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 f90ade196..9665b3c74 100644
--- a/SmartDeviceLink/SDLRPCParameterNames.h
+++ b/SmartDeviceLink/SDLRPCParameterNames.h
@@ -1,3 +1,34 @@
+/*
+ * 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>
@@ -186,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;
@@ -211,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;
@@ -222,8 +254,8 @@ extern SDLRPCParameterName const SDLRPCParameterNameFrequencyFraction;
extern SDLRPCParameterName const SDLRPCParameterNameFrontVerticalPosition;
extern SDLRPCParameterName const SDLRPCParameterNameFrontVerticalPositionAvailable;
extern SDLRPCParameterName const SDLRPCParameterNameFuelCutoffStatus;
-extern SDLRPCParameterName const SDLRPCParameterNameFuelLevel __deprecated;
-extern SDLRPCParameterName const SDLRPCParameterNameFuelLevelState __deprecated;
+extern SDLRPCParameterName const SDLRPCParameterNameFuelLevel;
+extern SDLRPCParameterName const SDLRPCParameterNameFuelLevelState;
extern SDLRPCParameterName const SDLRPCParameterNameFuelMaintenanceMode;
extern SDLRPCParameterName const SDLRPCParameterNameFuelRange;
extern SDLRPCParameterName const SDLRPCParameterNameFullAppID;
@@ -387,7 +419,7 @@ 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;
@@ -494,7 +526,7 @@ extern SDLRPCParameterName const SDLRPCParameterNamePressure;
extern SDLRPCParameterName const SDLRPCParameterNamePressureTelltale;
extern SDLRPCParameterName const SDLRPCParameterNamePrimaryAudioSource;
extern SDLRPCParameterName const SDLRPCParameterNamePrimaryColor;
-extern SDLRPCParameterName const SDLRPCParameterNamePRNDL __deprecated;
+extern SDLRPCParameterName const SDLRPCParameterNamePRNDL;
extern SDLRPCParameterName const SDLRPCParameterNameProgramIdentification;
extern SDLRPCParameterName const SDLRPCParameterNameProgressIndicator;
extern SDLRPCParameterName const SDLRPCParameterNameProperties;
@@ -624,6 +656,8 @@ 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;
@@ -683,6 +717,7 @@ 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;
diff --git a/SmartDeviceLink/SDLRPCParameterNames.m b/SmartDeviceLink/SDLRPCParameterNames.m
index 83500c84d..f0192f679 100644
--- a/SmartDeviceLink/SDLRPCParameterNames.m
+++ b/SmartDeviceLink/SDLRPCParameterNames.m
@@ -188,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";
@@ -213,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";
@@ -238,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";
@@ -411,7 +413,7 @@ 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";
@@ -603,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";
@@ -650,6 +651,8 @@ 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";
@@ -709,6 +712,7 @@ 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";
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/SDLSubscribeVehicleData.h b/SmartDeviceLink/SDLSubscribeVehicleData.h
index 667008eea..f886f2c56 100644
--- a/SmartDeviceLink/SDLSubscribeVehicleData.h
+++ b/SmartDeviceLink/SDLSubscribeVehicleData.h
@@ -158,7 +158,9 @@ NS_ASSUME_NONNULL_BEGIN
- (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;
/**
- * A boolean value. If true, subscribes for GearStatus data.
+ * See GearStatus
+ *
+ * @since SDL 7.0
*/
@property (strong, nonatomic, nullable) NSNumber<SDLBool> *gearStatus;
@@ -203,8 +205,11 @@ NS_ASSUME_NONNULL_BEGIN
@property (strong, nonatomic, nullable) NSNumber<SDLBool> *externalTemperature;
/**
- * A boolean value. If true, subscribes PRNDL data.
- */
+ * 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");
/**
diff --git a/SmartDeviceLink/SDLSubscribeVehicleDataResponse.h b/SmartDeviceLink/SDLSubscribeVehicleDataResponse.h
index ef09a1510..911f32b0b 100644
--- a/SmartDeviceLink/SDLSubscribeVehicleDataResponse.h
+++ b/SmartDeviceLink/SDLSubscribeVehicleDataResponse.h
@@ -53,8 +53,10 @@ NS_ASSUME_NONNULL_BEGIN
- (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;
/**
- The result of requesting to subscribe to the GearStatus.
- */
+ * See GearStatus
+ *
+ * @since SDL 7.0
+*/
@property (strong, nonatomic, nullable) SDLVehicleDataResult *gearStatus;
/**
@@ -114,10 +116,11 @@ NS_ASSUME_NONNULL_BEGIN
@property (strong, nonatomic, nullable) SDLVehicleDataResult *externalTemperature;
/**
- The result of requesting to subscribe to the PRNDL status.
-
- Optional
- */
+ * 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");
/**
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/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/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
index 1a2802a6b..0a11ace1f 100644
--- a/SmartDeviceLink/SDLTransmissionType.h
+++ b/SmartDeviceLink/SDLTransmissionType.h
@@ -34,7 +34,9 @@
/**
* Type of transmission used in the vehicle.
- */
+ *
+ * @since SDL 7.0
+*/
typedef SDLEnum SDLTransmissionType SDL_SWIFT_ENUM;
/**
diff --git a/SmartDeviceLink/SDLUnsubscribeVehicleData.h b/SmartDeviceLink/SDLUnsubscribeVehicleData.h
index 92b183836..c8849521c 100644
--- a/SmartDeviceLink/SDLUnsubscribeVehicleData.h
+++ b/SmartDeviceLink/SDLUnsubscribeVehicleData.h
@@ -160,8 +160,10 @@ NS_ASSUME_NONNULL_BEGIN
- (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;
/**
- * If true, unsubscribes from GearStatus
- */
+ * See GearStatus
+ *
+ * @since SDL 7.0
+*/
@property (strong, nonatomic, nullable) NSNumber<SDLBool> *gearStatus;
/**
@@ -205,8 +207,11 @@ NS_ASSUME_NONNULL_BEGIN
@property (strong, nonatomic, nullable) NSNumber<SDLBool> *externalTemperature;
/**
- * If true, unsubscribes from 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");
/**
diff --git a/SmartDeviceLink/SDLUnsubscribeVehicleDataResponse.h b/SmartDeviceLink/SDLUnsubscribeVehicleDataResponse.h
index cc3886d12..3a2e12776 100644
--- a/SmartDeviceLink/SDLUnsubscribeVehicleDataResponse.h
+++ b/SmartDeviceLink/SDLUnsubscribeVehicleDataResponse.h
@@ -52,8 +52,10 @@ NS_ASSUME_NONNULL_BEGIN
- (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;
/**
- The result of requesting to unsubscribe to the GearStatus.
- */
+ * See GearStatus
+ *
+ * @since SDL 7.0
+*/
@property (strong, nonatomic, nullable) SDLVehicleDataResult *gearStatus;
/**
@@ -113,10 +115,11 @@ NS_ASSUME_NONNULL_BEGIN
@property (strong, nonatomic, nullable) SDLVehicleDataResult *externalTemperature;
/**
- The result of requesting to unsubscribe to the PRNDL status.
-
- Optional
- */
+ * 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");
/**
diff --git a/SmartDeviceLink/SDLVehicleDataType.h b/SmartDeviceLink/SDLVehicleDataType.h
index e20f6cc65..40bb04295 100644
--- a/SmartDeviceLink/SDLVehicleDataType.h
+++ b/SmartDeviceLink/SDLVehicleDataType.h
@@ -10,7 +10,8 @@
typedef SDLEnum SDLVehicleDataType SDL_SWIFT_ENUM;
/**
- Vehicle Gear Status data
+ * Vehicle Gear Status data
+ * @since SDL 7.0
*/
extern SDLVehicleDataType const SDLVehicleDataTypeGearStatus;
@@ -57,7 +58,7 @@ extern SDLVehicleDataType const SDLVehicleDataTypeVIN;
/**
Vehicle PRNDL data
*/
-extern SDLVehicleDataType const SDLVehicleDataTypePrndl __deprecated_msg("use SDLVehicleDataTypeGearStatus instead on 7.0+ RPC version connections");
+extern SDLVehicleDataType const SDLVehicleDataTypePRNDL __deprecated_msg("use SDLVehicleDataTypeGearStatus instead on 7.0+ RPC version connections");
/**
Vehicle tire pressure data
diff --git a/SmartDeviceLink/SDLVehicleDataType.m b/SmartDeviceLink/SDLVehicleDataType.m
index 9af6c6168..585e40130 100644
--- a/SmartDeviceLink/SDLVehicleDataType.m
+++ b/SmartDeviceLink/SDLVehicleDataType.m
@@ -30,7 +30,7 @@ SDLVehicleDataType const SDLVehicleDataTypeHeadlampStatus = @"VEHICLEDATA_HEADLA
SDLVehicleDataType const SDLVehicleDataTypeMyKey = @"VEHICLEDATA_MYKEY";
SDLVehicleDataType const SDLVehicleDataTypeOEMVehicleDataType = @"VEHICLEDATA_OEM_CUSTOM_DATA";
SDLVehicleDataType const SDLVehicleDataTypeOdometer = @"VEHICLEDATA_ODOMETER";
-SDLVehicleDataType const SDLVehicleDataTypePrndl = @"VEHICLEDATA_PRNDL";
+SDLVehicleDataType const SDLVehicleDataTypePRNDL = @"VEHICLEDATA_PRNDL";
SDLVehicleDataType const SDLVehicleDataTypeRPM = @"VEHICLEDATA_RPM";
SDLVehicleDataType const SDLVehicleDataTypeSpeed = @"VEHICLEDATA_SPEED";
SDLVehicleDataType const SDLVehicleDataTypeSteeringWheel = @"VEHICLEDATA_STEERINGWHEEL";
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/SmartDeviceLink.h b/SmartDeviceLink/SmartDeviceLink.h
index ddc76863f..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,6 +203,7 @@ 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"
@@ -286,7 +292,7 @@ FOUNDATION_EXPORT const unsigned char SmartDeviceLinkVersionString[];
#import "SDLWindowState.h"
#import "SDLWindowTypeCapabilities.h"
-// Enums
+#pragma mark Enums
#import "SDLAmbientLightStatus.h"
#import "SDLAppHMIType.h"
#import "SDLAppInterfaceUnregisteredReason.h"
@@ -395,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"
@@ -405,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"
@@ -422,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"
@@ -458,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"
@@ -471,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"
@@ -488,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/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/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/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/SDLVehicleDataTypeSpec.m b/SmartDeviceLinkTests/RPCSpecs/EnumSpecs/SDLVehicleDataTypeSpec.m
index 77f2e927a..3f423bd0b 100644
--- a/SmartDeviceLinkTests/RPCSpecs/EnumSpecs/SDLVehicleDataTypeSpec.m
+++ b/SmartDeviceLinkTests/RPCSpecs/EnumSpecs/SDLVehicleDataTypeSpec.m
@@ -42,7 +42,7 @@ describe(@"individual enum value tests", ^{
expect(SDLVehicleDataTypeOdometer).to(equal(@"VEHICLEDATA_ODOMETER"));
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
- expect(SDLVehicleDataTypePrndl).to(equal(@"VEHICLEDATA_PRNDL"));
+ expect(SDLVehicleDataTypePRNDL).to(equal(@"VEHICLEDATA_PRNDL"));
#pragma clang diagnostic pop
expect(SDLVehicleDataTypeRPM).to(equal(@"VEHICLEDATA_RPM"));
expect(SDLVehicleDataTypeSpeed).to(equal(@"VEHICLEDATA_SPEED"));
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 2cc8f8a45..67d5cd911 100644
--- a/SmartDeviceLinkTests/RPCSpecs/NotificationSpecs/SDLOnVehicleDataSpec.m
+++ b/SmartDeviceLinkTests/RPCSpecs/NotificationSpecs/SDLOnVehicleDataSpec.m
@@ -83,7 +83,6 @@ describe(@"getter/setter tests", ^{
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
testResponse.prndl = prndl;
#pragma clang diagnostic pop
- testResponse.gearStatus = gearStatus;
testResponse.rpm = @(rpm);
testResponse.speed = @(speed);
testResponse.steeringWheelAngle = @(steeringWheelAngle);
@@ -125,7 +124,6 @@ describe(@"getter/setter tests", ^{
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
expect(testResponse.prndl).to(equal(prndl));
#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)));
@@ -274,8 +272,9 @@ describe(@"getter/setter tests", ^{
});
});
- 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", ^{
+ 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];
+
it(@"expect all properties to be set properly", ^{
expect(testResponse.accPedalPosition).to(equal(@(accPedalPosition)));
expect(testResponse.airbagStatus).to(equal(airbagStatus));
diff --git a/SmartDeviceLinkTests/RPCSpecs/RequestSpecs/SDLAddSubMenuSpec.m b/SmartDeviceLinkTests/RPCSpecs/RequestSpecs/SDLAddSubMenuSpec.m
index ca0ab6f28..17ce72c6c 100644
--- a/SmartDeviceLinkTests/RPCSpecs/RequestSpecs/SDLAddSubMenuSpec.m
+++ b/SmartDeviceLinkTests/RPCSpecs/RequestSpecs/SDLAddSubMenuSpec.m
@@ -120,7 +120,7 @@ describe(@"Getter/Setter Tests", ^ {
it(@"Should get correctly when initialized", ^ {
NSMutableDictionary<NSString *, id> *dict = [@{SDLRPCParameterNameRequest:
@{SDLRPCParameterNameParameters:
- @{SDLRPCParameterNameMenuId: @(menuId),
+ @{SDLRPCParameterNameMenuID: @(menuId),
SDLRPCParameterNamePosition: @(position),
SDLRPCParameterNameMenuName: menuName,
SDLRPCParameterNameMenuIcon: @{
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 47b8ed27e..f2199bf2e 100644
--- a/SmartDeviceLinkTests/RPCSpecs/RequestSpecs/SDLGetVehicleDataSpec.m
+++ b/SmartDeviceLinkTests/RPCSpecs/RequestSpecs/SDLGetVehicleDataSpec.m
@@ -143,10 +143,10 @@ describe(@"getter/setter tests", ^{
SDLRPCParameterNameOperationName:SDLRPCFunctionNameGetVehicleData}};
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
- SDLGetVehicleData* testRequest = [[SDLGetVehicleData alloc] initWithDictionary:dict];
+ SDLGetVehicleData* testRequest = [[SDLGetVehicleData alloc] initWithDictionary:dict];
#pragma clang diagnostic pop
- it(@"expect all properties to be set properly", ^{
+ 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));
@@ -189,7 +189,7 @@ describe(@"getter/setter tests", ^{
});
});
-describe(@"test initializers", ^{
+describe(@"initializers", ^{
context(@"init", ^{
SDLGetVehicleData* testRequest = [[SDLGetVehicleData alloc] init];
it(@"expect all properties to be nil", ^{
@@ -409,11 +409,10 @@ describe(@"test initializers", ^{
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"
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
expect(testRequest.prndl).to(beNil());
- #pragma clang diagnostic pop
- expect(testRequest.gearStatus).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));
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 7ee90a22b..6d8bfe532 100644
--- a/SmartDeviceLinkTests/RPCSpecs/RequestSpecs/SDLSubscribeVehicleDataSpec.m
+++ b/SmartDeviceLinkTests/RPCSpecs/RequestSpecs/SDLSubscribeVehicleDataSpec.m
@@ -17,7 +17,6 @@ QuickSpecBegin(SDLSubscribeVehicleDataSpec)
describe(@"getter/setter tests", ^{
context(@"init and assign", ^{
SDLSubscribeVehicleData* testRequest = [[SDLSubscribeVehicleData alloc] init];
-
testRequest.accPedalPosition = @YES;
testRequest.airbagStatus = @YES;
testRequest.beltStatus = @YES;
@@ -49,7 +48,6 @@ describe(@"getter/setter tests", ^{
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
testRequest.prndl = @YES;
#pragma clang diagnostic pop
- testRequest.gearStatus = @YES;
testRequest.rpm = @YES;
testRequest.speed = @YES;
testRequest.steeringWheelAngle = @YES;
@@ -149,7 +147,7 @@ describe(@"getter/setter tests", ^{
SDLSubscribeVehicleData* testRequest = [[SDLSubscribeVehicleData alloc] initWithDictionary:dict];
#pragma clang diagnostic pop
- it(@"expect all properties to be 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));
@@ -338,7 +336,7 @@ describe(@"test initializers", ^{
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];
- it(@"should set all the parameters properly", ^{
+ 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));
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 3494d660d..697d1d265 100644
--- a/SmartDeviceLinkTests/RPCSpecs/RequestSpecs/SDLUnsubscribeVehicleDataSpec.m
+++ b/SmartDeviceLinkTests/RPCSpecs/RequestSpecs/SDLUnsubscribeVehicleDataSpec.m
@@ -17,7 +17,6 @@ QuickSpecBegin(SDLUnsubscribeVehicleDataSpec)
describe(@"getter/setter tests", ^{
context(@"init and assign", ^{
SDLUnsubscribeVehicleData* testRequest = [[SDLUnsubscribeVehicleData alloc] init];
-
testRequest.accPedalPosition = @YES;
testRequest.airbagStatus = @YES;
testRequest.beltStatus = @YES;
@@ -235,7 +234,7 @@ describe(@"test initializers", ^{
});
});
- 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:", ^{
+ 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];
@@ -283,7 +282,7 @@ describe(@"test initializers", ^{
});
});
-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];
@@ -378,11 +377,8 @@ context(@"initWithAccelerationPedalPosition:airbagStatus:beltStatus:bodyInformat
});
});
- 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:", ^{
- #pragma clang diagnostic push
- #pragma clang diagnostic ignored "-Wdeprecated-declarations"
+ 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];
- #pragma clang diagnostic pop
it(@"expect all properties to be set properly", ^{
expect(testRequest.accPedalPosition).to(equal(@YES));
diff --git a/SmartDeviceLinkTests/RPCSpecs/ResponseSpecs/SDLGetVehicleDataResponseSpec.m b/SmartDeviceLinkTests/RPCSpecs/ResponseSpecs/SDLGetVehicleDataResponseSpec.m
index e8d5488a3..cdf61e1c9 100644
--- a/SmartDeviceLinkTests/RPCSpecs/ResponseSpecs/SDLGetVehicleDataResponseSpec.m
+++ b/SmartDeviceLinkTests/RPCSpecs/ResponseSpecs/SDLGetVehicleDataResponseSpec.m
@@ -84,7 +84,6 @@ describe(@"getter/setter tests", ^{
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
testResponse.prndl = prndl;
#pragma clang diagnostic pop
- testResponse.gearStatus = gearStatus;
testResponse.rpm = @(rpm);
testResponse.speed = @(speed);
testResponse.steeringWheelAngle = @(steeringWheelAngle);
@@ -126,7 +125,6 @@ describe(@"getter/setter tests", ^{
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
expect(testResponse.prndl).to(equal(prndl));
#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)));
@@ -162,7 +160,6 @@ describe(@"getter/setter tests", ^{
#pragma clang diagnostic pop
SDLRPCParameterNameFuelRange:fuelRangeArray,
SDLRPCParameterNameGearStatus:gearStatus,
- SDLRPCParameterNameGearStatus:gearStatus,
SDLRPCParameterNameGPS:gps,
SDLRPCParameterNameHandsOffSteering:@(handsOffSteering),
SDLRPCParameterNameHeadLampStatus:headLampStatus,
@@ -220,7 +217,6 @@ describe(@"getter/setter tests", ^{
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
expect(testResponse.prndl).to(equal(prndl));
#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)));
@@ -231,7 +227,7 @@ describe(@"getter/setter tests", ^{
expect(testResponse.wiperStatus).to(equal(wiperStatus));
});
});
-
+
context(@"init", ^{
SDLGetVehicleDataResponse* testResponse = [[SDLGetVehicleDataResponse alloc] init];
it(@"expect all properties to be nil", ^{
@@ -325,6 +321,7 @@ describe(@"getter/setter tests", ^{
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 83cac494b..88253eb18 100644
--- a/SmartDeviceLinkTests/RPCSpecs/ResponseSpecs/SDLSubscribeVehicleDataResponseSpec.m
+++ b/SmartDeviceLinkTests/RPCSpecs/ResponseSpecs/SDLSubscribeVehicleDataResponseSpec.m
@@ -23,7 +23,6 @@ SDLVehicleDataResult* customOEMvehicleDataResult = [[SDLVehicleDataResult alloc]
describe(@"getter/setter tests", ^{
context(@"init and assign", ^{
SDLSubscribeVehicleDataResponse* testResponse = [[SDLSubscribeVehicleDataResponse alloc] init];
-
testResponse.accPedalPosition = vehicleDataResult;
testResponse.airbagStatus = vehicleDataResult;
testResponse.beltStatus = vehicleDataResult;
@@ -240,7 +239,7 @@ describe(@"getter/setter tests", ^{
});
});
- context(@"initWithGps:speed:rpm:instantFuelConsumption:fuelRange:externalTemperature:turnSignal:prndl:tirePressure:odometer:beltStatus:bodyInformation:deviceStatus:driverBraking:wiperStatus:headLampStatus:engineTorque:accPedalPosition:steeringWheelAngle:engineOilLife:electronicParkBrakeStatus:cloudAppVehicleID:eCallInfo:airbagStatus:emergencyEvent:clusterModes:myKey:handsOffSteering:windowStatus:", ^{
+ 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];
it(@"expect all properties to be set properly", ^{
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 9f55061f0..a0047604c 100644
--- a/SmartDeviceLinkTests/RPCSpecs/ResponseSpecs/SDLUnsubscribeVehicleDataResponseSpec.m
+++ b/SmartDeviceLinkTests/RPCSpecs/ResponseSpecs/SDLUnsubscribeVehicleDataResponseSpec.m
@@ -22,7 +22,6 @@ SDLVehicleDataResult* customOEMvehicleDataResult = [[SDLVehicleDataResult alloc]
describe(@"getter/setter tests", ^{
context(@"init", ^{
SDLUnsubscribeVehicleDataResponse* testResponse = [[SDLUnsubscribeVehicleDataResponse alloc] init];
-
testResponse.accPedalPosition = vehicleDataResult;
testResponse.airbagStatus = vehicleDataResult;
testResponse.beltStatus = vehicleDataResult;
@@ -238,7 +237,7 @@ describe(@"getter/setter tests", ^{
});
});
- context(@"initWithGps:speed:rpm:instantFuelConsumption:fuelRange:externalTemperature:turnSignal:prndl:tirePressure:odometer:beltStatus:bodyInformation:deviceStatus:driverBraking:wiperStatus:headLampStatus:engineTorque:accPedalPosition:steeringWheelAngle:engineOilLife:electronicParkBrakeStatus:cloudAppVehicleID:eCallInfo:airbagStatus:emergencyEvent:clusterModes:myKey:handsOffSteering:windowStatus:", ^{
+ 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(@"expect all properties to be set properly", ^{
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/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/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/transformers/common_producer.py b/generator/transformers/common_producer.py
index 59dbac4c3..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))
@@ -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
+