summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.travis.yml9
-rw-r--r--Cartfile.resolved6
-rw-r--r--Example Apps/Example ObjC/AlertManager.h9
-rw-r--r--Example Apps/Example ObjC/AlertManager.m26
-rw-r--r--Example Apps/Example ObjC/MenuManager.m14
-rw-r--r--Example Apps/Example ObjC/ProxyManager.m14
-rw-r--r--Example Apps/Example ObjC/VehicleDataManager.m6
-rw-r--r--Example Apps/Example Swift/AlertManager.swift16
-rw-r--r--Example Apps/Example Swift/MenuManager.swift18
-rw-r--r--Example Apps/Example Swift/ProxyManager.swift20
-rw-r--r--Example Apps/Shared/AppConstants.h8
-rw-r--r--Example Apps/Shared/AppConstants.m7
-rw-r--r--SmartDeviceLink-iOS.podspec10
-rw-r--r--SmartDeviceLink-iOS.xcodeproj/project.pbxproj133
-rw-r--r--SmartDeviceLink.podspec10
-rw-r--r--SmartDeviceLink/Assets/Base.lproj/SDLLockScreen.storyboard11
-rw-r--r--SmartDeviceLink/SDLAlert.h300
-rw-r--r--SmartDeviceLink/SDLAlert.m90
-rw-r--r--SmartDeviceLink/SDLAsynchronousRPCOperation.m10
-rw-r--r--SmartDeviceLink/SDLAsynchronousRPCRequestOperation.m1
-rw-r--r--SmartDeviceLink/SDLAudioControlCapabilities.h34
-rw-r--r--SmartDeviceLink/SDLAudioControlCapabilities.m38
-rw-r--r--SmartDeviceLink/SDLButtonCapabilities.h8
-rw-r--r--SmartDeviceLink/SDLButtonCapabilities.m8
-rw-r--r--SmartDeviceLink/SDLButtonPress.h11
-rw-r--r--SmartDeviceLink/SDLButtonPress.m24
-rw-r--r--SmartDeviceLink/SDLCancelInteraction.h115
-rw-r--r--SmartDeviceLink/SDLCancelInteraction.m103
-rw-r--r--SmartDeviceLink/SDLCancelInteractionResponse.h20
-rw-r--r--SmartDeviceLink/SDLCancelInteractionResponse.m27
-rw-r--r--SmartDeviceLink/SDLCheckChoiceVROptionalOperation.m1
-rw-r--r--SmartDeviceLink/SDLChoiceSet.h11
-rw-r--r--SmartDeviceLink/SDLChoiceSet.m13
-rw-r--r--SmartDeviceLink/SDLChoiceSetManager.h17
-rw-r--r--SmartDeviceLink/SDLChoiceSetManager.m75
-rw-r--r--SmartDeviceLink/SDLClimateControlCapabilities.h12
-rw-r--r--SmartDeviceLink/SDLClimateControlCapabilities.m15
-rw-r--r--SmartDeviceLink/SDLDeleteChoicesOperation.m1
-rw-r--r--SmartDeviceLink/SDLDeleteFileOperation.m1
-rw-r--r--SmartDeviceLink/SDLDiagnosticMessageResponse.h4
-rw-r--r--SmartDeviceLink/SDLDiagnosticMessageResponse.m4
-rw-r--r--SmartDeviceLink/SDLDisplayCapabilities+ShowManagerExtensions.h20
-rw-r--r--SmartDeviceLink/SDLFunctionID.m3
-rw-r--r--SmartDeviceLink/SDLGetDTCsResponse.h4
-rw-r--r--SmartDeviceLink/SDLGetDTCsResponse.m4
-rw-r--r--SmartDeviceLink/SDLGetInteriorVehicleData.h25
-rwxr-xr-xSmartDeviceLink/SDLGetInteriorVehicleData.m47
-rw-r--r--SmartDeviceLink/SDLGetInteriorVehicleDataConsent.h34
-rw-r--r--SmartDeviceLink/SDLGetInteriorVehicleDataConsent.m55
-rw-r--r--SmartDeviceLink/SDLGetInteriorVehicleDataConsentResponse.h26
-rw-r--r--SmartDeviceLink/SDLGetInteriorVehicleDataConsentResponse.m34
-rw-r--r--SmartDeviceLink/SDLGetInteriorVehicleDataResponse.h4
-rw-r--r--SmartDeviceLink/SDLGetInteriorVehicleDataResponse.m4
-rw-r--r--SmartDeviceLink/SDLGetSystemCapabilityResponse.h4
-rw-r--r--SmartDeviceLink/SDLGetSystemCapabilityResponse.m4
-rw-r--r--SmartDeviceLink/SDLGlobalProperty.h5
-rw-r--r--SmartDeviceLink/SDLGlobalProperty.m1
-rw-r--r--SmartDeviceLink/SDLGrid.h56
-rw-r--r--SmartDeviceLink/SDLGrid.m70
-rw-r--r--SmartDeviceLink/SDLHMICapabilities.h49
-rw-r--r--SmartDeviceLink/SDLHMICapabilities.m32
-rw-r--r--SmartDeviceLink/SDLHMISettingsControlCapabilities.h35
-rw-r--r--SmartDeviceLink/SDLHMISettingsControlCapabilities.m33
-rw-r--r--SmartDeviceLink/SDLLifecycleManager.m7
-rw-r--r--SmartDeviceLink/SDLLightControlCapabilities.h20
-rw-r--r--SmartDeviceLink/SDLLightControlCapabilities.m19
-rw-r--r--SmartDeviceLink/SDLListFilesOperation.m1
-rw-r--r--SmartDeviceLink/SDLLockScreenConfiguration.m4
-rw-r--r--SmartDeviceLink/SDLLogFileModuleMap.m2
-rw-r--r--SmartDeviceLink/SDLMenuManager.h3
-rw-r--r--SmartDeviceLink/SDLMenuManager.m47
-rw-r--r--SmartDeviceLink/SDLModuleData.h7
-rw-r--r--SmartDeviceLink/SDLModuleData.m9
-rw-r--r--SmartDeviceLink/SDLModuleInfo.h50
-rw-r--r--SmartDeviceLink/SDLModuleInfo.m52
-rw-r--r--SmartDeviceLink/SDLNotificationConstants.h6
-rw-r--r--SmartDeviceLink/SDLNotificationConstants.m9
-rw-r--r--SmartDeviceLink/SDLNotificationDispatcher.m24
-rw-r--r--SmartDeviceLink/SDLPerformInteraction.h242
-rw-r--r--SmartDeviceLink/SDLPerformInteraction.m57
-rw-r--r--SmartDeviceLink/SDLPreloadChoicesOperation.h4
-rw-r--r--SmartDeviceLink/SDLPreloadChoicesOperation.m28
-rw-r--r--SmartDeviceLink/SDLPresentChoiceSetOperation.h28
-rw-r--r--SmartDeviceLink/SDLPresentChoiceSetOperation.m57
-rw-r--r--SmartDeviceLink/SDLPresentKeyboardOperation.h25
-rw-r--r--SmartDeviceLink/SDLPresentKeyboardOperation.m41
-rw-r--r--SmartDeviceLink/SDLProxyListener.h48
-rw-r--r--SmartDeviceLink/SDLRPCFunctionNames.h3
-rw-r--r--SmartDeviceLink/SDLRPCFunctionNames.m3
-rw-r--r--SmartDeviceLink/SDLRPCParameterNames.h22
-rw-r--r--SmartDeviceLink/SDLRPCParameterNames.m22
-rw-r--r--SmartDeviceLink/SDLRadioControlCapabilities.h37
-rw-r--r--SmartDeviceLink/SDLRadioControlCapabilities.m40
-rw-r--r--SmartDeviceLink/SDLReleaseInteriorVehicleDataModule.h34
-rw-r--r--SmartDeviceLink/SDLReleaseInteriorVehicleDataModule.m56
-rw-r--r--SmartDeviceLink/SDLReleaseInteriorVehicleDataModuleResponse.h17
-rw-r--r--SmartDeviceLink/SDLReleaseInteriorVehicleDataModuleResponse.m23
-rw-r--r--SmartDeviceLink/SDLScreenManager.h19
-rw-r--r--SmartDeviceLink/SDLScreenManager.m24
-rw-r--r--SmartDeviceLink/SDLScrollableMessage.h85
-rw-r--r--SmartDeviceLink/SDLScrollableMessage.m33
-rw-r--r--SmartDeviceLink/SDLSeatControlCapabilities.h17
-rw-r--r--SmartDeviceLink/SDLSeatControlCapabilities.m45
-rw-r--r--SmartDeviceLink/SDLSeatControlData.h10
-rw-r--r--SmartDeviceLink/SDLSeatControlData.m12
-rw-r--r--SmartDeviceLink/SDLSeatLocation.h26
-rw-r--r--SmartDeviceLink/SDLSeatLocation.m25
-rw-r--r--SmartDeviceLink/SDLSeatLocationCapability.h48
-rw-r--r--SmartDeviceLink/SDLSeatLocationCapability.m70
-rw-r--r--SmartDeviceLink/SDLSequentialRPCRequestOperation.m1
-rw-r--r--SmartDeviceLink/SDLSetGlobalProperties.h8
-rw-r--r--SmartDeviceLink/SDLSetGlobalProperties.m9
-rw-r--r--SmartDeviceLink/SDLSetInteriorVehicleDataResponse.h4
-rw-r--r--SmartDeviceLink/SDLSetInteriorVehicleDataResponse.m4
-rw-r--r--SmartDeviceLink/SDLSlider.h133
-rw-r--r--SmartDeviceLink/SDLSlider.m26
-rw-r--r--SmartDeviceLink/SDLSoftButtonManager.h7
-rw-r--r--SmartDeviceLink/SDLSoftButtonManager.m57
-rw-r--r--SmartDeviceLink/SDLSoftButtonReplaceOperation.m2
-rw-r--r--SmartDeviceLink/SDLSoftButtonTransitionOperation.m1
-rw-r--r--SmartDeviceLink/SDLStreamingVideoLifecycleManager.m23
-rw-r--r--SmartDeviceLink/SDLSupportedSeat.h10
-rw-r--r--SmartDeviceLink/SDLSupportedSeat.m3
-rwxr-xr-xSmartDeviceLink/SDLSystemCapability.h24
-rwxr-xr-xSmartDeviceLink/SDLSystemCapability.m32
-rw-r--r--SmartDeviceLink/SDLSystemCapabilityManager.h45
-rw-r--r--SmartDeviceLink/SDLSystemCapabilityManager.m315
-rw-r--r--SmartDeviceLink/SDLSystemCapabilityObserver.m8
-rwxr-xr-xSmartDeviceLink/SDLSystemCapabilityType.h5
-rwxr-xr-xSmartDeviceLink/SDLSystemCapabilityType.m1
-rw-r--r--SmartDeviceLink/SDLTextAndGraphicManager.h6
-rw-r--r--SmartDeviceLink/SDLTextAndGraphicManager.m63
-rw-r--r--SmartDeviceLink/SDLUploadFileOperation.m1
-rw-r--r--SmartDeviceLink/SDLWindowCapability+ShowManagerExtensions.h26
-rw-r--r--SmartDeviceLink/SDLWindowCapability+ShowManagerExtensions.m (renamed from SmartDeviceLink/SDLDisplayCapabilities+ShowManagerExtensions.m)14
-rw-r--r--SmartDeviceLink/SDLWindowCapability.m8
-rw-r--r--SmartDeviceLink/SmartDeviceLink.h10
-rw-r--r--SmartDeviceLinkTests/DevAPISpecs/SDLChoiceSetManagerSpec.m66
-rw-r--r--SmartDeviceLinkTests/DevAPISpecs/SDLChoiceSetSpec.m51
-rw-r--r--SmartDeviceLinkTests/DevAPISpecs/SDLFileManagerSpec.m2
-rw-r--r--SmartDeviceLinkTests/DevAPISpecs/SDLLockScreenConfigurationSpec.m12
-rw-r--r--SmartDeviceLinkTests/DevAPISpecs/SDLMenuManagerSpec.m70
-rw-r--r--SmartDeviceLinkTests/DevAPISpecs/SDLPreloadChoicesOperationSpec.m46
-rw-r--r--SmartDeviceLinkTests/DevAPISpecs/SDLPresentChoiceSetOperationSpec.m211
-rw-r--r--SmartDeviceLinkTests/DevAPISpecs/SDLPresentKeyboardOperationSpec.m200
-rw-r--r--SmartDeviceLinkTests/DevAPISpecs/SDLSoftButtonManagerSpec.m15
-rw-r--r--SmartDeviceLinkTests/DevAPISpecs/SDLStreamingVideoLifecycleManagerSpec.m72
-rw-r--r--SmartDeviceLinkTests/DevAPISpecs/SDLTextAndGraphicManagerSpec.m29
-rw-r--r--SmartDeviceLinkTests/Notifications/SDLResponseDispatcherSpec.m4
-rw-r--r--SmartDeviceLinkTests/ProtocolSpecs/ControlFramePayloadSpecs/SDLControlFramePayloadNakSpec.m3
-rw-r--r--SmartDeviceLinkTests/ProtocolSpecs/ControlFramePayloadSpecs/SDLControlFramePayloadRegisterSecondaryTransportNakSpec.m3
-rw-r--r--SmartDeviceLinkTests/ProtocolSpecs/ControlFramePayloadSpecs/SDLControlFramePayloadTransportEventUpdateSpec.m3
-rw-r--r--SmartDeviceLinkTests/ProtocolSpecs/ControlFramePayloadSpecs/SDLControlFramePayloadVideoStartServiceSpec.m3
-rw-r--r--SmartDeviceLinkTests/ProtocolSpecs/ControlFramePayloadSpecs/SDLControlFrameVideoStartServiceAckSpec.m3
-rw-r--r--SmartDeviceLinkTests/ProtocolSpecs/SDLControlFramePayloadAudioStartServiceAckSpec.m3
-rw-r--r--SmartDeviceLinkTests/ProtocolSpecs/SDLControlFramePayloadEndServiceSpec.m3
-rw-r--r--SmartDeviceLinkTests/ProtocolSpecs/SDLControlFramePayloadRPCStartServiceAckSpec.m6
-rw-r--r--SmartDeviceLinkTests/ProtocolSpecs/SDLControlFramePayloadRPCStartServiceSpec.m3
-rw-r--r--SmartDeviceLinkTests/RPCSpecs/EnumSpecs/SDLGlobalProperySpec.m1
-rw-r--r--SmartDeviceLinkTests/RPCSpecs/RequestSpecs/SDLAlertSpec.m554
-rw-r--r--SmartDeviceLinkTests/RPCSpecs/RequestSpecs/SDLButtonPressSpec.m9
-rw-r--r--SmartDeviceLinkTests/RPCSpecs/RequestSpecs/SDLCancelInteractionSpec.m142
-rw-r--r--SmartDeviceLinkTests/RPCSpecs/RequestSpecs/SDLGetInteriorVehicleDataConsentSpec.m61
-rwxr-xr-xSmartDeviceLinkTests/RPCSpecs/RequestSpecs/SDLGetInteriorVehicleDataSpec.m8
-rw-r--r--SmartDeviceLinkTests/RPCSpecs/RequestSpecs/SDLPerformInteractionSpec.m351
-rw-r--r--SmartDeviceLinkTests/RPCSpecs/RequestSpecs/SDLReleaseInteriorVehicleDataModuleSpec.m61
-rw-r--r--SmartDeviceLinkTests/RPCSpecs/RequestSpecs/SDLScrollableMessageSpec.m130
-rw-r--r--SmartDeviceLinkTests/RPCSpecs/RequestSpecs/SDLSetGlobalPropertiesSpec.m7
-rw-r--r--SmartDeviceLinkTests/RPCSpecs/RequestSpecs/SDLSliderSpec.m172
-rw-r--r--SmartDeviceLinkTests/RPCSpecs/ResponseSpecs/SDLCancelInteractionResponseSpec.m41
-rw-r--r--SmartDeviceLinkTests/RPCSpecs/ResponseSpecs/SDLGetInteriorVehicleDataConsentResponseSpec.m58
-rw-r--r--SmartDeviceLinkTests/RPCSpecs/ResponseSpecs/SDLReleaseInteriorVehicleDataModuleResponseSpec.m19
-rw-r--r--SmartDeviceLinkTests/RPCSpecs/StructSpecs/SDLAudioControlCapabilitiesSpec.m58
-rw-r--r--SmartDeviceLinkTests/RPCSpecs/StructSpecs/SDLButtonCapabilitiesSpec.m21
-rw-r--r--SmartDeviceLinkTests/RPCSpecs/StructSpecs/SDLClimateControlCapabilitiesSpec.m25
-rw-r--r--SmartDeviceLinkTests/RPCSpecs/StructSpecs/SDLHMICapabilitiesSpec.m39
-rw-r--r--SmartDeviceLinkTests/RPCSpecs/StructSpecs/SDLHMISettingsControlCapabilitiesSpec.m53
-rw-r--r--SmartDeviceLinkTests/RPCSpecs/StructSpecs/SDLLightControlCapabilitiesSpec.m35
-rw-r--r--SmartDeviceLinkTests/RPCSpecs/StructSpecs/SDLModuleDataSpec.m16
-rw-r--r--SmartDeviceLinkTests/RPCSpecs/StructSpecs/SDLRadioControlCapabilitiesSpec.m28
-rw-r--r--SmartDeviceLinkTests/RPCSpecs/StructSpecs/SDLSeatControlCapabilitiesSpec.m76
-rw-r--r--SmartDeviceLinkTests/RPCSpecs/StructSpecs/SDLSeatLocationCapabilitySpec.m88
-rw-r--r--SmartDeviceLinkTests/RPCSpecs/StructSpecs/SDLSeatLocationSpec.m58
-rwxr-xr-xSmartDeviceLinkTests/RPCSpecs/StructSpecs/SDLSystemCapabilitySpec.m27
-rw-r--r--SmartDeviceLinkTests/ReferenceImages_64/SDLLockScreenViewControllerSnapshotTests/testAppAndVehicleIcons@2x.pngbin38911 -> 39056 bytes
-rw-r--r--SmartDeviceLinkTests/ReferenceImages_64/SDLLockScreenViewControllerSnapshotTests/testAppAndVehicleIcons_iPhone11_4_0x0@3x.pngbin65090 -> 0 bytes
-rw-r--r--SmartDeviceLinkTests/ReferenceImages_64/SDLLockScreenViewControllerSnapshotTests/testLightBackgroundNoAppNoVehicleIcons@2x.pngbin38911 -> 39056 bytes
-rw-r--r--SmartDeviceLinkTests/ReferenceImages_64/SDLLockScreenViewControllerSnapshotTests/testLightBackgroundNoAppNoVehicleIcons_iPhone11_4_0x0@3x.pngbin65090 -> 0 bytes
-rw-r--r--SmartDeviceLinkTests/ReferenceImages_64/SDLLockScreenViewControllerSnapshotTests/testNoAppNoVehicleIcons@2x.pngbin38911 -> 39056 bytes
-rw-r--r--SmartDeviceLinkTests/ReferenceImages_64/SDLLockScreenViewControllerSnapshotTests/testNoAppNoVehicleIcons_iPhone11_4_0x0@3x.pngbin65090 -> 0 bytes
-rw-r--r--SmartDeviceLinkTests/ReferenceImages_64/SDLLockScreenViewControllerSnapshotTests/testOnlyAppIcon@2x.pngbin38911 -> 39056 bytes
-rw-r--r--SmartDeviceLinkTests/ReferenceImages_64/SDLLockScreenViewControllerSnapshotTests/testOnlyAppIcon_iPhone11_4_0x0@3x.pngbin65090 -> 0 bytes
-rw-r--r--SmartDeviceLinkTests/ReferenceImages_64/SDLLockScreenViewControllerSnapshotTests/testOnlyVehicleIcon@2x.pngbin38911 -> 39056 bytes
-rw-r--r--SmartDeviceLinkTests/ReferenceImages_64/SDLLockScreenViewControllerSnapshotTests/testOnlyVehicleIcon_iPhone11_4_0x0@3x.pngbin65090 -> 0 bytes
-rw-r--r--SmartDeviceLinkTests/SDLAsynchronousRPCOperationSpec.m4
-rw-r--r--SmartDeviceLinkTests/SDLRPCFunctionNamesSpec.m2
-rw-r--r--SmartDeviceLinkTests/SDLScreenManagerSpec.m5
-rw-r--r--SmartDeviceLinkTests/SDLSoftButtonReplaceOperationSpec.m1
-rw-r--r--SmartDeviceLinkTests/SDLSystemCapabilityManagerSpec.m198
199 files changed, 5880 insertions, 1392 deletions
diff --git a/.travis.yml b/.travis.yml
index a9201e483..7ea31d992 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,8 +1,8 @@
language: objective-c
-osx_image: xcode10.2
+osx_image: xcode11
xcode_project: SmartDeviceLink-iOS.xcodeproj
xcode_scheme: SmartDeviceLink
-xcode_sdk: iphonesimulator12.0
+xcode_sdk: iphonesimulator13.0
env:
global:
- FRAMEWORK_NAME=SmartDeviceLink
@@ -18,8 +18,9 @@ before_script:
- carthage bootstrap --platform ios
script:
-- xcodebuild -project "SmartDeviceLink-iOS.xcodeproj" -scheme "SmartDeviceLink" -sdk "iphonesimulator11.0" -destination "OS=11.0,name=iPhone 7" -configuration Debug ONLY_ACTIVE_ARCH=NO RUN_CLANG_STATIC_ANALYZER=NO GCC_INSTRUMENT_PROGRAM_FLOW_ARCS=YES GCC_GENERATE_TEST_COVERAGE_FILES=YES ENABLE_TESTABILITY=YES test | xcpretty -c;
-- xcodebuild -project "SmartDeviceLink-iOS.xcodeproj" -scheme "SmartDeviceLink-Example" -sdk "iphonesimulator11.0" -destination "OS=11.0,name=iPhone 7" -configuration Debug ONLY_ACTIVE_ARCH=NO build | xcpretty -c;
+- set -o pipefail && xcodebuild -project "SmartDeviceLink-iOS.xcodeproj" -scheme "SmartDeviceLink" -sdk "iphonesimulator13.0" -destination "OS=13.0,name=iPhone 11" -configuration Debug ONLY_ACTIVE_ARCH=NO RUN_CLANG_STATIC_ANALYZER=NO GCC_INSTRUMENT_PROGRAM_FLOW_ARCS=YES GCC_GENERATE_TEST_COVERAGE_FILES=YES ENABLE_TESTABILITY=YES test | xcpretty -c;
+- set -o pipefail && xcodebuild -project "SmartDeviceLink-iOS.xcodeproj" -scheme "SmartDeviceLink-Example-ObjC" -sdk "iphonesimulator13.0" -destination "OS=13.0,name=iPhone 11" -configuration Debug ONLY_ACTIVE_ARCH=NO build | xcpretty -c;
+- set -o pipefail && xcodebuild -project "SmartDeviceLink-iOS.xcodeproj" -scheme "SmartDeviceLink-Example-Swift" -sdk "iphonesimulator13.0" -destination "OS=13.0,name=iPhone 11" -configuration Debug ONLY_ACTIVE_ARCH=NO build | xcpretty -c;
after_script:
- bash <(curl -s https://codecov.io/bash)
diff --git a/Cartfile.resolved b/Cartfile.resolved
index ad013b84e..c74a6b293 100644
--- a/Cartfile.resolved
+++ b/Cartfile.resolved
@@ -1,4 +1,4 @@
-github "Quick/Nimble" "v8.0.1"
-github "Quick/Quick" "v2.0.0"
+github "Quick/Nimble" "v8.0.4"
+github "Quick/Quick" "v2.2.0"
github "erikdoe/ocmock" "v3.4.3"
-github "uber/ios-snapshot-test-case" "6.0.3"
+github "uber/ios-snapshot-test-case" "6.1.0"
diff --git a/Example Apps/Example ObjC/AlertManager.h b/Example Apps/Example ObjC/AlertManager.h
index bd803cec0..10508261a 100644
--- a/Example Apps/Example ObjC/AlertManager.h
+++ b/Example Apps/Example ObjC/AlertManager.h
@@ -14,7 +14,14 @@ NS_ASSUME_NONNULL_BEGIN
@interface AlertManager : NSObject
-+ (SDLAlert *)alertWithMessage:(NSString *)textField1 textField2:(nullable NSString *)textField2;
+/**
+ 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;
@end
diff --git a/Example Apps/Example ObjC/AlertManager.m b/Example Apps/Example ObjC/AlertManager.m
index d95bd2fc8..3efbba544 100644
--- a/Example Apps/Example ObjC/AlertManager.m
+++ b/Example Apps/Example ObjC/AlertManager.m
@@ -14,32 +14,12 @@ NS_ASSUME_NONNULL_BEGIN
@implementation AlertManager
-/**
- * Creates an alert with a single line of text
- *
- * @param textField1 The first line of a message to display in the alert
- * @param textField2 The second line of a message to display in the alert
- * @return An SDLAlert object
- */
-+ (SDLAlert *)alertWithMessage:(NSString *)textField1 textField2:(nullable NSString *)textField2 {
- return [[SDLAlert alloc] initWithAlertText1:textField1 alertText2:textField2];
++ (SDLSoftButton *)sdlex_okSoftButton {
+ return [[SDLSoftButton alloc] initWithType:SDLSoftButtonTypeText text:AlertOKButtonText image:nil highlighted:YES buttonId:1 systemAction:nil handler:nil];
}
-/**
- Creates an alert with up to two lines of text and a close button that will dismiss the alert when tapped
-
- @param textField1 The first line of a message to display in the alert
- @param textField2 The second line of a message to display in the alert
- @param iconName The name of the uploaded icon artwork
- @return An SDLAlert object
- */
+ (SDLAlert *)alertWithMessageAndCloseButton:(NSString *)textField1 textField2:(nullable NSString *)textField2 iconName:(nullable NSString *)iconName {
- return [[SDLAlert alloc] initWithAlertText1:textField1 alertText2:textField2 alertText3:nil ttsChunks:nil playTone:NO progressIndicator:NO duration:5000 softButtons:@[[self sdlex_okSoftButton]] alertIcon:[[SDLImage alloc] initWithName:iconName isTemplate:YES]];
-}
-
-+ (SDLSoftButton *)sdlex_okSoftButton {
- SDLSoftButton *okSoftButton = [[SDLSoftButton alloc] initWithType:SDLSoftButtonTypeText text:@"OK" image:nil highlighted:YES buttonId:1 systemAction:nil handler:nil];
- return okSoftButton;
+ 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];
}
@end
diff --git a/Example Apps/Example ObjC/MenuManager.m b/Example Apps/Example ObjC/MenuManager.m
index 00e58f00a..ec9d221b3 100644
--- a/Example Apps/Example ObjC/MenuManager.m
+++ b/Example Apps/Example ObjC/MenuManager.m
@@ -135,14 +135,22 @@ NS_ASSUME_NONNULL_BEGIN
+ (SDLMenuCell *)sdlex_sliderMenuCellWithManager:(SDLManager *)manager {
return [[SDLMenuCell alloc] initWithTitle:ACSliderMenuName icon:nil voiceCommands:@[ACSliderMenuName] handler:^(SDLTriggerSource _Nonnull triggerSource) {
SDLSlider *sliderRPC = [[SDLSlider alloc] initWithNumTicks:3 position:1 sliderHeader:@"Select a letter" sliderFooters:@[@"A", @"B", @"C"] timeout:10000];
- [manager sendRequest:sliderRPC];
+ [manager sendRequest:sliderRPC withResponseHandler:^(__kindof SDLRPCRequest * _Nullable request, __kindof SDLRPCResponse * _Nullable response, NSError * _Nullable error) {
+ if(![response.resultCode isEqualToEnum:SDLResultSuccess]) {
+ [manager sendRequest:[AlertManager alertWithMessageAndCloseButton:@"Slider could not be displayed" textField2:nil iconName:nil]];
+ }
+ }];
}];
}
+ (SDLMenuCell *)sdlex_scrollableMessageMenuCellWithManager:(SDLManager *)manager {
return [[SDLMenuCell alloc] initWithTitle:ACScrollableMessageMenuName icon:nil voiceCommands:@[ACScrollableMessageMenuName] handler:^(SDLTriggerSource _Nonnull triggerSource) {
- SDLScrollableMessage *messageRPC = [[SDLScrollableMessage alloc] initWithMessage:@"This is a scrollable message\nIt can contain many lines" timeout:10000 softButtons:nil];
- [manager sendRequest:messageRPC];
+ SDLScrollableMessage *messageRPC = [[SDLScrollableMessage alloc] initWithMessage:@"This is a scrollable message\nIt can contain many lines"];
+ [manager sendRequest:messageRPC withResponseHandler:^(__kindof SDLRPCRequest * _Nullable request, __kindof SDLRPCResponse * _Nullable response, NSError * _Nullable error) {
+ if(![response.resultCode isEqualToEnum:SDLResultSuccess]) {
+ [manager sendRequest:[AlertManager alertWithMessageAndCloseButton:@"Scrollable Message could not be displayed" textField2:nil iconName:nil]];
+ }
+ }];
}];
}
diff --git a/Example Apps/Example ObjC/ProxyManager.m b/Example Apps/Example ObjC/ProxyManager.m
index 980c5b137..35e28c9b0 100644
--- a/Example Apps/Example ObjC/ProxyManager.m
+++ b/Example Apps/Example ObjC/ProxyManager.m
@@ -193,14 +193,12 @@ NS_ASSUME_NONNULL_BEGIN
screenManager.textField2 = isTextEnabled ? [NSString stringWithFormat:@"Obj-C %@", ExampleAppText] : nil;
screenManager.textField3 = isTextEnabled ? self.vehicleDataManager.vehicleOdometerData : nil;
- if (self.sdlManager.systemCapabilityManager.displayCapabilities.graphicSupported) {
- if ([self sdlex_imageFieldSupported:SDLImageFieldNameGraphic]) {
- screenManager.primaryGraphic = areImagesVisible ? [SDLArtwork persistentArtworkWithImage:[[UIImage imageNamed:ExampleAppLogoName] imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal] asImageFormat:SDLArtworkImageFormatPNG] : nil;
- }
+ if ([self sdlex_imageFieldSupported:SDLImageFieldNameGraphic]) {
+ screenManager.primaryGraphic = areImagesVisible ? [SDLArtwork persistentArtworkWithImage:[[UIImage imageNamed:ExampleAppLogoName] imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal] asImageFormat:SDLArtworkImageFormatPNG] : nil;
+ }
- if ([self sdlex_imageFieldSupported:SDLImageFieldNameSecondaryGraphic]) {
- screenManager.secondaryGraphic = areImagesVisible ? [SDLArtwork persistentArtworkWithImage:[UIImage imageNamed:CarBWIconImageName] asImageFormat:SDLArtworkImageFormatPNG] : nil;
- }
+ if ([self sdlex_imageFieldSupported:SDLImageFieldNameSecondaryGraphic]) {
+ screenManager.secondaryGraphic = areImagesVisible ? [SDLArtwork persistentArtworkWithImage:[UIImage imageNamed:CarBWIconImageName] asImageFormat:SDLArtworkImageFormatPNG] : nil;
}
[screenManager endUpdatesWithCompletionHandler:^(NSError * _Nullable error) {
@@ -215,7 +213,7 @@ NS_ASSUME_NONNULL_BEGIN
* @return True if the image field is supported, false if not
*/
- (BOOL)sdlex_imageFieldSupported:(SDLImageFieldName)imageFieldName {
- for (SDLImageField *imageField in self.sdlManager.systemCapabilityManager.displayCapabilities.imageFields) {
+ for (SDLImageField *imageField in self.sdlManager.systemCapabilityManager.defaultMainWindowCapability.imageFields) {
if ([imageField.name isEqualToString:imageFieldName]) {
return YES;
}
diff --git a/Example Apps/Example ObjC/VehicleDataManager.m b/Example Apps/Example ObjC/VehicleDataManager.m
index 2ebb62422..d4e9a1066 100644
--- a/Example Apps/Example ObjC/VehicleDataManager.m
+++ b/Example Apps/Example ObjC/VehicleDataManager.m
@@ -142,7 +142,11 @@ NS_ASSUME_NONNULL_BEGIN
}
SDLLogD(@"App has permission to access vehicle data. Requesting vehicle data...");
- SDLGetVehicleData *getAllVehicleData = [[SDLGetVehicleData alloc] initWithAccelerationPedalPosition:YES airbagStatus:YES beltStatus:YES bodyInformation:YES cloudAppVehicleID:YES clusterModeStatus:YES deviceStatus:YES driverBraking:YES eCallInfo:YES electronicParkBrakeStatus:YES emergencyEvent:YES engineOilLife:YES engineTorque:YES externalTemperature:YES fuelLevel:YES fuelLevelState:YES fuelRange:YES gps:YES headLampStatus:YES instantFuelConsumption:YES myKey:YES odometer:YES prndl:YES rpm:YES speed:YES steeringWheelAngle:YES tirePressure:YES turnSignal:YES vin:YES wiperStatus:YES];
+
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
+ SDLGetVehicleData *getAllVehicleData = [[SDLGetVehicleData alloc] initWithAccelerationPedalPosition:YES airbagStatus:YES beltStatus:YES bodyInformation:YES clusterModeStatus:YES deviceStatus:YES driverBraking:YES eCallInfo:YES electronicParkBrakeStatus:YES emergencyEvent:YES engineOilLife:YES engineTorque:YES externalTemperature:YES fuelLevel:YES fuelLevelState:YES fuelRange:YES gps:YES headLampStatus:YES instantFuelConsumption:YES myKey:YES odometer:YES prndl:YES rpm:YES speed:YES steeringWheelAngle:YES tirePressure:YES turnSignal:YES vin:YES wiperStatus:YES];
+#pragma clang diagnostic pop
[manager sendRequest:getAllVehicleData withResponseHandler:^(__kindof SDLRPCRequest * _Nullable request, __kindof SDLRPCResponse * _Nullable response, NSError * _Nullable error) {
if (error || ![response isKindOfClass:SDLGetVehicleDataResponse.class]) {
diff --git a/Example Apps/Example Swift/AlertManager.swift b/Example Apps/Example Swift/AlertManager.swift
index 820f69f40..718210777 100644
--- a/Example Apps/Example Swift/AlertManager.swift
+++ b/Example Apps/Example Swift/AlertManager.swift
@@ -11,20 +11,10 @@ import SmartDeviceLink
class AlertManager {
private class var okSoftButton: SDLSoftButton {
- return SDLSoftButton(type: .text, text: "OK", image: nil, highlighted: true, buttonId: 1, systemAction: nil, handler: nil)
+ return SDLSoftButton(type: .text, text: AlertOKButtonText, image: nil, highlighted: true, buttonId: 1, systemAction: nil, handler: nil)
}
- /// Creates an alert with one or two lines of text.
- ///
- /// - 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
- /// - Returns: An SDLAlert object
- class func alertWithMessage(_ textField1: String, textField2: String? = nil) -> SDLAlert {
- return SDLAlert(alertText1: textField1, alertText2: nil)
- }
-
- /// Creates an alert with up to two lines of text and a close button that will dismiss the alert when tapped
+ /// Creates an alert with up to two lines of text, an image, and a close button that will dismiss the alert when tapped.
///
/// - Parameters:
/// - textField1: The first line of a message to display in the alert
@@ -32,6 +22,6 @@ class AlertManager {
/// - 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, ttsChunks: nil, playTone: false, progressIndicator: false, duration: 5000, softButtons: [AlertManager.okSoftButton], alertIcon: (iconName != nil) ? SDLImage(name: iconName!, isTemplate: true) : nil)
+ 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)
}
}
diff --git a/Example Apps/Example Swift/MenuManager.swift b/Example Apps/Example Swift/MenuManager.swift
index d39081ccd..f87b66099 100644
--- a/Example Apps/Example Swift/MenuManager.swift
+++ b/Example Apps/Example Swift/MenuManager.swift
@@ -179,15 +179,25 @@ private extension MenuManager {
private class func sliderMenuCell(with manager: SDLManager) -> SDLMenuCell {
return SDLMenuCell(title: ACSliderMenuName, icon: nil, voiceCommands: [ACSliderMenuName], handler: { _ in
- let slider = SDLSlider(numTicks: 3, position: 1, sliderHeader: "Select a letter", sliderFooters: ["A", "B", "C"], timeout: 10000)
- manager.send(slider)
+ let slider = SDLSlider(numTicks: 3, position: 1, sliderHeader: "Select a letter", sliderFooters: ["A", "B", "C"], timeout: 3000)
+ manager.send(request: slider, responseHandler: { (request, response, error) in
+ guard let response = response, response.resultCode == .success else {
+ manager.send(AlertManager.alertWithMessageAndCloseButton("Slider could not be displayed"))
+ return
+ }
+ })
})
}
private class func scrollableMessageMenuCell(with manager: SDLManager) -> SDLMenuCell {
return SDLMenuCell(title: ACScrollableMessageMenuName, icon: nil, voiceCommands: [ACScrollableMessageMenuName], handler: { _ in
- let scrollableMessage = SDLScrollableMessage(message: "This is a scrollable message\nIt can contain many lines", timeout: 10000, softButtons: nil)
- manager.send(scrollableMessage)
+ let scrollableMessage = SDLScrollableMessage(message: "This is a scrollable message\nIt can contain many lines")
+ manager.send(request: scrollableMessage, responseHandler: { (request, response, error) in
+ guard let response = response, response.resultCode == .success else {
+ manager.send(AlertManager.alertWithMessageAndCloseButton("Scrollable could not be displayed"))
+ return
+ }
+ })
})
}
}
diff --git a/Example Apps/Example Swift/ProxyManager.swift b/Example Apps/Example Swift/ProxyManager.swift
index 77d4f7976..ac3913955 100644
--- a/Example Apps/Example Swift/ProxyManager.swift
+++ b/Example Apps/Example Swift/ProxyManager.swift
@@ -271,16 +271,14 @@ private extension ProxyManager {
screenManager.textField2 = isTextVisible ? "Swift \(ExampleAppText)" : nil
screenManager.textField3 = isTextVisible ? vehicleDataManager.vehicleOdometerData : nil
- if sdlManager.systemCapabilityManager.displayCapabilities?.graphicSupported.boolValue ?? false {
- // Primary graphic
- if imageFieldSupported(imageFieldName: .graphic) {
- screenManager.primaryGraphic = areImagesVisible ? SDLArtwork(image: UIImage(named: ExampleAppLogoName)!.withRenderingMode(.alwaysOriginal), persistent: false, as: .PNG) : nil
- }
-
- // Secondary graphic
- if imageFieldSupported(imageFieldName: .secondaryGraphic) {
- screenManager.secondaryGraphic = areImagesVisible ? SDLArtwork(image: UIImage(named: CarBWIconImageName)!, persistent: false, as: .PNG) : nil
- }
+ // Primary graphic
+ if imageFieldSupported(imageFieldName: .graphic) {
+ screenManager.primaryGraphic = areImagesVisible ? SDLArtwork(image: UIImage(named: ExampleAppLogoName)!.withRenderingMode(.alwaysOriginal), persistent: false, as: .PNG) : nil
+ }
+
+ // Secondary graphic
+ if imageFieldSupported(imageFieldName: .secondaryGraphic) {
+ screenManager.secondaryGraphic = areImagesVisible ? SDLArtwork(image: UIImage(named: CarBWIconImageName)!, persistent: false, as: .PNG) : nil
}
screenManager.endUpdates(completionHandler: { (error) in
@@ -305,6 +303,6 @@ private extension ProxyManager {
/// - Parameter imageFieldName: The name for the image field
/// - Returns: True if the image field is supported, false if not
func imageFieldSupported(imageFieldName: SDLImageFieldName) -> Bool {
- return sdlManager.systemCapabilityManager.displayCapabilities?.imageFields?.first { $0.name == imageFieldName } != nil ? true : false
+ return sdlManager.systemCapabilityManager.defaultMainWindowCapability?.imageFields?.first { $0.name == imageFieldName } != nil ? true : false
}
}
diff --git a/Example Apps/Shared/AppConstants.h b/Example Apps/Shared/AppConstants.h
index 9e7ec3d28..5fb4b25b0 100644
--- a/Example Apps/Shared/AppConstants.h
+++ b/Example Apps/Shared/AppConstants.h
@@ -47,11 +47,14 @@ extern NSString * const ImagesVisibleSoftButtonImageOffState;
extern NSString * const ImagesVisibleSoftButtonImageOnText;
extern NSString * const ImagesVisibleSoftButtonImageOffText;
-#pragma martk - SDL Text-To-Speech
+#pragma mark - Alert
+extern NSString * const AlertOKButtonText;
+
+#pragma mark - SDL Text-To-Speech
extern NSString * const TTSGoodJob;
extern NSString * const TTSYouMissed;
-#pragma martk - SDL Voice Commands
+#pragma mark - SDL Voice Commands
extern NSString * const VCStart;
extern NSString * const VCStop;
@@ -112,7 +115,6 @@ extern NSString * const ACTurnSignalMenuName;
extern NSString * const ACVINMenuName;
extern NSString * const ACWiperStatusMenuName;
-
#pragma mark - SDL Image Names
extern NSString * const AlertBWIconName;
extern NSString * const CarBWIconImageName;
diff --git a/Example Apps/Shared/AppConstants.m b/Example Apps/Shared/AppConstants.m
index 1760ecb42..ffe4762d1 100644
--- a/Example Apps/Shared/AppConstants.m
+++ b/Example Apps/Shared/AppConstants.m
@@ -44,11 +44,14 @@ NSString * const ImagesVisibleSoftButtonImageOffState = @"ImagesVisibleSoftButto
NSString * const ImagesVisibleSoftButtonImageOnText = @"➖Icons";
NSString * const ImagesVisibleSoftButtonImageOffText = @"➕Icons";
-#pragma mart - SDL Text-To-Speech
+#pragma mark - Alert
+NSString * const AlertOKButtonText = @"OK";
+
+#pragma mark - SDL Text-To-Speech
NSString * const TTSGoodJob = @"Good Job";
NSString * const TTSYouMissed = @"You Missed";
-#pragma martk - SDL Voice Commands
+#pragma mark - SDL Voice Commands
NSString * const VCStart = @"Start";
NSString * const VCStop = @"Stop";
diff --git a/SmartDeviceLink-iOS.podspec b/SmartDeviceLink-iOS.podspec
index 508ede379..b6804dc23 100644
--- a/SmartDeviceLink-iOS.podspec
+++ b/SmartDeviceLink-iOS.podspec
@@ -58,6 +58,8 @@ ss.public_header_files = [
'SmartDeviceLink/SDLButtonName.h',
'SmartDeviceLink/SDLButtonPress.h',
'SmartDeviceLink/SDLButtonPressMode.h',
+'SmartDeviceLink/SDLCancelInteraction.h',
+'SmartDeviceLink/SDLCancelInteractionResponse.h',
'SmartDeviceLink/SDLCarModeStatus.h',
'SmartDeviceLink/SDLCarWindowViewController.h',
'SmartDeviceLink/SDLChangeRegistration.h',
@@ -140,6 +142,8 @@ ss.public_header_files = [
'SmartDeviceLink/SDLGetFile.h',
'SmartDeviceLink/SDLGetFileResponse.h',
'SmartDeviceLink/SDLGetInteriorVehicleData.h',
+'SmartDeviceLink/SDLGetInteriorVehicleDataConsent.h',
+'SmartDeviceLink/SDLGetInteriorVehicleDataConsentResponse.h',
'SmartDeviceLink/SDLGetInteriorVehicleDataResponse.h',
'SmartDeviceLink/SDLGetSystemCapability.h',
'SmartDeviceLink/SDLGetSystemCapabilityResponse.h',
@@ -149,6 +153,7 @@ ss.public_header_files = [
'SmartDeviceLink/SDLGetWaypointsResponse.h',
'SmartDeviceLink/SDLGlobalProperty.h',
'SmartDeviceLink/SDLGPSData.h',
+'SmartDeviceLink/SDLGrid.h',
'SmartDeviceLink/SDLHapticRect.h',
'SmartDeviceLink/SDLHeadLampStatus.h',
'SmartDeviceLink/SDLHMICapabilities.h',
@@ -219,6 +224,7 @@ ss.public_header_files = [
'SmartDeviceLink/SDLMetadataTags.h',
'SmartDeviceLink/SDLMetadataType.h',
'SmartDeviceLink/SDLModuleData.h',
+'SmartDeviceLink/SDLModuleInfo.h',
'SmartDeviceLink/SDLModuleType.h',
'SmartDeviceLink/SDLMyKey.h',
'SmartDeviceLink/SDLNavigationAction.h',
@@ -289,6 +295,8 @@ ss.public_header_files = [
'SmartDeviceLink/SDLRegisterAppInterface.h',
'SmartDeviceLink/SDLRegisterAppInterfaceResponse.h',
'SmartDeviceLink/SDLRemoteControlCapabilities.h',
+'SmartDeviceLink/SDLReleaseInteriorVehicleDataModule.h',
+'SmartDeviceLink/SDLReleaseInteriorVehicleDataModuleResponse.h',
'SmartDeviceLink/SDLRequestType.h',
'SmartDeviceLink/SDLResetGlobalProperties.h',
'SmartDeviceLink/SDLResetGlobalPropertiesResponse.h',
@@ -311,6 +319,8 @@ ss.public_header_files = [
'SmartDeviceLink/SDLScrollableMessageResponse.h',
'SmartDeviceLink/SDLSeatControlCapabilities.h',
'SmartDeviceLink/SDLSeatControlData.h',
+'SmartDeviceLink/SDLSeatLocation.h',
+'SmartDeviceLink/SDLSeatLocationCapability.h',
'SmartDeviceLink/SDLSeatMemoryAction.h',
'SmartDeviceLink/SDLSeatMemoryActionType.h',
'SmartDeviceLink/SDLSupportedSeat.h',
diff --git a/SmartDeviceLink-iOS.xcodeproj/project.pbxproj b/SmartDeviceLink-iOS.xcodeproj/project.pbxproj
index cbb0ad848..1655793c1 100644
--- a/SmartDeviceLink-iOS.xcodeproj/project.pbxproj
+++ b/SmartDeviceLink-iOS.xcodeproj/project.pbxproj
@@ -7,6 +7,28 @@
objects = {
/* Begin PBXBuildFile section */
+ 000DD56C22EEF8E4005AB7A7 /* SDLSeatLocationCapabilitySpec.m in Sources */ = {isa = PBXBuildFile; fileRef = 000DD56B22EEF8E4005AB7A7 /* SDLSeatLocationCapabilitySpec.m */; };
+ 000DD56E22EF01FC005AB7A7 /* SDLSeatLocationSpec.m in Sources */ = {isa = PBXBuildFile; fileRef = 000DD56D22EF01FC005AB7A7 /* SDLSeatLocationSpec.m */; };
+ 000DD57022EF038C005AB7A7 /* SDLGetInteriorVehicleDataConsentSpec.m in Sources */ = {isa = PBXBuildFile; fileRef = 000DD56F22EF038C005AB7A7 /* SDLGetInteriorVehicleDataConsentSpec.m */; };
+ 000DD57222EF063F005AB7A7 /* SDLGetInteriorVehicleDataConsentResponseSpec.m in Sources */ = {isa = PBXBuildFile; fileRef = 000DD57122EF063F005AB7A7 /* SDLGetInteriorVehicleDataConsentResponseSpec.m */; };
+ 000DD57422EF0957005AB7A7 /* SDLReleaseInteriorVehicleDataModuleSpec.m in Sources */ = {isa = PBXBuildFile; fileRef = 000DD57322EF0957005AB7A7 /* SDLReleaseInteriorVehicleDataModuleSpec.m */; };
+ 000DD57622EF0971005AB7A7 /* SDLReleaseInteriorVehicleDataModuleResponseSpec.m in Sources */ = {isa = PBXBuildFile; fileRef = 000DD57522EF0971005AB7A7 /* SDLReleaseInteriorVehicleDataModuleResponseSpec.m */; };
+ 0055412622D40DAB003194D3 /* SDLModuleInfo.h in Headers */ = {isa = PBXBuildFile; fileRef = 0055412422D40DAB003194D3 /* SDLModuleInfo.h */; settings = {ATTRIBUTES = (Public, ); }; };
+ 0055412722D40DAB003194D3 /* SDLModuleInfo.m in Sources */ = {isa = PBXBuildFile; fileRef = 0055412522D40DAB003194D3 /* SDLModuleInfo.m */; };
+ 0055412A22D5DC0B003194D3 /* SDLGrid.h in Headers */ = {isa = PBXBuildFile; fileRef = 0055412822D5DC0B003194D3 /* SDLGrid.h */; settings = {ATTRIBUTES = (Public, ); }; };
+ 0055412B22D5DC0B003194D3 /* SDLGrid.m in Sources */ = {isa = PBXBuildFile; fileRef = 0055412922D5DC0B003194D3 /* SDLGrid.m */; };
+ 0055412E22D759BD003194D3 /* SDLSeatLocation.h in Headers */ = {isa = PBXBuildFile; fileRef = 0055412C22D759BC003194D3 /* SDLSeatLocation.h */; settings = {ATTRIBUTES = (Public, ); }; };
+ 0055412F22D759BD003194D3 /* SDLSeatLocation.m in Sources */ = {isa = PBXBuildFile; fileRef = 0055412D22D759BC003194D3 /* SDLSeatLocation.m */; };
+ 0055413222D75A7B003194D3 /* SDLSeatLocationCapability.h in Headers */ = {isa = PBXBuildFile; fileRef = 0055413022D75A7A003194D3 /* SDLSeatLocationCapability.h */; settings = {ATTRIBUTES = (Public, ); }; };
+ 0055413322D75A7B003194D3 /* SDLSeatLocationCapability.m in Sources */ = {isa = PBXBuildFile; fileRef = 0055413122D75A7B003194D3 /* SDLSeatLocationCapability.m */; };
+ 008DB36122EA7482003F458C /* SDLGetInteriorVehicleDataConsent.h in Headers */ = {isa = PBXBuildFile; fileRef = 008DB35F22EA7481003F458C /* SDLGetInteriorVehicleDataConsent.h */; settings = {ATTRIBUTES = (Public, ); }; };
+ 008DB36222EA7482003F458C /* SDLGetInteriorVehicleDataConsent.m in Sources */ = {isa = PBXBuildFile; fileRef = 008DB36022EA7481003F458C /* SDLGetInteriorVehicleDataConsent.m */; };
+ 008DB36522EA7F6F003F458C /* SDLGetInteriorVehicleDataConsentResponse.h in Headers */ = {isa = PBXBuildFile; fileRef = 008DB36322EA7F6F003F458C /* SDLGetInteriorVehicleDataConsentResponse.h */; settings = {ATTRIBUTES = (Public, ); }; };
+ 008DB36622EA7F6F003F458C /* SDLGetInteriorVehicleDataConsentResponse.m in Sources */ = {isa = PBXBuildFile; fileRef = 008DB36422EA7F6F003F458C /* SDLGetInteriorVehicleDataConsentResponse.m */; };
+ 008DB36922EA8261003F458C /* SDLReleaseInteriorVehicleDataModule.h in Headers */ = {isa = PBXBuildFile; fileRef = 008DB36722EA8261003F458C /* SDLReleaseInteriorVehicleDataModule.h */; settings = {ATTRIBUTES = (Public, ); }; };
+ 008DB36A22EA8261003F458C /* SDLReleaseInteriorVehicleDataModule.m in Sources */ = {isa = PBXBuildFile; fileRef = 008DB36822EA8261003F458C /* SDLReleaseInteriorVehicleDataModule.m */; };
+ 008DB36D22EA83E4003F458C /* SDLReleaseInteriorVehicleDataModuleResponse.h in Headers */ = {isa = PBXBuildFile; fileRef = 008DB36B22EA83E4003F458C /* SDLReleaseInteriorVehicleDataModuleResponse.h */; settings = {ATTRIBUTES = (Public, ); }; };
+ 008DB36E22EA83E4003F458C /* SDLReleaseInteriorVehicleDataModuleResponse.m in Sources */ = {isa = PBXBuildFile; fileRef = 008DB36C22EA83E4003F458C /* SDLReleaseInteriorVehicleDataModuleResponse.m */; };
162E82CA1A9BDE8A00906325 /* SDLAmbientLightStatusSpec.m in Sources */ = {isa = PBXBuildFile; fileRef = 162E81E21A9BDE8A00906325 /* SDLAmbientLightStatusSpec.m */; };
162E82CB1A9BDE8A00906325 /* SDLAppHMITypeSpec.m in Sources */ = {isa = PBXBuildFile; fileRef = 162E81E31A9BDE8A00906325 /* SDLAppHMITypeSpec.m */; };
162E82CC1A9BDE8A00906325 /* SDLAppInterfaceUnregisteredReasonSpec.m in Sources */ = {isa = PBXBuildFile; fileRef = 162E81E41A9BDE8A00906325 /* SDLAppInterfaceUnregisteredReasonSpec.m */; };
@@ -106,7 +128,6 @@
162E832C1A9BDE8B00906325 /* SDLDiagnosticMessageSpec.m in Sources */ = {isa = PBXBuildFile; fileRef = 162E82481A9BDE8A00906325 /* SDLDiagnosticMessageSpec.m */; };
162E832D1A9BDE8B00906325 /* SDLEncodedSyncPDataSpec.m in Sources */ = {isa = PBXBuildFile; fileRef = 162E82491A9BDE8A00906325 /* SDLEncodedSyncPDataSpec.m */; };
162E832E1A9BDE8B00906325 /* SDLEndAudioPassThruSpec.m in Sources */ = {isa = PBXBuildFile; fileRef = 162E824A1A9BDE8A00906325 /* SDLEndAudioPassThruSpec.m */; };
- 162E832F1A9BDE8B00906325 /* SDLGetDTCsSpec.m in Sources */ = {isa = PBXBuildFile; fileRef = 162E824B1A9BDE8A00906325 /* SDLGetDTCsSpec.m */; };
162E83301A9BDE8B00906325 /* SDLGetVehicleDataSpec.m in Sources */ = {isa = PBXBuildFile; fileRef = 162E824C1A9BDE8A00906325 /* SDLGetVehicleDataSpec.m */; };
162E83311A9BDE8B00906325 /* SDLListFilesSpec.m in Sources */ = {isa = PBXBuildFile; fileRef = 162E824D1A9BDE8A00906325 /* SDLListFilesSpec.m */; };
162E83321A9BDE8B00906325 /* SDLPerformAudioPassThruSpec.m in Sources */ = {isa = PBXBuildFile; fileRef = 162E824E1A9BDE8A00906325 /* SDLPerformAudioPassThruSpec.m */; };
@@ -374,6 +395,8 @@
1FF7DABA1F75B2A800B46C30 /* SDLFocusableItemLocator.h in Headers */ = {isa = PBXBuildFile; fileRef = 1FF7DAB91F75B2A800B46C30 /* SDLFocusableItemLocator.h */; };
1FF7DABC1F75B2BF00B46C30 /* SDLFocusableItemLocator.m in Sources */ = {isa = PBXBuildFile; fileRef = 1FF7DABB1F75B2BF00B46C30 /* SDLFocusableItemLocator.m */; };
1FF7DAC01F75CF6C00B46C30 /* SDLHapticManagerSpec.m in Sources */ = {isa = PBXBuildFile; fileRef = 1FF7DABF1F75CF6C00B46C30 /* SDLHapticManagerSpec.m */; };
+ 2B233530232BD8A5002118E5 /* SDLWindowCapability+ShowManagerExtensions.h in Headers */ = {isa = PBXBuildFile; fileRef = 2B23352E232BD8A5002118E5 /* SDLWindowCapability+ShowManagerExtensions.h */; };
+ 2B233531232BD8A5002118E5 /* SDLWindowCapability+ShowManagerExtensions.m in Sources */ = {isa = PBXBuildFile; fileRef = 2B23352F232BD8A5002118E5 /* SDLWindowCapability+ShowManagerExtensions.m */; };
2BF2F84F20ED004000A26EF2 /* SDLAudioStreamingIndicator.h in Headers */ = {isa = PBXBuildFile; fileRef = 2BF2F84D20ED004000A26EF2 /* SDLAudioStreamingIndicator.h */; settings = {ATTRIBUTES = (Public, ); }; };
2BF2F85020ED004000A26EF2 /* SDLAudioStreamingIndicator.m in Sources */ = {isa = PBXBuildFile; fileRef = 2BF2F84E20ED004000A26EF2 /* SDLAudioStreamingIndicator.m */; };
2BF2F85220ED068200A26EF2 /* SDLAudioStreamingIndicatorSpec.m in Sources */ = {isa = PBXBuildFile; fileRef = 2BF2F85120ED068200A26EF2 /* SDLAudioStreamingIndicatorSpec.m */; };
@@ -426,8 +449,6 @@
5D1665C91CF8CA3D00CC4CA1 /* SDLPermissionFilter.m in Sources */ = {isa = PBXBuildFile; fileRef = 5D1665C71CF8CA3D00CC4CA1 /* SDLPermissionFilter.m */; };
5D1665CB1CF8CA6700CC4CA1 /* NSNumber+NumberType.h in Headers */ = {isa = PBXBuildFile; fileRef = 5D1665CA1CF8CA6700CC4CA1 /* NSNumber+NumberType.h */; settings = {ATTRIBUTES = (Public, ); }; };
5D1665CD1CF8CA8A00CC4CA1 /* SDLPermissionConstants.h in Headers */ = {isa = PBXBuildFile; fileRef = 5D1665CC1CF8CA8A00CC4CA1 /* SDLPermissionConstants.h */; settings = {ATTRIBUTES = (Public, ); }; };
- 5D1BF6AF204742FB00D36881 /* SDLDisplayCapabilities+ShowManagerExtensions.h in Headers */ = {isa = PBXBuildFile; fileRef = 5D1BF6AD204742FB00D36881 /* SDLDisplayCapabilities+ShowManagerExtensions.h */; };
- 5D1BF6B0204742FB00D36881 /* SDLDisplayCapabilities+ShowManagerExtensions.m in Sources */ = {isa = PBXBuildFile; fileRef = 5D1BF6AE204742FB00D36881 /* SDLDisplayCapabilities+ShowManagerExtensions.m */; };
5D1FF28D213044F9000EB9B4 /* AlertManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 5D1FF28C213044F9000EB9B4 /* AlertManager.m */; };
5D1FF29C21304515000EB9B4 /* PerformInteractionManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 5D1FF29121304513000EB9B4 /* PerformInteractionManager.m */; };
5D1FF29D21304515000EB9B4 /* RPCPermissionsManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 5D1FF29221304513000EB9B4 /* RPCPermissionsManager.m */; };
@@ -1247,6 +1268,7 @@
755F176222A00B7C0041B9CB /* SDLMenuManagerConstants.h in Headers */ = {isa = PBXBuildFile; fileRef = 755F176122A00B7C0041B9CB /* SDLMenuManagerConstants.h */; settings = {ATTRIBUTES = (Public, ); }; };
756C62762289F11F008B57A2 /* SDLDynamicMenuUpdateRunScore.h in Headers */ = {isa = PBXBuildFile; fileRef = 756C62742289F11F008B57A2 /* SDLDynamicMenuUpdateRunScore.h */; };
756C62772289F11F008B57A2 /* SDLDynamicMenuUpdateRunScore.m in Sources */ = {isa = PBXBuildFile; fileRef = 756C62752289F11F008B57A2 /* SDLDynamicMenuUpdateRunScore.m */; };
+ 75CE2041233D335100B9DEF9 /* SDLGetDTCsSpec.m in Sources */ = {isa = PBXBuildFile; fileRef = 162E824B1A9BDE8A00906325 /* SDLGetDTCsSpec.m */; };
75FF2E3822DF9D5900D0C13B /* SDLShowAppMenuResponseSpec.m in Sources */ = {isa = PBXBuildFile; fileRef = 75FF2E3722DF9D5900D0C13B /* SDLShowAppMenuResponseSpec.m */; };
75FF2E3B22E0DD5400D0C13B /* SDLMsgVersion.h in Headers */ = {isa = PBXBuildFile; fileRef = 75FF2E3922E0DD5400D0C13B /* SDLMsgVersion.h */; settings = {ATTRIBUTES = (Public, ); }; };
75FF2E3C22E0DD5400D0C13B /* SDLMsgVersion.m in Sources */ = {isa = PBXBuildFile; fileRef = 75FF2E3A22E0DD5400D0C13B /* SDLMsgVersion.m */; };
@@ -1273,6 +1295,7 @@
8818ADD82100FC18007D6F19 /* SDLTurnSignal.h in Headers */ = {isa = PBXBuildFile; fileRef = 8818ADD62100FC18007D6F19 /* SDLTurnSignal.h */; settings = {ATTRIBUTES = (Public, ); }; };
8818ADD92100FC18007D6F19 /* SDLTurnSignal.m in Sources */ = {isa = PBXBuildFile; fileRef = 8818ADD72100FC18007D6F19 /* SDLTurnSignal.m */; };
8818ADDD2100FE0C007D6F19 /* SDLTurnSignalSpec.m in Sources */ = {isa = PBXBuildFile; fileRef = 8818ADDC2100FE0C007D6F19 /* SDLTurnSignalSpec.m */; };
+ 881F388D22D904BE00DF6DCE /* SDLCancelInteractionResponseSpec.m in Sources */ = {isa = PBXBuildFile; fileRef = 881F388C22D904BE00DF6DCE /* SDLCancelInteractionResponseSpec.m */; };
8829568B207CF68800EF056C /* SmartDeviceLink.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5D61FA1C1A84237100846EE7 /* SmartDeviceLink.framework */; settings = {ATTRIBUTES = (Weak, ); }; };
88295693207CF68800EF056C /* SmartDeviceLink.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 5D61FA1C1A84237100846EE7 /* SmartDeviceLink.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
882C42CE2108CDB100A44B58 /* (null) in Sources */ = {isa = PBXBuildFile; };
@@ -1429,6 +1452,11 @@
88EED83B1F33BECB00E6C42E /* SDLHapticRectSpec.m in Sources */ = {isa = PBXBuildFile; fileRef = 88EED83A1F33BECB00E6C42E /* SDLHapticRectSpec.m */; };
88EED83E1F33C5A400E6C42E /* SDLSendHapticData.h in Headers */ = {isa = PBXBuildFile; fileRef = 88EED83C1F33C5A400E6C42E /* SDLSendHapticData.h */; settings = {ATTRIBUTES = (Public, ); }; };
88EED83F1F33C5A400E6C42E /* SDLSendHapticData.m in Sources */ = {isa = PBXBuildFile; fileRef = 88EED83D1F33C5A400E6C42E /* SDLSendHapticData.m */; };
+ 88EF8EB722D8E02E00CB06C2 /* SDLCancelInteraction.h in Headers */ = {isa = PBXBuildFile; fileRef = 88EF8EB522D8E02E00CB06C2 /* SDLCancelInteraction.h */; settings = {ATTRIBUTES = (Public, ); }; };
+ 88EF8EB822D8E02E00CB06C2 /* SDLCancelInteraction.m in Sources */ = {isa = PBXBuildFile; fileRef = 88EF8EB622D8E02E00CB06C2 /* SDLCancelInteraction.m */; };
+ 88EF8EBA22D8F48300CB06C2 /* SDLCancelInteractionSpec.m in Sources */ = {isa = PBXBuildFile; fileRef = 88EF8EB922D8F48300CB06C2 /* SDLCancelInteractionSpec.m */; };
+ 88EF8EBD22D8FE5800CB06C2 /* SDLCancelInteractionResponse.h in Headers */ = {isa = PBXBuildFile; fileRef = 88EF8EBB22D8FE5800CB06C2 /* SDLCancelInteractionResponse.h */; settings = {ATTRIBUTES = (Public, ); }; };
+ 88EF8EBE22D8FE5800CB06C2 /* SDLCancelInteractionResponse.m in Sources */ = {isa = PBXBuildFile; fileRef = 88EF8EBC22D8FE5800CB06C2 /* SDLCancelInteractionResponse.m */; };
88F37A4D226F84BE00DF119B /* SDLIAPDataSessionSpec.m in Sources */ = {isa = PBXBuildFile; fileRef = 88F37A4C226F84BE00DF119B /* SDLIAPDataSessionSpec.m */; };
88F50D5F220B720E00F34648 /* SDLPerformAppServiceInteractionSpec.m in Sources */ = {isa = PBXBuildFile; fileRef = 88F50D5E220B720E00F34648 /* SDLPerformAppServiceInteractionSpec.m */; };
88F65133220C6DC300CAF321 /* SDLWeatherAlertSpec.m in Sources */ = {isa = PBXBuildFile; fileRef = 88F65132220C6DC300CAF321 /* SDLWeatherAlertSpec.m */; };
@@ -1672,6 +1700,28 @@
/* End PBXCopyFilesBuildPhase section */
/* Begin PBXFileReference section */
+ 000DD56B22EEF8E4005AB7A7 /* SDLSeatLocationCapabilitySpec.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SDLSeatLocationCapabilitySpec.m; sourceTree = "<group>"; };
+ 000DD56D22EF01FC005AB7A7 /* SDLSeatLocationSpec.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SDLSeatLocationSpec.m; sourceTree = "<group>"; };
+ 000DD56F22EF038C005AB7A7 /* SDLGetInteriorVehicleDataConsentSpec.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SDLGetInteriorVehicleDataConsentSpec.m; sourceTree = "<group>"; };
+ 000DD57122EF063F005AB7A7 /* SDLGetInteriorVehicleDataConsentResponseSpec.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SDLGetInteriorVehicleDataConsentResponseSpec.m; sourceTree = "<group>"; };
+ 000DD57322EF0957005AB7A7 /* SDLReleaseInteriorVehicleDataModuleSpec.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SDLReleaseInteriorVehicleDataModuleSpec.m; sourceTree = "<group>"; };
+ 000DD57522EF0971005AB7A7 /* SDLReleaseInteriorVehicleDataModuleResponseSpec.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SDLReleaseInteriorVehicleDataModuleResponseSpec.m; sourceTree = "<group>"; };
+ 0055412422D40DAB003194D3 /* SDLModuleInfo.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SDLModuleInfo.h; sourceTree = "<group>"; };
+ 0055412522D40DAB003194D3 /* SDLModuleInfo.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SDLModuleInfo.m; sourceTree = "<group>"; };
+ 0055412822D5DC0B003194D3 /* SDLGrid.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SDLGrid.h; sourceTree = "<group>"; };
+ 0055412922D5DC0B003194D3 /* SDLGrid.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SDLGrid.m; sourceTree = "<group>"; };
+ 0055412C22D759BC003194D3 /* SDLSeatLocation.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SDLSeatLocation.h; sourceTree = "<group>"; };
+ 0055412D22D759BC003194D3 /* SDLSeatLocation.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SDLSeatLocation.m; sourceTree = "<group>"; };
+ 0055413022D75A7A003194D3 /* SDLSeatLocationCapability.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SDLSeatLocationCapability.h; sourceTree = "<group>"; };
+ 0055413122D75A7B003194D3 /* SDLSeatLocationCapability.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SDLSeatLocationCapability.m; sourceTree = "<group>"; };
+ 008DB35F22EA7481003F458C /* SDLGetInteriorVehicleDataConsent.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SDLGetInteriorVehicleDataConsent.h; sourceTree = "<group>"; };
+ 008DB36022EA7481003F458C /* SDLGetInteriorVehicleDataConsent.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SDLGetInteriorVehicleDataConsent.m; sourceTree = "<group>"; };
+ 008DB36322EA7F6F003F458C /* SDLGetInteriorVehicleDataConsentResponse.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SDLGetInteriorVehicleDataConsentResponse.h; sourceTree = "<group>"; };
+ 008DB36422EA7F6F003F458C /* SDLGetInteriorVehicleDataConsentResponse.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SDLGetInteriorVehicleDataConsentResponse.m; sourceTree = "<group>"; };
+ 008DB36722EA8261003F458C /* SDLReleaseInteriorVehicleDataModule.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SDLReleaseInteriorVehicleDataModule.h; sourceTree = "<group>"; };
+ 008DB36822EA8261003F458C /* SDLReleaseInteriorVehicleDataModule.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SDLReleaseInteriorVehicleDataModule.m; sourceTree = "<group>"; };
+ 008DB36B22EA83E4003F458C /* SDLReleaseInteriorVehicleDataModuleResponse.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SDLReleaseInteriorVehicleDataModuleResponse.h; sourceTree = "<group>"; };
+ 008DB36C22EA83E4003F458C /* SDLReleaseInteriorVehicleDataModuleResponse.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SDLReleaseInteriorVehicleDataModuleResponse.m; sourceTree = "<group>"; };
162E81E21A9BDE8A00906325 /* SDLAmbientLightStatusSpec.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SDLAmbientLightStatusSpec.m; sourceTree = "<group>"; };
162E81E31A9BDE8A00906325 /* SDLAppHMITypeSpec.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SDLAppHMITypeSpec.m; sourceTree = "<group>"; };
162E81E41A9BDE8A00906325 /* SDLAppInterfaceUnregisteredReasonSpec.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SDLAppInterfaceUnregisteredReasonSpec.m; sourceTree = "<group>"; };
@@ -2038,6 +2088,8 @@
1FF7DAB91F75B2A800B46C30 /* SDLFocusableItemLocator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDLFocusableItemLocator.h; sourceTree = "<group>"; };
1FF7DABB1F75B2BF00B46C30 /* SDLFocusableItemLocator.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SDLFocusableItemLocator.m; sourceTree = "<group>"; };
1FF7DABF1F75CF6C00B46C30 /* SDLHapticManagerSpec.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = SDLHapticManagerSpec.m; path = ProxySpecs/SDLHapticManagerSpec.m; sourceTree = "<group>"; };
+ 2B23352E232BD8A5002118E5 /* SDLWindowCapability+ShowManagerExtensions.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "SDLWindowCapability+ShowManagerExtensions.h"; sourceTree = "<group>"; };
+ 2B23352F232BD8A5002118E5 /* SDLWindowCapability+ShowManagerExtensions.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "SDLWindowCapability+ShowManagerExtensions.m"; sourceTree = "<group>"; };
2BF2F84D20ED004000A26EF2 /* SDLAudioStreamingIndicator.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SDLAudioStreamingIndicator.h; sourceTree = "<group>"; };
2BF2F84E20ED004000A26EF2 /* SDLAudioStreamingIndicator.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SDLAudioStreamingIndicator.m; sourceTree = "<group>"; };
2BF2F85120ED068200A26EF2 /* SDLAudioStreamingIndicatorSpec.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SDLAudioStreamingIndicatorSpec.m; sourceTree = "<group>"; };
@@ -2098,8 +2150,6 @@
5D1665C71CF8CA3D00CC4CA1 /* SDLPermissionFilter.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SDLPermissionFilter.m; sourceTree = "<group>"; };
5D1665CA1CF8CA6700CC4CA1 /* NSNumber+NumberType.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSNumber+NumberType.h"; sourceTree = "<group>"; };
5D1665CC1CF8CA8A00CC4CA1 /* SDLPermissionConstants.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDLPermissionConstants.h; sourceTree = "<group>"; };
- 5D1BF6AD204742FB00D36881 /* SDLDisplayCapabilities+ShowManagerExtensions.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "SDLDisplayCapabilities+ShowManagerExtensions.h"; sourceTree = "<group>"; };
- 5D1BF6AE204742FB00D36881 /* SDLDisplayCapabilities+ShowManagerExtensions.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "SDLDisplayCapabilities+ShowManagerExtensions.m"; sourceTree = "<group>"; };
5D1FF28B213044F9000EB9B4 /* AlertManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AlertManager.h; path = "Example Apps/Example ObjC/AlertManager.h"; sourceTree = SOURCE_ROOT; };
5D1FF28C213044F9000EB9B4 /* AlertManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = AlertManager.m; path = "Example Apps/Example ObjC/AlertManager.m"; sourceTree = SOURCE_ROOT; };
5D1FF28E21304513000EB9B4 /* MenuManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MenuManager.h; path = "Example Apps/Example ObjC/MenuManager.h"; sourceTree = SOURCE_ROOT; };
@@ -2978,6 +3028,7 @@
8818ADD62100FC18007D6F19 /* SDLTurnSignal.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SDLTurnSignal.h; sourceTree = "<group>"; };
8818ADD72100FC18007D6F19 /* SDLTurnSignal.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SDLTurnSignal.m; sourceTree = "<group>"; };
8818ADDC2100FE0C007D6F19 /* SDLTurnSignalSpec.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SDLTurnSignalSpec.m; sourceTree = "<group>"; };
+ 881F388C22D904BE00DF6DCE /* SDLCancelInteractionResponseSpec.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SDLCancelInteractionResponseSpec.m; sourceTree = "<group>"; };
88295697207CF68800EF056C /* SDL Example Swift.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "SDL Example Swift.app"; sourceTree = BUILT_PRODUCTS_DIR; };
882FAC4C2209D7EF0062385D /* SDLAppServiceDataSpec.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SDLAppServiceDataSpec.m; sourceTree = "<group>"; };
8831FA382201E3D100B8FFB7 /* SDLAppServiceManifestSpec.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SDLAppServiceManifestSpec.m; sourceTree = "<group>"; };
@@ -3132,6 +3183,11 @@
88EED83A1F33BECB00E6C42E /* SDLHapticRectSpec.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SDLHapticRectSpec.m; sourceTree = "<group>"; };
88EED83C1F33C5A400E6C42E /* SDLSendHapticData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDLSendHapticData.h; sourceTree = "<group>"; };
88EED83D1F33C5A400E6C42E /* SDLSendHapticData.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SDLSendHapticData.m; sourceTree = "<group>"; };
+ 88EF8EB522D8E02E00CB06C2 /* SDLCancelInteraction.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SDLCancelInteraction.h; sourceTree = "<group>"; };
+ 88EF8EB622D8E02E00CB06C2 /* SDLCancelInteraction.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SDLCancelInteraction.m; sourceTree = "<group>"; };
+ 88EF8EB922D8F48300CB06C2 /* SDLCancelInteractionSpec.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SDLCancelInteractionSpec.m; sourceTree = "<group>"; };
+ 88EF8EBB22D8FE5800CB06C2 /* SDLCancelInteractionResponse.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SDLCancelInteractionResponse.h; sourceTree = "<group>"; };
+ 88EF8EBC22D8FE5800CB06C2 /* SDLCancelInteractionResponse.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SDLCancelInteractionResponse.m; sourceTree = "<group>"; };
88F37A4C226F84BE00DF119B /* SDLIAPDataSessionSpec.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SDLIAPDataSessionSpec.m; sourceTree = "<group>"; };
88F50D5E220B720E00F34648 /* SDLPerformAppServiceInteractionSpec.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SDLPerformAppServiceInteractionSpec.m; sourceTree = "<group>"; };
88F65132220C6DC300CAF321 /* SDLWeatherAlertSpec.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SDLWeatherAlertSpec.m; sourceTree = "<group>"; };
@@ -3565,7 +3621,10 @@
8877F5EA1F34A3BE00DC128A /* SDLSendHapticDataSpec.m */,
9FA0D00822DF0B47009CF344 /* SDLCreateWindowSpec.m */,
9FA0D00E22DF0B90009CF344 /* SDLDeleteWindowSpec.m */,
+ 88EF8EB922D8F48300CB06C2 /* SDLCancelInteractionSpec.m */,
8B05F88822DD011300666CD8 /* SDLUnpublishAppServiceSpec.m */,
+ 000DD56F22EF038C005AB7A7 /* SDLGetInteriorVehicleDataConsentSpec.m */,
+ 000DD57322EF0957005AB7A7 /* SDLReleaseInteriorVehicleDataModuleSpec.m */,
);
path = RequestSpecs;
sourceTree = "<group>";
@@ -3633,7 +3692,10 @@
DA9F7EAB1DCC062400ACAE48 /* SDLUnsubscribeWaypointsResponseSpec.m */,
162E828D1A9BDE8A00906325 /* SDLUpdateTurnListResponseSpec.m */,
8877F5F01F34AA2D00DC128A /* SDLSendHapticDataResponseSpec.m */,
+ 881F388C22D904BE00DF6DCE /* SDLCancelInteractionResponseSpec.m */,
8BA12B1722DCF59700371E82 /* SDLUnpublishAppServiceResponseSpec.m */,
+ 000DD57122EF063F005AB7A7 /* SDLGetInteriorVehicleDataConsentResponseSpec.m */,
+ 000DD57522EF0971005AB7A7 /* SDLReleaseInteriorVehicleDataModuleResponseSpec.m */,
);
path = ResponseSpecs;
sourceTree = "<group>";
@@ -3740,6 +3802,8 @@
8855F9DF220C93B700A5C897 /* SDLWeatherDataSpec.m */,
880D2679220DDD1000B3F496 /* SDLWeatherServiceDataSpec.m */,
880D267F220E038800B3F496 /* SDLWeatherServiceManifestSpec.m */,
+ 000DD56B22EEF8E4005AB7A7 /* SDLSeatLocationCapabilitySpec.m */,
+ 000DD56D22EF01FC005AB7A7 /* SDLSeatLocationSpec.m */,
9FA0CFFF22DF06A0009CF344 /* SDLWindowCapabilitySpec.m */,
9FA0D00222DF06B9009CF344 /* SDLWindowTypeCapabilitiesSpec.m */,
);
@@ -3932,8 +3996,8 @@
5D1BF6AA2047429C00D36881 /* Utilities */ = {
isa = PBXGroup;
children = (
- 5D1BF6AD204742FB00D36881 /* SDLDisplayCapabilities+ShowManagerExtensions.h */,
- 5D1BF6AE204742FB00D36881 /* SDLDisplayCapabilities+ShowManagerExtensions.m */,
+ 2B23352E232BD8A5002118E5 /* SDLWindowCapability+ShowManagerExtensions.h */,
+ 2B23352F232BD8A5002118E5 /* SDLWindowCapability+ShowManagerExtensions.m */,
);
name = Utilities;
sourceTree = "<group>";
@@ -4259,6 +4323,8 @@
5D61FA4D1A84238A00846EE7 /* SDLAlertManeuver.m */,
1E5AD07E1F20B73E0029B8AF /* SDLButtonPress.h */,
1E5AD07F1F20B73E0029B8AF /* SDLButtonPress.m */,
+ 88EF8EB522D8E02E00CB06C2 /* SDLCancelInteraction.h */,
+ 88EF8EB622D8E02E00CB06C2 /* SDLCancelInteraction.m */,
5D61FA6E1A84238A00846EE7 /* SDLChangeRegistration.h */,
5D61FA6F1A84238A00846EE7 /* SDLChangeRegistration.m */,
888DBAE922D52431002A0AE2 /* SDLCloseApplication.h */,
@@ -4369,6 +4435,10 @@
5D61FC051A84238C00846EE7 /* SDLUpdateTurnList.m */,
8BA12B0F22DCCE1F00371E82 /* SDLUnpublishAppService.h */,
8BA12B1022DCCE1F00371E82 /* SDLUnpublishAppService.m */,
+ 008DB35F22EA7481003F458C /* SDLGetInteriorVehicleDataConsent.h */,
+ 008DB36022EA7481003F458C /* SDLGetInteriorVehicleDataConsent.m */,
+ 008DB36722EA8261003F458C /* SDLReleaseInteriorVehicleDataModule.h */,
+ 008DB36822EA8261003F458C /* SDLReleaseInteriorVehicleDataModule.m */,
);
name = Requests;
sourceTree = "<group>";
@@ -4386,6 +4456,8 @@
5D61FA511A84238A00846EE7 /* SDLAlertResponse.m */,
1E5AD0821F20B9290029B8AF /* SDLButtonPressResponse.h */,
1E5AD0831F20B9290029B8AF /* SDLButtonPressResponse.m */,
+ 88EF8EBB22D8FE5800CB06C2 /* SDLCancelInteractionResponse.h */,
+ 88EF8EBC22D8FE5800CB06C2 /* SDLCancelInteractionResponse.m */,
5D61FA701A84238A00846EE7 /* SDLChangeRegistrationResponse.h */,
5D61FA711A84238A00846EE7 /* SDLChangeRegistrationResponse.m */,
888DBAED22D528DE002A0AE2 /* SDLCloseApplicationResponse.h */,
@@ -4498,6 +4570,10 @@
5D61FC071A84238C00846EE7 /* SDLUpdateTurnListResponse.m */,
8BA12B1322DCEACB00371E82 /* SDLUnpublishAppServiceResponse.h */,
8BA12B1422DCEACB00371E82 /* SDLUnpublishAppServiceResponse.m */,
+ 008DB36322EA7F6F003F458C /* SDLGetInteriorVehicleDataConsentResponse.h */,
+ 008DB36422EA7F6F003F458C /* SDLGetInteriorVehicleDataConsentResponse.m */,
+ 008DB36B22EA83E4003F458C /* SDLReleaseInteriorVehicleDataModuleResponse.h */,
+ 008DB36C22EA83E4003F458C /* SDLReleaseInteriorVehicleDataModuleResponse.m */,
);
name = Responses;
sourceTree = "<group>";
@@ -4705,6 +4781,14 @@
88D5EB36220CD95000EC3782 /* SDLWeatherServiceData.m */,
880D267B220DE5DF00B3F496 /* SDLWeatherServiceManifest.h */,
880D267C220DE5DF00B3F496 /* SDLWeatherServiceManifest.m */,
+ 0055412422D40DAB003194D3 /* SDLModuleInfo.h */,
+ 0055412522D40DAB003194D3 /* SDLModuleInfo.m */,
+ 0055412822D5DC0B003194D3 /* SDLGrid.h */,
+ 0055412922D5DC0B003194D3 /* SDLGrid.m */,
+ 0055412C22D759BC003194D3 /* SDLSeatLocation.h */,
+ 0055412D22D759BC003194D3 /* SDLSeatLocation.m */,
+ 0055413022D75A7A003194D3 /* SDLSeatLocationCapability.h */,
+ 0055413122D75A7B003194D3 /* SDLSeatLocationCapability.m */,
9F425AD022DD980200BE3245 /* SDLWindowCapability.h */,
9F425AD122DD980200BE3245 /* SDLWindowCapability.m */,
9F425AD422DD981E00BE3245 /* SDLWindowTypeCapabilities.h */,
@@ -6370,6 +6454,7 @@
1EB59CBF202DA26000343A61 /* SDLSeatControlData.h in Headers */,
1EB59CB3202D9B5F00343A61 /* SDLSeatMemoryActionType.h in Headers */,
88665B73220B80F400D9DA77 /* SDLWeatherAlert.h in Headers */,
+ 008DB36122EA7482003F458C /* SDLGetInteriorVehicleDataConsent.h in Headers */,
1EB59CC3202DB40400343A61 /* SDLSeatControlCapabilities.h in Headers */,
1EB59CB7202D9C8100343A61 /* SDLSeatMemoryAction.h in Headers */,
1EB59CBB202DA1B400343A61 /* SDLSupportedSeat.h in Headers */,
@@ -6381,6 +6466,7 @@
1EB59CAF202D97AC00343A61 /* SDLMassageCushionFirmness.h in Headers */,
1EAA470B2032BAE5000FE74B /* SDLOnRCStatus.h in Headers */,
2BF2F84F20ED004000A26EF2 /* SDLAudioStreamingIndicator.h in Headers */,
+ 0055412E22D759BD003194D3 /* SDLSeatLocation.h in Headers */,
1EAA475120356CD2000FE74B /* SDLDistanceUnit.h in Headers */,
1EAA4755203583BC000FE74B /* SDLHMISettingsControlData.h in Headers */,
1EAA4731203442C0000FE74B /* SDLLightName.h in Headers */,
@@ -6391,6 +6477,7 @@
1EAA4749203567FA000FE74B /* SDLHMISettingsControlCapabilities.h in Headers */,
1EAA47452035623B000FE74B /* SDLLightControlData.h in Headers */,
1EAA474120355FF3000FE74B /* SDLLightControlCapabilities.h in Headers */,
+ 008DB36522EA7F6F003F458C /* SDLGetInteriorVehicleDataConsentResponse.h in Headers */,
1EAA473920345B7A000FE74B /* SDLLightCapabilities.h in Headers */,
1EAA4725203416D3000FE74B /* SDLEqualizerSettings.h in Headers */,
1EAA47112033FE80000FE74B /* SDLStationIDNumber.h in Headers */,
@@ -6467,6 +6554,7 @@
5D4D67B41D30161600468B4A /* SDLLockScreenManager.h in Headers */,
5D00AC7B1F15287E004000D9 /* SDLPhoneCapability.h in Headers */,
5D61FE111A84238C00846EE7 /* SDLWarningLightStatus.h in Headers */,
+ 008DB36922EA8261003F458C /* SDLReleaseInteriorVehicleDataModule.h in Headers */,
5D61FC7A1A84238C00846EE7 /* SDLDeleteInteractionChoiceSet.h in Headers */,
5D61FC3B1A84238C00846EE7 /* SDLAlertManeuverResponse.h in Headers */,
5DB9964E1F26886C002D8795 /* SDLControlFramePayloadEndService.h in Headers */,
@@ -6489,6 +6577,7 @@
5D61FD791A84238C00846EE7 /* SDLScreenParams.h in Headers */,
5D61FDCF1A84238C00846EE7 /* SDLTireStatus.h in Headers */,
5D61FDFD1A84238C00846EE7 /* SDLVehicleDataActiveStatus.h in Headers */,
+ 0055412622D40DAB003194D3 /* SDLModuleInfo.h in Headers */,
5D61FD811A84238C00846EE7 /* SDLSetAppIconResponse.h in Headers */,
5D61FC551A84238C00846EE7 /* SDLButtonName.h in Headers */,
5D616B531D59044400553F6B /* SDLErrorConstants.h in Headers */,
@@ -6533,6 +6622,7 @@
5D61FC451A84238C00846EE7 /* SDLAudioPassThruCapabilities.h in Headers */,
5D61FDC71A84238C00846EE7 /* SDLTextAlignment.h in Headers */,
5D61FD051A84238C00846EE7 /* SDLOnButtonPress.h in Headers */,
+ 0055413222D75A7B003194D3 /* SDLSeatLocationCapability.h in Headers */,
5DA150C72271FDC20032928D /* SDLSoftButtonTransitionOperation.h in Headers */,
5D61FCC51A84238C00846EE7 /* SDLHMIZoneCapabilities.h in Headers */,
884AF94F220B488900E22928 /* SDLOnSystemCapabilityUpdated.h in Headers */,
@@ -6712,7 +6802,6 @@
5D82041A1BCD80BA00D0A41B /* SDLLockScreenConfiguration.h in Headers */,
880E35B52088F75A00181259 /* SDLSystemCapabilityManager.h in Headers */,
5D61FC611A84238C00846EE7 /* SDLChoice.h in Headers */,
- 5D1BF6AF204742FB00D36881 /* SDLDisplayCapabilities+ShowManagerExtensions.h in Headers */,
5D92937420B5EEA200FCC775 /* SDLPreloadChoicesOperation.h in Headers */,
5D7F87F31CE3C29E002DD7C4 /* SDLFileWrapper.h in Headers */,
5D61FC7C1A84238C00846EE7 /* SDLDeleteInteractionChoiceSetResponse.h in Headers */,
@@ -6726,6 +6815,7 @@
5D61FD0B1A84238C00846EE7 /* SDLOnEncodedSyncPData.h in Headers */,
5D61FC631A84238C00846EE7 /* SDLClusterModeStatus.h in Headers */,
5D61FD371A84238C00846EE7 /* SDLPredefinedLayout.h in Headers */,
+ 008DB36D22EA83E4003F458C /* SDLReleaseInteriorVehicleDataModuleResponse.h in Headers */,
5D61FDE31A84238C00846EE7 /* SDLUnregisterAppInterface.h in Headers */,
5D61FD331A84238C00846EE7 /* SDLPowerModeQualificationStatus.h in Headers */,
5D92937020B5E0E500FCC775 /* SDLDeleteChoicesOperation.h in Headers */,
@@ -6742,6 +6832,7 @@
5D535DC51B72473800CF7760 /* SDLGlobals.h in Headers */,
5D79A03B1CE36F030035797B /* SDLUploadFileOperation.h in Headers */,
8880D24722205B1B00964F6A /* SDLNavigationInstruction.h in Headers */,
+ 88EF8EB722D8E02E00CB06C2 /* SDLCancelInteraction.h in Headers */,
DA9F7E6F1DCBFFDB00ACAE48 /* SDLGetWayPoints.h in Headers */,
5D61FD231A84238C00846EE7 /* SDLParameterPermissions.h in Headers */,
5D61FCB91A84238C00846EE7 /* SDLGlobalProperty.h in Headers */,
@@ -6780,6 +6871,7 @@
5DA102A41D4122C700C15826 /* NSMutableDictionary+SafeRemove.h in Headers */,
5DBF062A1E64A92C00A5CF03 /* SDLLogTarget.h in Headers */,
5DA49CE51F1EA83300E65FC5 /* SDLControlFramePayloadRPCStartService.h in Headers */,
+ 0055412A22D5DC0B003194D3 /* SDLGrid.h in Headers */,
5D61FE031A84238C00846EE7 /* SDLVehicleDataResult.h in Headers */,
5D61FD911A84238C00846EE7 /* SDLShowConstantTBT.h in Headers */,
5D92937C20B70A3E00FCC775 /* SDLPresentKeyboardOperation.h in Headers */,
@@ -6806,6 +6898,7 @@
5D61FD951A84238C00846EE7 /* SDLShowResponse.h in Headers */,
5D61FCA31A84238C00846EE7 /* SDLEndAudioPassThru.h in Headers */,
88A795D22106787400056542 /* SDLStaticIconName.h in Headers */,
+ 2B233530232BD8A5002118E5 /* SDLWindowCapability+ShowManagerExtensions.h in Headers */,
5D61FCB11A84238C00846EE7 /* SDLGetDTCs.h in Headers */,
5D61FDFF1A84238C00846EE7 /* SDLVehicleDataEventStatus.h in Headers */,
5D61FC5B1A84238C00846EE7 /* SDLChangeRegistration.h in Headers */,
@@ -6870,6 +6963,7 @@
5D61FCFC1A84238C00846EE7 /* SDLRPCParameterNames.h in Headers */,
DA9F7E8F1DCC04C000ACAE48 /* SDLUnsubscribeWayPointsResponse.h in Headers */,
5D61FCFD1A84238C00846EE7 /* SDLObjectWithPriority.h in Headers */,
+ 88EF8EBD22D8FE5800CB06C2 /* SDLCancelInteractionResponse.h in Headers */,
888DBAEF22D528DE002A0AE2 /* SDLCloseApplicationResponse.h in Headers */,
DAC5726C1D11B4840004288B /* SDLTouchManagerDelegate.h in Headers */,
5D61FD3F1A84238C00846EE7 /* SDLPrioritizedObjectCollection.h in Headers */,
@@ -7215,6 +7309,7 @@
5D61FDD21A84238C00846EE7 /* SDLTouchCoord.m in Sources */,
5D61FCEF1A84238C00846EE7 /* SDLListFilesResponse.m in Sources */,
5D3E420B20EAAD6500D8C622 /* SDLTPMS.m in Sources */,
+ 008DB36E22EA83E4003F458C /* SDLReleaseInteriorVehicleDataModuleResponse.m in Sources */,
5DD67CB11E65DDB7009CD394 /* SDLLogTargetAppleSystemLog.m in Sources */,
5D92935420B2F76500FCC775 /* SDLTemplateColorScheme.m in Sources */,
88D5EB38220CD95000EC3782 /* SDLWeatherServiceData.m in Sources */,
@@ -7301,6 +7396,7 @@
5D61FDE21A84238C00846EE7 /* SDLTurn.m in Sources */,
5D61FC5A1A84238C00846EE7 /* SDLCarModeStatus.m in Sources */,
5D82041B1BCD80BA00D0A41B /* SDLLockScreenConfiguration.m in Sources */,
+ 0055412B22D5DC0B003194D3 /* SDLGrid.m in Sources */,
8815D0F122330781000F24E6 /* SDLRPCRequestNotification.m in Sources */,
5D3E48CC1D7722FE0000BFEF /* NSBundle+SDLBundle.m in Sources */,
5D61FCBC1A84238C00846EE7 /* SDLGPSData.m in Sources */,
@@ -7339,12 +7435,14 @@
5D61FC731A84238C00846EE7 /* SDLDeleteCommand.m in Sources */,
5D61FD2A1A84238C00846EE7 /* SDLPerformInteraction.m in Sources */,
5D61FC541A84238C00846EE7 /* SDLButtonEventMode.m in Sources */,
+ 008DB36622EA7F6F003F458C /* SDLGetInteriorVehicleDataConsentResponse.m in Sources */,
5D61FC8D1A84238C00846EE7 /* SDLDIDResult.m in Sources */,
5D61FC601A84238C00846EE7 /* SDLCharacterSet.m in Sources */,
5D07C02E2044AC9100D1ECDC /* SDLSequentialRPCRequestOperation.m in Sources */,
5DD67CB91E661C4A009CD394 /* SDLLogTargetFile.m in Sources */,
5D61FCBE1A84238C00846EE7 /* SDLHeadLampStatus.m in Sources */,
5D61FD921A84238C00846EE7 /* SDLShowConstantTBT.m in Sources */,
+ 008DB36A22EA8261003F458C /* SDLReleaseInteriorVehicleDataModule.m in Sources */,
88E6F1A8220E1588006156F9 /* SDLMediaType.m in Sources */,
5D61FC4E1A84238C00846EE7 /* SDLBitsPerSample.m in Sources */,
5D00AC701F1511B9004000D9 /* SDLGetSystemCapability.m in Sources */,
@@ -7368,6 +7466,7 @@
5DBF06241E64A83F00A5CF03 /* SDLLogManager.m in Sources */,
5D61FC401A84238C00846EE7 /* SDLAmbientLightStatus.m in Sources */,
9F425ADB22DD983500BE3245 /* SDLDisplayCapability.m in Sources */,
+ 2B233531232BD8A5002118E5 /* SDLWindowCapability+ShowManagerExtensions.m in Sources */,
88EEC5BC220A327B005AA2F9 /* SDLPublishAppServiceResponse.m in Sources */,
5D61FC951A84238C00846EE7 /* SDLDriverDistractionState.m in Sources */,
5DB996611F28C6ED002D8795 /* SDLControlFramePayloadVideoStartServiceAck.m in Sources */,
@@ -7381,6 +7480,7 @@
5D61FD511A84238C00846EE7 /* SDLProxy.m in Sources */,
5D61FD461A84238C00846EE7 /* SDLProtocolHeader.m in Sources */,
5DD8406320FCD6C10082CE04 /* SDLElectronicParkBrakeStatus.m in Sources */,
+ 88EF8EB822D8E02E00CB06C2 /* SDLCancelInteraction.m in Sources */,
8BBEA6071F324165003EEA26 /* SDLMetadataType.m in Sources */,
5DA150C82271FDC20032928D /* SDLSoftButtonTransitionOperation.m in Sources */,
9FE2471222D77AA400F8D2FC /* SDLCreateWindowResponse.m in Sources */,
@@ -7450,6 +7550,7 @@
DA9F7E901DCC04C000ACAE48 /* SDLUnsubscribeWayPointsResponse.m in Sources */,
88F65137220C74FD00CAF321 /* SDLWeatherData.m in Sources */,
5DA150CE2271FE180032928D /* SDLSoftButtonReplaceOperation.m in Sources */,
+ 88EF8EBE22D8FE5800CB06C2 /* SDLCancelInteractionResponse.m in Sources */,
5DE372A21ACB2ED300849FAA /* SDLHMICapabilities.m in Sources */,
5D61FDD41A84238C00846EE7 /* SDLTouchEvent.m in Sources */,
5D61FD881A84238C00846EE7 /* SDLSetGlobalProperties.m in Sources */,
@@ -7464,6 +7565,7 @@
5D61FD841A84238C00846EE7 /* SDLSetDisplayLayout.m in Sources */,
DA9F7E701DCBFFDB00ACAE48 /* SDLGetWayPoints.m in Sources */,
1EAA4756203583BC000FE74B /* SDLHMISettingsControlData.m in Sources */,
+ 008DB36222EA7482003F458C /* SDLGetInteriorVehicleDataConsent.m in Sources */,
5D00AC741F151CFE004000D9 /* SDLGetSystemCapabilityResponse.m in Sources */,
5D61FE001A84238C00846EE7 /* SDLVehicleDataEventStatus.m in Sources */,
5D61FDC41A84238C00846EE7 /* SDLTBTState.m in Sources */,
@@ -7475,6 +7577,7 @@
5D61FDDE1A84238C00846EE7 /* SDLTTSChunk.m in Sources */,
5D61FD9E1A84238C00846EE7 /* SDLSliderResponse.m in Sources */,
1EAA47462035623B000FE74B /* SDLLightControlData.m in Sources */,
+ 0055412F22D759BD003194D3 /* SDLSeatLocation.m in Sources */,
5D76750F22D8FB3700E8D71A /* SDLMenuLayout.m in Sources */,
5D61FC5C1A84238C00846EE7 /* SDLChangeRegistration.m in Sources */,
5D1665C91CF8CA3D00CC4CA1 /* SDLPermissionFilter.m in Sources */,
@@ -7523,7 +7626,6 @@
88B58DBB222040FF0011B063 /* SDLDirection.m in Sources */,
5D61FD5C1A84238C00846EE7 /* SDLReadDIDResponse.m in Sources */,
884AF950220B488900E22928 /* SDLOnSystemCapabilityUpdated.m in Sources */,
- 5D1BF6B0204742FB00D36881 /* SDLDisplayCapabilities+ShowManagerExtensions.m in Sources */,
1EB59CB4202D9B5F00343A61 /* SDLSeatMemoryActionType.m in Sources */,
5D61FD321A84238C00846EE7 /* SDLPolicyDataParser.m in Sources */,
5D61FC621A84238C00846EE7 /* SDLChoice.m in Sources */,
@@ -7555,6 +7657,7 @@
E9C32B9F1AB20C5900F283AF /* EAAccessoryManager+SDLProtocols.m in Sources */,
756C62772289F11F008B57A2 /* SDLDynamicMenuUpdateRunScore.m in Sources */,
5D61FDA81A84238C00846EE7 /* SDLSpeakResponse.m in Sources */,
+ 0055413322D75A7B003194D3 /* SDLSeatLocationCapability.m in Sources */,
5DB92D331AC9C8BA00C15BB0 /* SDLRPCStruct.m in Sources */,
1EAA474220355FF3000FE74B /* SDLLightControlCapabilities.m in Sources */,
8B7B31A31F2F7FEA00BDC38D /* SDLVideoStreamingFormat.m in Sources */,
@@ -7582,6 +7685,7 @@
5D60088B1BE3ED540094A505 /* SDLStateMachine.m in Sources */,
8877F5EF1F34A72200DC128A /* SDLSendHapticDataResponse.m in Sources */,
5D61FD181A84238C00846EE7 /* SDLOnPermissionsChange.m in Sources */,
+ 0055412722D40DAB003194D3 /* SDLModuleInfo.m in Sources */,
8881AFAD2225D61900EA870B /* SDLSetCloudAppProperties.m in Sources */,
1EB59CAC202D96A200343A61 /* SDLMassageCushion.m in Sources */,
5D61FD3E1A84238C00846EE7 /* SDLPrimaryAudioSource.m in Sources */,
@@ -7654,6 +7758,7 @@
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
+ 75CE2041233D335100B9DEF9 /* SDLGetDTCsSpec.m in Sources */,
5DBAE0AD1D368D1A00CE00BF /* SDLResponseDispatcherSpec.m in Sources */,
162E83951A9BDE8B00906325 /* SDLTurnSpec.m in Sources */,
162E83481A9BDE8B00906325 /* SDLUpdateTurnListSpec.m in Sources */,
@@ -7664,11 +7769,13 @@
5D76751822D921CB00E8D71A /* SDLMenuLayoutSpec.m in Sources */,
5DA026901AD44EE700019F86 /* SDLDialNumberResponseSpec.m in Sources */,
162E83901A9BDE8B00906325 /* SDLTireStatusSpec.m in Sources */,
+ 000DD57622EF0971005AB7A7 /* SDLReleaseInteriorVehicleDataModuleResponseSpec.m in Sources */,
162E82E01A9BDE8B00906325 /* SDLHMILevelSpec.m in Sources */,
88F65133220C6DC300CAF321 /* SDLWeatherAlertSpec.m in Sources */,
5DC09EDA1F2F7FEC00F4AB1D /* SDLControlFramePayloadNakSpec.m in Sources */,
5D76751622D920FD00E8D71A /* SDLMenuConfigurationSpec.m in Sources */,
1EB59CCE202DC97900343A61 /* SDLMassageCushionSpec.m in Sources */,
+ 88EF8EBA22D8F48300CB06C2 /* SDLCancelInteractionSpec.m in Sources */,
162E83041A9BDE8B00906325 /* SDLUpdateModeSpec.m in Sources */,
8855F9E0220C93B700A5C897 /* SDLWeatherDataSpec.m in Sources */,
88DF998D22035CC600477AC1 /* EAAccessory+OCMock.m in Sources */,
@@ -7698,6 +7805,7 @@
5D76E3291D3D0A8800647CFA /* SDLFakeViewControllerPresenter.m in Sources */,
9FA0D00622DF06D3009CF344 /* SDLDisplayCapabilitySpec.m in Sources */,
5DB2022A1F5F38B60061D189 /* SDLFakeStreamingManagerDataSource.m in Sources */,
+ 000DD56C22EEF8E4005AB7A7 /* SDLSeatLocationCapabilitySpec.m in Sources */,
5D92935020AF526200FCC775 /* SDLRGBColorSpec.m in Sources */,
162E83331A9BDE8B00906325 /* SDLPerformInteractionSpec.m in Sources */,
1EAA47622035B1AE000FE74B /* SDLDistanceUnitSpec.m in Sources */,
@@ -7708,6 +7816,7 @@
5DE35E4720CB0AB90034BE5A /* SDLChoiceSetSpec.m in Sources */,
162E83101A9BDE8B00906325 /* SDLOnAudioPassThruSpec.m in Sources */,
DABB62171E4A900C0034C567 /* SDLH264VideoEncoderSpec.m in Sources */,
+ 000DD57022EF038C005AB7A7 /* SDLGetInteriorVehicleDataConsentSpec.m in Sources */,
5DBEFA581F436132009EE295 /* SDLFakeSecurityManager.m in Sources */,
9FA0D00022DF06A0009CF344 /* SDLWindowCapabilitySpec.m in Sources */,
162E82D91A9BDE8A00906325 /* SDLDisplayTypeSpec.m in Sources */,
@@ -7926,6 +8035,7 @@
5D43466F1E6F55BD00B639C6 /* SDLLogManagerSpec.m in Sources */,
162E83451A9BDE8B00906325 /* SDLUnregisterAppInterfaceSpec.m in Sources */,
162E82EF1A9BDE8B00906325 /* SDLPermissionStatusSpec.m in Sources */,
+ 881F388D22D904BE00DF6DCE /* SDLCancelInteractionResponseSpec.m in Sources */,
8BA12B1822DCF59700371E82 /* SDLUnpublishAppServiceResponseSpec.m in Sources */,
DA9F7EA61DCC05F500ACAE48 /* SDLUnsubscribeWaypointsSpec.m in Sources */,
1E89B0E2203196B800A47992 /* SDLSeatControlCapabilitiesSpec.m in Sources */,
@@ -7937,6 +8047,7 @@
88A4A0FA22242AB400C6F01D /* SDLNavigationServiceDataSpec.m in Sources */,
8831FA3D220207DA00B8FFB7 /* SDLServiceUpdateReasonSpec.m in Sources */,
162E831A1A9BDE8B00906325 /* SDLOnLockScreenStatusSpec.m in Sources */,
+ 000DD57422EF0957005AB7A7 /* SDLReleaseInteriorVehicleDataModuleSpec.m in Sources */,
162E83431A9BDE8B00906325 /* SDLSyncPDataSpec.m in Sources */,
167ED9461A9BCE5D00797BE5 /* SwiftSpec.swift in Sources */,
162E838B1A9BDE8B00906325 /* SDLSoftButtonCapabilitiesSpec.m in Sources */,
@@ -8018,6 +8129,7 @@
8816772922208B82001FACFF /* SDLNavigationInstructionSpec.m in Sources */,
5DC978261B7A38640012C2F1 /* SDLGlobalsSpec.m in Sources */,
162E82FF1A9BDE8B00906325 /* SDLTextAlignmentSpec.m in Sources */,
+ 000DD57222EF063F005AB7A7 /* SDLGetInteriorVehicleDataConsentResponseSpec.m in Sources */,
162E831F1A9BDE8B00906325 /* SDLOnTouchEventSpec.m in Sources */,
162E83921A9BDE8B00906325 /* SDLTouchEventCapabilitiesSpec.m in Sources */,
162E837F1A9BDE8B00906325 /* SDLHeadLampStatusSpec.m in Sources */,
@@ -8108,6 +8220,7 @@
162E83731A9BDE8B00906325 /* SDLBeltStatusSpec.m in Sources */,
162E83551A9BDE8B00906325 /* SDLEndAudioPassThruResponseSpec.m in Sources */,
8881AFC12225EB9300EA870B /* SDLGetCloudAppPropertiesResponseSpec.m in Sources */,
+ 000DD56E22EF01FC005AB7A7 /* SDLSeatLocationSpec.m in Sources */,
162E83251A9BDE8B00906325 /* SDLAlertSpec.m in Sources */,
2BF2F85220ED068200A26EF2 /* SDLAudioStreamingIndicatorSpec.m in Sources */,
5D6035D2202CD46200A429C9 /* SDLSpecUtilities.m in Sources */,
@@ -8124,10 +8237,8 @@
1EB59CD0202DC9F200343A61 /* SDLSupportedSeatSpec.m in Sources */,
162E82EB1A9BDE8B00906325 /* SDLLayoutModeSpec.m in Sources */,
1680B1181A9CD7AD00DBD79E /* SDLV1ProtocolMessageSpec.m in Sources */,
- 162E832F1A9BDE8B00906325 /* SDLGetDTCsSpec.m in Sources */,
162E82EC1A9BDE8B00906325 /* SDLLockScreenStatusSpec.m in Sources */,
DA96C0661D4D4F730022F520 /* SDLAppInfoSpec.m in Sources */,
- 162E832F1A9BDE8B00906325 /* SDLGetDTCsSpec.m in Sources */,
75FF2E3822DF9D5900D0C13B /* SDLShowAppMenuResponseSpec.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
diff --git a/SmartDeviceLink.podspec b/SmartDeviceLink.podspec
index cf94c0390..72bf0e170 100644
--- a/SmartDeviceLink.podspec
+++ b/SmartDeviceLink.podspec
@@ -59,6 +59,8 @@ sdefault.public_header_files = [
'SmartDeviceLink/SDLButtonName.h',
'SmartDeviceLink/SDLButtonPress.h',
'SmartDeviceLink/SDLButtonPressMode.h',
+'SmartDeviceLink/SDLCancelInteraction.h',
+'SmartDeviceLink/SDLCancelInteractionResponse.h',
'SmartDeviceLink/SDLCarModeStatus.h',
'SmartDeviceLink/SDLCarWindowViewController.h',
'SmartDeviceLink/SDLChangeRegistration.h',
@@ -141,6 +143,8 @@ sdefault.public_header_files = [
'SmartDeviceLink/SDLGetFile.h',
'SmartDeviceLink/SDLGetFileResponse.h',
'SmartDeviceLink/SDLGetInteriorVehicleData.h',
+'SmartDeviceLink/SDLGetInteriorVehicleDataConsent.h',
+'SmartDeviceLink/SDLGetInteriorVehicleDataConsentResponse.h',
'SmartDeviceLink/SDLGetInteriorVehicleDataResponse.h',
'SmartDeviceLink/SDLGetSystemCapability.h',
'SmartDeviceLink/SDLGetSystemCapabilityResponse.h',
@@ -150,6 +154,7 @@ sdefault.public_header_files = [
'SmartDeviceLink/SDLGetWaypointsResponse.h',
'SmartDeviceLink/SDLGlobalProperty.h',
'SmartDeviceLink/SDLGPSData.h',
+'SmartDeviceLink/SDLGrid.h',
'SmartDeviceLink/SDLHapticRect.h',
'SmartDeviceLink/SDLHeadLampStatus.h',
'SmartDeviceLink/SDLHMICapabilities.h',
@@ -220,6 +225,7 @@ sdefault.public_header_files = [
'SmartDeviceLink/SDLMetadataTags.h',
'SmartDeviceLink/SDLMetadataType.h',
'SmartDeviceLink/SDLModuleData.h',
+'SmartDeviceLink/SDLModuleInfo.h',
'SmartDeviceLink/SDLModuleType.h',
'SmartDeviceLink/SDLMyKey.h',
'SmartDeviceLink/SDLNavigationAction.h',
@@ -290,6 +296,8 @@ sdefault.public_header_files = [
'SmartDeviceLink/SDLRegisterAppInterface.h',
'SmartDeviceLink/SDLRegisterAppInterfaceResponse.h',
'SmartDeviceLink/SDLRemoteControlCapabilities.h',
+'SmartDeviceLink/SDLReleaseInteriorVehicleDataModule.h',
+'SmartDeviceLink/SDLReleaseInteriorVehicleDataModuleResponse.h',
'SmartDeviceLink/SDLRequestType.h',
'SmartDeviceLink/SDLResetGlobalProperties.h',
'SmartDeviceLink/SDLResetGlobalPropertiesResponse.h',
@@ -312,6 +320,8 @@ sdefault.public_header_files = [
'SmartDeviceLink/SDLScrollableMessageResponse.h',
'SmartDeviceLink/SDLSeatControlCapabilities.h',
'SmartDeviceLink/SDLSeatControlData.h',
+'SmartDeviceLink/SDLSeatLocation.h',
+'SmartDeviceLink/SDLSeatLocationCapability.h',
'SmartDeviceLink/SDLSeatMemoryAction.h',
'SmartDeviceLink/SDLSeatMemoryActionType.h',
'SmartDeviceLink/SDLSupportedSeat.h',
diff --git a/SmartDeviceLink/Assets/Base.lproj/SDLLockScreen.storyboard b/SmartDeviceLink/Assets/Base.lproj/SDLLockScreen.storyboard
index 6d65f20d9..611806ac1 100644
--- a/SmartDeviceLink/Assets/Base.lproj/SDLLockScreen.storyboard
+++ b/SmartDeviceLink/Assets/Base.lproj/SDLLockScreen.storyboard
@@ -1,19 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
-<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="13196" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="sao-xX-Ugl">
- <device id="retina4_7" orientation="portrait">
- <adaptation id="fullscreen"/>
- </device>
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="14868" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="sao-xX-Ugl">
+ <device id="retina4_7" orientation="portrait" appearance="light"/>
<dependencies>
<deployment identifier="iOS"/>
- <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="13173"/>
- <capability name="Constraints to layout margins" minToolsVersion="6.0"/>
+ <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14824"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<scenes>
<!--Lock Screen View Controller-->
<scene sceneID="390-LV-jKT">
<objects>
- <viewController id="sao-xX-Ugl" customClass="SDLLockScreenViewController" sceneMemberID="viewController">
+ <viewController modalPresentationStyle="fullScreen" id="sao-xX-Ugl" customClass="SDLLockScreenViewController" sceneMemberID="viewController">
<layoutGuides>
<viewControllerLayoutGuide type="top" id="mqk-8V-oes"/>
<viewControllerLayoutGuide type="bottom" id="wh4-r5-yql"/>
diff --git a/SmartDeviceLink/SDLAlert.h b/SmartDeviceLink/SDLAlert.h
index a0a8329c5..6a9a25e57 100644
--- a/SmartDeviceLink/SDLAlert.h
+++ b/SmartDeviceLink/SDLAlert.h
@@ -8,158 +8,254 @@
@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.
- *
- * <ul>
- * <li>The displayed portion of the SDLAlert, if any, will persist until the
- * specified timeout has elapsed, or the SDLAlert is preempted</li>
- * <li>An SDLAlert will preempt (abort) any SmartDeviceLink Operation that is in-progress,
- * except an already-in-progress SDLAlert</li>
- * <li>An SDLAlert cannot be preempted by any SmartDeviceLink Operation</li>
- * <li>An SDLAlert can be preempted by a user action (button push)</li>
- * <li>An SDLAlert will fail if it is issued while another SDLAlert is in progress</li>
- * <li>Although each Alert parameter is optional, in fact each SDLAlert request
- * must supply at least one of the following parameters:<br/>
- * <ul>
- * <li>alertText1</li>
- * <li>alertText2</li>
- * <li>ttsChunks</li>
- * </ul>
- * </li>
- * </ul>
- * <br/>
- * <b>HMILevel needs to be FULL or LIMITED.</b><br/>
- * <b>If the app has been granted function group Notification the SDLHMILevel can
- * also be BACKGROUND</b><br/>
- *
- * @since SDL 1.0
- */
+ Shows an alert which typically consists of text-to-speech message and text on the display. Either `alertText1`, `alertText2` or `TTSChunks` needs to be set or the request will be rejected.
-NS_ASSUME_NONNULL_BEGIN
+ If connecting to SDL Core v.6.0+, the alert can be canceled programmatically using the `cancelID`. Canceling will not dismiss the alert's speech - only the modal view will be dismissed. On older versions of SDL Core, the alert will persist until the user has interacted with the alert or the specified timeout has elapsed.
+ @since SDL 1.0
+ */
@interface SDLAlert : SDLRPCRequest
-- (instancetype)initWithAlertText1:(nullable NSString *)alertText1 alertText2:(nullable NSString *)alertText2 duration:(UInt16)duration __deprecated_msg("Use initWithAlertText1:alertText2: instead");
+/**
+ Convenience init for creating a modal view with text, buttons, and optional sound cues.
-- (instancetype)initWithAlertText1:(nullable NSString *)alertText1 alertText2:(nullable NSString *)alertText2 alertText3:(nullable NSString *)alertText3 __deprecated_msg("Use initWithAlertText1:alertText2: instead");
+ @param alertText The string to be displayed in the first field of the display
+ @param softButtons Soft buttons to be displayed
+ @param playTone Whether the alert tone should be played before the TTS (if any) is spoken
+ @param ttsChunks Speech or a sound file to be played when the alert shows
+ @param cancelID An ID for this specific alert to allow cancellation through the `CancelInteraction` RPC
+ @param icon Image to be displayed in the alert
+ @return An SDLAlert object
+ */
+- (instancetype)initWithAlertText:(nullable NSString *)alertText softButtons:(nullable NSArray<SDLSoftButton *> *)softButtons playTone:(BOOL)playTone ttsChunks:(nullable NSArray<SDLTTSChunk *> *)ttsChunks alertIcon:(nullable SDLImage *)icon cancelID:(UInt32)cancelID;
-- (instancetype)initWithAlertText1:(nullable NSString *)alertText1 alertText2:(nullable NSString *)alertText2 alertText3:(nullable NSString *)alertText3 duration:(UInt16)duration __deprecated_msg("Use initWithAlertText1:alertText2: instead");
+/**
+ Convenience init for creating a sound-only alert.
-- (instancetype)initWithAlertText1:(nullable NSString *)alertText1 alertText2:(nullable NSString *)alertText2 alertText3:(nullable NSString *)alertText3 duration:(UInt16)duration softButtons:(nullable NSArray<SDLSoftButton *> *)softButtons __deprecated_msg("Use initWithAlertText1:alertText2: instead");
+ @param ttsChunks Speech or a sound file to be played when the alert shows
+ @param playTone Whether the alert tone should be played before the TTS is spoken
+ @return An SDLAlert object
+ */
+- (instancetype)initWithTTSChunks:(nullable NSArray<SDLTTSChunk *> *)ttsChunks playTone:(BOOL)playTone;
-- (instancetype)initWithTTS:(nullable NSString *)ttsText alertText1:(nullable NSString *)alertText1 alertText2:(nullable NSString *)alertText2 playTone:(BOOL)playTone duration:(UInt16)duration __deprecated_msg("Use initWithAlertText1:alertText2: instead");
+/**
+ Convenience init for setting all alert parameters.
-- (instancetype)initWithTTS:(nullable NSString *)ttsText alertText1:(nullable NSString *)alertText1 alertText2:(nullable NSString *)alertText2 alertText3:(nullable NSString *)alertText3 playTone:(BOOL)playTone duration:(UInt16)duration __deprecated_msg("Use initWithAlertText1:alertText2: instead");
+ @param alertText1 The first line of the alert
+ @param alertText2 The second line of the alert
+ @param alertText3 The third line of the alert
+ @param softButtons Buttons for the alert
+ @param playTone Whether the alert tone should be played before the TTS (if any) is spoken
+ @param ttsChunks An array of text chunks to be spoken or a prerecorded sound file
+ @param duration The duration of the displayed portion of the alert, in milliseconds
+ @param progressIndicator Whether an animation indicating that loading of a feature is progressing should be shown
+ @param cancelID An ID for this specific alert to allow cancellation through the `CancelInteraction` RPC
+ @param icon Image to be displayed in the alert
+ @return An SDLAlert object
+ */
+- (instancetype)initWithAlertText1:(nullable NSString *)alertText1 alertText2:(nullable NSString *)alertText2 alertText3:(nullable NSString *)alertText3 softButtons:(nullable NSArray<SDLSoftButton *> *)softButtons playTone:(BOOL)playTone ttsChunks:(nullable NSArray<SDLTTSChunk *> *)ttsChunks duration:(UInt16)duration progressIndicator:(BOOL)progressIndicator alertIcon:(nullable SDLImage *)icon cancelID:(UInt32)cancelID;
-- (instancetype)initWithTTS:(nullable NSString *)ttsText playTone:(BOOL)playTone __deprecated_msg("Use initWithTTSChunks:playTone: instead");
+/**
+ Convenience init for creating an alert with two lines of text and a timeout.
-- (instancetype)initWithTTSChunks:(nullable NSArray<SDLTTSChunk *> *)ttsChunks alertText1:(nullable NSString *)alertText1 alertText2:(nullable NSString *)alertText2 alertText3:(nullable NSString *)alertText3 playTone:(BOOL)playTone softButtons:(nullable NSArray<SDLSoftButton *> *)softButtons __deprecated_msg("Use initWithAlertText1:alertText2:alertText3:ttsChunks:playTone:progressIndicator:duration:softButtons:alertIcon: instead");
+ @param alertText1 The first line of the alert
+ @param alertText2 The second line of the alert
+ @param duration The duration of the displayed portion of the alert, in milliseconds
+ @return An SDLAlert object
+ */
+- (instancetype)initWithAlertText1:(nullable NSString *)alertText1 alertText2:(nullable NSString *)alertText2 duration:(UInt16)duration __deprecated_msg("Use initWithAlertText1:alertText2:alertText3:softButtons:playTone:ttsChunks:duration:progressIndicator:alertIcon:cancelID: instead");
-- (instancetype)initWithTTSChunks:(nullable NSArray<SDLTTSChunk *> *)ttsChunks alertText1:(nullable NSString *)alertText1 alertText2:(nullable NSString *)alertText2 alertText3:(nullable NSString *)alertText3 playTone:(BOOL)playTone duration:(UInt16)duration softButtons:(nullable NSArray<SDLSoftButton *> *)softButtons __deprecated_msg("Use initWithAlertText1:alertText2:alertText3:ttsChunks:playTone:progressIndicator:duration:softButtons:alertIcon: instead");;
+/**
+ Convenience init for creating an alert with three lines of text.
-- (instancetype)initWithAlertText1:(NSString *)alertText1 alertText2:(nullable NSString *)alertText2;
+ @param alertText1 The first line of the alert
+ @param alertText2 The second line of the alert
+ @param alertText3 The third line of the alert
+ @return An SDLAlert object
+ */
+- (instancetype)initWithAlertText1:(nullable NSString *)alertText1 alertText2:(nullable NSString *)alertText2 alertText3:(nullable NSString *)alertText3 __deprecated_msg("Use initWithAlertText1:alertText2:alertText3:softButtons:playTone:ttsChunks:duration:progressIndicator:alertIcon:cancelID: instead");
-- (instancetype)initWithTTSChunks:(nullable NSArray<SDLTTSChunk *> *)ttsChunks playTone:(BOOL)playTone;
+/**
+ Convenience init for creating an alert with three lines of text and a timeout.
+
+ @param alertText1 The first line of the alert
+ @param alertText2 The second line of the alert
+ @param alertText3 The third line of the alert
+ @param duration The duration of the displayed portion of the alert, in milliseconds
+ @return An SDLAlert object
+ */
+- (instancetype)initWithAlertText1:(nullable NSString *)alertText1 alertText2:(nullable NSString *)alertText2 alertText3:(nullable NSString *)alertText3 duration:(UInt16)duration __deprecated_msg("Use initWithAlertText1:alertText2:alertText3:softButtons:playTone:ttsChunks:duration:progressIndicator:alertIcon:cancelID: instead");
+
+/**
+ Convenience init for creating an alert with three lines of text and a timeout.
+
+ @param alertText1 The first line of the alert
+ @param alertText2 The second line of the alert
+ @param alertText3 The third line of the alert
+ @param duration The duration of the displayed portion of the alert, in milliseconds
+ @param softButtons Buttons for the alert
+ @return An SDLAlert object
+ */
+- (instancetype)initWithAlertText1:(nullable NSString *)alertText1 alertText2:(nullable NSString *)alertText2 alertText3:(nullable NSString *)alertText3 duration:(UInt16)duration softButtons:(nullable NSArray<SDLSoftButton *> *)softButtons __deprecated_msg("Use initWithAlertText1:alertText2:alertText3:softButtons:playTone:ttsChunks:duration:progressIndicator:alertIcon:cancelID: instead");
+
+/**
+ Convenience init for creating a speech-only alert.
+
+ @param ttsText Speech to be played
+ @param playTone Whether the alert tone should be played before the TTS is spoken
+ @return An SDLAlert object
+ */
+- (instancetype)initWithTTS:(nullable NSString *)ttsText playTone:(BOOL)playTone __deprecated_msg("Use initWithTTS:playTone: instead");
+
+/**
+ Convenience init for creating an alert with two lines of text, optional sound cues, and a timout.
+
+ @param ttsText Speech to be played
+ @param alertText1 The first line of the alert
+ @param alertText2 The second line of the alert
+ @param playTone Whether the alert tone should be played before the TTS is spoken
+ @param duration The duration of the displayed portion of the alert, in milliseconds
+ @return An SDLAlert object
+ */
+- (instancetype)initWithTTS:(nullable NSString *)ttsText alertText1:(nullable NSString *)alertText1 alertText2:(nullable NSString *)alertText2 playTone:(BOOL)playTone duration:(UInt16)duration __deprecated_msg("Use initWithAlertText1:alertText2:alertText3:softButtons:playTone:ttsChunks:duration:progressIndicator:alertIcon:cancelID: instead");
+
+/**
+ Convenience init for creating an alert with three lines of text, optional sound cues, and a timout.
-- (instancetype)initWithAlertText1:(nullable NSString *)alertText1 alertText2:(nullable NSString *)alertText2 alertText3:(nullable NSString *)alertText3 ttsChunks:(nullable NSArray<SDLTTSChunk *> *)ttsChunks playTone:(BOOL)playTone progressIndicator:(BOOL)showProgressIndicator duration:(UInt16)duration softButtons:(nullable NSArray<SDLSoftButton *> *)softButtons alertIcon:(nullable SDLImage *)icon;
+ @param ttsText Speech to be played
+ @param alertText1 The first line of the alert
+ @param alertText2 The second line of the alert
+ @param alertText3 The third line of the alert
+ @param playTone Whether the alert tone should be played before the TTS is spoken
+ @param duration The duration of the displayed portion of the alert, in milliseconds
+ @return An SDLAlert object
+ */
+- (instancetype)initWithTTS:(nullable NSString *)ttsText alertText1:(nullable NSString *)alertText1 alertText2:(nullable NSString *)alertText2 alertText3:(nullable NSString *)alertText3 playTone:(BOOL)playTone duration:(UInt16)duration __deprecated_msg("Use initWithAlertText1:alertText2:alertText3:softButtons:playTone:ttsChunks:duration:progressIndicator:alertIcon:cancelID: instead");
/**
- * The String to be displayed in the first field of the display during the Alert
- *
- * @discussion Length is limited to what is indicated in *SDLRegisterAppInterface* response
- *
- * If omitted, top display line will be cleared
- *
- * Text is always centered
- *
- * Optional, Max length 500 chars
+ Convenience init for creating an alert with three lines of text, soft buttons, and optional sound cues.
+
+ @param ttsChunks Speech or a sound file to be played when the alert shows
+ @param alertText1 The first line of the alert
+ @param alertText2 The second line of the alert
+ @param alertText3 The third line of the alert
+ @param playTone Whether the alert tone should be played before the TTS is spoken
+ @param softButtons Buttons for the alert
+ @return An SDLAlert object
+ */
+- (instancetype)initWithTTSChunks:(nullable NSArray<SDLTTSChunk *> *)ttsChunks alertText1:(nullable NSString *)alertText1 alertText2:(nullable NSString *)alertText2 alertText3:(nullable NSString *)alertText3 playTone:(BOOL)playTone softButtons:(nullable NSArray<SDLSoftButton *> *)softButtons __deprecated_msg("Use initWithAlertText1:alertText2:alertText3:softButtons:playTone:ttsChunks:duration:progressIndicator:alertIcon:cancelID: instead");
+
+/**
+ Convenience init for creating an alert with three lines of text, soft buttons, optional sound cues, and a timout.
+
+ @param ttsChunks Speech or a sound file to be played when the alert shows
+ @param alertText1 The first line of the alert
+ @param alertText2 The second line of the alert
+ @param alertText3 The third line of the alert
+ @param playTone Whether the alert tone should be played before the TTS is spoken
+ @param duration The duration of the displayed portion of the alert, in milliseconds
+ @param softButtons Buttons for the alert
+ @return An SDLAlert object
+ */
+- (instancetype)initWithTTSChunks:(nullable NSArray<SDLTTSChunk *> *)ttsChunks alertText1:(nullable NSString *)alertText1 alertText2:(nullable NSString *)alertText2 alertText3:(nullable NSString *)alertText3 playTone:(BOOL)playTone duration:(UInt16)duration softButtons:(nullable NSArray<SDLSoftButton *> *)softButtons __deprecated_msg("Use initWithAlertText1:alertText2:alertText3:softButtons:playTone:ttsChunks:duration:progressIndicator:alertIcon:cancelID: instead");
+
+/**
+ The first line of the alert text field.
+
+ @discussion At least either `alertText1`, `alertText2` or `ttsChunks` need to be provided.
+ @discussion If supported, the `displayCapabilities` will have a `TextField` with a `name` of `alertText1`.
+
+ String, Optional, Max length 500 chars
+ @since SDL 1.0
*/
@property (nullable, strong, nonatomic) NSString *alertText1;
/**
- * The String to be displayed in the second field of the display during the Alert
- *
- * @discussion Only permitted if HMI supports a second display line
- *
- * Length is limited to what is indicated in *SDLRegisterAppInterface* response
- *
- * If omitted, second display line will be cleared
- *
- * Text is always centered
- *
- * Optional, Max length 500 chars
+ The second line of the alert text field.
+
+ @discussion At least either `alertText1`, `alertText2` or `ttsChunks` need to be provided.
+ @discussion If supported, the `displayCapabilities` will have a `TextField` with a `name` of `alertText2`
+
+ String, Optional, Max length 500 chars
+ @since SDL 1.0
*/
@property (nullable, strong, nonatomic) NSString *alertText2;
/**
- * the String to be displayed in the third field of the display during the Alert
- * @discussion Only permitted if HMI supports a third display line
- *
- * Length is limited to what is indicated in *SDLRegisterAppInterface* response
- *
- * If omitted, third display line will be cleared
- *
- * Text is always centered
- *
- * Optional, Max length 500 chars
+ The optional third line of the alert text field.
+
+ @discussion If supported, the `displayCapabilities` will have a `TextField` with a `name` of `alertText3`
+
+ String, Optional, Max length 500 chars
+ @since SDL 2.0
*/
@property (nullable, strong, nonatomic) NSString *alertText3;
/**
- * An array which, taken together, specify what is to be spoken to the user
- *
- * Optional, Array of SDLTTSChunk, Array length 1 - 100
- *
- * @see SDLTTSChunk
+ An array of text chunks to be spoken or a prerecorded sound file.
+
+ @discussion At least either `alertText1`, `alertText2` or `ttsChunks` need to be provided.
+
+ Array of SDLTTSChunk, Optional, Array length 1 - 100
+
+ @since SDL 1.0
*/
@property (nullable, strong, nonatomic) NSArray<SDLTTSChunk *> *ttsChunks;
/**
- * The duration of the displayed portion of the alert, in milliseconds.
- *
- * @discussion After this amount of time has passed, the display fields alertText1 and alertText2 will revert to what was displayed in those fields before the alert began.
- *
- * Typical timeouts are 3 - 5 seconds
- *
- * If omitted, the timeout is set to 5 seconds
- *
- * Optional, Integer, 3000 - 10000
+ The duration of the displayed portion of the alert, in milliseconds. Typical timeouts are 3 - 5 seconds. If omitted, the timeout is set to a default of 5 seconds.
+
+ Integer, Optional, Min value: 3000, Max value: 10000
+
+ @since SDL 1.0
*/
@property (nullable, strong, nonatomic) NSNumber<SDLInt> *duration;
/**
- * Whether the alert tone should be played before the TTS (if any) is spoken.
- *
- * @discussion If ommitted, no tone is played
- *
- * Optional, Boolean
+ Whether the alert tone should be played before the TTS (if any) is spoken. If omitted or set to false, no tone is played.
+
+ Boolean, Optional
+
+ @since SDL 1.0
*/
@property (nullable, strong, nonatomic) NSNumber<SDLBool> *playTone;
/**
- * If supported on the given platform, the alert GUI will include some sort of animation indicating that loading of a feature is progressing. e.g. a spinning wheel or hourglass, etc.
- *
- * Optional, Boolean
- *
- * @since SmartDeviceLink 2.0
+ If supported on the given platform, the alert GUI will include some sort of animation indicating that loading of a feature is progressing (e.g. a spinning wheel or hourglass, etc.).
+
+ Boolean, Optional
+
+ @since SDL 2.0
*/
@property (nullable, strong, nonatomic) NSNumber<SDLBool> *progressIndicator;
/**
- * App defined SoftButtons.
- *
- * @discussion If omitted on supported displays, the displayed alert shall not have any SoftButtons
- *
- * Optional, Array of SDLSoftButton, Array size 0 - 4
- *
- * @see SDLSoftButton
+ Buttons for the displayed alert. If omitted on supported displays, the displayed alert shall not have any buttons.
+
+ Array of SDLSoftButton, Optional, Array size 0 - 4
+
+ @since SDL 2.0
*/
@property (nullable, strong, nonatomic) NSArray<SDLSoftButton *> *softButtons;
/**
- Image struct determining whether static or dynamic icon.
- If omitted on supported displays, no (or the default if applicable) icon should be displayed.
+ An ID for this specific alert to allow cancellation through the `CancelInteraction` RPC.
+
+ Integer, Optional
+
+ @see SDLCancelInteraction
+ @since SDL 6.0
+ */
+@property (nullable, strong, nonatomic) NSNumber<SDLInt> *cancelID;
+
+/**
+ Image to be displayed in the alert. If omitted on supported displays, no (or the default if applicable) icon should be displayed.
+
+ SDLImage, Optional
+ @since SDL 6.0
*/
@property (nullable, strong, nonatomic) SDLImage *alertIcon;
diff --git a/SmartDeviceLink/SDLAlert.m b/SmartDeviceLink/SDLAlert.m
index 31cb2cbac..041943a29 100644
--- a/SmartDeviceLink/SDLAlert.m
+++ b/SmartDeviceLink/SDLAlert.m
@@ -24,70 +24,76 @@ NS_ASSUME_NONNULL_BEGIN
}
#pragma clang diagnostic pop
-- (instancetype)initWithAlertText1:(nullable NSString *)alertText1 alertText2:(nullable NSString *)alertText2 alertText3:(nullable NSString *)alertText3 {
- return [self initWithAlertText1:alertText1 alertText2:alertText2 alertText3:alertText3 ttsChunks:nil playTone:NO progressIndicator:NO duration:DefaultAlertDuration softButtons:nil alertIcon:nil];
-}
+- (instancetype)initWithAlertText:(nullable NSString *)alertText1 alertText2:(nullable NSString *)alertText2 alertText3:(nullable NSString *)alertText3 softButtons:(nullable NSArray<SDLSoftButton *> *)softButtons playTone:(BOOL)playTone ttsChunks:(nullable NSArray<SDLTTSChunk *> *)ttsChunks duration:(nullable NSNumber *)duration progressIndicator:(BOOL)progressIndicator alertIcon:(nullable SDLImage *)icon cancelID:(nullable NSNumber *)cancelID {
+ self = [self init];
+ if (!self) {
+ return nil;
+ }
+ self.alertText1 = alertText1;
+ self.alertText2 = alertText2;
+ self.alertText3 = alertText3;
+ self.ttsChunks = ttsChunks;
+ self.duration = duration;
+ self.playTone = @(playTone);
+ self.progressIndicator = @(progressIndicator);
+ self.softButtons = softButtons;
+ self.alertIcon = icon;
+ self.cancelID = cancelID;
-- (instancetype)initWithAlertText1:(nullable NSString *)alertText1 alertText2:(nullable NSString *)alertText2 duration:(UInt16)duration {
- return [self initWithAlertText1:alertText1 alertText2:alertText2 alertText3:nil ttsChunks:nil playTone:NO progressIndicator:NO duration:duration softButtons:nil alertIcon:nil];
+ return self;
+}
+- (instancetype)initWithAlertText1:(nullable NSString *)alertText1 alertText2:(nullable NSString *)alertText2 alertText3:(nullable NSString *)alertText3 softButtons:(nullable NSArray<SDLSoftButton *> *)softButtons playTone:(BOOL)playTone ttsChunks:(nullable NSArray<SDLTTSChunk *> *)ttsChunks duration:(UInt16)duration progressIndicator:(BOOL)progressIndicator alertIcon:(nullable SDLImage *)icon cancelID:(UInt32)cancelID {
+ return [self initWithAlertText:alertText1 alertText2:alertText2 alertText3:alertText3 softButtons:softButtons playTone:playTone ttsChunks:ttsChunks duration:@(duration) progressIndicator:progressIndicator alertIcon:icon cancelID:@(cancelID)];
}
-- (instancetype)initWithAlertText1:(nullable NSString *)alertText1 alertText2:(nullable NSString *)alertText2 alertText3:(nullable NSString *)alertText3 duration:(UInt16)duration {
- return [self initWithAlertText1:alertText1 alertText2:alertText2 alertText3:alertText3 ttsChunks:nil playTone:NO progressIndicator:NO duration:duration softButtons:nil alertIcon:nil];
+- (instancetype)initWithTTS:(nullable NSString *)ttsText playTone:(BOOL)playTone {
+ return [self initWithTTS:ttsText alertText1:nil alertText2:nil playTone:playTone duration:DefaultAlertDuration];
}
-- (instancetype)initWithAlertText1:(nullable NSString *)alertText1 alertText2:(nullable NSString *)alertText2 alertText3:(nullable NSString *)alertText3 duration:(UInt16)duration softButtons:(nullable NSArray<SDLSoftButton *> *)softButtons {
- return [self initWithAlertText1:alertText1 alertText2:alertText2 alertText3:alertText3 ttsChunks:nil playTone:NO progressIndicator:NO duration:duration softButtons:softButtons alertIcon:nil];
+- (instancetype)initWithAlertText:(nullable NSString *)alertText softButtons:(nullable NSArray<SDLSoftButton *> *)softButtons playTone:(BOOL)playTone ttsChunks:(nullable NSArray<SDLTTSChunk *> *)ttsChunks alertIcon:(nullable SDLImage *)icon cancelID:(UInt32)cancelID {
+ return [self initWithAlertText:alertText alertText2:nil alertText3:nil softButtons:softButtons playTone:playTone ttsChunks:ttsChunks duration:nil progressIndicator:false alertIcon:icon cancelID:@(cancelID)];
}
-- (instancetype)initWithTTS:(nullable NSString *)ttsText playTone:(BOOL)playTone {
- return [self initWithAlertText1:nil alertText2:nil alertText3:nil ttsChunks:[SDLTTSChunk textChunksFromString:ttsText] playTone:playTone progressIndicator:NO duration:DefaultAlertDuration softButtons:nil alertIcon:nil];
+- (instancetype)initWithAlertText1:(nullable NSString *)alertText1 alertText2:(nullable NSString *)alertText2 alertText3:(nullable NSString *)alertText3 {
+ return [self initWithAlertText1:alertText1 alertText2:alertText2 alertText3:alertText3 duration:DefaultAlertDuration];
}
-- (instancetype)initWithTTS:(nullable NSString *)ttsText alertText1:(nullable NSString *)alertText1 alertText2:(nullable NSString *)alertText2 playTone:(BOOL)playTone duration:(UInt16)duration {
- return [self initWithAlertText1:alertText1 alertText2:alertText2 alertText3:nil ttsChunks:[SDLTTSChunk textChunksFromString:ttsText] playTone:playTone progressIndicator:NO duration:duration softButtons:nil alertIcon:nil];
+- (instancetype)initWithAlertText1:(nullable NSString *)alertText1 alertText2:(nullable NSString *)alertText2 duration:(UInt16)duration {
+ return [self initWithAlertText1:alertText1 alertText2:alertText2 alertText3:nil duration:duration];
}
-- (instancetype)initWithTTS:(nullable NSString *)ttsText alertText1:(nullable NSString *)alertText1 alertText2:(nullable NSString *)alertText2 alertText3:(nullable NSString *)alertText3 playTone:(BOOL)playTone duration:(UInt16)duration {
- return [self initWithAlertText1:alertText1 alertText2:alertText2 alertText3:alertText3 ttsChunks:[SDLTTSChunk textChunksFromString:ttsText] playTone:playTone progressIndicator:NO duration:duration softButtons:nil alertIcon:nil];
+- (instancetype)initWithAlertText1:(nullable NSString *)alertText1 alertText2:(nullable NSString *)alertText2 alertText3:(nullable NSString *)alertText3 duration:(UInt16)duration {
+ return [self initWithAlertText1:alertText1 alertText2:alertText2 alertText3:alertText3 duration:duration softButtons:nil];
}
-- (instancetype)initWithTTSChunks:(nullable NSArray<SDLTTSChunk *> *)ttsChunks alertText1:(nullable NSString *)alertText1 alertText2:(nullable NSString *)alertText2 alertText3:(nullable NSString *)alertText3 playTone:(BOOL)playTone softButtons:(nullable NSArray<SDLSoftButton *> *)softButtons {
- return [self initWithAlertText1:alertText1 alertText2:alertText2 alertText3:alertText3 ttsChunks:ttsChunks playTone:playTone progressIndicator:NO duration:DefaultAlertDuration softButtons:softButtons alertIcon:nil];
+- (instancetype)initWithAlertText1:(nullable NSString *)alertText1 alertText2:(nullable NSString *)alertText2 alertText3:(nullable NSString *)alertText3 duration:(UInt16)duration softButtons:(nullable NSArray<SDLSoftButton *> *)softButtons {
+ return [self initWithTTSChunks:nil alertText1:alertText1 alertText2:alertText2 alertText3:alertText3 playTone:NO duration:duration softButtons:softButtons];
}
-- (instancetype)initWithTTSChunks:(nullable NSArray<SDLTTSChunk *> *)ttsChunks alertText1:(nullable NSString *)alertText1 alertText2:(nullable NSString *)alertText2 alertText3:(nullable NSString *)alertText3 playTone:(BOOL)playTone duration:(UInt16)duration softButtons:(nullable NSArray<SDLSoftButton *> *)softButtons {
- return [self initWithAlertText1:alertText1 alertText2:alertText2 alertText3:alertText3 ttsChunks:ttsChunks playTone:playTone progressIndicator:NO duration:duration softButtons:softButtons alertIcon:nil];
+- (instancetype)initWithTTS:(nullable NSString *)ttsText alertText1:(nullable NSString *)alertText1 alertText2:(nullable NSString *)alertText2 playTone:(BOOL)playTone duration:(UInt16)duration {
+ return [self initWithTTS:ttsText alertText1:alertText1 alertText2:alertText2 alertText3:nil playTone:playTone duration:duration];
}
-- (instancetype)initWithAlertText1:(NSString *)alertText1 alertText2:(nullable NSString *)alertText2 {
- return [self initWithAlertText1:alertText1 alertText2:alertText2 alertText3:nil ttsChunks:nil playTone:NO progressIndicator:NO duration:DefaultAlertDuration softButtons:nil alertIcon:nil];
+- (instancetype)initWithTTS:(nullable NSString *)ttsText alertText1:(nullable NSString *)alertText1 alertText2:(nullable NSString *)alertText2 alertText3:(nullable NSString *)alertText3 playTone:(BOOL)playTone duration:(UInt16)duration {
+ NSArray *ttsChunks = [SDLTTSChunk textChunksFromString:ttsText];
+ return [self initWithTTSChunks:ttsChunks alertText1:alertText1 alertText2:alertText2 alertText3:alertText3 playTone:playTone duration:duration softButtons:nil];
}
- (instancetype)initWithTTSChunks:(nullable NSArray<SDLTTSChunk *> *)ttsChunks playTone:(BOOL)playTone {
- return [self initWithAlertText1:nil alertText2:nil alertText3:nil ttsChunks:ttsChunks playTone:playTone progressIndicator:NO duration:DefaultAlertDuration softButtons:nil alertIcon:nil];
+ return [self initWithAlertText:nil alertText2:nil alertText3:nil softButtons:nil playTone:playTone ttsChunks:ttsChunks duration:nil progressIndicator:false alertIcon:nil cancelID:nil];
}
-- (instancetype)initWithAlertText1:(nullable NSString *)alertText1 alertText2:(nullable NSString *)alertText2 alertText3:(nullable NSString *)alertText3 ttsChunks:(nullable NSArray<SDLTTSChunk *> *)ttsChunks playTone:(BOOL)playTone progressIndicator:(BOOL)showProgressIndicator duration:(UInt16)duration softButtons:(nullable NSArray<SDLSoftButton *> *)softButtons alertIcon:(nullable SDLImage *)icon {
- self = [self init];
- if (!self) {
- return nil;
- }
-
- self.ttsChunks = [ttsChunks copy];
- self.alertText1 = alertText1;
- self.alertText2 = alertText2;
- self.alertText3 = alertText3;
- self.playTone = @(playTone);
- self.progressIndicator = @(showProgressIndicator);
- self.duration = @(duration);
- self.softButtons = [softButtons copy];
- self.alertIcon = icon;
+- (instancetype)initWithTTSChunks:(nullable NSArray<SDLTTSChunk *> *)ttsChunks alertText1:(nullable NSString *)alertText1 alertText2:(nullable NSString *)alertText2 alertText3:(nullable NSString *)alertText3 playTone:(BOOL)playTone softButtons:(nullable NSArray<SDLSoftButton *> *)softButtons {
+ return [self initWithTTSChunks:ttsChunks alertText1:alertText1 alertText2:alertText2 alertText3:alertText3 playTone:playTone duration:DefaultAlertDuration softButtons:softButtons];
+}
- return self;
+- (instancetype)initWithTTSChunks:(nullable NSArray<SDLTTSChunk *> *)ttsChunks alertText1:(nullable NSString *)alertText1 alertText2:(nullable NSString *)alertText2 alertText3:(nullable NSString *)alertText3 playTone:(BOOL)playTone duration:(UInt16)duration softButtons:(nullable NSArray<SDLSoftButton *> *)softButtons {
+ return [self initWithAlertText:alertText1 alertText2:alertText2 alertText3:alertText3 softButtons:softButtons playTone:playTone ttsChunks:ttsChunks duration:@(duration) progressIndicator:false alertIcon:nil cancelID:nil];
}
+#pragma mark - Getters and Setters
+
- (void)setAlertText1:(nullable NSString *)alertText1 {
[self.parameters sdl_setObject:alertText1 forName:SDLRPCParameterNameAlertText1];
}
@@ -160,6 +166,14 @@ NS_ASSUME_NONNULL_BEGIN
return [self.parameters sdl_objectForName:SDLRPCParameterNameAlertIcon ofClass:SDLImage.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/SDLAsynchronousRPCOperation.m b/SmartDeviceLink/SDLAsynchronousRPCOperation.m
index 4fe43a91e..ad169c8a9 100644
--- a/SmartDeviceLink/SDLAsynchronousRPCOperation.m
+++ b/SmartDeviceLink/SDLAsynchronousRPCOperation.m
@@ -21,18 +21,12 @@ NS_ASSUME_NONNULL_BEGIN
@end
-@implementation SDLAsynchronousRPCOperation {
- BOOL executing;
- BOOL finished;
-}
+@implementation SDLAsynchronousRPCOperation
- (instancetype)init {
self = [super init];
if (!self) { return nil; }
- executing = NO;
- finished = NO;
-
_operationId = [NSUUID UUID];
return self;
@@ -49,6 +43,8 @@ NS_ASSUME_NONNULL_BEGIN
- (void)start {
[super start];
+ if (self.isCancelled) { return; }
+
[self sdl_sendRPC:self.rpc];
}
diff --git a/SmartDeviceLink/SDLAsynchronousRPCRequestOperation.m b/SmartDeviceLink/SDLAsynchronousRPCRequestOperation.m
index c77c80d52..92b157e8d 100644
--- a/SmartDeviceLink/SDLAsynchronousRPCRequestOperation.m
+++ b/SmartDeviceLink/SDLAsynchronousRPCRequestOperation.m
@@ -72,6 +72,7 @@ NS_ASSUME_NONNULL_BEGIN
- (void)start {
[super start];
+ if (self.isCancelled) { return; }
[self sdl_sendRequests];
}
diff --git a/SmartDeviceLink/SDLAudioControlCapabilities.h b/SmartDeviceLink/SDLAudioControlCapabilities.h
index b7f29a01c..d91bef2ef 100644
--- a/SmartDeviceLink/SDLAudioControlCapabilities.h
+++ b/SmartDeviceLink/SDLAudioControlCapabilities.h
@@ -2,6 +2,7 @@
//
#import "SDLRPCMessage.h"
+#import "SDLModuleInfo.h"
NS_ASSUME_NONNULL_BEGIN
@@ -13,7 +14,16 @@ NS_ASSUME_NONNULL_BEGIN
@param name The short friendly name of the audio control module.
@return An instance of the SDLAudioControlCapabilities class.
*/
-- (instancetype)initWithModuleName:(NSString *)name;
+- (instancetype)initWithModuleName:(NSString *)name __deprecated_msg("Use initWithModuleName:moduleInfo: instead");
+
+/**
+ Constructs a newly allocated SDLAudioControlCapabilities object with audio control module name (max 100 chars)
+
+ @param name The short friendly name of the audio control module.
+ @param moduleInfo Information about a RC module, including its id.
+ @return An instance of the SDLAudioControlCapabilities class.
+ */
+- (instancetype)initWithModuleName:(NSString *)name moduleInfo:(nullable SDLModuleInfo *)moduleInfo;
/**
Constructs a newly allocated SDLAudioControlCapabilities object with given parameters
@@ -25,7 +35,20 @@ NS_ASSUME_NONNULL_BEGIN
@param equalizerMaxChannelID Equalizer channel ID (between 1-100).
@return An instance of the SDLAudioControlCapabilities class.
*/
-- (instancetype)initWithModuleName:(NSString *)name sourceAvailable:(nullable NSNumber<SDLBool> *)sourceAvailable keepContextAvailable:(nullable NSNumber<SDLBool> *)keepContextAvailable volumeAvailable:(nullable NSNumber<SDLBool> *)volumeAvailable equalizerAvailable:(nullable NSNumber<SDLBool> *)equalizerAvailable equalizerMaxChannelID:(nullable NSNumber<SDLInt> *)equalizerMaxChannelID;
+- (instancetype)initWithModuleName:(NSString *)name sourceAvailable:(nullable NSNumber<SDLBool> *)sourceAvailable keepContextAvailable:(nullable NSNumber<SDLBool> *)keepContextAvailable volumeAvailable:(nullable NSNumber<SDLBool> *)volumeAvailable equalizerAvailable:(nullable NSNumber<SDLBool> *)equalizerAvailable equalizerMaxChannelID:(nullable NSNumber<SDLInt> *)equalizerMaxChannelID __deprecated_msg("Use initWithModuleName:moduleInfo:sourceAvailable:keepContextAvailable:volumeAvailable:equalizerAvailable:equalizerMaxChannelID: instead");
+
+/**
+ Constructs a newly allocated SDLAudioControlCapabilities object with given parameters
+
+ @param name The short friendly name of the audio control module.
+ @param moduleInfo Information about a RC module, including its id.
+ @param sourceAvailable Availability of the control of audio source.
+ @param volumeAvailable Availability of the volume of audio source.
+ @param equalizerAvailable Availability of the equalizer of audio source.
+ @param equalizerMaxChannelID Equalizer channel ID (between 1-100).
+ @return An instance of the SDLAudioControlCapabilities class.
+ */
+- (instancetype)initWithModuleName:(NSString *)name moduleInfo:(nullable SDLModuleInfo *)moduleInfo sourceAvailable:(nullable NSNumber<SDLBool> *)sourceAvailable keepContextAvailable:(nullable NSNumber<SDLBool> *)keepContextAvailable volumeAvailable:(nullable NSNumber<SDLBool> *)volumeAvailable equalizerAvailable:(nullable NSNumber<SDLBool> *)equalizerAvailable equalizerMaxChannelID:(nullable NSNumber<SDLInt> *)equalizerMaxChannelID;
/**
* @abstract The short friendly name of the audio control module.
@@ -71,6 +94,13 @@ NS_ASSUME_NONNULL_BEGIN
*/
@property (nullable, strong, nonatomic) NSNumber<SDLInt> *equalizerMaxChannelId;
+/**
+ * Information about a RC module, including its id.
+ *
+ * Optional
+ */
+@property (nullable, strong, nonatomic) SDLModuleInfo *moduleInfo;
+
@end
NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLAudioControlCapabilities.m b/SmartDeviceLink/SDLAudioControlCapabilities.m
index ad204cc62..bc7ff568d 100644
--- a/SmartDeviceLink/SDLAudioControlCapabilities.m
+++ b/SmartDeviceLink/SDLAudioControlCapabilities.m
@@ -19,6 +19,17 @@ NS_ASSUME_NONNULL_BEGIN
return self;
}
+- (instancetype)initWithModuleName:(NSString *)name moduleInfo:(nullable SDLModuleInfo *)moduleInfo {
+ self = [self init];
+ if (!self) {
+ return nil;
+ }
+ self.moduleName = name;
+ self.moduleInfo = moduleInfo;
+
+ return self;
+}
+
- (instancetype)initWithModuleName:(NSString *)name sourceAvailable:(nullable NSNumber<SDLBool> *)sourceAvailable keepContextAvailable:(nullable NSNumber<SDLBool> *)keepContextAvailable volumeAvailable:(nullable NSNumber<SDLBool> *)volumeAvailable equalizerAvailable:(nullable NSNumber<SDLBool> *)equalizerAvailable equalizerMaxChannelID:(nullable NSNumber<SDLInt> *)equalizerMaxChannelID {
self = [self init];
if (!self) {
@@ -34,6 +45,25 @@ NS_ASSUME_NONNULL_BEGIN
return self;
}
+- (instancetype)initWithModuleName:(NSString *)name moduleInfo:(nullable SDLModuleInfo *)moduleInfo sourceAvailable:(nullable NSNumber<SDLBool> *)sourceAvailable keepContextAvailable:(nullable NSNumber<SDLBool> *)keepContextAvailable volumeAvailable:(nullable NSNumber<SDLBool> *)volumeAvailable equalizerAvailable:(nullable NSNumber<SDLBool> *)equalizerAvailable equalizerMaxChannelID:(nullable NSNumber<SDLInt> *)equalizerMaxChannelID {
+ self = [self init];
+ if (!self) {
+ return nil;
+ }
+
+ self.moduleName = name;
+ self.moduleInfo = moduleInfo;
+ self.sourceAvailable = sourceAvailable;
+ self.keepContextAvailable = keepContextAvailable;
+ self.volumeAvailable = volumeAvailable;
+ self.equalizerAvailable = equalizerAvailable;
+ self.equalizerMaxChannelId = equalizerMaxChannelID;
+
+ return self;
+
+}
+
+
- (void)setModuleName:(NSString *)moduleName {
[self.store sdl_setObject:moduleName forName:SDLRPCParameterNameModuleName];
}
@@ -83,6 +113,14 @@ NS_ASSUME_NONNULL_BEGIN
return [self.store sdl_objectForName:SDLRPCParameterNameEqualizerMaxChannelId ofClass:NSNumber.class error:nil];
}
+- (void)setModuleInfo:(nullable SDLModuleInfo *)moduleInfo {
+ [self.store sdl_setObject:moduleInfo forName:SDLRPCParameterNameModuleInfo];
+}
+
+- (nullable SDLModuleInfo *)moduleInfo {
+ return [self.store sdl_objectForName:SDLRPCParameterNameModuleInfo ofClass:SDLModuleInfo.class error:nil];
+}
+
@end
NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLButtonCapabilities.h b/SmartDeviceLink/SDLButtonCapabilities.h
index 35600f5b2..1333da2cf 100644
--- a/SmartDeviceLink/SDLButtonCapabilities.h
+++ b/SmartDeviceLink/SDLButtonCapabilities.h
@@ -4,6 +4,7 @@
#import "SDLRPCMessage.h"
#import "SDLButtonName.h"
+#import "SDLModuleInfo.h"
/**
@@ -44,6 +45,13 @@ NS_ASSUME_NONNULL_BEGIN
*/
@property (strong, nonatomic) NSNumber<SDLBool> *upDownAvailable;
+/**
+ * Information about a RC module, including its id.
+ *
+ * Optional
+ */
+@property (nullable, strong, nonatomic) SDLModuleInfo *moduleInfo;
+
@end
NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLButtonCapabilities.m b/SmartDeviceLink/SDLButtonCapabilities.m
index 12cd24847..1685d0907 100644
--- a/SmartDeviceLink/SDLButtonCapabilities.m
+++ b/SmartDeviceLink/SDLButtonCapabilities.m
@@ -46,6 +46,14 @@ NS_ASSUME_NONNULL_BEGIN
return [self.store sdl_objectForName:SDLRPCParameterNameUpDownAvailable ofClass:NSNumber.class error:&error];
}
+- (void)setModuleInfo:(nullable SDLModuleInfo *)moduleInfo {
+ [self.store sdl_setObject:moduleInfo forName:SDLRPCParameterNameModuleInfo];
+}
+
+- (nullable SDLModuleInfo *)moduleInfo {
+ return [self.store sdl_objectForName:SDLRPCParameterNameModuleInfo ofClass:SDLModuleInfo.class error:nil];
+}
+
@end
NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLButtonPress.h b/SmartDeviceLink/SDLButtonPress.h
index b019b4edd..3d251f87d 100644
--- a/SmartDeviceLink/SDLButtonPress.h
+++ b/SmartDeviceLink/SDLButtonPress.h
@@ -15,7 +15,9 @@ NS_ASSUME_NONNULL_BEGIN
@interface SDLButtonPress : SDLRPCRequest
-- (instancetype)initWithButtonName:(SDLButtonName)buttonName moduleType:(SDLModuleType) moduleType;
+- (instancetype)initWithButtonName:(SDLButtonName)buttonName moduleType:(SDLModuleType)moduleType __deprecated_msg(("Use initWithButtonName:moduleType:moduleId: instead"));;
+
+- (instancetype)initWithButtonName:(SDLButtonName)buttonName moduleType:(SDLModuleType)moduleType moduleId:(nullable NSString *)moduleId;
/**
* The module where the button should be pressed.
@@ -24,6 +26,13 @@ NS_ASSUME_NONNULL_BEGIN
@property (strong, nonatomic) SDLModuleType moduleType;
/**
+ * Id of a module, published by System Capability.
+ *
+ * Optional
+ */
+@property (nullable, strong, nonatomic) NSString *moduleId;
+
+/**
* The name of supported RC climate or radio button.
*
*/
diff --git a/SmartDeviceLink/SDLButtonPress.m b/SmartDeviceLink/SDLButtonPress.m
index f79152830..4f215c206 100644
--- a/SmartDeviceLink/SDLButtonPress.m
+++ b/SmartDeviceLink/SDLButtonPress.m
@@ -20,7 +20,7 @@ NS_ASSUME_NONNULL_BEGIN
}
#pragma clang diagnostic pop
-- (instancetype)initWithButtonName:(SDLButtonName) buttonName moduleType:(SDLModuleType) moduleType {
+- (instancetype)initWithButtonName:(SDLButtonName) buttonName moduleType:(SDLModuleType)moduleType {
self = [self init];
if (!self) {
return nil;
@@ -32,6 +32,19 @@ NS_ASSUME_NONNULL_BEGIN
return self;
}
+- (instancetype)initWithButtonName:(SDLButtonName)buttonName moduleType:(SDLModuleType)moduleType moduleId:(nullable NSString *)moduleId {
+ self = [self init];
+ if (!self) {
+ return nil;
+ }
+
+ self.buttonName = buttonName;
+ self.moduleType = moduleType;
+ self.moduleId = moduleId;
+
+ return self;
+}
+
- (void)setModuleType:(SDLModuleType)moduleType {
[self.parameters sdl_setObject:moduleType forName:SDLRPCParameterNameModuleType];
}
@@ -59,5 +72,14 @@ NS_ASSUME_NONNULL_BEGIN
return [self.parameters sdl_enumForName:SDLRPCParameterNameButtonPressMode error:&error];
}
+- (void)setModuleId:(nullable NSString *)moduleId {
+ [self.parameters sdl_setObject:moduleId forName:SDLRPCParameterNameModuleId];
+}
+
+- (nullable NSString *)moduleId {
+ NSError *error = nil;
+ return [self.parameters sdl_objectForName:SDLRPCParameterNameModuleId ofClass:NSString.class error:&error];
+}
+
@end
NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLCancelInteraction.h b/SmartDeviceLink/SDLCancelInteraction.h
new file mode 100644
index 000000000..d8f9078d2
--- /dev/null
+++ b/SmartDeviceLink/SDLCancelInteraction.h
@@ -0,0 +1,115 @@
+//
+// SDLCancelInteraction.h
+// SmartDeviceLink
+//
+// Created by Nicole on 7/12/19.
+// Copyright © 2019 smartdevicelink. All rights reserved.
+//
+
+#import "SDLRPCRequest.h"
+
+NS_ASSUME_NONNULL_BEGIN
+
+/*
+ Used to dismiss a modal view programmatically without needing to wait for the timeout to complete. Can be used to dismiss alerts, scrollable messages, sliders, and perform interactions (i.e. pop-up menus).
+
+ @see SDLAlert, SDLScrollableMessage, SDLSlider, SDLPerformInteraction
+ */
+@interface SDLCancelInteraction : SDLRPCRequest
+
+/**
+ Convenience init for dismissing the currently presented modal view (either an alert, slider, scrollable message, or perform interation).
+
+ @param functionID The ID of the type of modal view to dismiss
+ @return A SDLCancelInteraction object
+ */
+- (instancetype)initWithFunctionID:(UInt32)functionID;
+
+/**
+ Convenience init for dismissing a specific view.
+
+ @param functionID The ID of the type of interaction to dismiss
+ @param cancelID The ID of the specific interaction to dismiss
+ @return A SDLCancelInteraction object
+ */
+- (instancetype)initWithFunctionID:(UInt32)functionID cancelID:(UInt32)cancelID;
+
+/**
+ Convenience init for dismissing an alert.
+
+ @param cancelID The ID of the specific interaction to dismiss
+ @return A SDLCancelInteraction object
+ */
+- (instancetype)initWithAlertCancelID:(UInt32)cancelID;
+
+/**
+ Convenience init for dismissing a slider.
+
+ @param cancelID The ID of the specific interaction to dismiss
+ @return A SDLCancelInteraction object
+ */
+- (instancetype)initWithSliderCancelID:(UInt32)cancelID;
+
+/**
+ Convenience init for dismissing a scrollable message.
+
+ @param cancelID The ID of the specific interaction to dismiss
+ @return A SDLCancelInteraction object
+ */
+- (instancetype)initWithScrollableMessageCancelID:(UInt32)cancelID;
+
+/**
+ Convenience init for dismissing a perform interaction.
+
+ @param cancelID The ID of the specific interaction to dismiss
+ @return A SDLCancelInteraction object
+ */
+- (instancetype)initWithPerformInteractionCancelID:(UInt32)cancelID;
+
+/**
+ Convenience init for dismissing the currently presented alert.
+
+ @return A SDLCancelInteraction object
+ */
++ (instancetype)alert;
+
+/**
+ Convenience init for dismissing the currently presented slider.
+
+ @return A SDLCancelInteraction object
+ */
++ (instancetype)slider;
+
+/**
+ Convenience init for dismissing the currently presented scrollable message.
+
+ @return A SDLCancelInteraction object
+ */
++ (instancetype)scrollableMessage;
+
+/**
+ Convenience init for dismissing the currently presented perform interaction.
+
+ @return A SDLCancelInteraction object
+ */
++ (instancetype)performInteraction NS_SWIFT_NAME(performInteraction());
+
+/**
+ 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
+ */
+@property (nullable, strong, nonatomic) NSNumber<SDLInt> *cancelID;
+
+/**
+ The ID of the type of interaction to dismiss.
+
+ Only values 10 (PerformInteractionID), 12 (AlertID), 25 (ScrollableMessageID), and 26 (SliderID) are permitted.
+
+ Integer, Required
+ */
+@property (strong, nonatomic) NSNumber<SDLInt> *functionID;
+
+@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLCancelInteraction.m b/SmartDeviceLink/SDLCancelInteraction.m
new file mode 100644
index 000000000..40de4fbef
--- /dev/null
+++ b/SmartDeviceLink/SDLCancelInteraction.m
@@ -0,0 +1,103 @@
+//
+// SDLCancelInteraction.m
+// SmartDeviceLink
+//
+// Created by Nicole on 7/12/19.
+// Copyright © 2019 smartdevicelink. All rights reserved.
+//
+
+#import "SDLCancelInteraction.h"
+
+#import "NSMutableDictionary+Store.h"
+#import "SDLFunctionID.h"
+#import "SDLRPCParameterNames.h"
+#import "SDLRPCFunctionNames.h"
+
+NS_ASSUME_NONNULL_BEGIN
+
+@implementation SDLCancelInteraction
+
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
+- (instancetype)init {
+ if (self = [super initWithName:SDLRPCFunctionNameCancelInteraction]) {
+ }
+ return self;
+}
+#pragma clang diagnostic pop
+
+
+- (instancetype)initWithFunctionID:(UInt32)functionID {
+ self = [self init];
+ if (!self) {
+ return nil;
+ }
+
+ self.functionID = @(functionID);
+
+ return self;
+}
+
+- (instancetype)initWithFunctionID:(UInt32)functionID cancelID:(UInt32)cancelID {
+ self = [self initWithFunctionID:functionID];
+ if (!self) {
+ return nil;
+ }
+
+ self.cancelID = @(cancelID);
+
+ return self;
+}
+
+- (instancetype)initWithAlertCancelID:(UInt32)cancelID {
+ return [self initWithFunctionID:[SDLFunctionID.sharedInstance functionIdForName:SDLRPCFunctionNameAlert].unsignedIntValue cancelID:cancelID];
+}
+
+- (instancetype)initWithSliderCancelID:(UInt32)cancelID {
+ return [self initWithFunctionID:[SDLFunctionID.sharedInstance functionIdForName:SDLRPCFunctionNameSlider].unsignedIntValue cancelID:cancelID];
+}
+
+- (instancetype)initWithScrollableMessageCancelID:(UInt32)cancelID {
+ return [self initWithFunctionID:[SDLFunctionID.sharedInstance functionIdForName:SDLRPCFunctionNameScrollableMessage].unsignedIntValue cancelID:cancelID];
+}
+
+- (instancetype)initWithPerformInteractionCancelID:(UInt32)cancelID {
+ return [self initWithFunctionID:[SDLFunctionID.sharedInstance functionIdForName:SDLRPCFunctionNamePerformInteraction].unsignedIntValue cancelID:cancelID];
+}
+
++ (instancetype)alert {
+ return [[self alloc] initWithFunctionID:[SDLFunctionID.sharedInstance functionIdForName:SDLRPCFunctionNameAlert].unsignedIntValue];
+}
+
++ (instancetype)slider {
+ return [[self alloc] initWithFunctionID:[SDLFunctionID.sharedInstance functionIdForName:SDLRPCFunctionNameSlider].unsignedIntValue];
+}
+
++ (instancetype)scrollableMessage {
+ return [[self alloc] initWithFunctionID:[SDLFunctionID.sharedInstance functionIdForName:SDLRPCFunctionNameScrollableMessage].unsignedIntValue];
+}
+
++ (instancetype)performInteraction {
+ return [[self alloc] initWithFunctionID:[SDLFunctionID.sharedInstance functionIdForName:SDLRPCFunctionNamePerformInteraction].unsignedIntValue];
+}
+
+- (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];
+}
+
+- (void)setFunctionID:(NSNumber<SDLInt> *)functionID {
+ [self.parameters sdl_setObject:functionID forName:SDLRPCParameterNameFunctionID];
+}
+
+- (NSNumber<SDLInt> *)functionID {
+ NSError *error = nil;
+ return [self.parameters sdl_objectForName:SDLRPCParameterNameFunctionID ofClass:NSNumber.class error:&error];
+}
+
+@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLCancelInteractionResponse.h b/SmartDeviceLink/SDLCancelInteractionResponse.h
new file mode 100644
index 000000000..9a2ba5cbe
--- /dev/null
+++ b/SmartDeviceLink/SDLCancelInteractionResponse.h
@@ -0,0 +1,20 @@
+//
+// SDLCancelInteractionResponse.h
+// SmartDeviceLink
+//
+// Created by Nicole on 7/12/19.
+// Copyright © 2019 smartdevicelink. All rights reserved.
+//
+
+#import "SDLRPCResponse.h"
+
+NS_ASSUME_NONNULL_BEGIN
+
+/**
+ Response to the request to dismiss a modal view. If no applicable request can be dismissed, the `resultCode` will be `IGNORED`.
+ */
+@interface SDLCancelInteractionResponse : SDLRPCResponse
+
+@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLCancelInteractionResponse.m b/SmartDeviceLink/SDLCancelInteractionResponse.m
new file mode 100644
index 000000000..325fa96f1
--- /dev/null
+++ b/SmartDeviceLink/SDLCancelInteractionResponse.m
@@ -0,0 +1,27 @@
+//
+// SDLCancelInteractionResponse.m
+// SmartDeviceLink
+//
+// Created by Nicole on 7/12/19.
+// Copyright © 2019 smartdevicelink. All rights reserved.
+//
+
+#import "SDLCancelInteractionResponse.h"
+#import "SDLRPCFunctionNames.h"
+
+NS_ASSUME_NONNULL_BEGIN
+
+@implementation SDLCancelInteractionResponse
+
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
+- (instancetype)init {
+ if (self = [super initWithName:SDLRPCFunctionNameCancelInteraction]) {
+ }
+ return self;
+}
+#pragma clang diagnostic pop
+
+@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLCheckChoiceVROptionalOperation.m b/SmartDeviceLink/SDLCheckChoiceVROptionalOperation.m
index abe323689..0615cb01a 100644
--- a/SmartDeviceLink/SDLCheckChoiceVROptionalOperation.m
+++ b/SmartDeviceLink/SDLCheckChoiceVROptionalOperation.m
@@ -38,6 +38,7 @@ NS_ASSUME_NONNULL_BEGIN
- (void)start {
[super start];
+ if (self.isCancelled) { return; }
[self sdl_sendTestChoices];
}
diff --git a/SmartDeviceLink/SDLChoiceSet.h b/SmartDeviceLink/SDLChoiceSet.h
index bb411b839..f93fbc7df 100644
--- a/SmartDeviceLink/SDLChoiceSet.h
+++ b/SmartDeviceLink/SDLChoiceSet.h
@@ -15,6 +15,11 @@
NS_ASSUME_NONNULL_BEGIN
+/**
+ Notifies the subscriber that the choice set should be cancelled.
+ */
+typedef void (^SDLChoiceSetCanceledHandler)(void);
+
typedef NS_ENUM(NSUInteger, SDLChoiceSetLayout) {
SDLChoiceSetLayoutList,
SDLChoiceSetLayoutTiles,
@@ -123,6 +128,12 @@ typedef NS_ENUM(NSUInteger, SDLChoiceSetLayout) {
*/
- (instancetype)initWithTitle:(NSString *)title delegate:(id<SDLChoiceSetDelegate>)delegate layout:(SDLChoiceSetLayout)layout timeout:(NSTimeInterval)timeout initialPrompt:(nullable NSArray<SDLTTSChunk *> *)initialPrompt timeoutPrompt:(nullable NSArray<SDLTTSChunk *> *)timeoutPrompt helpPrompt:(nullable NSArray<SDLTTSChunk *> *)helpPrompt vrHelpList:(nullable NSArray<SDLVRHelpItem *> *)helpList choices:(NSArray<SDLChoiceCell *> *)choices;
+
+/**
+ Cancels the choice set. If the choice set has not yet been sent to Core, it will not be sent. If the choice set is already presented on Core, the choice set will be immediately dismissed. Canceling an already presented choice set will only work if connected to Core versions 6.0+. On older versions of Core, the choice set will not be dismissed.
+ */
+- (void)cancel;
+
@end
NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLChoiceSet.m b/SmartDeviceLink/SDLChoiceSet.m
index 0892e611d..45a830bcd 100644
--- a/SmartDeviceLink/SDLChoiceSet.m
+++ b/SmartDeviceLink/SDLChoiceSet.m
@@ -15,6 +15,12 @@
NS_ASSUME_NONNULL_BEGIN
+@interface SDLChoiceSet()
+
+@property (nullable, copy, nonatomic) SDLChoiceSetCanceledHandler canceledHandler;
+
+@end
+
@implementation SDLChoiceSet
static NSTimeInterval _defaultTimeout = 10.0;
@@ -105,6 +111,13 @@ static SDLChoiceSetLayout _defaultLayout = SDLChoiceSetLayoutList;
return self;
}
+#pragma mark - Cancel
+
+- (void)cancel {
+ if (self.canceledHandler == nil) { return; }
+ self.canceledHandler();
+}
+
#pragma mark - Getters / Setters
+ (NSTimeInterval)defaultTimeout {
diff --git a/SmartDeviceLink/SDLChoiceSetManager.h b/SmartDeviceLink/SDLChoiceSetManager.h
index 1c3c9c373..e0c11ac71 100644
--- a/SmartDeviceLink/SDLChoiceSetManager.h
+++ b/SmartDeviceLink/SDLChoiceSetManager.h
@@ -9,11 +9,13 @@
#import <Foundation/Foundation.h>
#import "SDLInteractionMode.h"
+#import "NSNumber+NumberType.h"
@class SDLChoiceCell;
@class SDLChoiceSet;
@class SDLFileManager;
@class SDLKeyboardProperties;
+@class SDLSystemCapabilityManager;
@protocol SDLConnectionManagerType;
@protocol SDLKeyboardDelegate;
@@ -50,9 +52,10 @@ extern SDLChoiceManagerState *const SDLChoiceManagerStateStartupError;
@param connectionManager The connection manager object for sending RPCs
@param fileManager The file manager object for uploading files
+ @param systemCapabilityManager The system capability manager object for reading window capabilities
@return The choice set manager
*/
-- (instancetype)initWithConnectionManager:(id<SDLConnectionManagerType>)connectionManager fileManager:(SDLFileManager *)fileManager;
+- (instancetype)initWithConnectionManager:(id<SDLConnectionManagerType>)connectionManager fileManager:(SDLFileManager *)fileManager systemCapabilityManager:(SDLSystemCapabilityManager *)systemCapabilityManager;
/**
Start the manager and prepare to manage choice sets
@@ -99,8 +102,18 @@ extern SDLChoiceManagerState *const SDLChoiceManagerStateStartupError;
@param initialText The initial text within the keyboard input field. It will disappear once the user selects the field in order to enter text
@param delegate The keyboard delegate called when the user interacts with the keyboard
+ @return A unique id that can be used to cancel this keyboard. If `null`, no keyboard was created.
*/
-- (void)presentKeyboardWithInitialText:(NSString *)initialText delegate:(id<SDLKeyboardDelegate>)delegate;
+- (nullable NSNumber<SDLInt> *)presentKeyboardWithInitialText:(NSString *)initialText delegate:(id<SDLKeyboardDelegate>)delegate;
+
+/**
+ Cancels the keyboard-only interface if it is currently showing. If the keyboard has not yet been sent to Core, it will not be sent.
+
+ This will only dismiss an already presented keyboard if connected to head units running SDL 6.0+.
+
+ @param cancelID The unique ID assigned to the keyboard, passed as the return value from `presentKeyboardWithInitialText:keyboardDelegate:`
+ */
+- (void)dismissKeyboardWithCancelID:(NSNumber<SDLInt> *)cancelID;
@end
diff --git a/SmartDeviceLink/SDLChoiceSetManager.m b/SmartDeviceLink/SDLChoiceSetManager.m
index 9579f7807..793876db7 100644
--- a/SmartDeviceLink/SDLChoiceSetManager.m
+++ b/SmartDeviceLink/SDLChoiceSetManager.m
@@ -17,8 +17,7 @@
#import "SDLCreateInteractionChoiceSet.h"
#import "SDLCreateInteractionChoiceSetResponse.h"
#import "SDLDeleteChoicesOperation.h"
-#import "SDLDisplayCapabilities.h"
-#import "SDLDisplayCapabilities+ShowManagerExtensions.h"
+#import "SDLDisplayCapability.h"
#import "SDLError.h"
#import "SDLFileManager.h"
#import "SDLGlobals.h"
@@ -38,6 +37,7 @@
#import "SDLSetDisplayLayoutResponse.h"
#import "SDLStateMachine.h"
#import "SDLSystemContext.h"
+#import "SDLSystemCapabilityManager.h"
NS_ASSUME_NONNULL_BEGIN
@@ -58,13 +58,13 @@ typedef NSNumber * SDLChoiceId;
@property (weak, nonatomic) id<SDLConnectionManagerType> connectionManager;
@property (weak, nonatomic) SDLFileManager *fileManager;
+@property (weak, nonatomic) SDLSystemCapabilityManager *systemCapabilityManager;
@property (strong, nonatomic, readonly) SDLStateMachine *stateMachine;
@property (strong, nonatomic) NSOperationQueue *transactionQueue;
@property (copy, nonatomic, nullable) SDLHMILevel currentHMILevel;
@property (copy, nonatomic, nullable) SDLSystemContext currentSystemContext;
-@property (strong, nonatomic, nullable) SDLDisplayCapabilities *displayCapabilities;
@property (strong, nonatomic) NSMutableSet<SDLChoiceCell *> *preloadedMutableChoices;
@property (strong, nonatomic, readonly) NSSet<SDLChoiceCell *> *pendingPreloadChoices;
@@ -73,22 +73,25 @@ typedef NSNumber * SDLChoiceId;
@property (strong, nonatomic, nullable) SDLAsynchronousOperation *pendingPresentOperation;
@property (assign, nonatomic) UInt16 nextChoiceId;
+@property (assign, nonatomic) UInt16 nextCancelId;
@property (assign, nonatomic, getter=isVROptional) BOOL vrOptional;
@end
UInt16 const ChoiceCellIdMin = 1;
+UInt16 const ChoiceCellCancelIdMin = 1;
@implementation SDLChoiceSetManager
#pragma mark - Lifecycle
-- (instancetype)initWithConnectionManager:(id<SDLConnectionManagerType>)connectionManager fileManager:(SDLFileManager *)fileManager {
+- (instancetype)initWithConnectionManager:(id<SDLConnectionManagerType>)connectionManager fileManager:(SDLFileManager *)fileManager systemCapabilityManager:(SDLSystemCapabilityManager *)systemCapabilityManager {
self = [super init];
if (!self) { return nil; }
_connectionManager = connectionManager;
_fileManager = fileManager;
+ _systemCapabilityManager = systemCapabilityManager;
_stateMachine = [[SDLStateMachine alloc] initWithTarget:self initialState:SDLChoiceManagerStateShutdown states:[self.class sdl_stateTransitionDictionary]];
_transactionQueue = [self sdl_newTransactionQueue];
@@ -96,11 +99,10 @@ UInt16 const ChoiceCellIdMin = 1;
_pendingMutablePreloadChoices = [NSMutableSet set];
_nextChoiceId = ChoiceCellIdMin;
+ _nextCancelId = ChoiceCellCancelIdMin;
_vrOptional = YES;
_keyboardConfiguration = [self sdl_defaultKeyboardConfiguration];
- [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(sdl_registerResponse:) name:SDLDidReceiveRegisterAppInterfaceResponse object:nil];
- [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(sdl_displayLayoutResponse:) name:SDLDidReceiveSetDisplayLayoutResponse object:nil];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(sdl_hmiStatusNotification:) name:SDLDidChangeHMIStatusNotification object:nil];
return self;
@@ -142,7 +144,6 @@ UInt16 const ChoiceCellIdMin = 1;
- (void)didEnterStateShutdown {
_currentHMILevel = nil;
_currentSystemContext = nil;
- _displayCapabilities = nil;
[self.transactionQueue cancelAllOperations];
self.transactionQueue = [self sdl_newTransactionQueue];
@@ -152,6 +153,7 @@ UInt16 const ChoiceCellIdMin = 1;
_vrOptional = YES;
_nextChoiceId = ChoiceCellIdMin;
+ _nextCancelId = ChoiceCellCancelIdMin;
}
- (void)didEnterStateCheckingVoiceOptional {
@@ -211,7 +213,9 @@ UInt16 const ChoiceCellIdMin = 1;
[self.pendingMutablePreloadChoices unionSet:choicesToUpload];
// Upload pending preloads
- SDLPreloadChoicesOperation *preloadOp = [[SDLPreloadChoicesOperation alloc] initWithConnectionManager:self.connectionManager fileManager:self.fileManager displayCapabilities:self.displayCapabilities isVROptional:self.isVROptional cellsToPreload:choicesToUpload];
+ // For backward compatibility with Gen38Inch display type head units
+ NSString *displayName = self.systemCapabilityManager.displays.firstObject.displayName;
+ SDLPreloadChoicesOperation *preloadOp = [[SDLPreloadChoicesOperation alloc] initWithConnectionManager:self.connectionManager fileManager:self.fileManager displayName:displayName defaultMainWindowCapability:self.systemCapabilityManager.defaultMainWindowCapability isVROptional:self.isVROptional cellsToPreload:choicesToUpload];
__weak typeof(self) weakSelf = self;
__weak typeof(preloadOp) weakPreloadOp = preloadOp;
@@ -277,6 +281,7 @@ UInt16 const ChoiceCellIdMin = 1;
- (void)presentChoiceSet:(SDLChoiceSet *)choiceSet mode:(SDLInteractionMode)mode withKeyboardDelegate:(nullable id<SDLKeyboardDelegate>)delegate {
if (![self.currentState isEqualToString:SDLChoiceManagerStateReady]) { return; }
+
if (choiceSet == nil) {
SDLLogW(@"Attempted to present a nil choice set, ignoring.");
return;
@@ -299,10 +304,10 @@ UInt16 const ChoiceCellIdMin = 1;
SDLPresentChoiceSetOperation *presentOp = nil;
if (delegate == nil) {
// Non-searchable choice set
- presentOp = [[SDLPresentChoiceSetOperation alloc] initWithConnectionManager:self.connectionManager choiceSet:self.pendingPresentationSet mode:mode keyboardProperties:nil keyboardDelegate:nil];
+ presentOp = [[SDLPresentChoiceSetOperation alloc] initWithConnectionManager:self.connectionManager choiceSet:self.pendingPresentationSet mode:mode keyboardProperties:nil keyboardDelegate:nil cancelID:self.nextCancelId++];
} else {
// Searchable choice set
- presentOp = [[SDLPresentChoiceSetOperation alloc] initWithConnectionManager:self.connectionManager choiceSet:self.pendingPresentationSet mode:mode keyboardProperties:self.keyboardConfiguration keyboardDelegate:delegate];
+ presentOp = [[SDLPresentChoiceSetOperation alloc] initWithConnectionManager:self.connectionManager choiceSet:self.pendingPresentationSet mode:mode keyboardProperties:self.keyboardConfiguration keyboardDelegate:delegate cancelID:self.nextCancelId++];
}
self.pendingPresentOperation = presentOp;
@@ -323,8 +328,8 @@ UInt16 const ChoiceCellIdMin = 1;
[self.transactionQueue addOperation:presentOp];
}
-- (void)presentKeyboardWithInitialText:(NSString *)initialText delegate:(id<SDLKeyboardDelegate>)delegate {
- if (![self.currentState isEqualToString:SDLChoiceManagerStateReady]) { return; }
+- (nullable NSNumber<SDLInt> *)presentKeyboardWithInitialText:(NSString *)initialText delegate:(id<SDLKeyboardDelegate>)delegate {
+ if (![self.currentState isEqualToString:SDLChoiceManagerStateReady]) { return nil; }
if (self.pendingPresentationSet != nil) {
[self.pendingPresentOperation cancel];
@@ -332,8 +337,22 @@ UInt16 const ChoiceCellIdMin = 1;
}
// Present a keyboard with the choice set that we used to test VR's optional state
- self.pendingPresentOperation = [[SDLPresentKeyboardOperation alloc] initWithConnectionManager:self.connectionManager keyboardProperties:self.keyboardConfiguration initialText:initialText keyboardDelegate:delegate];
+ UInt16 keyboardCancelId = self.nextCancelId++;
+ self.pendingPresentOperation = [[SDLPresentKeyboardOperation alloc] initWithConnectionManager:self.connectionManager keyboardProperties:self.keyboardConfiguration initialText:initialText keyboardDelegate:delegate cancelID:keyboardCancelId];
[self.transactionQueue addOperation:self.pendingPresentOperation];
+ return @(keyboardCancelId);
+}
+
+- (void)dismissKeyboardWithCancelID:(NSNumber<SDLInt> *)cancelID {
+ for (SDLAsynchronousOperation *op in self.transactionQueue.operations) {
+ if (![op isKindOfClass:SDLPresentKeyboardOperation.class]) { continue; }
+
+ SDLPresentKeyboardOperation *keyboardOperation = (SDLPresentKeyboardOperation *)op;
+ if (keyboardOperation.cancelId != cancelID.unsignedShortValue) { continue; }
+
+ [keyboardOperation dismissKeyboard];
+ break;
+ }
}
#pragma mark - Choice Management Helpers
@@ -386,7 +405,7 @@ UInt16 const ChoiceCellIdMin = 1;
if (keyboardConfiguration == nil) {
_keyboardConfiguration = [self sdl_defaultKeyboardConfiguration];
} else {
- _keyboardConfiguration = [[SDLKeyboardProperties alloc] initWithLanguage:keyboardConfiguration.language layout:keyboardConfiguration.keyboardLayout keypressMode:SDLKeypressModeResendCurrentEntry limitedCharacterList:keyboardConfiguration.limitedCharacterList autoCompleteText:keyboardConfiguration.autoCompleteText];
+ _keyboardConfiguration = [[SDLKeyboardProperties alloc] initWithLanguage:keyboardConfiguration.language layout:keyboardConfiguration.keyboardLayout keypressMode:SDLKeypressModeResendCurrentEntry limitedCharacterList:keyboardConfiguration.limitedCharacterList autoCompleteText:keyboardConfiguration.autoCompleteText autoCompleteList:keyboardConfiguration.autoCompleteList];
if (keyboardConfiguration.keypressMode != SDLKeypressModeResendCurrentEntry) {
SDLLogW(@"Attempted to set a keyboard configuration with an invalid keypress mode; only .resentCurrentEntry is valid. This value will be ignored, the rest of the properties will be set.");
@@ -395,7 +414,7 @@ UInt16 const ChoiceCellIdMin = 1;
}
- (SDLKeyboardProperties *)sdl_defaultKeyboardConfiguration {
- return [[SDLKeyboardProperties alloc] initWithLanguage:SDLLanguageEnUs layout:SDLKeyboardLayoutQWERTY keypressMode:SDLKeypressModeResendCurrentEntry limitedCharacterList:nil autoCompleteText:nil];
+ return [[SDLKeyboardProperties alloc] initWithLanguage:SDLLanguageEnUs layout:SDLKeyboardLayoutQWERTY keypressMode:SDLKeypressModeResendCurrentEntry limitedCharacterList:nil autoCompleteText:nil autoCompleteList:nil];
}
#pragma mark - Getters
@@ -414,32 +433,6 @@ UInt16 const ChoiceCellIdMin = 1;
#pragma mark - RPC Responses / Notifications
-- (void)sdl_registerResponse:(SDLRPCResponseNotification *)notification {
- SDLRegisterAppInterfaceResponse *response = (SDLRegisterAppInterfaceResponse *)notification.response;
-
- if (!response.success.boolValue) { return; }
-#pragma clang diagnostic push
-#pragma clang diagnostic ignored "-Wdeprecated"
- if (response.displayCapabilities == nil) {
- SDLLogE(@"RegisterAppInterface succeeded but didn't send a display capabilities. A lot of things will probably break.");
- return;
- }
-
- self.displayCapabilities = response.displayCapabilities;
-#pragma clang diagnostic pop
-}
-
-- (void)sdl_displayLayoutResponse:(SDLRPCResponseNotification *)notification {
- SDLSetDisplayLayoutResponse *response = (SDLSetDisplayLayoutResponse *)notification.response;
- if (!response.success.boolValue) { return; }
- if (response.displayCapabilities == nil) {
- SDLLogE(@"SetDisplayLayout succeeded but didn't send a display capabilities. A lot of things will probably break.");
- return;
- }
-
- self.displayCapabilities = response.displayCapabilities;
-}
-
- (void)sdl_hmiStatusNotification:(SDLRPCNotificationNotification *)notification {
// We can only present a choice set if we're in FULL
SDLOnHMIStatus *hmiStatus = (SDLOnHMIStatus *)notification.notification;
diff --git a/SmartDeviceLink/SDLClimateControlCapabilities.h b/SmartDeviceLink/SDLClimateControlCapabilities.h
index a8d4035da..99ad8fece 100644
--- a/SmartDeviceLink/SDLClimateControlCapabilities.h
+++ b/SmartDeviceLink/SDLClimateControlCapabilities.h
@@ -5,6 +5,7 @@
#import "SDLRPCMessage.h"
#import "SDLDefrostZone.h"
#import "SDLVentilationMode.h"
+#import "SDLModuleInfo.h"
NS_ASSUME_NONNULL_BEGIN
@@ -17,7 +18,9 @@ NS_ASSUME_NONNULL_BEGIN
- (instancetype)initWithModuleName:(NSString *)moduleName fanSpeedAvailable:(BOOL)fanSpeedAvailable desiredTemperatureAvailable:(BOOL)desiredTemperatureAvailable acEnableAvailable:(BOOL)acEnableAvailable acMaxEnableAvailable:(BOOL)acMaxEnableAvailable circulateAirAvailable:(BOOL)circulateAirEnableAvailable autoModeEnableAvailable:(BOOL)autoModeEnableAvailable dualModeEnableAvailable:(BOOL)dualModeEnableAvailable defrostZoneAvailable:(BOOL)defrostZoneAvailable ventilationModeAvailable:(BOOL)ventilationModeAvailable heatedSteeringWheelAvailable:(BOOL)heatedSteeringWheelAvailable heatedWindshieldAvailable:(BOOL)heatedWindshieldAvailable heatedRearWindowAvailable:(BOOL)heatedRearWindowAvailable heatedMirrorsAvailable:(BOOL)heatedMirrorsAvailable __deprecated_msg("Use initWithModuleName:fanSpeedAvailable:desiredTemperatureAvailable:acEnableAvailable:acMaxEnableAvailable:circulateAirAvailable:autoModeEnableAvailable: dualModeEnableAvailable:defrostZoneAvailable:ventilationModeAvailable: heatedSteeringWheelAvailable:heatedWindshieldAvailable: heatedRearWindowAvailable:heatedMirrorsAvailable: climateEnableAvailable: instead");
-- (instancetype)initWithModuleName:(NSString *)moduleName fanSpeedAvailable:(BOOL)fanSpeedAvailable desiredTemperatureAvailable:(BOOL)desiredTemperatureAvailable acEnableAvailable:(BOOL)acEnableAvailable acMaxEnableAvailable:(BOOL)acMaxEnableAvailable circulateAirAvailable:(BOOL)circulateAirEnableAvailable autoModeEnableAvailable:(BOOL)autoModeEnableAvailable dualModeEnableAvailable:(BOOL)dualModeEnableAvailable defrostZoneAvailable:(BOOL)defrostZoneAvailable ventilationModeAvailable:(BOOL)ventilationModeAvailable heatedSteeringWheelAvailable:(BOOL)heatedSteeringWheelAvailable heatedWindshieldAvailable:(BOOL)heatedWindshieldAvailable heatedRearWindowAvailable:(BOOL)heatedRearWindowAvailable heatedMirrorsAvailable:(BOOL)heatedMirrorsAvailable climateEnableAvailable:(BOOL)climateEnableAvailable;
+- (instancetype)initWithModuleName:(NSString *)moduleName fanSpeedAvailable:(BOOL)fanSpeedAvailable desiredTemperatureAvailable:(BOOL)desiredTemperatureAvailable acEnableAvailable:(BOOL)acEnableAvailable acMaxEnableAvailable:(BOOL)acMaxEnableAvailable circulateAirAvailable:(BOOL)circulateAirEnableAvailable autoModeEnableAvailable:(BOOL)autoModeEnableAvailable dualModeEnableAvailable:(BOOL)dualModeEnableAvailable defrostZoneAvailable:(BOOL)defrostZoneAvailable ventilationModeAvailable:(BOOL)ventilationModeAvailable heatedSteeringWheelAvailable:(BOOL)heatedSteeringWheelAvailable heatedWindshieldAvailable:(BOOL)heatedWindshieldAvailable heatedRearWindowAvailable:(BOOL)heatedRearWindowAvailable heatedMirrorsAvailable:(BOOL)heatedMirrorsAvailable climateEnableAvailable:(BOOL)climateEnableAvailable __deprecated_msg("Use initWithModuleName: moduleId:fanSpeedAvailable:desiredTemperatureAvailable:acEnableAvailable:acMaxEnableAvailable:circulateAirAvailable:autoModeEnableAvailable: dualModeEnableAvailable:defrostZoneAvailable:ventilationModeAvailable: heatedSteeringWheelAvailable:heatedWindshieldAvailable: heatedRearWindowAvailable:heatedMirrorsAvailable: climateEnableAvailable: instead");
+
+- (instancetype)initWithModuleName:(NSString *)moduleName moduleInfo:(nullable SDLModuleInfo *)moduleInfo fanSpeedAvailable:(BOOL)fanSpeedAvailable desiredTemperatureAvailable:(BOOL)desiredTemperatureAvailable acEnableAvailable:(BOOL)acEnableAvailable acMaxEnableAvailable:(BOOL)acMaxEnableAvailable circulateAirAvailable:(BOOL)circulateAirEnableAvailable autoModeEnableAvailable:(BOOL)autoModeEnableAvailable dualModeEnableAvailable:(BOOL)dualModeEnableAvailable defrostZoneAvailable:(BOOL)defrostZoneAvailable ventilationModeAvailable:(BOOL)ventilationModeAvailable heatedSteeringWheelAvailable:(BOOL)heatedSteeringWheelAvailable heatedWindshieldAvailable:(BOOL)heatedWindshieldAvailable heatedRearWindowAvailable:(BOOL)heatedRearWindowAvailable heatedMirrorsAvailable:(BOOL)heatedMirrorsAvailable climateEnableAvailable:(BOOL)climateEnableAvailable;
/**
* The short friendly name of the climate control module.
@@ -156,6 +159,13 @@ NS_ASSUME_NONNULL_BEGIN
*/
@property (nullable, strong, nonatomic) NSNumber<SDLBool> *climateEnableAvailable;
+/**
+ * Information about a RC module, including its id.
+ *
+ * Optional
+ */
+@property (nullable, strong, nonatomic) SDLModuleInfo *moduleInfo;
+
@end
NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLClimateControlCapabilities.m b/SmartDeviceLink/SDLClimateControlCapabilities.m
index 199795974..5742cb82c 100644
--- a/SmartDeviceLink/SDLClimateControlCapabilities.m
+++ b/SmartDeviceLink/SDLClimateControlCapabilities.m
@@ -19,12 +19,17 @@ NS_ASSUME_NONNULL_BEGIN
}
- (instancetype)initWithModuleName:(NSString *)moduleName fanSpeedAvailable:(BOOL)fanSpeedAvailable desiredTemperatureAvailable:(BOOL)desiredTemperatureAvailable acEnableAvailable:(BOOL)acEnableAvailable acMaxEnableAvailable:(BOOL)acMaxEnableAvailable circulateAirAvailable:(BOOL)circulateAirEnableAvailable autoModeEnableAvailable:(BOOL)autoModeEnableAvailable dualModeEnableAvailable:(BOOL)dualModeEnableAvailable defrostZoneAvailable:(BOOL)defrostZoneAvailable ventilationModeAvailable:(BOOL)ventilationModeAvailable heatedSteeringWheelAvailable:(BOOL)steeringWheelAvailable heatedWindshieldAvailable:(BOOL)windshieldAvailable heatedRearWindowAvailable:(BOOL)rearWindowAvailable heatedMirrorsAvailable:(BOOL)mirrorsAvailable climateEnableAvailable:(BOOL)climateEnableAvailable{
+ return [self initWithModuleName:moduleName moduleInfo:nil fanSpeedAvailable:fanSpeedAvailable desiredTemperatureAvailable:desiredTemperatureAvailable acEnableAvailable:acEnableAvailable acMaxEnableAvailable:acMaxEnableAvailable circulateAirAvailable:circulateAirEnableAvailable autoModeEnableAvailable:autoModeEnableAvailable dualModeEnableAvailable:dualModeEnableAvailable defrostZoneAvailable:defrostZoneAvailable ventilationModeAvailable:ventilationModeAvailable heatedSteeringWheelAvailable:steeringWheelAvailable heatedWindshieldAvailable:windshieldAvailable heatedRearWindowAvailable:rearWindowAvailable heatedMirrorsAvailable:mirrorsAvailable climateEnableAvailable:NO];
+}
+
+- (instancetype)initWithModuleName:(NSString *)moduleName moduleInfo:(nullable SDLModuleInfo *)moduleInfo fanSpeedAvailable:(BOOL)fanSpeedAvailable desiredTemperatureAvailable:(BOOL)desiredTemperatureAvailable acEnableAvailable:(BOOL)acEnableAvailable acMaxEnableAvailable:(BOOL)acMaxEnableAvailable circulateAirAvailable:(BOOL)circulateAirEnableAvailable autoModeEnableAvailable:(BOOL)autoModeEnableAvailable dualModeEnableAvailable:(BOOL)dualModeEnableAvailable defrostZoneAvailable:(BOOL)defrostZoneAvailable ventilationModeAvailable:(BOOL)ventilationModeAvailable heatedSteeringWheelAvailable:(BOOL)steeringWheelAvailable heatedWindshieldAvailable:(BOOL)windshieldAvailable heatedRearWindowAvailable:(BOOL)rearWindowAvailable heatedMirrorsAvailable:(BOOL)mirrorsAvailable climateEnableAvailable:(BOOL)climateEnableAvailable{
self = [self init];
if (!self) {
return nil;
}
-
+
self.moduleName = moduleName;
+ self.moduleInfo = moduleInfo;
self.fanSpeedAvailable = @(fanSpeedAvailable);
self.desiredTemperatureAvailable = @(desiredTemperatureAvailable);
self.acEnableAvailable = @(acEnableAvailable);
@@ -179,6 +184,14 @@ NS_ASSUME_NONNULL_BEGIN
return [self.store sdl_objectForName:SDLRPCParameterNameClimateEnableAvailable ofClass:NSNumber.class error:nil];
}
+- (void)setModuleInfo:(nullable SDLModuleInfo *)moduleInfo {
+ [self.store sdl_setObject:moduleInfo forName:SDLRPCParameterNameModuleInfo];
+}
+
+- (nullable SDLModuleInfo *)moduleInfo {
+ return [self.store sdl_objectForName:SDLRPCParameterNameModuleInfo ofClass:SDLModuleInfo.class error:nil];
+}
+
@end
NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLDeleteChoicesOperation.m b/SmartDeviceLink/SDLDeleteChoicesOperation.m
index 7fd42a491..027c549dd 100644
--- a/SmartDeviceLink/SDLDeleteChoicesOperation.m
+++ b/SmartDeviceLink/SDLDeleteChoicesOperation.m
@@ -45,6 +45,7 @@ NS_ASSUME_NONNULL_BEGIN
- (void)start {
[super start];
+ if (self.isCancelled) { return; }
[self sdl_sendDeletions];
}
diff --git a/SmartDeviceLink/SDLDeleteFileOperation.m b/SmartDeviceLink/SDLDeleteFileOperation.m
index fa1de55f6..e7ce7e204 100644
--- a/SmartDeviceLink/SDLDeleteFileOperation.m
+++ b/SmartDeviceLink/SDLDeleteFileOperation.m
@@ -40,6 +40,7 @@ NS_ASSUME_NONNULL_BEGIN
- (void)start {
[super start];
+ if (self.isCancelled) { return; }
[self sdl_deleteFile];
}
diff --git a/SmartDeviceLink/SDLDiagnosticMessageResponse.h b/SmartDeviceLink/SDLDiagnosticMessageResponse.h
index f78dbe2dc..aca74a779 100644
--- a/SmartDeviceLink/SDLDiagnosticMessageResponse.h
+++ b/SmartDeviceLink/SDLDiagnosticMessageResponse.h
@@ -16,9 +16,9 @@ NS_ASSUME_NONNULL_BEGIN
/**
Array of bytes comprising CAN message result.
- Required
+ Optional
*/
-@property (strong, nonatomic) NSArray<NSNumber<SDLInt> *> *messageDataResult;
+@property (nullable, strong, nonatomic) NSArray<NSNumber<SDLInt> *> *messageDataResult;
@end
diff --git a/SmartDeviceLink/SDLDiagnosticMessageResponse.m b/SmartDeviceLink/SDLDiagnosticMessageResponse.m
index 8863f97ec..a7b5cc254 100644
--- a/SmartDeviceLink/SDLDiagnosticMessageResponse.m
+++ b/SmartDeviceLink/SDLDiagnosticMessageResponse.m
@@ -20,11 +20,11 @@ NS_ASSUME_NONNULL_BEGIN
}
#pragma clang diagnostic pop
-- (void)setMessageDataResult:(NSArray<NSNumber<SDLInt> *> *)messageDataResult {
+- (void)setMessageDataResult:(nullable NSArray<NSNumber<SDLInt> *> *)messageDataResult {
[self.parameters sdl_setObject:messageDataResult forName:SDLRPCParameterNameMessageDataResult];
}
-- (NSArray<NSNumber<SDLInt> *> *)messageDataResult {
+- (nullable NSArray<NSNumber<SDLInt> *> *)messageDataResult {
NSError *error = nil;
return [self.parameters sdl_objectsForName:SDLRPCParameterNameMessageDataResult ofClass:NSNumber.class error:&error];
}
diff --git a/SmartDeviceLink/SDLDisplayCapabilities+ShowManagerExtensions.h b/SmartDeviceLink/SDLDisplayCapabilities+ShowManagerExtensions.h
deleted file mode 100644
index 375fc0e2a..000000000
--- a/SmartDeviceLink/SDLDisplayCapabilities+ShowManagerExtensions.h
+++ /dev/null
@@ -1,20 +0,0 @@
-//
-// SDLDisplayCapabilities+ShowManagerExtensions.h
-// SmartDeviceLink
-//
-// Created by Joel Fischer on 2/28/18.
-// Copyright © 2018 smartdevicelink. All rights reserved.
-//
-
-#import "SDLDisplayCapabilities.h"
-#import "SDLImageFieldName.h"
-#import "SDLTextFieldName.h"
-
-@interface SDLDisplayCapabilities (ShowManagerExtensions)
-
-@property (assign, nonatomic, readonly) NSUInteger maxNumberOfMainFieldLines;
-
-- (BOOL)hasTextFieldOfName:(SDLTextFieldName)name;
-- (BOOL)hasImageFieldOfName:(SDLImageFieldName)name;
-
-@end
diff --git a/SmartDeviceLink/SDLFunctionID.m b/SmartDeviceLink/SDLFunctionID.m
index 5c5546ffa..69e545fa1 100644
--- a/SmartDeviceLink/SDLFunctionID.m
+++ b/SmartDeviceLink/SDLFunctionID.m
@@ -89,10 +89,13 @@ NS_ASSUME_NONNULL_BEGIN
@54: SDLRPCFunctionNameGetFile,
@55: SDLRPCFunctionNamePerformAppServiceInteraction,
@56: SDLRPCFunctionNameUnpublishAppService,
+ @57: SDLRPCFunctionNameCancelInteraction,
@58: SDLRPCFunctionNameCloseApplication,
@59: SDLRPCFunctionNameShowAppMenu,
@60: SDLRPCFunctionNameCreateWindow,
@61: SDLRPCFunctionNameDeleteWindow,
+ @62: SDLRPCFunctionNameGetInteriorVehicleDataConsent,
+ @63: SDLRPCFunctionNameReleaseInteriorVehicleDataModule,
@32768: SDLRPCFunctionNameOnHMIStatus,
@32769: SDLRPCFunctionNameOnAppInterfaceUnregistered,
@32770: SDLRPCFunctionNameOnButtonEvent,
diff --git a/SmartDeviceLink/SDLGetDTCsResponse.h b/SmartDeviceLink/SDLGetDTCsResponse.h
index 3a8a5a99f..fd05f4196 100644
--- a/SmartDeviceLink/SDLGetDTCsResponse.h
+++ b/SmartDeviceLink/SDLGetDTCsResponse.h
@@ -16,8 +16,10 @@ NS_ASSUME_NONNULL_BEGIN
/**
2 byte ECU Header for DTC response (as defined in VHR_Layout_Specification_DTCs.pdf)
+
+ Optional
*/
-@property (strong, nonatomic) NSNumber<SDLInt> *ecuHeader;
+@property (nullable, strong, nonatomic) NSNumber<SDLInt> *ecuHeader;
/**
Array of all reported DTCs on module (ecuHeader contains information if list is truncated). Each DTC is represented by 4 bytes (3 bytes of data and 1 byte status as defined in VHR_Layout_Specification_DTCs.pdf).
diff --git a/SmartDeviceLink/SDLGetDTCsResponse.m b/SmartDeviceLink/SDLGetDTCsResponse.m
index 087990a88..3d141c96a 100644
--- a/SmartDeviceLink/SDLGetDTCsResponse.m
+++ b/SmartDeviceLink/SDLGetDTCsResponse.m
@@ -21,11 +21,11 @@ NS_ASSUME_NONNULL_BEGIN
}
#pragma clang diagnostic pop
-- (void)setEcuHeader:(NSNumber<SDLInt> *)ecuHeader {
+- (void)setEcuHeader:(nullable NSNumber<SDLInt> *)ecuHeader {
[self.parameters sdl_setObject:ecuHeader forName:SDLRPCParameterNameECUHeader];
}
-- (NSNumber<SDLInt> *)ecuHeader {
+- (nullable NSNumber<SDLInt> *)ecuHeader {
NSError *error = nil;
return [self.parameters sdl_objectForName:SDLRPCParameterNameECUHeader ofClass:NSNumber.class error:&error];
}
diff --git a/SmartDeviceLink/SDLGetInteriorVehicleData.h b/SmartDeviceLink/SDLGetInteriorVehicleData.h
index 01d208f71..143a2468f 100644
--- a/SmartDeviceLink/SDLGetInteriorVehicleData.h
+++ b/SmartDeviceLink/SDLGetInteriorVehicleData.h
@@ -4,6 +4,7 @@
#import "SDLRPCRequest.h"
#import "SDLModuleType.h"
+#import "SDLModuleInfo.h"
/**
* Reads the current status value of specified remote control module (type).
@@ -17,11 +18,17 @@ NS_ASSUME_NONNULL_BEGIN
@interface SDLGetInteriorVehicleData : SDLRPCRequest
-- (instancetype)initWithModuleType:(SDLModuleType)moduleType;
+- (instancetype)initWithModuleType:(SDLModuleType)moduleType moduleId:(NSString *)moduleId;
-- (instancetype)initAndSubscribeToModuleType:(SDLModuleType)moduleType;
+- (instancetype)initAndSubscribeToModuleType:(SDLModuleType)moduleType moduleId:(NSString *)moduleId;
-- (instancetype)initAndUnsubscribeToModuleType:(SDLModuleType)moduleType;
+- (instancetype)initAndUnsubscribeToModuleType:(SDLModuleType)moduleType moduleId:(NSString *)moduleId;
+
+- (instancetype)initWithModuleType:(SDLModuleType)moduleType __deprecated_msg("Use initWithModuleType:moduleId: instead");
+
+- (instancetype)initAndSubscribeToModuleType:(SDLModuleType)moduleType __deprecated_msg("Use initAndSubscribeToModuleType:moduleId: instead");
+
+- (instancetype)initAndUnsubscribeToModuleType:(SDLModuleType)moduleType __deprecated_msg("Use initAndUnsubscribeToModuleType:moduleId:");
/**
* The type of a RC module to retrieve module data from the vehicle.
@@ -30,8 +37,16 @@ NS_ASSUME_NONNULL_BEGIN
@property (strong, nonatomic) SDLModuleType moduleType;
/**
- * If subscribe is true, the head unit will register onInteriorVehicleData notifications for the requested moduelType.
- * If subscribe is false, the head unit will unregister onInteriorVehicleData notifications for the requested moduelType.
+ * Id of a module, published by System Capability.
+ *
+ * Optional
+ */
+@property (nullable, strong, nonatomic) NSString *moduleId;
+
+/**
+ * If subscribe is true, the head unit will register OnInteriorVehicleData notifications for the requested module (moduleId and moduleType).
+ * If subscribe is false, the head unit will unregister OnInteriorVehicleData notifications for the requested module (moduleId and moduleType).
+ * If subscribe is not included, the subscription status of the app for the requested module (moduleId and moduleType) will remain unchanged.
*
* optional, Boolean, default Value = false
*/
diff --git a/SmartDeviceLink/SDLGetInteriorVehicleData.m b/SmartDeviceLink/SDLGetInteriorVehicleData.m
index 4f283fb49..57f0aa833 100755
--- a/SmartDeviceLink/SDLGetInteriorVehicleData.m
+++ b/SmartDeviceLink/SDLGetInteriorVehicleData.m
@@ -20,6 +20,44 @@ NS_ASSUME_NONNULL_BEGIN
}
#pragma clang diagnostic pop
+- (instancetype)initWithModuleType:(SDLModuleType)moduleType moduleId:(NSString *)moduleId {
+ self = [self init];
+ if (!self) {
+ return nil;
+ }
+
+ self.moduleType = moduleType;
+ self.moduleId = moduleId;
+
+ return self;
+}
+
+- (instancetype)initAndSubscribeToModuleType:(SDLModuleType)moduleType moduleId:(NSString *)moduleId {
+ self = [self init];
+ if (!self) {
+ return nil;
+ }
+
+ self.moduleType = moduleType;
+ self.moduleId = moduleId;
+ self.subscribe = @(YES);
+
+ return self;
+}
+
+- (instancetype)initAndUnsubscribeToModuleType:(SDLModuleType)moduleType moduleId:(NSString *)moduleId {
+ self = [self init];
+ if (!self) {
+ return nil;
+ }
+
+ self.moduleType = moduleType;
+ self.moduleId = moduleId;
+ self.subscribe = @(NO);
+
+ return self;
+}
+
- (instancetype)initWithModuleType:(SDLModuleType)moduleType; {
self = [self init];
if (!self) {
@@ -72,6 +110,15 @@ NS_ASSUME_NONNULL_BEGIN
return [self.parameters sdl_objectForName:SDLRPCParameterNameSubscribe ofClass:NSNumber.class error:nil];
}
+- (void)setModuleId:(nullable NSString *)moduleId {
+ [self.parameters sdl_setObject:moduleId forName:SDLRPCParameterNameModuleId];
+}
+
+- (nullable NSString *)moduleId {
+ NSError *error = nil;
+ return [self.parameters sdl_objectForName:SDLRPCParameterNameModuleId ofClass:NSString.class error:&error];
+}
+
@end
NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLGetInteriorVehicleDataConsent.h b/SmartDeviceLink/SDLGetInteriorVehicleDataConsent.h
new file mode 100644
index 000000000..ff647fcde
--- /dev/null
+++ b/SmartDeviceLink/SDLGetInteriorVehicleDataConsent.h
@@ -0,0 +1,34 @@
+//
+// SDLGetInteriorVehicleDataConsent.h
+// SmartDeviceLink
+//
+// Created by standa1 on 7/25/19.
+// Copyright © 2019 smartdevicelink. All rights reserved.
+//
+
+#import "SDLRPCRequest.h"
+#import "SDLModuleType.h"
+
+NS_ASSUME_NONNULL_BEGIN
+
+@interface SDLGetInteriorVehicleDataConsent : SDLRPCRequest
+
+- (instancetype)initWithModuleType:(SDLModuleType)moduleType moduleIds:(NSArray<NSString *> *)moduleIds;
+
+/**
+ * The module type that the app requests to control.
+ *
+ * Required
+ */
+@property (strong, nonatomic) SDLModuleType moduleType;
+
+/**
+ * Ids of a module of same type, published by System Capability.
+ *
+ * Required
+ */
+@property (strong, nonatomic) NSArray<NSString *> *moduleIds;
+
+@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLGetInteriorVehicleDataConsent.m b/SmartDeviceLink/SDLGetInteriorVehicleDataConsent.m
new file mode 100644
index 000000000..88ed0d8e9
--- /dev/null
+++ b/SmartDeviceLink/SDLGetInteriorVehicleDataConsent.m
@@ -0,0 +1,55 @@
+//
+// SDLGetInteriorVehicleDataConsent.m
+// SmartDeviceLink
+//
+// Created by standa1 on 7/25/19.
+// Copyright © 2019 smartdevicelink. All rights reserved.
+//
+
+#import "SDLGetInteriorVehicleDataConsent.h"
+#import "SDLRPCParameterNames.h"
+#import "SDLRPCFunctionNames.h"
+#import "NSMutableDictionary+Store.h"
+
+@implementation SDLGetInteriorVehicleDataConsent
+
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
+- (instancetype)init {
+ if (self = [super initWithName:SDLRPCFunctionNameGetInteriorVehicleDataConsent]) {
+ }
+ return self;
+}
+#pragma clang diagnostic pop
+
+- (instancetype)initWithModuleType:(SDLModuleType)moduleType moduleIds:(NSArray<NSString *> *)moduleIds {
+ self = [self init];
+ if (!self) {
+ return nil;
+ }
+
+ self.moduleType = moduleType;
+ self.moduleIds = moduleIds;
+
+ return self;
+}
+
+- (void)setModuleType:(SDLModuleType)moduleType {
+ [self.parameters sdl_setObject:moduleType forName:SDLRPCParameterNameModuleType];
+}
+
+- (SDLModuleType)moduleType {
+ NSError *error = nil;
+ return [self.parameters sdl_enumForName:SDLRPCParameterNameModuleType error:&error];
+}
+
+- (void)setModuleIds:(NSArray<NSString *> *)moduleIds {
+ [self.parameters sdl_setObject:moduleIds forName:SDLRPCParameterNameModuleIds];
+}
+
+- (NSArray<NSString *> *)moduleIds {
+ NSError *error = nil;
+ return [self.parameters sdl_objectsForName:SDLRPCParameterNameModuleIds ofClass:NSString.class error:&error];
+}
+
+@end
diff --git a/SmartDeviceLink/SDLGetInteriorVehicleDataConsentResponse.h b/SmartDeviceLink/SDLGetInteriorVehicleDataConsentResponse.h
new file mode 100644
index 000000000..7aee83e57
--- /dev/null
+++ b/SmartDeviceLink/SDLGetInteriorVehicleDataConsentResponse.h
@@ -0,0 +1,26 @@
+//
+// SDLGetInteriorVehicleDataConsentResponse.h
+// SmartDeviceLink
+//
+// Created by standa1 on 7/25/19.
+// Copyright © 2019 smartdevicelink. All rights reserved.
+//
+
+#import "SDLRPCResponse.h"
+
+NS_ASSUME_NONNULL_BEGIN
+
+@interface SDLGetInteriorVehicleDataConsentResponse : SDLRPCResponse
+
+/**
+ This array has the same size as "moduleIds" in the request; each element corresponding to one moduleId
+ "true" - if SDL grants the permission for the requested module
+ "false" - SDL denies the permission for the requested module.
+
+ Optional
+ */
+@property (strong, nonatomic, nullable) NSArray<NSNumber<SDLBool> *> *allowed;
+
+@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLGetInteriorVehicleDataConsentResponse.m b/SmartDeviceLink/SDLGetInteriorVehicleDataConsentResponse.m
new file mode 100644
index 000000000..872eded62
--- /dev/null
+++ b/SmartDeviceLink/SDLGetInteriorVehicleDataConsentResponse.m
@@ -0,0 +1,34 @@
+//
+// SDLGetInteriorVehicleDataConsentResponse.m
+// SmartDeviceLink
+//
+// Created by standa1 on 7/25/19.
+// Copyright © 2019 smartdevicelink. All rights reserved.
+//
+
+#import "SDLGetInteriorVehicleDataConsentResponse.h"
+#import "NSMutableDictionary+Store.h"
+#import "SDLRPCFunctionNames.h"
+#import "SDLRPCParameterNames.h"
+
+@implementation SDLGetInteriorVehicleDataConsentResponse
+
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
+- (instancetype)init {
+ if (self = [super initWithName:SDLRPCFunctionNameGetInteriorVehicleDataConsent]) {
+ }
+ return self;
+}
+#pragma clang diagnostic pop
+
+- (void)setAllowed:(nullable NSArray<NSNumber<SDLBool> *> *)allowed {
+ [self.parameters sdl_setObject:allowed forName:SDLRPCParameterNameAllowed];
+}
+
+- (nullable NSArray<NSNumber<SDLBool> *> *)allowed {
+ NSError *error = nil;
+ return [self.parameters sdl_objectsForName:SDLRPCParameterNameAllowed ofClass:NSNumber.class error:&error];
+}
+
+@end
diff --git a/SmartDeviceLink/SDLGetInteriorVehicleDataResponse.h b/SmartDeviceLink/SDLGetInteriorVehicleDataResponse.h
index 372531877..5ab234ed0 100644
--- a/SmartDeviceLink/SDLGetInteriorVehicleDataResponse.h
+++ b/SmartDeviceLink/SDLGetInteriorVehicleDataResponse.h
@@ -14,8 +14,10 @@ NS_ASSUME_NONNULL_BEGIN
/**
The requested data
+
+ Optional
*/
-@property (strong, nonatomic) SDLModuleData *moduleData;
+@property (nullable, strong, nonatomic) SDLModuleData *moduleData;
/**
It is a conditional-mandatory parameter: must be returned in case "subscribe" parameter was present in the related request.
diff --git a/SmartDeviceLink/SDLGetInteriorVehicleDataResponse.m b/SmartDeviceLink/SDLGetInteriorVehicleDataResponse.m
index d57c35ad8..c729e66ee 100644
--- a/SmartDeviceLink/SDLGetInteriorVehicleDataResponse.m
+++ b/SmartDeviceLink/SDLGetInteriorVehicleDataResponse.m
@@ -22,11 +22,11 @@ NS_ASSUME_NONNULL_BEGIN
}
#pragma clang diagnostic pop
-- (void)setModuleData:(SDLModuleData *)moduleData {
+- (void)setModuleData:(nullable SDLModuleData *)moduleData {
[self.parameters sdl_setObject:moduleData forName:SDLRPCParameterNameModuleData];
}
-- (SDLModuleData *)moduleData {
+- (nullable SDLModuleData *)moduleData {
NSError *error = nil;
return [self.parameters sdl_objectForName:SDLRPCParameterNameModuleData ofClass:SDLModuleData.class error:&error];
}
diff --git a/SmartDeviceLink/SDLGetSystemCapabilityResponse.h b/SmartDeviceLink/SDLGetSystemCapabilityResponse.h
index 2c4372651..215a4c409 100644
--- a/SmartDeviceLink/SDLGetSystemCapabilityResponse.h
+++ b/SmartDeviceLink/SDLGetSystemCapabilityResponse.h
@@ -22,8 +22,10 @@ NS_ASSUME_NONNULL_BEGIN
/**
The requested system capability, of the type that was sent in the request
+
+ Optional
*/
-@property (strong, nonatomic) SDLSystemCapability *systemCapability;
+@property (nullable, strong, nonatomic) SDLSystemCapability *systemCapability;
@end
diff --git a/SmartDeviceLink/SDLGetSystemCapabilityResponse.m b/SmartDeviceLink/SDLGetSystemCapabilityResponse.m
index c3abcc757..730f74c71 100644
--- a/SmartDeviceLink/SDLGetSystemCapabilityResponse.m
+++ b/SmartDeviceLink/SDLGetSystemCapabilityResponse.m
@@ -30,11 +30,11 @@ NS_ASSUME_NONNULL_BEGIN
}
#pragma clang diagnostic pop
-- (void)setSystemCapability:(SDLSystemCapability *)systemCapability {
+- (void)setSystemCapability:(nullable SDLSystemCapability *)systemCapability {
[self.parameters sdl_setObject:systemCapability forName:SDLRPCParameterNameSystemCapability];
}
-- (SDLSystemCapability *)systemCapability {
+- (nullable SDLSystemCapability *)systemCapability {
NSError *error = nil;
return [self.parameters sdl_objectForName:SDLRPCParameterNameSystemCapability ofClass:SDLSystemCapability.class error:&error];
}
diff --git a/SmartDeviceLink/SDLGlobalProperty.h b/SmartDeviceLink/SDLGlobalProperty.h
index e719cd45c..9175288cb 100644
--- a/SmartDeviceLink/SDLGlobalProperty.h
+++ b/SmartDeviceLink/SDLGlobalProperty.h
@@ -45,3 +45,8 @@ extern SDLGlobalProperty const SDLGlobalPropertyMenuIcon;
* Property related to the keyboard
*/
extern SDLGlobalProperty const SDLGlobalPropertyKeyboard;
+
+/**
+ * Location of the user's seat of setGlobalProperties
+ */
+extern SDLGlobalProperty const SDLGlobalPropertyUserLocation;
diff --git a/SmartDeviceLink/SDLGlobalProperty.m b/SmartDeviceLink/SDLGlobalProperty.m
index 00537847b..410af9179 100644
--- a/SmartDeviceLink/SDLGlobalProperty.m
+++ b/SmartDeviceLink/SDLGlobalProperty.m
@@ -11,3 +11,4 @@ SDLGlobalProperty const SDLGlobalPropertyVoiceRecognitionHelpItems = @"VRHELPITE
SDLGlobalProperty const SDLGlobalPropertyMenuName = @"MENUNAME";
SDLGlobalProperty const SDLGlobalPropertyMenuIcon = @"MENUICON";
SDLGlobalProperty const SDLGlobalPropertyKeyboard = @"KEYBOARDPROPERTIES";
+SDLGlobalProperty const SDLGlobalPropertyUserLocation = @"USER_LOCATION";
diff --git a/SmartDeviceLink/SDLGrid.h b/SmartDeviceLink/SDLGrid.h
new file mode 100644
index 000000000..64ad01e2f
--- /dev/null
+++ b/SmartDeviceLink/SDLGrid.h
@@ -0,0 +1,56 @@
+//
+// SDLGrid.h
+// SmartDeviceLink
+//
+// Created by standa1 on 7/10/19.
+// Copyright © 2019 smartdevicelink. All rights reserved.
+//
+
+#import "SDLRPCMessage.h"
+
+NS_ASSUME_NONNULL_BEGIN
+
+/**
+ * Describes a location (origin coordinates and span) of a vehicle component.
+ */
+@interface SDLGrid : SDLRPCStruct
+
+/**
+ *
+ * Required, Integer, -1 - 100
+ */
+@property (strong, nonatomic) NSNumber<SDLInt> *col;
+
+/**
+ *
+ * Required, Integer, -1 - 100
+ */
+@property (strong, nonatomic) NSNumber<SDLInt> *row;
+
+/**
+ *
+ * Optional, Integer, -1 - 100
+ */
+@property (strong, nonatomic, nullable) NSNumber<SDLInt> *level;
+
+/**
+ *
+ * Optional, Integer, 1 - 100
+ */
+@property (strong, nonatomic, nullable) NSNumber<SDLInt> *colspan;
+
+/**
+ *
+ * Optional, Integer, 1 - 100
+ */
+@property (strong, nonatomic, nullable) NSNumber<SDLInt> *rowspan;
+
+/**
+ *
+ * Optional, Integer, 1 - 100
+ */
+@property (strong, nonatomic, nullable) NSNumber<SDLInt> *levelspan;
+
+@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLGrid.m b/SmartDeviceLink/SDLGrid.m
new file mode 100644
index 000000000..f0e5d333d
--- /dev/null
+++ b/SmartDeviceLink/SDLGrid.m
@@ -0,0 +1,70 @@
+//
+// SDLGrid.m
+// SmartDeviceLink
+//
+// Created by standa1 on 7/10/19.
+// Copyright © 2019 smartdevicelink. All rights reserved.
+//
+
+#import "SDLGrid.h"
+
+#import "NSMutableDictionary+Store.h"
+#import "SDLRPCParameterNames.h"
+
+@implementation SDLGrid
+
+- (void)setCol:(NSNumber<SDLInt> *)col {
+ [self.store sdl_setObject:col forName:SDLRPCParameterNameCol];
+}
+
+- (NSNumber<SDLInt> *)col {
+ NSError *error = nil;
+ return [self.store sdl_objectForName:SDLRPCParameterNameCol ofClass:NSNumber.class error:&error];
+}
+
+- (void)setRow:(NSNumber<SDLInt> *)row {
+ [self.store sdl_setObject:row forName:SDLRPCParameterNameRow];
+}
+
+- (NSNumber<SDLInt> *)row {
+ NSError *error = nil;
+ return [self.store sdl_objectForName:SDLRPCParameterNameRow ofClass:NSNumber.class error:&error];
+}
+
+- (void)setLevel:(nullable NSNumber<SDLInt> *)level {
+ [self.store sdl_setObject:level forName:SDLRPCParameterNameLevel];
+}
+
+- (nullable NSNumber<SDLInt> *)level {
+ NSError *error = nil;
+ return [self.store sdl_objectForName:SDLRPCParameterNameLevel ofClass:NSNumber.class error:&error];
+}
+
+- (void)setColspan:(nullable NSNumber<SDLInt> *)colspan {
+ [self.store sdl_setObject:colspan forName:SDLRPCParameterNameColSpan];
+}
+
+- (nullable NSNumber<SDLInt> *)colspan {
+ NSError *error = nil;
+ return [self.store sdl_objectForName:SDLRPCParameterNameColSpan ofClass:NSNumber.class error:&error];
+}
+
+- (void)setRowspan:(nullable NSNumber<SDLInt> *)rowspan {
+ [self.store sdl_setObject:rowspan forName:SDLRPCParameterNameRowSpan];
+}
+
+- (nullable NSNumber<SDLInt> *)rowspan {
+ NSError *error = nil;
+ return [self.store sdl_objectForName:SDLRPCParameterNameRowSpan ofClass:NSNumber.class error:&error];
+}
+
+- (void)setLevelspan:(nullable NSNumber<SDLInt> *)levelspan {
+ [self.store sdl_setObject:levelspan forName:SDLRPCParameterNameLevelSpan];
+}
+
+- (nullable NSNumber<SDLInt> *)levelspan {
+ NSError *error = nil;
+ return [self.store sdl_objectForName:SDLRPCParameterNameLevelSpan ofClass:NSNumber.class error:&error];
+}
+
+@end
diff --git a/SmartDeviceLink/SDLHMICapabilities.h b/SmartDeviceLink/SDLHMICapabilities.h
index 43ee2b810..84a2eecf7 100644
--- a/SmartDeviceLink/SDLHMICapabilities.h
+++ b/SmartDeviceLink/SDLHMICapabilities.h
@@ -6,12 +6,19 @@
NS_ASSUME_NONNULL_BEGIN
+/**
+ Contains information about the HMI capabilities.
+
+ Since SDL 3.0
+**/
@interface SDLHMICapabilities : SDLRPCStruct
/**
Availability of built in Nav. True: Available, False: Not Available
Boolean value. Optional.
+
+ Since SDL 3.0
*/
@property (nullable, copy, nonatomic) NSNumber<SDLBool> *navigation;
@@ -19,6 +26,8 @@ NS_ASSUME_NONNULL_BEGIN
Availability of built in phone. True: Available, False: Not Available
Boolean value. Optional.
+
+ Since SDL 3.0
*/
@property (nullable, copy, nonatomic) NSNumber<SDLBool> *phoneCall;
@@ -26,9 +35,49 @@ NS_ASSUME_NONNULL_BEGIN
Availability of built in video streaming. True: Available, False: Not Available
Boolean value. Optional.
+
+ Since SDL 4.5
*/
@property (nullable, copy, nonatomic) NSNumber<SDLBool> *videoStreaming;
+/**
+ Availability of built in remote control. True: Available, False: Not Available
+
+ Boolean value. Optional.
+
+ Since SDL 4.5
+**/
+@property (nullable, copy, nonatomic) NSNumber<SDLBool> *remoteControl;
+
+/**
+ Availability of app services. True: Available, False: Not Available
+
+ App services is supported since SDL 5.1. If your connection is 5.1+, you can assume that app services is available even though between v5.1 and v6.0 this parameter is `nil`.
+
+ Boolean value. Optional.
+
+ Since SDL 6.0
+**/
+@property (nullable, copy, nonatomic) NSNumber<SDLBool> *appServices;
+
+/**
+ Availability of displays. True: Available, False: Not Available
+
+ Boolean value. Optional.
+
+ Since SDL 6.0
+**/
+@property (nullable, copy, nonatomic) NSNumber<SDLBool> *displays;
+
+/**
+ Availability of seatLocation. True: Available, False: Not Available
+
+ Boolean value. Optional.
+
+ Since SDL 6.0
+ **/
+@property (nullable, copy, nonatomic) NSNumber<SDLBool> *seatLocation;
+
@end
NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLHMICapabilities.m b/SmartDeviceLink/SDLHMICapabilities.m
index 353d90a27..fd0104e5e 100644
--- a/SmartDeviceLink/SDLHMICapabilities.m
+++ b/SmartDeviceLink/SDLHMICapabilities.m
@@ -35,6 +35,38 @@ NS_ASSUME_NONNULL_BEGIN
return [self.store sdl_objectForName:SDLRPCParameterNameVideoStreaming ofClass:NSNumber.class error:nil];
}
+- (void)setRemoteControl:(nullable NSNumber<SDLBool> *)remoteControl {
+ [self.store sdl_setObject:remoteControl forName:SDLRPCParameterNameRemoteControl];
+}
+
+- (nullable NSNumber<SDLBool> *)remoteControl {
+ return [self.store sdl_objectForName:SDLRPCParameterNameRemoteControl ofClass:NSNumber.class error:nil];
+}
+
+- (void)setAppServices:(nullable NSNumber<SDLBool> *)appServices {
+ [self.store sdl_setObject:appServices forName:SDLRPCParameterNameAppServices];
+}
+
+- (nullable NSNumber<SDLBool> *)appServices {
+ return [self.store sdl_objectForName:SDLRPCParameterNameAppServices ofClass:NSNumber.class error:nil];
+}
+
+- (void)setDisplays:(nullable NSNumber<SDLBool> *)displays {
+ [self.store sdl_setObject:displays forName:SDLRPCParameterNameDisplays];
+}
+
+- (nullable NSNumber<SDLBool> *)displays {
+ return [self.store sdl_objectForName:SDLRPCParameterNameDisplays ofClass:NSNumber.class error:nil];
+}
+
+- (void)setSeatLocation:(nullable NSNumber<SDLBool> *)seatLocation {
+ [self.store sdl_setObject:seatLocation forName:SDLRPCParameterNameSeatLocation];
+}
+
+- (nullable NSNumber<SDLBool> *)seatLocation {
+ return [self.store sdl_objectForName:SDLRPCParameterNameSeatLocation ofClass:NSNumber.class error:nil];
+}
+
@end
NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLHMISettingsControlCapabilities.h b/SmartDeviceLink/SDLHMISettingsControlCapabilities.h
index da7d04310..4f0f0cf45 100644
--- a/SmartDeviceLink/SDLHMISettingsControlCapabilities.h
+++ b/SmartDeviceLink/SDLHMISettingsControlCapabilities.h
@@ -2,6 +2,7 @@
//
#import "SDLRPCMessage.h"
+#import "SDLModuleInfo.h"
NS_ASSUME_NONNULL_BEGIN
@@ -14,7 +15,17 @@ NS_ASSUME_NONNULL_BEGIN
@return An instance of the SDLHMISettingsControlCapabilities class
*/
-- (instancetype)initWithModuleName:(NSString *)moduleName;
+- (instancetype)initWithModuleName:(NSString *)moduleName __deprecated_msg("Use initWithModuleName:moduleInfo:");
+
+/**
+ Constructs a newly allocated SDLHMISettingsControlCapabilities object with moduleName
+
+ @param moduleName The short friendly name of the hmi setting module
+ @param moduleInfo Information about a RC module, including its id.
+
+ @return An instance of the SDLHMISettingsControlCapabilities class
+ */
+- (instancetype)initWithModuleName:(NSString *)moduleName moduleInfo:(nullable SDLModuleInfo *)moduleInfo;
/**
Constructs a newly allocated SDLHMISettingsControlCapabilities object with given parameters
@@ -26,7 +37,20 @@ NS_ASSUME_NONNULL_BEGIN
@return An instance of the SDLHMISettingsControlCapabilities class
*/
-- (instancetype)initWithModuleName:(NSString *)moduleName distanceUnitAvailable:(BOOL)distanceUnitAvailable temperatureUnitAvailable:(BOOL)temperatureUnitAvailable displayModeUnitAvailable:(BOOL)displayModeUnitAvailable;
+- (instancetype)initWithModuleName:(NSString *)moduleName distanceUnitAvailable:(BOOL)distanceUnitAvailable temperatureUnitAvailable:(BOOL)temperatureUnitAvailable displayModeUnitAvailable:(BOOL)displayModeUnitAvailable __deprecated_msg("Use initWithModuleName:moduleInfo:distanceUnitAvailable:distanceUnitAvailable:temperatureUnitAvailable:displayModeUnitAvailable:");
+
+/**
+ Constructs a newly allocated SDLHMISettingsControlCapabilities object with given parameters
+
+ @param moduleName The short friendly name of the hmi setting module.
+ @param moduleInfo Information about a RC module, including its id.
+ @param distanceUnitAvailable Availability of the control of distance unit.
+ @param temperatureUnitAvailable Availability of the control of temperature unit.
+ @param displayModeUnitAvailable Availability of the control of displayMode unit.
+
+ @return An instance of the SDLHMISettingsControlCapabilities class
+ */
+- (instancetype)initWithModuleName:(NSString *)moduleName moduleInfo:(nullable SDLModuleInfo *)moduleInfo distanceUnitAvailable:(BOOL)distanceUnitAvailable temperatureUnitAvailable:(BOOL)temperatureUnitAvailable displayModeUnitAvailable:(BOOL)displayModeUnitAvailable;
/**
* @abstract The short friendly name of the hmi setting module.
@@ -57,6 +81,13 @@ NS_ASSUME_NONNULL_BEGIN
*/
@property (nullable, strong, nonatomic) NSNumber<SDLBool> *displayModeUnitAvailable;
+/**
+ * Information about a RC module, including its id.
+ *
+ * Optional
+ */
+@property (nullable, strong, nonatomic) SDLModuleInfo *moduleInfo;
+
@end
NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLHMISettingsControlCapabilities.m b/SmartDeviceLink/SDLHMISettingsControlCapabilities.m
index 82eff7c81..d7dab5f6f 100644
--- a/SmartDeviceLink/SDLHMISettingsControlCapabilities.m
+++ b/SmartDeviceLink/SDLHMISettingsControlCapabilities.m
@@ -19,6 +19,17 @@ NS_ASSUME_NONNULL_BEGIN
return self;
}
+- (instancetype)initWithModuleName:(NSString *)moduleName moduleInfo:(nullable SDLModuleInfo *)moduleInfo {
+ self = [self init];
+ if(!self) {
+ return nil;
+ }
+ self.moduleName = moduleName;
+ self.moduleInfo = moduleInfo;
+
+ return self;
+}
+
- (instancetype)initWithModuleName:(NSString *)moduleName distanceUnitAvailable:(BOOL)distanceUnitAvailable temperatureUnitAvailable:(BOOL)temperatureUnitAvailable displayModeUnitAvailable:(BOOL)displayModeUnitAvailable {
self = [self init];
if(!self) {
@@ -32,6 +43,20 @@ NS_ASSUME_NONNULL_BEGIN
return self;
}
+- (instancetype)initWithModuleName:(NSString *)moduleName moduleInfo:(nullable SDLModuleInfo *)moduleInfo distanceUnitAvailable:(BOOL)distanceUnitAvailable temperatureUnitAvailable:(BOOL)temperatureUnitAvailable displayModeUnitAvailable:(BOOL)displayModeUnitAvailable {
+ self = [self init];
+ if(!self) {
+ return nil;
+ }
+ self.moduleName = moduleName;
+ self.moduleInfo = moduleInfo;
+ self.distanceUnitAvailable = @(distanceUnitAvailable);
+ self.temperatureUnitAvailable = @(temperatureUnitAvailable);
+ self.displayModeUnitAvailable = @(displayModeUnitAvailable);
+
+ return self;
+}
+
- (void)setModuleName:(NSString *)moduleName {
[self.store sdl_setObject:moduleName forName:SDLRPCParameterNameModuleName];
}
@@ -66,6 +91,14 @@ NS_ASSUME_NONNULL_BEGIN
return [self.store sdl_objectForName:SDLRPCParameterNameDisplayModeUnitAvailable ofClass:NSNumber.class error:nil];
}
+- (void)setModuleInfo:(nullable SDLModuleInfo *)moduleInfo {
+ [self.store sdl_setObject:moduleInfo forName:SDLRPCParameterNameModuleInfo];
+}
+
+- (nullable SDLModuleInfo *)moduleInfo {
+ return [self.store sdl_objectForName:SDLRPCParameterNameModuleInfo ofClass:SDLModuleInfo.class error:nil];
+}
+
@end
NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLLifecycleManager.m b/SmartDeviceLink/SDLLifecycleManager.m
index 857c043b8..bdeee35f1 100644
--- a/SmartDeviceLink/SDLLifecycleManager.m
+++ b/SmartDeviceLink/SDLLifecycleManager.m
@@ -14,11 +14,9 @@
#import "SDLAsynchronousRPCRequestOperation.h"
#import "SDLBackgroundTaskManager.h"
#import "SDLChangeRegistration.h"
-#import "SDLChoiceSetManager.h"
#import "SDLConfiguration.h"
#import "SDLConnectionManagerType.h"
#import "SDLLogMacros.h"
-#import "SDLDisplayCapabilities.h"
#import "SDLError.h"
#import "SDLFile.h"
#import "SDLFileManager.h"
@@ -58,6 +56,7 @@
#import "SDLSystemCapabilityManager.h"
#import "SDLUnregisterAppInterface.h"
#import "SDLVersion.h"
+#import "SDLWindowCapability.h"
NS_ASSUME_NONNULL_BEGIN
@@ -140,8 +139,8 @@ NSString *const BackgroundTaskTransportName = @"com.sdl.transport.backgroundTask
_fileManager = [[SDLFileManager alloc] initWithConnectionManager:self configuration:_configuration.fileManagerConfig];
_permissionManager = [[SDLPermissionManager alloc] init];
_lockScreenManager = [[SDLLockScreenManager alloc] initWithConfiguration:_configuration.lockScreenConfig notificationDispatcher:_notificationDispatcher presenter:[[SDLLockScreenPresenter alloc] init]];
- _screenManager = [[SDLScreenManager alloc] initWithConnectionManager:self fileManager:_fileManager];
_systemCapabilityManager = [[SDLSystemCapabilityManager alloc] initWithConnectionManager:self];
+ _screenManager = [[SDLScreenManager alloc] initWithConnectionManager:self fileManager:_fileManager systemCapabilityManager:_systemCapabilityManager];
if ([configuration.lifecycleConfig.appType isEqualToEnum:SDLAppHMITypeNavigation] ||
[configuration.lifecycleConfig.appType isEqualToEnum:SDLAppHMITypeProjection] ||
@@ -523,7 +522,7 @@ NSString *const BackgroundTaskTransportName = @"com.sdl.transport.backgroundTask
// If no app icon was set, just move on to ready
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated"
- if (appIcon == nil || !self.registerResponse.displayCapabilities.graphicSupported.boolValue) {
+ if (appIcon == nil || ![self.systemCapabilityManager.defaultMainWindowCapability.imageTypeSupported containsObject:SDLImageTypeDynamic]) {
completion();
return;
}
diff --git a/SmartDeviceLink/SDLLightControlCapabilities.h b/SmartDeviceLink/SDLLightControlCapabilities.h
index 26e675cea..d50e14db9 100644
--- a/SmartDeviceLink/SDLLightControlCapabilities.h
+++ b/SmartDeviceLink/SDLLightControlCapabilities.h
@@ -2,6 +2,7 @@
//
#import "SDLRPCMessage.h"
+#import "SDLModuleInfo.h"
@class SDLLightCapabilities;
@@ -17,7 +18,18 @@ NS_ASSUME_NONNULL_BEGIN
@param supportedLights array of available LightCapabilities
@return An instance of the SDLLightControlCapabilities class
*/
-- (instancetype)initWithModuleName:(NSString *)moduleName supportedLights:(NSArray<SDLLightCapabilities *> *)supportedLights;
+- (instancetype)initWithModuleName:(NSString *)moduleName supportedLights:(NSArray<SDLLightCapabilities *> *)supportedLights __deprecated_msg("Use initWithModuleName:moduleInfo:supportedLights:");
+
+/**
+ Constructs a newly allocated SDLLightControlCapabilities object with given parameters
+
+
+ @param moduleName friendly name of the light control module
+ @param moduleInfo information about a RC module, including its id
+ @param supportedLights array of available LightCapabilities
+ @return An instance of the SDLLightControlCapabilities class
+ */
+- (instancetype)initWithModuleName:(NSString *)moduleName moduleInfo:(nullable SDLModuleInfo *)moduleInfo supportedLights:(NSArray<SDLLightCapabilities *> *)supportedLights;
/**
* @abstract The short friendly name of the light control module.
@@ -34,6 +46,12 @@ NS_ASSUME_NONNULL_BEGIN
*/
@property (strong, nonatomic) NSArray<SDLLightCapabilities *> *supportedLights;
+/**
+ * Information about a RC module, including its id.
+ *
+ * Optional
+ */
+@property (nullable, strong, nonatomic) SDLModuleInfo *moduleInfo;
@end
diff --git a/SmartDeviceLink/SDLLightControlCapabilities.m b/SmartDeviceLink/SDLLightControlCapabilities.m
index 88c38e437..4a899c2dd 100644
--- a/SmartDeviceLink/SDLLightControlCapabilities.m
+++ b/SmartDeviceLink/SDLLightControlCapabilities.m
@@ -22,6 +22,18 @@ NS_ASSUME_NONNULL_BEGIN
return self;
}
+- (instancetype)initWithModuleName:(NSString *)moduleName moduleInfo:(nullable SDLModuleInfo *)moduleInfo supportedLights:(NSArray<SDLLightCapabilities *> *)supportedLights {
+ self = [self init];
+ if(!self) {
+ return nil;
+ }
+ self.moduleName = moduleName;
+ self.moduleInfo = moduleInfo;
+ self.supportedLights = supportedLights;
+
+ return self;
+}
+
- (void)setModuleName:(NSString *)moduleName {
[self.store sdl_setObject:moduleName forName:SDLRPCParameterNameModuleName];
}
@@ -41,6 +53,13 @@ NS_ASSUME_NONNULL_BEGIN
return [self.store sdl_objectsForName:SDLRPCParameterNameSupportedLights ofClass:SDLLightCapabilities.class error:&error];
}
+- (void)setModuleInfo:(nullable SDLModuleInfo *)moduleInfo {
+ [self.store sdl_setObject:moduleInfo forName:SDLRPCParameterNameModuleInfo];
+}
+
+- (nullable SDLModuleInfo *)moduleInfo {
+ return [self.store sdl_objectForName:SDLRPCParameterNameModuleInfo ofClass:SDLModuleInfo.class error:nil];
+}
@end
diff --git a/SmartDeviceLink/SDLListFilesOperation.m b/SmartDeviceLink/SDLListFilesOperation.m
index 5e6ace166..cdfaca5f3 100644
--- a/SmartDeviceLink/SDLListFilesOperation.m
+++ b/SmartDeviceLink/SDLListFilesOperation.m
@@ -41,6 +41,7 @@ NS_ASSUME_NONNULL_BEGIN
- (void)start {
[super start];
+ if (self.isCancelled) { return; }
[self sdl_listFiles];
}
diff --git a/SmartDeviceLink/SDLLockScreenConfiguration.m b/SmartDeviceLink/SDLLockScreenConfiguration.m
index 47e4980de..c5cdfa8e6 100644
--- a/SmartDeviceLink/SDLLockScreenConfiguration.m
+++ b/SmartDeviceLink/SDLLockScreenConfiguration.m
@@ -23,7 +23,7 @@ NS_ASSUME_NONNULL_BEGIN
_displayMode = mode;
_enableAutomaticLockScreen = (mode == SDLLockScreenConfigurationDisplayModeNever) ? NO : YES;
- _showInOptionalState = (mode == SDLLockScreenConfigurationDisplayModeOptionalOrRequired) ? NO : YES;
+ _showInOptionalState = (mode == SDLLockScreenConfigurationDisplayModeOptionalOrRequired) ? YES : NO;
_enableDismissGesture = enableDismissGesture;
_backgroundColor = backgroundColor;
@@ -35,7 +35,7 @@ NS_ASSUME_NONNULL_BEGIN
}
+ (instancetype)disabledConfiguration {
- return [[self alloc] initWithDisplayMode:SDLLockScreenConfigurationDisplayModeNever enableDismissGesture:NO showDeviceLogo:YES backgroundColor:[self sdl_defaultBackgroundColor] appIcon:nil viewController:nil];
+ return [[self alloc] initWithDisplayMode:SDLLockScreenConfigurationDisplayModeNever enableDismissGesture:NO showDeviceLogo:NO backgroundColor:[self sdl_defaultBackgroundColor] appIcon:nil viewController:nil];
}
+ (instancetype)enabledConfiguration {
diff --git a/SmartDeviceLink/SDLLogFileModuleMap.m b/SmartDeviceLink/SDLLogFileModuleMap.m
index e9e2a56ba..53efda21e 100644
--- a/SmartDeviceLink/SDLLogFileModuleMap.m
+++ b/SmartDeviceLink/SDLLogFileModuleMap.m
@@ -60,7 +60,7 @@
}
+ (SDLLogFileModule *)sdl_lifecycleManagerModule {
- return [SDLLogFileModule moduleWithName:@"Lifecycle" files:[NSSet setWithArray:@[@"SDLLifecycleManager", @"SDLManager", @"SDLAsynchronousOperation"]]];
+ return [SDLLogFileModule moduleWithName:@"Lifecycle" files:[NSSet setWithArray:@[@"SDLLifecycleManager", @"SDLManager", @"SDLAsynchronousOperation", @"SDLBackgroundTaskManager"]]];
}
+ (SDLLogFileModule *)sdl_systemCapabilityModule {
diff --git a/SmartDeviceLink/SDLMenuManager.h b/SmartDeviceLink/SDLMenuManager.h
index a2d076197..54701313b 100644
--- a/SmartDeviceLink/SDLMenuManager.h
+++ b/SmartDeviceLink/SDLMenuManager.h
@@ -12,6 +12,7 @@
@class SDLFileManager;
@class SDLMenuCell;
@class SDLMenuConfiguration;
+@class SDLSystemCapabilityManager;
@class SDLVoiceCommand;
@protocol SDLConnectionManagerType;
@@ -27,7 +28,7 @@ typedef void(^SDLMenuUpdateCompletionHandler)(NSError *__nullable error);
@interface SDLMenuManager : NSObject
-- (instancetype)initWithConnectionManager:(id<SDLConnectionManagerType>)connectionManager fileManager:(SDLFileManager *)fileManager;
+- (instancetype)initWithConnectionManager:(id<SDLConnectionManagerType>)connectionManager fileManager:(SDLFileManager *)fileManager systemCapabilityManager:(SDLSystemCapabilityManager *)systemCapabilityManager;
/**
* Stops the manager. This method is used internally.
diff --git a/SmartDeviceLink/SDLMenuManager.m b/SmartDeviceLink/SDLMenuManager.m
index 8f4d3e6fe..9d368ea2b 100644
--- a/SmartDeviceLink/SDLMenuManager.m
+++ b/SmartDeviceLink/SDLMenuManager.m
@@ -14,8 +14,8 @@
#import "SDLConnectionManagerType.h"
#import "SDLDeleteCommand.h"
#import "SDLDeleteSubMenu.h"
-#import "SDLDisplayCapabilities.h"
-#import "SDLDisplayCapabilities+ShowManagerExtensions.h"
+#import "SDLDisplayCapability.h"
+#import "SDLDisplayType.h"
#import "SDLError.h"
#import "SDLFileManager.h"
#import "SDLGlobals.h"
@@ -36,6 +36,9 @@
#import "SDLSetGlobalProperties.h"
#import "SDLScreenManager.h"
#import "SDLShowAppMenu.h"
+#import "SDLSystemCapabilityManager.h"
+#import "SDLWindowCapability.h"
+#import "SDLWindowCapability+ShowManagerExtensions.h"
#import "SDLVersion.h"
#import "SDLVoiceCommand.h"
@@ -52,10 +55,10 @@ NS_ASSUME_NONNULL_BEGIN
@property (weak, nonatomic) id<SDLConnectionManagerType> connectionManager;
@property (weak, nonatomic) SDLFileManager *fileManager;
+@property (weak, nonatomic) SDLSystemCapabilityManager *systemCapabilityManager;
@property (copy, nonatomic, nullable) SDLHMILevel currentHMILevel;
@property (copy, nonatomic, nullable) SDLSystemContext currentSystemContext;
-@property (strong, nonatomic, nullable) SDLDisplayCapabilities *displayCapabilities;
@property (strong, nonatomic, nullable) NSArray<SDLRPCRequest *> *inProgressUpdate;
@property (assign, nonatomic) BOOL hasQueuedUpdate;
@@ -82,20 +85,19 @@ UInt32 const MenuCellIdMin = 1;
_oldMenuCells = @[];
_dynamicMenuUpdatesMode = SDLDynamicMenuUpdatesModeOnWithCompatibility;
- [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(sdl_registerResponse:) name:SDLDidReceiveRegisterAppInterfaceResponse object:nil];
- [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(sdl_displayLayoutResponse:) name:SDLDidReceiveSetDisplayLayoutResponse object:nil];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(sdl_hmiStatusNotification:) name:SDLDidChangeHMIStatusNotification object:nil];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(sdl_commandNotification:) name:SDLDidReceiveCommandNotification object:nil];
return self;
}
-- (instancetype)initWithConnectionManager:(id<SDLConnectionManagerType>)connectionManager fileManager:(SDLFileManager *)fileManager {
+- (instancetype)initWithConnectionManager:(id<SDLConnectionManagerType>)connectionManager fileManager:(SDLFileManager *)fileManager systemCapabilityManager:(nonnull SDLSystemCapabilityManager *)systemCapabilityManager {
self = [self init];
if (!self) { return nil; }
_connectionManager = connectionManager;
_fileManager = fileManager;
+ _systemCapabilityManager = systemCapabilityManager;
return self;
}
@@ -107,7 +109,6 @@ UInt32 const MenuCellIdMin = 1;
_currentHMILevel = nil;
_currentSystemContext = SDLSystemContextMain;
- _displayCapabilities = nil;
_inProgressUpdate = nil;
_hasQueuedUpdate = NO;
_waitingOnHMIUpdate = NO;
@@ -412,7 +413,7 @@ UInt32 const MenuCellIdMin = 1;
NSArray<SDLRPCRequest *> *mainMenuCommands = nil;
NSArray<SDLRPCRequest *> *subMenuCommands = nil;
- if ([self sdl_findAllArtworksToBeUploadedFromCells:self.menuCells].count > 0 || ![self.displayCapabilities hasImageFieldOfName:SDLImageFieldNameCommandIcon]) {
+ if ([self sdl_findAllArtworksToBeUploadedFromCells:self.menuCells].count > 0 || ![self.systemCapabilityManager.defaultMainWindowCapability hasImageFieldOfName:SDLImageFieldNameCommandIcon]) {
// Send artwork-less menu
mainMenuCommands = [self sdl_mainMenuCommandsForCells:updatedMenu withArtwork:NO usingIndexesFrom:menu];
subMenuCommands = [self sdl_subMenuCommandsForCells:updatedMenu withArtwork:NO];
@@ -465,7 +466,7 @@ UInt32 const MenuCellIdMin = 1;
case SDLDynamicMenuUpdatesModeOnWithCompatibility:
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
- return ![self.displayCapabilities.displayType isEqualToEnum:SDLDisplayTypeGen38Inch];
+ return ![self.systemCapabilityManager.displays.firstObject.displayName isEqualToString:SDLDisplayTypeGen38Inch];
#pragma clang diagnostic pop
}
@@ -474,7 +475,7 @@ UInt32 const MenuCellIdMin = 1;
#pragma mark Artworks
- (NSArray<SDLArtwork *> *)sdl_findAllArtworksToBeUploadedFromCells:(NSArray<SDLMenuCell *> *)cells {
- if (![self.displayCapabilities hasImageFieldOfName:SDLImageFieldNameCommandIcon]) {
+ if (![self.systemCapabilityManager.defaultMainWindowCapability hasImageFieldOfName:SDLImageFieldNameCommandIcon]) {
return @[];
}
@@ -634,32 +635,6 @@ UInt32 const MenuCellIdMin = 1;
[self sdl_callHandlerForCells:self.menuCells command:onCommand];
}
-- (void)sdl_registerResponse:(SDLRPCResponseNotification *)notification {
- SDLRegisterAppInterfaceResponse *response = (SDLRegisterAppInterfaceResponse *)notification.response;
-
- if (!response.success.boolValue) { return; }
-#pragma clang diagnostic push
-#pragma clang diagnostic ignored "-Wdeprecated"
- if (response.displayCapabilities == nil) {
- SDLLogE(@"RegisterAppInterface succeeded but didn't send a display capabilities. A lot of things will probably break.");
- return;
- }
-
- self.displayCapabilities = response.displayCapabilities;
-#pragma clang diagnostic pop
-}
-
-- (void)sdl_displayLayoutResponse:(SDLRPCResponseNotification *)notification {
- SDLSetDisplayLayoutResponse *response = (SDLSetDisplayLayoutResponse *)notification.response;
- if (!response.success.boolValue) { return; }
- if (response.displayCapabilities == nil) {
- SDLLogE(@"SetDisplayLayout succeeded but didn't send a display capabilities. A lot of things will probably break.");
- return;
- }
-
- self.displayCapabilities = response.displayCapabilities;
-}
-
- (void)sdl_hmiStatusNotification:(SDLRPCNotificationNotification *)notification {
SDLOnHMIStatus *hmiStatus = (SDLOnHMIStatus *)notification.notification;
diff --git a/SmartDeviceLink/SDLModuleData.h b/SmartDeviceLink/SDLModuleData.h
index cd652804c..3ed7bfd15 100644
--- a/SmartDeviceLink/SDLModuleData.h
+++ b/SmartDeviceLink/SDLModuleData.h
@@ -78,6 +78,13 @@ NS_ASSUME_NONNULL_BEGIN
@property (strong, nonatomic) SDLModuleType moduleType;
/**
+ Id of a module, published by System Capability.
+
+ Optional
+ */
+@property (nullable, strong, nonatomic) NSString *moduleId;
+
+/**
The radio control data
Optional
diff --git a/SmartDeviceLink/SDLModuleData.m b/SmartDeviceLink/SDLModuleData.m
index 09ae37864..9595deb4c 100644
--- a/SmartDeviceLink/SDLModuleData.m
+++ b/SmartDeviceLink/SDLModuleData.m
@@ -97,6 +97,15 @@ NS_ASSUME_NONNULL_BEGIN
return [self.store sdl_enumForName:SDLRPCParameterNameModuleType error:&error];
}
+- (void)setModuleId:(nullable NSString *)moduleId {
+ [self.store sdl_setObject:moduleId forName:SDLRPCParameterNameModuleId];
+}
+
+- (nullable NSString *)moduleId {
+ NSError *error = nil;
+ return [self.store sdl_enumForName:SDLRPCParameterNameModuleId error:&error];
+}
+
- (void)setRadioControlData:(nullable SDLRadioControlData *)radioControlData {
[self.store sdl_setObject:radioControlData forName:SDLRPCParameterNameRadioControlData];
}
diff --git a/SmartDeviceLink/SDLModuleInfo.h b/SmartDeviceLink/SDLModuleInfo.h
new file mode 100644
index 000000000..f8dabce60
--- /dev/null
+++ b/SmartDeviceLink/SDLModuleInfo.h
@@ -0,0 +1,50 @@
+//
+// SDLModuleInfo.h
+// SmartDeviceLink
+//
+// Created by standa1 on 7/8/19.
+// Copyright © 2019 smartdevicelink. All rights reserved.
+//
+
+#import "SDLRPCMessage.h"
+#import "SDLGrid.h"
+
+NS_ASSUME_NONNULL_BEGIN
+
+/**
+ * Contains information about a RC module.
+ */
+@interface SDLModuleInfo : SDLRPCStruct
+
+/**
+ * UUID of a module. "moduleId + moduleType" uniquely identify a module.
+ *
+ * Max string length 100 chars
+
+ Required
+ */
+@property (nullable, strong, nonatomic) NSString *moduleId;
+
+/**
+ * Location of a module.
+ * Optional
+ */
+@property (nullable, strong, nonatomic) SDLGrid *location;
+
+/**
+ * Service area of a module.
+ * Optional
+ */
+@property (nullable, strong, nonatomic) SDLGrid *serviceArea;
+
+/**
+ * Allow multiple users/apps to access the module or not
+ *
+ * Optional, Boolean
+ */
+@property (nullable, strong, nonatomic) NSNumber<SDLBool> *allowMultipleAccess;
+
+
+@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLModuleInfo.m b/SmartDeviceLink/SDLModuleInfo.m
new file mode 100644
index 000000000..46a95e697
--- /dev/null
+++ b/SmartDeviceLink/SDLModuleInfo.m
@@ -0,0 +1,52 @@
+//
+// SDLModuleInfo.m
+// SmartDeviceLink
+//
+// Created by standa1 on 7/8/19.
+// Copyright © 2019 smartdevicelink. All rights reserved.
+//
+
+#import "SDLModuleInfo.h"
+
+#import "NSMutableDictionary+Store.h"
+#import "SDLRPCParameterNames.h"
+
+@implementation SDLModuleInfo
+
+- (void)setModuleId:(NSString *)moduleId {
+ [self.store sdl_setObject:moduleId forName:SDLRPCParameterNameModuleId];
+}
+
+- (NSString *)moduleId {
+ NSError *error = nil;
+ return [self.store sdl_objectForName:SDLRPCParameterNameModuleId ofClass:NSString.class error:&error];
+}
+
+- (void)setLocation:(nullable SDLGrid *)location {
+ [self.store sdl_setObject:location forName:SDLRPCParameterNameLocation];
+}
+
+- (nullable SDLGrid *)location {
+ NSError *error = nil;
+ return [self.store sdl_objectForName:SDLRPCParameterNameLocation ofClass:SDLGrid.class error:&error];
+}
+
+- (void)setServiceArea:(nullable SDLGrid *)serviceArea {
+ [self.store sdl_setObject:serviceArea forName:SDLRPCParameterNameServiceArea];
+}
+
+- (nullable SDLGrid *)serviceArea {
+ NSError *error = nil;
+ return [self.store sdl_objectForName:SDLRPCParameterNameServiceArea ofClass:SDLGrid.class error:&error];
+}
+
+- (void)setAllowMultipleAccess:(nullable NSNumber<SDLBool> *)allowMultipleAccess {
+ [self.store sdl_setObject:allowMultipleAccess forName:SDLRPCParameterNameAllowMultipleAccess];
+}
+
+- (nullable NSNumber<SDLBool> *)allowMultipleAccess {
+ NSError *error = nil;
+ return [self.store sdl_objectForName:SDLRPCParameterNameAllowMultipleAccess ofClass:NSNumber.class error:&error];
+}
+
+@end
diff --git a/SmartDeviceLink/SDLNotificationConstants.h b/SmartDeviceLink/SDLNotificationConstants.h
index d1efd8b8f..ef19ec270 100644
--- a/SmartDeviceLink/SDLNotificationConstants.h
+++ b/SmartDeviceLink/SDLNotificationConstants.h
@@ -121,6 +121,7 @@ extern SDLNotificationName const SDLDidReceiveAddSubMenuResponse;
extern SDLNotificationName const SDLDidReceiveAlertResponse;
extern SDLNotificationName const SDLDidReceiveAlertManeuverResponse;
extern SDLNotificationName const SDLDidReceiveButtonPressResponse;
+extern SDLNotificationName const SDLDidReceiveCancelInteractionResponse;
extern SDLNotificationName const SDLDidReceiveChangeRegistrationResponse;
extern SDLNotificationName const SDLDidReceiveCloseApplicationResponse;
extern SDLNotificationName const SDLDidReceiveCreateInteractionChoiceSetResponse;
@@ -140,6 +141,7 @@ extern SDLNotificationName const SDLDidReceiveGetAppServiceDataResponse;
extern SDLNotificationName const SDLDidReceiveGetDTCsResponse;
extern SDLNotificationName const SDLDidReceiveGetFileResponse;
extern SDLNotificationName const SDLDidReceiveGetInteriorVehicleDataResponse;
+extern SDLNotificationName const SDLDidReceiveGetInteriorVehicleDataConsentResponse;
extern SDLNotificationName const SDLDidReceiveGetSystemCapabilitiesResponse;
extern SDLNotificationName const SDLDidReceiveGetVehicleDataResponse;
extern SDLNotificationName const SDLDidReceiveGetWaypointsResponse;
@@ -151,6 +153,7 @@ extern SDLNotificationName const SDLDidReceivePublishAppServiceResponse;
extern SDLNotificationName const SDLDidReceivePutFileResponse;
extern SDLNotificationName const SDLDidReceiveReadDIDResponse;
extern SDLNotificationName const SDLDidReceiveRegisterAppInterfaceResponse;
+extern SDLNotificationName const SDLDidReceiveReleaseInteriorVehicleDataModuleResponse;
extern SDLNotificationName const SDLDidReceiveResetGlobalPropertiesResponse;
extern SDLNotificationName const SDLDidReceiveScrollableMessageResponse;
extern SDLNotificationName const SDLDidReceiveSendHapticDataResponse;
@@ -186,6 +189,7 @@ extern SDLNotificationName const SDLDidReceiveAddSubMenuRequest;
extern SDLNotificationName const SDLDidReceiveAlertRequest;
extern SDLNotificationName const SDLDidReceiveAlertManeuverRequest;
extern SDLNotificationName const SDLDidReceiveButtonPressRequest;
+extern SDLNotificationName const SDLDidReceiveCancelInteractionRequest;
extern SDLNotificationName const SDLDidReceiveChangeRegistrationRequest;
extern SDLNotificationName const SDLDidReceiveCloseApplicationRequest;
extern SDLNotificationName const SDLDidReceiveCreateInteractionChoiceSetRequest;
@@ -204,6 +208,7 @@ extern SDLNotificationName const SDLDidReceiveGetCloudAppPropertiesRequest;
extern SDLNotificationName const SDLDidReceiveGetDTCsRequest;
extern SDLNotificationName const SDLDidReceiveGetFileRequest;
extern SDLNotificationName const SDLDidReceiveGetInteriorVehicleDataRequest;
+extern SDLNotificationName const SDLDidReceiveGetInteriorVehicleDataConsentRequest;
extern SDLNotificationName const SDLDidReceiveGetSystemCapabilityRequest;
extern SDLNotificationName const SDLDidReceiveGetVehicleDataRequest;
extern SDLNotificationName const SDLDidReceiveGetWayPointsRequest;
@@ -215,6 +220,7 @@ extern SDLNotificationName const SDLDidReceivePublishAppServiceRequest;
extern SDLNotificationName const SDLDidReceivePutFileRequest;
extern SDLNotificationName const SDLDidReceiveReadDIDRequest;
extern SDLNotificationName const SDLDidReceiveRegisterAppInterfaceRequest;
+extern SDLNotificationName const SDLDidReceiveReleaseInteriorVehicleDataModuleRequest;
extern SDLNotificationName const SDLDidReceiveResetGlobalPropertiesRequest;
extern SDLNotificationName const SDLDidReceiveScrollableMessageRequest;
extern SDLNotificationName const SDLDidReceiveSendHapticDataRequest;
diff --git a/SmartDeviceLink/SDLNotificationConstants.m b/SmartDeviceLink/SDLNotificationConstants.m
index 7882d7d6f..73d935c57 100644
--- a/SmartDeviceLink/SDLNotificationConstants.m
+++ b/SmartDeviceLink/SDLNotificationConstants.m
@@ -29,6 +29,7 @@ SDLNotificationName const SDLDidReceiveAddSubMenuResponse = @"com.sdl.response.a
SDLNotificationName const SDLDidReceiveAlertResponse = @"com.sdl.response.alert";
SDLNotificationName const SDLDidReceiveAlertManeuverResponse = @"com.sdl.response.alertManeuver";
SDLNotificationName const SDLDidReceiveButtonPressResponse = @"com.sdl.response.buttonPress";
+SDLNotificationName const SDLDidReceiveCancelInteractionResponse = @"com.sdl.response.cancelInteraction";
SDLNotificationName const SDLDidReceiveChangeRegistrationResponse = @"com.sdl.response.changeRegistration";
SDLNotificationName const SDLDidReceiveCloseApplicationResponse = @"com.sdl.response.closeApplication";
SDLNotificationName const SDLDidReceiveCreateInteractionChoiceSetResponse = @"com.sdl.response.createInteractionChoiceSet";
@@ -48,6 +49,7 @@ SDLNotificationName const SDLDidReceiveGetAppServiceDataResponse = @"com.sdl.res
SDLNotificationName const SDLDidReceiveGetDTCsResponse = @"com.sdl.response.getDTCs";
SDLNotificationName const SDLDidReceiveGetFileResponse = @"com.sdl.response.getFile";
SDLNotificationName const SDLDidReceiveGetInteriorVehicleDataResponse = @"com.sdl.response.getInteriorVehicleData";
+SDLNotificationName const SDLDidReceiveGetInteriorVehicleDataConsentResponse = @"com.sdl.response.getInteriorVehicleDataConsent";
SDLNotificationName const SDLDidReceiveGetSystemCapabilitiesResponse = @"com.sdl.response.getSystemCapabilities";
SDLNotificationName const SDLDidReceiveGetVehicleDataResponse = @"com.sdl.response.getVehicleData";
SDLNotificationName const SDLDidReceiveGetWaypointsResponse = @"com.sdl.response.getWaypoints";
@@ -59,6 +61,7 @@ SDLNotificationName const SDLDidReceivePublishAppServiceResponse = @"com.sdl.res
SDLNotificationName const SDLDidReceivePutFileResponse = @"com.sdl.response.putFile";
SDLNotificationName const SDLDidReceiveReadDIDResponse = @"com.sdl.response.readDID";
SDLNotificationName const SDLDidReceiveRegisterAppInterfaceResponse = @"com.sdl.response.registerAppInterface";
+SDLNotificationName const SDLDidReceiveReleaseInteriorVehicleDataModuleResponse = @"com.sdl.response.releaseInteriorVehicleDataModule";
SDLNotificationName const SDLDidReceiveResetGlobalPropertiesResponse = @"com.sdl.response.resetGlobalProperties";
SDLNotificationName const SDLDidReceiveScrollableMessageResponse = @"com.sdl.response.scrollableMessage";
SDLNotificationName const SDLDidReceiveSendHapticDataResponse = @"com.sdl.response.sendHapticData";
@@ -91,6 +94,7 @@ SDLNotificationName const SDLDidReceiveAddSubMenuRequest = @"com.sdl.request.add
SDLNotificationName const SDLDidReceiveAlertRequest = @"com.sdl.request.alert";
SDLNotificationName const SDLDidReceiveAlertManeuverRequest = @"com.sdl.request.alertManeuver";
SDLNotificationName const SDLDidReceiveButtonPressRequest = @"com.sdl.request.buttonPress";
+SDLNotificationName const SDLDidReceiveCancelInteractionRequest = @"com.sdl.request.cancelInteraction";
SDLNotificationName const SDLDidReceiveChangeRegistrationRequest = @"com.sdl.request.changeRegistration";
SDLNotificationName const SDLDidReceiveCloseApplicationRequest = @"com.sdl.request.closeApplication";
SDLNotificationName const SDLDidReceiveCreateWindowRequest = @"com.sdl.request.createWindow";
@@ -109,6 +113,7 @@ SDLNotificationName const SDLDidReceiveGetCloudAppPropertiesRequest = @"com.sdl.
SDLNotificationName const SDLDidReceiveGetDTCsRequest = @"com.sdl.request.getDTCs";
SDLNotificationName const SDLDidReceiveGetFileRequest = @"com.sdl.request.getFile";
SDLNotificationName const SDLDidReceiveGetInteriorVehicleDataRequest = @"com.sdl.request.getInteriorVehicleData";
+SDLNotificationName const SDLDidReceiveGetInteriorVehicleDataConsentRequest = @"com.sdl.request.getInteriorVehicleDataConsent";
SDLNotificationName const SDLDidReceiveGetSystemCapabilityRequest = @"com.sdl.request.getSystemCapability";
SDLNotificationName const SDLDidReceiveGetVehicleDataRequest = @"com.sdl.request.getVehicleData";
SDLNotificationName const SDLDidReceiveGetWayPointsRequest = @"com.sdl.request.getWayPoints";
@@ -120,6 +125,7 @@ SDLNotificationName const SDLDidReceivePublishAppServiceRequest = @"com.sdl.requ
SDLNotificationName const SDLDidReceivePutFileRequest = @"com.sdl.request.putFile";
SDLNotificationName const SDLDidReceiveReadDIDRequest = @"com.sdl.request.readDID";
SDLNotificationName const SDLDidReceiveRegisterAppInterfaceRequest = @"com.sdl.request.registerAppInterface";
+SDLNotificationName const SDLDidReceiveReleaseInteriorVehicleDataModuleRequest = @"com.sdl.request.releaseInteriorVehicleDataModule";
SDLNotificationName const SDLDidReceiveResetGlobalPropertiesRequest = @"com.sdl.request.resetGlobalProperties";
SDLNotificationName const SDLDidReceiveScrollableMessageRequest = @"com.sdl.request.scrollableMessage";
SDLNotificationName const SDLDidReceiveSendHapticDataRequest = @"com.sdl.request.sendHapticData";
@@ -180,6 +186,7 @@ SDLNotificationName const SDLDidReceiveWaypointNotification = @"com.sdl.notifica
SDLDidReceiveAlertResponse,
SDLDidReceiveAlertManeuverResponse,
SDLDidReceiveButtonPressResponse,
+ SDLDidReceiveCancelInteractionResponse,
SDLDidReceiveChangeRegistrationResponse,
SDLDidReceiveCloseApplicationResponse,
SDLDidReceiveCreateInteractionChoiceSetResponse,
@@ -199,6 +206,7 @@ SDLNotificationName const SDLDidReceiveWaypointNotification = @"com.sdl.notifica
SDLDidReceiveGetDTCsResponse,
SDLDidReceiveGetFileResponse,
SDLDidReceiveGetInteriorVehicleDataResponse,
+ SDLDidReceiveGetInteriorVehicleDataConsentResponse,
SDLDidReceiveGetSystemCapabilitiesResponse,
SDLDidReceiveGetVehicleDataResponse,
SDLDidReceiveGetWaypointsResponse,
@@ -210,6 +218,7 @@ SDLNotificationName const SDLDidReceiveWaypointNotification = @"com.sdl.notifica
SDLDidReceivePutFileResponse,
SDLDidReceiveReadDIDResponse,
SDLDidReceiveRegisterAppInterfaceResponse,
+ SDLDidReceiveReleaseInteriorVehicleDataModuleResponse,
SDLDidReceiveResetGlobalPropertiesResponse,
SDLDidReceiveScrollableMessageResponse,
SDLDidReceiveSendHapticDataResponse,
diff --git a/SmartDeviceLink/SDLNotificationDispatcher.m b/SmartDeviceLink/SDLNotificationDispatcher.m
index 5398eb7e1..d1fb0e63d 100644
--- a/SmartDeviceLink/SDLNotificationDispatcher.m
+++ b/SmartDeviceLink/SDLNotificationDispatcher.m
@@ -115,6 +115,10 @@ NS_ASSUME_NONNULL_BEGIN
[self postRPCResponseNotification:SDLDidReceiveButtonPressResponse response:response];
}
+- (void)onCancelInteractionResponse:(SDLCancelInteractionResponse *)response {
+ [self postRPCResponseNotification:SDLDidReceiveCancelInteractionResponse response:response];
+}
+
- (void)onChangeRegistrationResponse:(SDLChangeRegistrationResponse *)response {
[self postRPCResponseNotification:SDLDidReceiveChangeRegistrationResponse response:response];
}
@@ -191,6 +195,10 @@ NS_ASSUME_NONNULL_BEGIN
[self postRPCResponseNotification:SDLDidReceiveGetInteriorVehicleDataResponse response:response];
}
+- (void)onGetInteriorVehicleDataConsentResponse:(SDLGetInteriorVehicleDataConsentResponse *)response {
+ [self postRPCResponseNotification:SDLDidReceiveGetInteriorVehicleDataConsentResponse response:response];
+}
+
- (void)onGetSystemCapabilityResponse:(SDLGetSystemCapabilityResponse *)response {
[self postRPCResponseNotification:SDLDidReceiveGetSystemCapabilitiesResponse response:response];
}
@@ -235,6 +243,10 @@ NS_ASSUME_NONNULL_BEGIN
[self postRPCResponseNotification:SDLDidReceiveRegisterAppInterfaceResponse response:response];
}
+- (void)onReleaseInteriorVehicleDataModuleResponse:(SDLReleaseInteriorVehicleDataModuleResponse *)response {
+ [self postRPCResponseNotification:SDLDidReceiveReleaseInteriorVehicleDataModuleResponse response:response];
+}
+
- (void)onResetGlobalPropertiesResponse:(SDLResetGlobalPropertiesResponse *)response {
[self postRPCResponseNotification:SDLDidReceiveResetGlobalPropertiesResponse response:response];
}
@@ -357,6 +369,10 @@ NS_ASSUME_NONNULL_BEGIN
[self postRPCRequestNotification:SDLDidReceiveButtonPressRequest request:request];
}
+- (void)onCancelInteraction:(SDLCancelInteraction *)request {
+ [self postRPCRequestNotification:SDLDidReceiveCancelInteractionRequest request:request];
+}
+
- (void)onChangeRegistration:(SDLChangeRegistration *)request {
[self postRPCRequestNotification:SDLDidReceiveChangeRegistrationRequest request:request];
}
@@ -429,6 +445,10 @@ NS_ASSUME_NONNULL_BEGIN
[self postRPCRequestNotification:SDLDidReceiveGetInteriorVehicleDataRequest request:request];
}
+- (void)onGetInteriorVehicleDataConsent:(SDLGetInteriorVehicleDataConsent *)request {
+ [self postRPCRequestNotification:SDLDidReceiveGetInteriorVehicleDataConsentRequest request:request];
+}
+
- (void)onGetSystemCapability:(SDLGetSystemCapability *)request {
[self postRPCRequestNotification:SDLDidReceiveGetSystemCapabilityRequest request:request];
}
@@ -473,6 +493,10 @@ NS_ASSUME_NONNULL_BEGIN
[self postRPCRequestNotification:SDLDidReceiveRegisterAppInterfaceRequest request:request];
}
+- (void)onReleaseInteriorVehicleDataModule:(SDLReleaseInteriorVehicleDataModule *)request {
+ [self postRPCRequestNotification:SDLDidReceiveReleaseInteriorVehicleDataModuleRequest request:request];
+}
+
- (void)onResetGlobalProperties:(SDLResetGlobalProperties *)request {
[self postRPCRequestNotification:SDLDidReceiveResetGlobalPropertiesRequest request:request];
}
diff --git a/SmartDeviceLink/SDLPerformInteraction.h b/SmartDeviceLink/SDLPerformInteraction.h
index c8929af3b..575305682 100644
--- a/SmartDeviceLink/SDLPerformInteraction.h
+++ b/SmartDeviceLink/SDLPerformInteraction.h
@@ -1,7 +1,6 @@
// SDLPerformInteraction.h
//
-
#import "SDLRPCRequest.h"
#import "SDLInteractionMode.h"
@@ -10,88 +9,243 @@
@class SDLTTSChunk;
@class SDLVRHelpItem;
+NS_ASSUME_NONNULL_BEGIN
+
/**
- * Performs an application-initiated interaction in which the user can select a
- * {@linkplain Choice} from among the specified Choice Sets. For instance, an
- * application may use a PerformInteraction to ask a user to say the name of a
- * song to play. The user's response is only valid if it appears in the
- * specified Choice Sets and is recognized by SDL
- * <p>
- * Function Group: Base
- * <p>
- * <b>HMILevel needs to be FULL</b>
- * </p>
- *
- * Since SmartDeviceLink 1.0<br/>
- * See SDLCreateInteractionChoiceSet SDLDeleteInteractionChoiceSet
- */
+ Performs an application-initiated interaction in which the user can select a choice from the passed choice set.
-NS_ASSUME_NONNULL_BEGIN
+ There are several ways to present a choice set: as visual pop-up menu (with an optional keyboard that allows for searches), as voice-recognition (VR) only menu, or as both a VR and visual menu. It is also possible to present only the keyboard for doing searches.
+
+ A choice set can have up to 100 items, however if you are presenting a visual only menu please be aware that the OEM may choose to limit the number of presented choices when the driver is distracted (i.e. the car is moving).
+
+ A VR-only menu could be used to ask a user to say the name of a song to play. The user's response would only be valid if it appears in the specified choice set.
+ A visual popup-menu could be used to present a list of albums to the user. The user would select the album they want to play from the list of presented choices.
+ A keyboard can be used for searches. For example, the user could be asked to enter the name of a restaurant. The name can be used to search for local restaurants with the same name. When the search is completed another menu can be presented with a list of potential addresses for the destination.
+
+ If connecting to SDL Core v.6.0+, the perform interaction can be canceled programmatically using the `cancelID`. On older versions of SDL Core, the perform interaction will persist until the user has interacted with the perform interaction or the specified timeout has elapsed.
+
+ @see SDLCreateInteractionChoiceSet, SDLDeleteInteractionChoiceSet
+ @since SDL 1.0
+ */
@interface SDLPerformInteraction : SDLRPCRequest
-- (instancetype)initWithInteractionChoiceSetId:(UInt16)interactionChoiceSetId;
+/**
+ Convenience init for creating a basic display or voice-recognition menu.
-- (instancetype)initWithInteractionChoiceSetIdList:(NSArray<NSNumber<SDLUInt> *> *)interactionChoiceSetIdList;
+ @param initialText Text to be displayed first
+ @param interactionMode Indicates the method in which the user is notified and uses the interaction
+ @param interactionChoiceSetIDList List of interaction choice set IDs to use with an interaction
+ @param cancelID An ID for this specific perform interaction to allow cancellation through the `CancelInteraction` RPC
+ @return An SDLPerformInteraction object
+ */
+- (instancetype)initWithInitialText:(NSString *)initialText interactionMode:(SDLInteractionMode)interactionMode interactionChoiceSetIDList:(NSArray<NSNumber<SDLUInt> *> *)interactionChoiceSetIDList cancelID:(UInt32)cancelID;
-- (instancetype)initWithInitialPrompt:(nullable NSString *)initialPrompt initialText:(NSString *)initialText interactionChoiceSetID:(UInt16)interactionChoiceSetID;
+/**
+ Convenience init for setting all parameters of a display or voice-recognition menu.
+
+ @param initialText Text to be displayed first
+ @param initialPrompt The initial prompt spoken to the user at the start of an interaction
+ @param interactionMode The method in which the user is notified and uses the interaction (voice, visual or both)
+ @param interactionChoiceSetIDList List of interaction choice set IDs to use with an interaction
+ @param helpPrompt The spoken text when a user speaks "help" when the interaction is occurring
+ @param timeoutPrompt The text spoken when a VR interaction times out
+ @param timeout Timeout in milliseconds
+ @param vrHelp Suggested voice recognition help items to display on-screen during a perform interaction
+ @param interactionLayout For touchscreen interactions, the mode of how the choices are presented
+ @param cancelID An ID for this specific perform interaction to allow cancellation through the `CancelInteraction` RPC.
+ @return An SDLPerformInteraction object
+ */
+- (instancetype)initWithInitialText:(NSString *)initialText initialPrompt:(nullable NSArray<SDLTTSChunk *> *)initialPrompt interactionMode:(SDLInteractionMode)interactionMode interactionChoiceSetIDList:(NSArray<NSNumber<SDLUInt> *> *)interactionChoiceSetIDList helpPrompt:(nullable NSArray<SDLTTSChunk *> *)helpPrompt timeoutPrompt:(nullable NSArray<SDLTTSChunk *> *)timeoutPrompt timeout:(UInt16)timeout vrHelp:(nullable NSArray<SDLVRHelpItem *> *)vrHelp interactionLayout:(nullable SDLLayoutMode)interactionLayout cancelID:(UInt32)cancelID;
-- (instancetype)initWithInitialPrompt:(nullable NSString *)initialPrompt initialText:(NSString *)initialText interactionChoiceSetID:(UInt16)interactionChoiceSetID vrHelp:(nullable NSArray<SDLVRHelpItem *> *)vrHelp;
+/**
+ Convenience init for setting the a single visual or voice-recognition menu choice.
-- (instancetype)initWithInitialPrompt:(nullable NSString *)initialPrompt initialText:(NSString *)initialText interactionChoiceSetIDList:(NSArray<NSNumber<SDLUInt> *> *)interactionChoiceSetIDList helpPrompt:(nullable NSString *)helpPrompt timeoutPrompt:(nullable NSString *)timeoutPrompt interactionMode:(SDLInteractionMode)interactionMode timeout:(UInt32)timeout;
+ @param interactionChoiceSetId Single interaction choice set ID to use with an interaction
+ @return An SDLPerformInteraction object
+ */
+- (instancetype)initWithInteractionChoiceSetId:(UInt16)interactionChoiceSetId __deprecated_msg("Use initWithInitialText:interactionMode:interactionChoiceSetIDList:cancelID: instead");
-- (instancetype)initWithInitialPrompt:(nullable NSString *)initialPrompt initialText:(NSString *)initialText interactionChoiceSetIDList:(NSArray<NSNumber<SDLUInt> *> *)interactionChoiceSetIDList helpPrompt:(nullable NSString *)helpPrompt timeoutPrompt:(nullable NSString *)timeoutPrompt interactionMode:(SDLInteractionMode)interactionMode timeout:(UInt32)timeout vrHelp:(nullable NSArray<SDLVRHelpItem *> *)vrHelp;
+/**
+ Convenience init for setting the a visual or voice-recognition menu choices.
-- (instancetype)initWithInitialChunks:(nullable NSArray<SDLTTSChunk *> *)initialChunks initialText:(NSString *)initialText interactionChoiceSetIDList:(NSArray<NSNumber<SDLUInt> *> *)interactionChoiceSetIDList helpChunks:(nullable NSArray<SDLTTSChunk *> *)helpChunks timeoutChunks:(nullable NSArray<SDLTTSChunk *> *)timeoutChunks interactionMode:(SDLInteractionMode)interactionMode timeout:(UInt32)timeout vrHelp:(nullable NSArray<SDLVRHelpItem *> *)vrHelp;
+ @param interactionChoiceSetIdList List of interaction choice set IDs to use with an interaction
+ @return An SDLPerformInteraction object
+ */
+- (instancetype)initWithInteractionChoiceSetIdList:(NSArray<NSNumber<SDLUInt> *> *)interactionChoiceSetIdList __deprecated_msg("Use initWithInitialText:interactionMode:interactionChoiceSetIDList:cancelID: instead");
+
+/**
+ Convenience init for creating a visual or voice-recognition menu with one choice.
+
+ @param initialPrompt The initial prompt spoken to the user at the start of an interaction
+ @param initialText Text to be displayed first
+ @param interactionChoiceSetID Single interaction choice set ID to use with an interaction
+ @return An SDLPerformInteraction object
+ */
+- (instancetype)initWithInitialPrompt:(nullable NSString *)initialPrompt initialText:(NSString *)initialText interactionChoiceSetID:(UInt16)interactionChoiceSetID __deprecated_msg("Use initWithInitialText:interactionMode:interactionChoiceSetIDList:cancelID: instead");
+
+/**
+ Convenience init for creating a visual or voice-recognition menu with one choice and VR help items.
+
+ @param initialPrompt The initial prompt spoken to the user at the start of an interaction
+ @param initialText Text to be displayed first
+ @param interactionChoiceSetID Single interaction choice set ID to use with an interaction
+ @param vrHelp Suggested voice recognition help items to display on-screen during a perform interaction
+ @return An SDLPerformInteraction object
+ */
+- (instancetype)initWithInitialPrompt:(nullable NSString *)initialPrompt initialText:(NSString *)initialText interactionChoiceSetID:(UInt16)interactionChoiceSetID vrHelp:(nullable NSArray<SDLVRHelpItem *> *)vrHelp __deprecated_msg("Use initWithInitialText:initialPrompt:interactionMode:interactionChoiceSetIDList:helpPrompt:timeoutPrompt:timeout:vrHelp:interactionLayout:cancelID: instead");
+
+/**
+ Convenience init for creating a visual or voice-recognition menu using the default display layout and VR help items. Prompts are created from the passed strings.
+
+ @param initialText Text to be displayed first
+ @param initialPrompt The initial prompt spoken to the user at the start of an interaction
+ @param interactionMode The method in which the user is notified and uses the interaction (voice, visual or both)
+ @param interactionChoiceSetIDList List of interaction choice set IDs to use with an interaction
+ @param helpPrompt The spoken text when a user speaks "help" when the interaction is occurring
+ @param timeoutPrompt The text spoken when a VR interaction times out
+ @param timeout Timeout in milliseconds
+ @return An SDLPerformInteraction object
+ */
+- (instancetype)initWithInitialPrompt:(nullable NSString *)initialPrompt initialText:(NSString *)initialText interactionChoiceSetIDList:(NSArray<NSNumber<SDLUInt> *> *)interactionChoiceSetIDList helpPrompt:(nullable NSString *)helpPrompt timeoutPrompt:(nullable NSString *)timeoutPrompt interactionMode:(SDLInteractionMode)interactionMode timeout:(UInt32)timeout __deprecated_msg("Use initWithInitialText:initialPrompt:interactionMode:interactionChoiceSetIDList:helpPrompt:timeoutPrompt:timeout:vrHelp:interactionLayout:cancelID: instead");
+
+/**
+ Convenience init for creating a visual or voice-recognition menu using the default display layout. Prompts are created from the passed strings.
+
+ @param initialText Text to be displayed first
+ @param initialPrompt The initial prompt spoken to the user at the start of an interaction
+ @param interactionMode The method in which the user is notified and uses the interaction (voice, visual or both)
+ @param interactionChoiceSetIDList List of interaction choice set IDs to use with an interaction
+ @param helpPrompt The spoken text when a user speaks "help" when the interaction is occurring
+ @param timeoutPrompt The text spoken when a VR interaction times out
+ @param timeout Timeout in milliseconds
+ @param vrHelp Suggested voice recognition help items to display on-screen during a perform interaction
+ @return An SDLPerformInteraction object
+ */
+- (instancetype)initWithInitialPrompt:(nullable NSString *)initialPrompt initialText:(NSString *)initialText interactionChoiceSetIDList:(NSArray<NSNumber<SDLUInt> *> *)interactionChoiceSetIDList helpPrompt:(nullable NSString *)helpPrompt timeoutPrompt:(nullable NSString *)timeoutPrompt interactionMode:(SDLInteractionMode)interactionMode timeout:(UInt32)timeout vrHelp:(nullable NSArray<SDLVRHelpItem *> *)vrHelp __deprecated_msg("Use initWithInitialText:initialPrompt:interactionMode:interactionChoiceSetIDList:helpPrompt:timeoutPrompt:timeout:vrHelp:interactionLayout:cancelID: instead");
+
+/**
+ Convenience init for creating a visual or voice-recognition menu using the default display layout.
+
+ @param initialText Text to be displayed first
+ @param initialChunks The initial prompt spoken to the user at the start of an interaction
+ @param interactionMode The method in which the user is notified and uses the interaction (voice, visual or both)
+ @param interactionChoiceSetIDList List of interaction choice set IDs to use with an interaction
+ @param helpChunks The spoken text when a user speaks "help" when the interaction is occurring
+ @param timeoutChunks The text spoken when a VR interaction times out
+ @param timeout Timeout in milliseconds
+ @param vrHelp Suggested voice recognition help items to display on-screen during a perform interaction
+ @return An SDLPerformInteraction object
+ */
+- (instancetype)initWithInitialChunks:(nullable NSArray<SDLTTSChunk *> *)initialChunks initialText:(NSString *)initialText interactionChoiceSetIDList:(NSArray<NSNumber<SDLUInt> *> *)interactionChoiceSetIDList helpChunks:(nullable NSArray<SDLTTSChunk *> *)helpChunks timeoutChunks:(nullable NSArray<SDLTTSChunk *> *)timeoutChunks interactionMode:(SDLInteractionMode)interactionMode timeout:(UInt32)timeout vrHelp:(nullable NSArray<SDLVRHelpItem *> *)vrHelp __deprecated_msg("Use initWithInitialText:initialPrompt:interactionMode:interactionChoiceSetIDList:helpPrompt:timeoutPrompt:timeout:vrHelp:interactionLayout:cancelID: instead");
-- (instancetype)initWithInitialChunks:(nullable NSArray<SDLTTSChunk *> *)initialChunks initialText:(NSString *)initialText interactionChoiceSetIDList:(NSArray<NSNumber<SDLUInt> *> *)interactionChoiceSetIDList helpChunks:(nullable NSArray<SDLTTSChunk *> *)helpChunks timeoutChunks:(nullable NSArray<SDLTTSChunk *> *)timeoutChunks interactionMode:(SDLInteractionMode)interactionMode timeout:(UInt32)timeout vrHelp:(nullable NSArray<SDLVRHelpItem *> *)vrHelp interactionLayout:(nullable SDLLayoutMode)layout;
+/**
+ Convenience init for setting all parameters of a visual or voice-recognition menu.
+
+ @param initialText Text to be displayed first
+ @param initialChunks The initial prompt spoken to the user at the start of an interaction
+ @param interactionMode The method in which the user is notified and uses the interaction (voice, visual or both)
+ @param interactionChoiceSetIDList List of interaction choice set IDs to use with an interaction
+ @param helpChunks The spoken text when a user speaks "help" when the interaction is occurring
+ @param timeoutChunks The text spoken when a VR interaction times out
+ @param timeout Timeout in milliseconds
+ @param vrHelp Suggested voice recognition help items to display on-screen during a perform interaction
+ @param layout For touchscreen interactions, the mode of how the choices are presented
+ @return An SDLPerformInteraction object
+ */
+- (instancetype)initWithInitialChunks:(nullable NSArray<SDLTTSChunk *> *)initialChunks initialText:(NSString *)initialText interactionChoiceSetIDList:(NSArray<NSNumber<SDLUInt> *> *)interactionChoiceSetIDList helpChunks:(nullable NSArray<SDLTTSChunk *> *)helpChunks timeoutChunks:(nullable NSArray<SDLTTSChunk *> *)timeoutChunks interactionMode:(SDLInteractionMode)interactionMode timeout:(UInt32)timeout vrHelp:(nullable NSArray<SDLVRHelpItem *> *)vrHelp interactionLayout:(nullable SDLLayoutMode)layout __deprecated_msg("Use initWithInitialText:initialPrompt:interactionMode:interactionChoiceSetIDList:helpPrompt:timeoutPrompt:timeout:vrHelp:interactionLayout:cancelID: instead");
/**
- * The Text that Displayed when the interaction begins. This text may
- * be overlaid by the "Listening" prompt during the interaction. Text is
- * displayed on first line of multiline display, and is centered. If text
- * does not fit on line, it will be truncated
+ Text to be displayed first.
+
+ String, Required
+
+ @since SDL 1.0
*/
@property (strong, nonatomic) NSString *initialText;
+
/**
- * An array of one or more TTSChunks that, taken together, specify
- * what is to be spoken to the user at the start of an interaction
+ This is the TTS prompt spoken to the user at the start of an interaction.
+
+ Array of SDLTTSChunk, Optional, Array size: 1-100
+
+ @since SDL 1.0
*/
@property (nullable, strong, nonatomic) NSArray<SDLTTSChunk *> *initialPrompt;
+
/**
- * The Indicates mode that indicate how user selects interaction
- * choice. User can choose either by voice (VR_ONLY), by visual selection
- * from the menu (MANUAL_ONLY), or by either mode (BOTH)
+ For application-requested interactions, this mode indicates the method in which the user is notified and uses the interaction. Users can choose either only by voice (VR_ONLY), by tactile selection from the menu (MANUAL_ONLY), or by either mode (BOTH).
+
+ SDLInteractionMode, Required
+
+ @since SDL 1.0
*/
@property (strong, nonatomic) SDLInteractionMode interactionMode;
+
/**
- * A Vector<Integer> value representing an Array of one or more Choice
- * Set IDs
+ List of interaction choice set IDs to use with an interaction.
+
+ Array of Integers, Required, Array size: 0-100, Min value: 0, Max value: 2000000000
+
+ @since SDL 1.0
*/
@property (strong, nonatomic) NSArray<NSNumber<SDLInt> *> *interactionChoiceSetIDList;
+
/**
- * A Vector<TTSChunk> which taken together, specify the help phrase to
- * be spoken when the user says "help" during the VR session
+ Help text. This is the spoken text when a user speaks "help" while the interaction is occurring.
+
+ SDLTTSChunk, Optional
+
+ @since SDL 1.0
*/
@property (nullable, strong, nonatomic) NSArray<SDLTTSChunk *> *helpPrompt;
+
/**
- * An array of TTSChunks which, taken together, specify the phrase to
- * be spoken when the listen times out during the VR session
+ Timeout text. This text is spoken when a VR interaction times out.
+
+ Array of SDLTTSChunk, Optional, Array size: 1-100
+
+ @since SDL 1.0
*/
@property (nullable, strong, nonatomic) NSArray<SDLTTSChunk *> *timeoutPrompt;
+
/**
- * An Integer value representing the amount of time, in milliseconds,
- * SDL will wait for the user to make a choice (VR or Menu)
+ Timeout in milliseconds. Applies only to the menu portion of the interaction. The VR timeout will be handled by the platform. If omitted a standard value of 10 seconds is used.
+
+ Integer, Optional, Min value: 5000, Max value: 100,000
+
+ @since SDL 1.0
*/
@property (nullable, strong, nonatomic) NSNumber<SDLInt> *timeout;
+
/**
- * A Voice recognition Help, which is a suggested VR Help Items to
- * display on-screen during Perform Interaction
- * @since SmartDeviceLink 2.0
+ Suggested voice recognition help items to display on-screen during a perform interaction. If omitted on supported displays, the default generated list of suggested choices shall be displayed.
+
+ SDLVRHelpItem, Optional
+
+ @since SDL 2.0
*/
@property (nullable, strong, nonatomic) NSArray<SDLVRHelpItem *> *vrHelp;
+
+/**
+ For tactile interaction modes (MANUAL_ONLY, or BOTH), the layout mode of how the choices are presented.
+
+ SDLLayoutMode, Optional
+
+ @since SDL 3.0
+ */
@property (nullable, strong, nonatomic) SDLLayoutMode interactionLayout;
+/**
+ An ID for this specific perform interaction to allow cancellation through the `CancelInteraction` RPC.
+
+ Integer, Optional
+
+ @see SDLCancelInteraction
+ @since SDL 6.0
+ */
+@property (nullable, strong, nonatomic) NSNumber<SDLInt> *cancelID;
+
@end
NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLPerformInteraction.m b/SmartDeviceLink/SDLPerformInteraction.m
index d44ac3e16..6b72bf502 100644
--- a/SmartDeviceLink/SDLPerformInteraction.m
+++ b/SmartDeviceLink/SDLPerformInteraction.m
@@ -23,6 +23,35 @@ NS_ASSUME_NONNULL_BEGIN
}
#pragma clang diagnostic pop
+- (instancetype)initWithInitialDisplayText:(NSString *)initialText initialPrompt:(nullable NSArray<SDLTTSChunk *> *)initialPrompt interactionMode:(SDLInteractionMode)interactionMode interactionChoiceSetIDList:(NSArray<NSNumber<SDLUInt> *> *)interactionChoiceSetIDList helpPrompt:(nullable NSArray<SDLTTSChunk *> *)helpPrompt timeoutPrompt:(nullable NSArray<SDLTTSChunk *> *)timeoutPrompt timeout:(nullable NSNumber *)timeout vrHelp:(nullable NSArray<SDLVRHelpItem *> *)vrHelp interactionLayout:(nullable SDLLayoutMode)interactionLayout cancelID:(nullable NSNumber *)cancelID {
+ self = [self init];
+ if (!self) {
+ return nil;
+ }
+
+ self.initialText = initialText;
+ self.initialPrompt = initialPrompt;
+ self.interactionMode = interactionMode;
+ self.interactionChoiceSetIDList = interactionChoiceSetIDList;
+ self.helpPrompt = helpPrompt;
+ self.timeoutPrompt = timeoutPrompt;
+ self.timeout = timeout;
+ self.vrHelp = vrHelp;
+ self.interactionLayout = interactionLayout;
+ self.cancelID = cancelID;
+
+ return self;
+}
+
+- (instancetype)initWithInitialText:(NSString *)initialText interactionMode:(SDLInteractionMode)interactionMode interactionChoiceSetIDList:(NSArray<NSNumber<SDLUInt> *> *)interactionChoiceSetIDList cancelID:(UInt32)cancelID {
+ return [self initWithInitialDisplayText:initialText initialPrompt:nil interactionMode:interactionMode interactionChoiceSetIDList:interactionChoiceSetIDList helpPrompt:nil timeoutPrompt:nil timeout:nil vrHelp:nil interactionLayout:nil cancelID:@(cancelID)];
+}
+
+- (instancetype)initWithInitialText:(NSString *)initialText initialPrompt:(nullable NSArray<SDLTTSChunk *> *)initialPrompt interactionMode:(SDLInteractionMode)interactionMode interactionChoiceSetIDList:(NSArray<NSNumber<SDLUInt> *> *)interactionChoiceSetIDList helpPrompt:(nullable NSArray<SDLTTSChunk *> *)helpPrompt timeoutPrompt:(nullable NSArray<SDLTTSChunk *> *)timeoutPrompt timeout:(UInt16)timeout vrHelp:(nullable NSArray<SDLVRHelpItem *> *)vrHelp interactionLayout:(nullable SDLLayoutMode)interactionLayout cancelID:(UInt32)cancelID {
+ return [self initWithInitialDisplayText:initialText initialPrompt:initialPrompt interactionMode:interactionMode interactionChoiceSetIDList:interactionChoiceSetIDList helpPrompt:helpPrompt timeoutPrompt:timeoutPrompt timeout:@(timeout) vrHelp:vrHelp interactionLayout:interactionLayout cancelID:@(cancelID)];
+}
+
+
- (instancetype)initWithInteractionChoiceSetId:(UInt16)interactionChoiceSetId {
return [self initWithInteractionChoiceSetIdList:@[@(interactionChoiceSetId)]];
}
@@ -45,7 +74,7 @@ NS_ASSUME_NONNULL_BEGIN
return nil;
}
- self.vrHelp = [vrHelp mutableCopy];
+ self.vrHelp = vrHelp;
return self;
}
@@ -66,21 +95,7 @@ NS_ASSUME_NONNULL_BEGIN
}
- (instancetype)initWithInitialChunks:(nullable NSArray<SDLTTSChunk *> *)initialChunks initialText:(NSString *)initialText interactionChoiceSetIDList:(NSArray<NSNumber<SDLUInt> *> *)interactionChoiceSetIDList helpChunks:(nullable NSArray<SDLTTSChunk *> *)helpChunks timeoutChunks:(nullable NSArray<SDLTTSChunk *> *)timeoutChunks interactionMode:(SDLInteractionMode)interactionMode timeout:(UInt32)timeout vrHelp:(nullable NSArray<SDLVRHelpItem *> *)vrHelp interactionLayout:(nullable SDLLayoutMode)layout {
- self = [self initWithInteractionChoiceSetIdList:interactionChoiceSetIDList];
- if (!self) {
- return nil;
- }
-
- self.initialPrompt = [initialChunks mutableCopy];
- self.initialText = initialText;
- self.helpPrompt = [helpChunks mutableCopy];
- self.timeoutPrompt = [timeoutChunks mutableCopy];
- self.interactionMode = interactionMode;
- self.timeout = @(timeout);
- self.vrHelp = [vrHelp mutableCopy];
- self.interactionLayout = layout;
-
- return self;
+ return [self initWithInitialDisplayText:initialText initialPrompt:initialChunks interactionMode:interactionMode interactionChoiceSetIDList:interactionChoiceSetIDList helpPrompt:helpChunks timeoutPrompt:timeoutChunks timeout:@(timeout) vrHelp:vrHelp interactionLayout:layout cancelID:nil];
}
- (instancetype)initWithInteractionChoiceSetIdList:(NSArray<NSNumber<SDLInt> *> *)interactionChoiceSetIdList {
@@ -89,7 +104,7 @@ NS_ASSUME_NONNULL_BEGIN
return nil;
}
- self.interactionChoiceSetIDList = [interactionChoiceSetIdList mutableCopy];
+ self.interactionChoiceSetIDList = interactionChoiceSetIdList;
return self;
}
@@ -169,6 +184,14 @@ NS_ASSUME_NONNULL_BEGIN
return [self.parameters sdl_enumForName:SDLRPCParameterNameInteractionLayout 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/SDLPreloadChoicesOperation.h b/SmartDeviceLink/SDLPreloadChoicesOperation.h
index cc6c7ae30..b62ff5296 100644
--- a/SmartDeviceLink/SDLPreloadChoicesOperation.h
+++ b/SmartDeviceLink/SDLPreloadChoicesOperation.h
@@ -11,8 +11,8 @@
#import "SDLAsynchronousOperation.h"
@class SDLChoiceCell;
-@class SDLDisplayCapabilities;
@class SDLFileManager;
+@class SDLWindowCapability;
@protocol SDLConnectionManagerType;
@@ -29,7 +29,7 @@ typedef NS_ENUM(NSUInteger, SDLPreloadChoicesOperationState) {
@property (assign, nonatomic) SDLPreloadChoicesOperationState currentState;
-- (instancetype)initWithConnectionManager:(id<SDLConnectionManagerType>)connectionManager fileManager:(SDLFileManager *)fileManager displayCapabilities:(SDLDisplayCapabilities *)displayCapabilities isVROptional:(BOOL)isVROptional cellsToPreload:(NSSet<SDLChoiceCell *> *)cells;
+- (instancetype)initWithConnectionManager:(id<SDLConnectionManagerType>)connectionManager fileManager:(SDLFileManager *)fileManager displayName:(NSString *)displayName defaultMainWindowCapability:(SDLWindowCapability *)defaultMainWindowCapability isVROptional:(BOOL)isVROptional cellsToPreload:(NSSet<SDLChoiceCell *> *)cells;
- (BOOL)removeChoicesFromUpload:(NSSet<SDLChoiceCell *> *)choices;
diff --git a/SmartDeviceLink/SDLPreloadChoicesOperation.m b/SmartDeviceLink/SDLPreloadChoicesOperation.m
index a2f83b5b7..ddb0e36c8 100644
--- a/SmartDeviceLink/SDLPreloadChoicesOperation.m
+++ b/SmartDeviceLink/SDLPreloadChoicesOperation.m
@@ -13,12 +13,13 @@
#import "SDLConnectionManagerType.h"
#import "SDLCreateInteractionChoiceSet.h"
#import "SDLCreateInteractionChoiceSetResponse.h"
-#import "SDLDisplayCapabilities.h"
-#import "SDLDisplayCapabilities+ShowManagerExtensions.h"
+#import "SDLDisplayType.h"
#import "SDLError.h"
#import "SDLFileManager.h"
#import "SDLImage.h"
#import "SDLLogMacros.h"
+#import "SDLWindowCapability.h"
+#import "SDLWindowCapability+ShowManagerExtensions.h"
NS_ASSUME_NONNULL_BEGIN
@@ -32,7 +33,8 @@ NS_ASSUME_NONNULL_BEGIN
@property (strong, nonatomic) NSUUID *operationId;
@property (strong, nonatomic) NSMutableSet<SDLChoiceCell *> *cellsToUpload;
-@property (strong, nonatomic) SDLDisplayCapabilities *displayCapabilities;
+@property (strong, nonatomic) SDLWindowCapability *defaultMainWindowCapability;
+@property (strong, nonatomic) NSString *displayName;
@property (assign, nonatomic, getter=isVROptional) BOOL vrOptional;
@property (weak, nonatomic) id<SDLConnectionManagerType> connectionManager;
@@ -43,13 +45,14 @@ NS_ASSUME_NONNULL_BEGIN
@implementation SDLPreloadChoicesOperation
-- (instancetype)initWithConnectionManager:(id<SDLConnectionManagerType>)connectionManager fileManager:(SDLFileManager *)fileManager displayCapabilities:(SDLDisplayCapabilities *)displayCapabilities isVROptional:(BOOL)isVROptional cellsToPreload:(NSSet<SDLChoiceCell *> *)cells {
+- (instancetype)initWithConnectionManager:(id<SDLConnectionManagerType>)connectionManager fileManager:(SDLFileManager *)fileManager displayName:(NSString *)displayName defaultMainWindowCapability:(SDLWindowCapability *)defaultMainWindowCapability isVROptional:(BOOL)isVROptional cellsToPreload:(NSSet<SDLChoiceCell *> *)cells {
self = [super init];
if (!self) { return nil; }
_connectionManager = connectionManager;
_fileManager = fileManager;
- _displayCapabilities = displayCapabilities;
+ _displayName = displayName;
+ _defaultMainWindowCapability = defaultMainWindowCapability;
_vrOptional = isVROptional;
_cellsToUpload = [cells mutableCopy];
_operationId = [NSUUID UUID];
@@ -61,6 +64,7 @@ NS_ASSUME_NONNULL_BEGIN
- (void)start {
[super start];
+ if (self.isCancelled) { return; }
[self sdl_preloadCellArtworksWithCompletionHandler:^(NSError * _Nullable error) {
self.internalError = error;
@@ -83,11 +87,11 @@ NS_ASSUME_NONNULL_BEGIN
NSMutableArray<SDLArtwork *> *artworksToUpload = [NSMutableArray arrayWithCapacity:self.cellsToUpload.count];
for (SDLChoiceCell *cell in self.cellsToUpload) {
- if ([self.displayCapabilities hasImageFieldOfName:SDLImageFieldNameChoiceImage]
+ if ([self.defaultMainWindowCapability hasImageFieldOfName:SDLImageFieldNameChoiceImage]
&& [self sdl_artworkNeedsUpload:cell.artwork]) {
[artworksToUpload addObject:cell.artwork];
}
- if ([self.displayCapabilities hasImageFieldOfName:SDLImageFieldNameChoiceSecondaryImage]
+ if ([self.defaultMainWindowCapability hasImageFieldOfName:SDLImageFieldNameChoiceSecondaryImage]
&& [self sdl_artworkNeedsUpload:cell.secondaryArtwork]) {
[artworksToUpload addObject:cell.secondaryArtwork];
}
@@ -163,7 +167,7 @@ NS_ASSUME_NONNULL_BEGIN
NSString *menuName = nil;
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
- if ([self.displayCapabilities.displayType isEqualToEnum:SDLDisplayTypeGen38Inch] || [self.displayCapabilities hasTextFieldOfName:SDLTextFieldNameMenuName]) {
+ if ([self.displayName isEqualToString:SDLDisplayTypeGen38Inch] || [self.defaultMainWindowCapability hasTextFieldOfName:SDLTextFieldNameMenuName]) {
menuName = cell.text;
}
#pragma clang diagnostic pop
@@ -173,11 +177,11 @@ NS_ASSUME_NONNULL_BEGIN
return nil;
}
- NSString *secondaryText = [self.displayCapabilities hasTextFieldOfName:SDLTextFieldNameSecondaryText] ? cell.secondaryText : nil;
- NSString *tertiaryText = [self.displayCapabilities hasTextFieldOfName:SDLTextFieldNameTertiaryText] ? cell.tertiaryText : nil;
+ NSString *secondaryText = [self.defaultMainWindowCapability hasTextFieldOfName:SDLTextFieldNameSecondaryText] ? cell.secondaryText : nil;
+ NSString *tertiaryText = [self.defaultMainWindowCapability hasTextFieldOfName:SDLTextFieldNameTertiaryText] ? cell.tertiaryText : nil;
- SDLImage *image = ([self.displayCapabilities hasImageFieldOfName:SDLImageFieldNameChoiceImage] && cell.artwork != nil) ? cell.artwork.imageRPC : nil;
- SDLImage *secondaryImage = ([self.displayCapabilities hasImageFieldOfName:SDLImageFieldNameChoiceSecondaryImage] && cell.secondaryArtwork != nil) ? cell.secondaryArtwork.imageRPC : nil;
+ SDLImage *image = ([self.defaultMainWindowCapability hasImageFieldOfName:SDLImageFieldNameChoiceImage] && cell.artwork != nil) ? cell.artwork.imageRPC : nil;
+ SDLImage *secondaryImage = ([self.defaultMainWindowCapability hasImageFieldOfName:SDLImageFieldNameChoiceSecondaryImage] && cell.secondaryArtwork != nil) ? cell.secondaryArtwork.imageRPC : nil;
SDLChoice *choice = [[SDLChoice alloc] initWithId:cell.choiceId menuName:(NSString *_Nonnull)menuName vrCommands:(NSArray<NSString *> * _Nonnull)vrCommands image:image secondaryText:secondaryText secondaryImage:secondaryImage tertiaryText:tertiaryText];
diff --git a/SmartDeviceLink/SDLPresentChoiceSetOperation.h b/SmartDeviceLink/SDLPresentChoiceSetOperation.h
index cf92f51b0..df82bfa22 100644
--- a/SmartDeviceLink/SDLPresentChoiceSetOperation.h
+++ b/SmartDeviceLink/SDLPresentChoiceSetOperation.h
@@ -23,12 +23,38 @@ NS_ASSUME_NONNULL_BEGIN
@interface SDLPresentChoiceSetOperation : SDLAsynchronousOperation
+/**
+ The choice set to be displayed.
+ */
@property (strong, nonatomic, readonly) SDLChoiceSet *choiceSet;
+
+/**
+ The choice set item the user selected.
+ */
@property (strong, nonatomic, readonly, nullable) SDLChoiceCell *selectedCell;
+
+/**
+ How the user selected the choice set item: either from the menu or through voice-recognition.
+ */
@property (strong, nonatomic, readonly, nullable) SDLTriggerSource selectedTriggerSource;
+
+/**
+ The row number of the choice set item the user selected.
+ */
@property (assign, nonatomic, readonly) NSUInteger selectedCellRow;
-- (instancetype)initWithConnectionManager:(id<SDLConnectionManagerType>)connectionManager choiceSet:(SDLChoiceSet *)choiceSet mode:(SDLInteractionMode)mode keyboardProperties:(nullable SDLKeyboardProperties *)originalKeyboardProperties keyboardDelegate:(nullable id<SDLKeyboardDelegate>)keyboardDelegate;
+/**
+ An operation to present a choice set.
+
+ @param connectionManager The connection manager
+ @param choiceSet The choice set to be displayed
+ @param mode If the set should be presented for the user to interact via voice, touch, or both
+ @param originalKeyboardProperties The keyboard configuration
+ @param keyboardDelegate The keyboard delegate called when the user interacts with the keyboard
+ @param cancelID A unique ID for this specific choice set that allows cancellation through the `CancelInteraction` RPC.
+ @return A SDLPresentChoiceSetOperation object
+ */
+- (instancetype)initWithConnectionManager:(id<SDLConnectionManagerType>)connectionManager choiceSet:(SDLChoiceSet *)choiceSet mode:(SDLInteractionMode)mode keyboardProperties:(nullable SDLKeyboardProperties *)originalKeyboardProperties keyboardDelegate:(nullable id<SDLKeyboardDelegate>)keyboardDelegate cancelID:(UInt16)cancelID;
@end
diff --git a/SmartDeviceLink/SDLPresentChoiceSetOperation.m b/SmartDeviceLink/SDLPresentChoiceSetOperation.m
index 87caf9d0a..3787fb996 100644
--- a/SmartDeviceLink/SDLPresentChoiceSetOperation.m
+++ b/SmartDeviceLink/SDLPresentChoiceSetOperation.m
@@ -8,10 +8,12 @@
#import "SDLPresentChoiceSetOperation.h"
+#import "SDLCancelInteraction.h"
#import "SDLChoiceCell.h"
#import "SDLChoiceSet.h"
#import "SDLChoiceSetDelegate.h"
#import "SDLConnectionManagerType.h"
+#import "SDLGlobals.h"
#import "SDLKeyboardDelegate.h"
#import "SDLKeyboardProperties.h"
#import "SDLLogMacros.h"
@@ -21,6 +23,7 @@
#import "SDLPerformInteractionResponse.h"
#import "SDLRPCNotificationNotification.h"
#import "SDLSetGlobalProperties.h"
+#import "SDLVersion.h"
NS_ASSUME_NONNULL_BEGIN
@@ -30,6 +33,13 @@ NS_ASSUME_NONNULL_BEGIN
@end
+@interface SDLChoiceSet()
+
+@property (copy, nonatomic) SDLChoiceSetCanceledHandler canceledHandler;
+
+
+@end
+
@interface SDLPresentChoiceSetOperation()
@property (strong, nonatomic) NSUUID *operationId;
@@ -43,6 +53,7 @@ NS_ASSUME_NONNULL_BEGIN
@property (strong, nonatomic, readonly) SDLPerformInteraction *performInteraction;
@property (strong, nonatomic, readonly) SDLLayoutMode layoutMode;
@property (strong, nonatomic, readonly) NSArray<NSNumber<SDLInt> *> *choiceIds;
+@property (assign, nonatomic) UInt16 cancelId;
@property (assign, nonatomic) BOOL updatedKeyboardProperties;
@property (copy, nonatomic, nullable) NSError *internalError;
@@ -54,18 +65,25 @@ NS_ASSUME_NONNULL_BEGIN
@implementation SDLPresentChoiceSetOperation
-- (instancetype)initWithConnectionManager:(id<SDLConnectionManagerType>)connectionManager choiceSet:(SDLChoiceSet *)choiceSet mode:(SDLInteractionMode)mode keyboardProperties:(nullable SDLKeyboardProperties *)originalKeyboardProperties keyboardDelegate:(nullable id<SDLKeyboardDelegate>)keyboardDelegate {
+- (instancetype)initWithConnectionManager:(id<SDLConnectionManagerType>)connectionManager choiceSet:(SDLChoiceSet *)choiceSet mode:(SDLInteractionMode)mode keyboardProperties:(nullable SDLKeyboardProperties *)originalKeyboardProperties keyboardDelegate:(nullable id<SDLKeyboardDelegate>)keyboardDelegate cancelID:(UInt16)cancelID {
self = [super init];
if (!self) { return self; }
_connectionManager = connectionManager;
_choiceSet = choiceSet;
+
+ __weak typeof(self) weakSelf = self;
+ self.choiceSet.canceledHandler = ^{
+ [weakSelf sdl_cancelInteraction];
+ };
+
_presentationMode = mode;
_operationId = [NSUUID UUID];
_originalKeyboardProperties = originalKeyboardProperties;
_keyboardProperties = originalKeyboardProperties;
_keyboardDelegate = keyboardDelegate;
+ _cancelId = cancelID;
_selectedCellRow = NSNotFound;
@@ -74,6 +92,7 @@ NS_ASSUME_NONNULL_BEGIN
- (void)start {
[super start];
+ if (self.isCancelled) { return; }
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(sdl_keyboardInputNotification:) name:SDLDidReceiveKeyboardInputNotification object:nil];
@@ -157,6 +176,41 @@ NS_ASSUME_NONNULL_BEGIN
}];
}
+/**
+ * Cancels the choice set. If the choice set has not yet been sent to Core, it will not be sent. If the choice set is already presented on Core, the choice set will be immediately dismissed. Canceling an already presented choice set will only work if connected to Core versions 6.0+. On older versions of Core, the choice set will not be dismissed.
+ */
+- (void)sdl_cancelInteraction {
+ if (self.isFinished) {
+ SDLLogW(@"This operation has already finished so it can not be canceled.");
+ return;
+ } else if (self.isCancelled) {
+ SDLLogW(@"This operation has already been canceled. It will be finished at some point during the operation.");
+ return;
+ } else if (self.isExecuting) {
+ if ([SDLGlobals.sharedGlobals.rpcVersion isLessThanVersion:[[SDLVersion alloc] initWithMajor:6 minor:0 patch:0]]) {
+ SDLLogE(@"Canceling a choice set is not supported on this head unit");
+ return;
+ }
+
+ SDLLogD(@"Canceling the presented choice set interaction");
+
+ SDLCancelInteraction *cancelInteraction = [[SDLCancelInteraction alloc] initWithPerformInteractionCancelID:self.cancelId];
+
+ __weak typeof(self) weakSelf = self;
+ [self.connectionManager sendConnectionRequest:cancelInteraction withResponseHandler:^(__kindof SDLRPCRequest * _Nullable request, __kindof SDLRPCResponse * _Nullable response, NSError * _Nullable error) {
+ if (error != nil) {
+ weakSelf.internalError = error;
+ SDLLogE(@"Error canceling the presented choice set: %@, with error: %@", request, error);
+ return;
+ }
+ SDLLogD(@"The presented choice set was canceled successfully");
+ }];
+ } else {
+ SDLLogD(@"Canceling a choice set that has not yet been sent to Core");
+ [self cancel];
+ }
+}
+
#pragma mark - Getters
- (SDLPerformInteraction *)performInteraction {
@@ -170,6 +224,7 @@ NS_ASSUME_NONNULL_BEGIN
performInteraction.timeout = @((NSUInteger)(self.choiceSet.timeout * 1000));
performInteraction.interactionLayout = self.layoutMode;
performInteraction.interactionChoiceSetIDList = self.choiceIds;
+ performInteraction.cancelID = @(self.cancelId);
return performInteraction;
}
diff --git a/SmartDeviceLink/SDLPresentKeyboardOperation.h b/SmartDeviceLink/SDLPresentKeyboardOperation.h
index 754260a53..9a5a6cfb5 100644
--- a/SmartDeviceLink/SDLPresentKeyboardOperation.h
+++ b/SmartDeviceLink/SDLPresentKeyboardOperation.h
@@ -7,6 +7,7 @@
//
#import "SDLAsynchronousOperation.h"
+#import "NSNumber+NumberType.h"
@class SDLKeyboardProperties;
@@ -17,7 +18,29 @@ NS_ASSUME_NONNULL_BEGIN
@interface SDLPresentKeyboardOperation : SDLAsynchronousOperation
-- (instancetype)initWithConnectionManager:(id<SDLConnectionManagerType>)connectionManager keyboardProperties:(SDLKeyboardProperties *)originalKeyboardProperties initialText:(NSString *)initialText keyboardDelegate:(id<SDLKeyboardDelegate>)keyboardDelegate;
+/**
+ A unique ID that can be used to cancel this keyboard.
+ */
+@property (assign, nonatomic, readonly) UInt16 cancelId;
+
+/**
+ An operation to present a keyboard.
+
+ @param connectionManager The connection manager
+ @param originalKeyboardProperties The keyboard configuration
+ @param initialText The initial text within the keyboard input field. It will disappear once the user selects the field in order to enter text
+ @param keyboardDelegate The keyboard delegate called when the user interacts with the keyboard
+ @param cancelID An ID for this specific keyboard to allow cancellation through the `CancelInteraction` RPC.
+ @return A SDLPresentKeyboardOperation object
+ */
+- (instancetype)initWithConnectionManager:(id<SDLConnectionManagerType>)connectionManager keyboardProperties:(SDLKeyboardProperties *)originalKeyboardProperties initialText:(NSString *)initialText keyboardDelegate:(id<SDLKeyboardDelegate>)keyboardDelegate cancelID:(UInt16)cancelID;
+
+/**
+ Cancels the keyboard-only interface if it is currently showing. If the keyboard has not yet been sent to Core, it will not be sent.
+
+ This will only dismiss an already presented keyboard if connected to head units running SDL 6.0+.
+ */
+- (void)dismissKeyboard;
@end
diff --git a/SmartDeviceLink/SDLPresentKeyboardOperation.m b/SmartDeviceLink/SDLPresentKeyboardOperation.m
index b54f040fe..27d865ea5 100644
--- a/SmartDeviceLink/SDLPresentKeyboardOperation.m
+++ b/SmartDeviceLink/SDLPresentKeyboardOperation.m
@@ -8,7 +8,9 @@
#import "SDLPresentKeyboardOperation.h"
+#import "SDLCancelInteraction.h"
#import "SDLConnectionManagerType.h"
+#import "SDLGlobals.h"
#import "SDLKeyboardDelegate.h"
#import "SDLKeyboardProperties.h"
#import "SDLLogMacros.h"
@@ -18,6 +20,7 @@
#import "SDLPerformInteractionResponse.h"
#import "SDLRPCNotificationNotification.h"
#import "SDLSetGlobalProperties.h"
+#import "SDLVersion.h"
NS_ASSUME_NONNULL_BEGIN
@@ -29,6 +32,7 @@ NS_ASSUME_NONNULL_BEGIN
@property (copy, nonatomic) NSString *initialText;
@property (strong, nonatomic) SDLKeyboardProperties *originalKeyboardProperties;
@property (strong, nonatomic) SDLKeyboardProperties *keyboardProperties;
+@property (assign, nonatomic, readwrite) UInt16 cancelId;
@property (strong, nonatomic, readonly) SDLPerformInteraction *performInteraction;
@@ -38,7 +42,7 @@ NS_ASSUME_NONNULL_BEGIN
@implementation SDLPresentKeyboardOperation
-- (instancetype)initWithConnectionManager:(id<SDLConnectionManagerType>)connectionManager keyboardProperties:(SDLKeyboardProperties *)originalKeyboardProperties initialText:(NSString *)initialText keyboardDelegate:(id<SDLKeyboardDelegate>)keyboardDelegate {
+- (instancetype)initWithConnectionManager:(id<SDLConnectionManagerType>)connectionManager keyboardProperties:(SDLKeyboardProperties *)originalKeyboardProperties initialText:(NSString *)initialText keyboardDelegate:(id<SDLKeyboardDelegate>)keyboardDelegate cancelID:(UInt16)cancelID {
self = [super init];
if (!self) { return self; }
@@ -47,6 +51,7 @@ NS_ASSUME_NONNULL_BEGIN
_keyboardDelegate = keyboardDelegate;
_originalKeyboardProperties = originalKeyboardProperties;
_keyboardProperties = originalKeyboardProperties;
+ _cancelId = cancelID;
_operationId = [NSUUID UUID];
return self;
@@ -54,6 +59,7 @@ NS_ASSUME_NONNULL_BEGIN
- (void)start {
[super start];
+ if (self.isCancelled) { return; }
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(sdl_keyboardInputNotification:) name:SDLDidReceiveKeyboardInputNotification object:nil];
@@ -110,6 +116,38 @@ NS_ASSUME_NONNULL_BEGIN
}];
}
+- (void)dismissKeyboard {
+ if (self.isFinished) {
+ SDLLogW(@"This operation has already finished so it can not be canceled.");
+ return;
+ } else if (self.isCancelled) {
+ SDLLogW(@"This operation has already been canceled. It will be finished at some point during the operation.");
+ return;
+ } else if (self.isExecuting) {
+ if ([SDLGlobals.sharedGlobals.rpcVersion isLessThanVersion:[[SDLVersion alloc] initWithMajor:6 minor:0 patch:0]]) {
+ SDLLogE(@"Canceling a keyboard is not supported on this head unit");
+ return;
+ }
+
+ SDLLogD(@"Canceling the presented keyboard");
+
+ SDLCancelInteraction *cancelInteraction = [[SDLCancelInteraction alloc] initWithPerformInteractionCancelID:self.cancelId];
+
+ __weak typeof(self) weakSelf = self;
+ [self.connectionManager sendConnectionRequest:cancelInteraction withResponseHandler:^(__kindof SDLRPCRequest * _Nullable request, __kindof SDLRPCResponse * _Nullable response, NSError * _Nullable error) {
+ if (error != nil) {
+ weakSelf.internalError = error;
+ SDLLogE(@"Error canceling the keyboard: %@, with error: %@", request, error);
+ return;
+ }
+ SDLLogD(@"The presented keyboard was canceled successfully");
+ }];
+ } else {
+ SDLLogD(@"Canceling a keyboard that has not yet been sent to Core");
+ [self cancel];
+ }
+}
+
#pragma mark - Private Getters / Setters
- (SDLPerformInteraction *)performInteraction {
@@ -118,6 +156,7 @@ NS_ASSUME_NONNULL_BEGIN
performInteraction.interactionMode = SDLInteractionModeManualOnly;
performInteraction.interactionChoiceSetIDList = @[];
performInteraction.interactionLayout = SDLLayoutModeKeyboard;
+ performInteraction.cancelID = @(self.cancelId);
return performInteraction;
}
diff --git a/SmartDeviceLink/SDLProxyListener.h b/SmartDeviceLink/SDLProxyListener.h
index 624242125..25d52f589 100644
--- a/SmartDeviceLink/SDLProxyListener.h
+++ b/SmartDeviceLink/SDLProxyListener.h
@@ -13,6 +13,8 @@
@class SDLAlertResponse;
@class SDLButtonPress;
@class SDLButtonPressResponse;
+@class SDLCancelInteraction;
+@class SDLCancelInteractionResponse;
@class SDLChangeRegistration;
@class SDLChangeRegistrationResponse;
@class SDLCloseApplication;
@@ -50,6 +52,8 @@
@class SDLGetFileResponse;
@class SDLGetInteriorVehicleData;
@class SDLGetInteriorVehicleDataResponse;
+@class SDLGetInteriorVehicleDataConsent;
+@class SDLGetInteriorVehicleDataConsentResponse;
@class SDLGetSystemCapability;
@class SDLGetSystemCapabilityResponse;
@class SDLGetVehicleData;
@@ -95,6 +99,8 @@
@class SDLReadDIDResponse;
@class SDLRegisterAppInterface;
@class SDLRegisterAppInterfaceResponse;
+@class SDLReleaseInteriorVehicleDataModule;
+@class SDLReleaseInteriorVehicleDataModuleResponse;
@class SDLResetGlobalProperties;
@class SDLResetGlobalPropertiesResponse;
@class SDLScrollableMessage;
@@ -215,6 +221,13 @@ NS_ASSUME_NONNULL_BEGIN
- (void)onButtonPressResponse:(SDLButtonPressResponse *)response;
/**
+ * Called when a `CancelInteraction` response is received from Core
+ *
+ * @param response A SDLCancelInteractionResponse object
+ */
+- (void)onCancelInteractionResponse:(SDLCancelInteractionResponse *)response;
+
+/**
* Called when a Change Registration Response is received from Core
*
* @param response A SDLChangeRegistrationResponse object
@@ -348,6 +361,13 @@ NS_ASSUME_NONNULL_BEGIN
- (void)onGetInteriorVehicleDataResponse:(SDLGetInteriorVehicleDataResponse *)response;
/**
+ * Called when a Get Interior Vehicle Data Consent Response is received from Core
+ *
+ * @param response A SDLGetInteriorVehicleDataConsentResponse object
+ */
+- (void)onGetInteriorVehicleDataConsentResponse:(SDLGetInteriorVehicleDataConsentResponse *)response;
+
+/**
* Called when a Get System Capability Response is received from Core
*
* @param response A SDLGetSystemCapabilityResponse object
@@ -432,6 +452,13 @@ NS_ASSUME_NONNULL_BEGIN
- (void)onRegisterAppInterfaceResponse:(SDLRegisterAppInterfaceResponse *)response;
/**
+ * Called when a Release Interior Vehicle Data Module Response is received from Core
+ *
+ * @param response A SDLReleaseInteriorVehicleDataModuleResponse object
+ */
+- (void)onReleaseInteriorVehicleDataModuleResponse:(SDLReleaseInteriorVehicleDataModuleResponse *)response;
+
+/**
* Called when a Reset Global Properties Response is received from Core
*
* @param response A SDLResetGlobalPropertiesResponse object
@@ -644,6 +671,13 @@ NS_ASSUME_NONNULL_BEGIN
- (void)onButtonPress:(SDLButtonPress *)request;
/**
+ * Called when a `CancelInteraction` request is received from Core
+ *
+ * @param request A SDLCancelInteraction object
+ */
+- (void)onCancelInteraction:(SDLCancelInteraction *)request;
+
+/**
* Called when a `ChangeRegistration` request is received from Core
*
* @param request A SDLChangeRegistration object
@@ -770,6 +804,13 @@ NS_ASSUME_NONNULL_BEGIN
- (void)onGetInteriorVehicleData:(SDLGetInteriorVehicleData *)request;
/**
+ * Called when a `GetInteriorVehicleDataConsent` request is received from Core
+ *
+ * @param request A SDLGetInteriorVehicleDataConsent object
+ */
+- (void)onGetInteriorVehicleConsentData:(SDLGetInteriorVehicleDataConsent *)request;
+
+/**
* Called when a `GetSystemCapability` request is received from Core
*
* @param request A SDLGetSystemCapability object
@@ -847,6 +888,13 @@ NS_ASSUME_NONNULL_BEGIN
- (void)onRegisterAppInterface:(SDLRegisterAppInterface *)request;
/**
+ * Called when a `ReleaseInteriorVehicleDataModule` request is received from Core
+ *
+ * @param request A SDLReleaseInteriorVehicleDataModule object
+ */
+- (void)onReleaseInteriorVehicleDataModule:(SDLReleaseInteriorVehicleDataModule *)request;
+
+/**
* Called when a `ResetGlobalProperties` request is received from Core
*
* @param request A SDLResetGlobalProperties object
diff --git a/SmartDeviceLink/SDLRPCFunctionNames.h b/SmartDeviceLink/SDLRPCFunctionNames.h
index 53658017b..f9dc5d5f6 100644
--- a/SmartDeviceLink/SDLRPCFunctionNames.h
+++ b/SmartDeviceLink/SDLRPCFunctionNames.h
@@ -18,6 +18,7 @@ extern SDLRPCFunctionName const SDLRPCFunctionNameAddSubMenu;
extern SDLRPCFunctionName const SDLRPCFunctionNameAlert;
extern SDLRPCFunctionName const SDLRPCFunctionNameAlertManeuver;
extern SDLRPCFunctionName const SDLRPCFunctionNameButtonPress;
+extern SDLRPCFunctionName const SDLRPCFunctionNameCancelInteraction;
extern SDLRPCFunctionName const SDLRPCFunctionNameChangeRegistration;
extern SDLRPCFunctionName const SDLRPCFunctionNameCloseApplication;
extern SDLRPCFunctionName const SDLRPCFunctionNameCreateInteractionChoiceSet;
@@ -35,6 +36,7 @@ extern SDLRPCFunctionName const SDLRPCFunctionNameGetDTCs;
extern SDLRPCFunctionName const SDLRPCFunctionNameGetFile;
extern SDLRPCFunctionName const SDLRPCFunctionNameGetCloudAppProperties;
extern SDLRPCFunctionName const SDLRPCFunctionNameGetInteriorVehicleData;
+extern SDLRPCFunctionName const SDLRPCFunctionNameGetInteriorVehicleDataConsent;
extern SDLRPCFunctionName const SDLRPCFunctionNameGetSystemCapability;
extern SDLRPCFunctionName const SDLRPCFunctionNameGetVehicleData;
extern SDLRPCFunctionName const SDLRPCFunctionNameGetWayPoints;
@@ -68,6 +70,7 @@ extern SDLRPCFunctionName const SDLRPCFunctionNamePerformInteraction;
extern SDLRPCFunctionName const SDLRPCFunctionNamePublishAppService;
extern SDLRPCFunctionName const SDLRPCFunctionNamePutFile;
extern SDLRPCFunctionName const SDLRPCFunctionNameReadDID;
+extern SDLRPCFunctionName const SDLRPCFunctionNameReleaseInteriorVehicleDataModule;
extern SDLRPCFunctionName const SDLRPCFunctionNameRegisterAppInterface;
extern SDLRPCFunctionName const SDLRPCFunctionNameReserved;
extern SDLRPCFunctionName const SDLRPCFunctionNameResetGlobalProperties;
diff --git a/SmartDeviceLink/SDLRPCFunctionNames.m b/SmartDeviceLink/SDLRPCFunctionNames.m
index acb426970..744922420 100644
--- a/SmartDeviceLink/SDLRPCFunctionNames.m
+++ b/SmartDeviceLink/SDLRPCFunctionNames.m
@@ -13,6 +13,7 @@ SDLRPCFunctionName const SDLRPCFunctionNameAddSubMenu = @"AddSubMenu";
SDLRPCFunctionName const SDLRPCFunctionNameAlert = @"Alert";
SDLRPCFunctionName const SDLRPCFunctionNameAlertManeuver = @"AlertManeuver";
SDLRPCFunctionName const SDLRPCFunctionNameButtonPress = @"ButtonPress";
+SDLRPCFunctionName const SDLRPCFunctionNameCancelInteraction = @"CancelInteraction";
SDLRPCFunctionName const SDLRPCFunctionNameChangeRegistration = @"ChangeRegistration";
SDLRPCFunctionName const SDLRPCFunctionNameCloseApplication = @"CloseApplication";
SDLRPCFunctionName const SDLRPCFunctionNameCreateInteractionChoiceSet = @"CreateInteractionChoiceSet";
@@ -30,6 +31,7 @@ SDLRPCFunctionName const SDLRPCFunctionNameGetDTCs = @"GetDTCs";
SDLRPCFunctionName const SDLRPCFunctionNameGetFile = @"GetFile";
SDLRPCFunctionName const SDLRPCFunctionNameGetCloudAppProperties = @"GetCloudAppProperties";
SDLRPCFunctionName const SDLRPCFunctionNameGetInteriorVehicleData = @"GetInteriorVehicleData";
+SDLRPCFunctionName const SDLRPCFunctionNameGetInteriorVehicleDataConsent = @"GetInteriorVehicleDataConsent";
SDLRPCFunctionName const SDLRPCFunctionNameGetSystemCapability = @"GetSystemCapability";
SDLRPCFunctionName const SDLRPCFunctionNameGetVehicleData = @"GetVehicleData";
SDLRPCFunctionName const SDLRPCFunctionNameGetWayPoints = @"GetWayPoints";
@@ -63,6 +65,7 @@ SDLRPCFunctionName const SDLRPCFunctionNamePerformInteraction = @"PerformInterac
SDLRPCFunctionName const SDLRPCFunctionNamePublishAppService = @"PublishAppService";
SDLRPCFunctionName const SDLRPCFunctionNamePutFile = @"PutFile";
SDLRPCFunctionName const SDLRPCFunctionNameReadDID = @"ReadDID";
+SDLRPCFunctionName const SDLRPCFunctionNameReleaseInteriorVehicleDataModule = @"ReleaseInteriorVehicleDataModule";
SDLRPCFunctionName const SDLRPCFunctionNameRegisterAppInterface = @"RegisterAppInterface";
SDLRPCFunctionName const SDLRPCFunctionNameReserved = @"reserved";
SDLRPCFunctionName const SDLRPCFunctionNameResetGlobalProperties = @"ResetGlobalProperties";
diff --git a/SmartDeviceLink/SDLRPCParameterNames.h b/SmartDeviceLink/SDLRPCParameterNames.h
index 482c37510..5d3f092d8 100644
--- a/SmartDeviceLink/SDLRPCParameterNames.h
+++ b/SmartDeviceLink/SDLRPCParameterNames.h
@@ -29,6 +29,7 @@ extern SDLRPCParameterName const SDLRPCParameterNameAlignment;
extern SDLRPCParameterName const SDLRPCParameterNameAllocatedModules;
extern SDLRPCParameterName const SDLRPCParameterNameAllowAppConsumers;
extern SDLRPCParameterName const SDLRPCParameterNameAllowed;
+extern SDLRPCParameterName const SDLRPCParameterNameAllowMultipleAccess;
extern SDLRPCParameterName const SDLRPCParameterNameAltitude;
extern SDLRPCParameterName const SDLRPCParameterNameAltitudeMeters;
extern SDLRPCParameterName const SDLRPCParameterNameAmbientLightSensorStatus;
@@ -85,7 +86,11 @@ extern SDLRPCParameterName const SDLRPCParameterNameButtonCapabilities;
extern SDLRPCParameterName const SDLRPCParameterNameButtonEventMode;
extern SDLRPCParameterName const SDLRPCParameterNameButtonName;
extern SDLRPCParameterName const SDLRPCParameterNameButtonPressMode;
+extern SDLRPCParameterName const SDLRPCParameterNameCancelID;
extern SDLRPCParameterName const SDLRPCParameterNameColor;
+extern SDLRPCParameterName const SDLRPCParameterNameCol;
+extern SDLRPCParameterName const SDLRPCParameterNameColSpan;
+extern SDLRPCParameterName const SDLRPCParameterNameColumns;
extern SDLRPCParameterName const SDLRPCParameterNameCoolingEnabled;
extern SDLRPCParameterName const SDLRPCParameterNameCoolingEnabledAvailable;
extern SDLRPCParameterName const SDLRPCParameterNameCoolingLevel;
@@ -145,6 +150,7 @@ extern SDLRPCParameterName const SDLRPCParameterNameDialNumberEnabled;
extern SDLRPCParameterName const SDLRPCParameterNameDIDLocation;
extern SDLRPCParameterName const SDLRPCParameterNameDIDResult;
extern SDLRPCParameterName const SDLRPCParameterNameDimension;
+extern SDLRPCParameterName const SDLRPCParameterNameDisplays;
extern SDLRPCParameterName const SDLRPCParameterNameDisplayCapabilities;
extern SDLRPCParameterName const SDLRPCParameterNameDisplayMode;
extern SDLRPCParameterName const SDLRPCParameterNameDisplayModeUnitAvailable;
@@ -214,11 +220,13 @@ extern SDLRPCParameterName const SDLRPCParameterNameFuelLevelState;
extern SDLRPCParameterName const SDLRPCParameterNameFuelMaintenanceMode;
extern SDLRPCParameterName const SDLRPCParameterNameFuelRange;
extern SDLRPCParameterName const SDLRPCParameterNameFullAppID;
+extern SDLRPCParameterName const SDLRPCParameterNameFunctionID;
extern SDLRPCParameterName const SDLRPCParameterNameGetWayPointsEnabled;
extern SDLRPCParameterName const SDLRPCParameterNameGPS;
extern SDLRPCParameterName const SDLRPCParameterNameGraphic;
extern SDLRPCParameterName const SDLRPCParameterNameGraphicSupported;
extern SDLRPCParameterName const SDLRPCParameterNameGreen;
+extern SDLRPCParameterName const SDLRPCParameterNameGrid;
extern SDLRPCParameterName const SDLRPCParameterNameHandledRPCs;
extern SDLRPCParameterName const SDLRPCParameterNameHapticRectData;
extern SDLRPCParameterName const SDLRPCParameterNameHapticSpatialDataSupported;
@@ -309,6 +317,9 @@ extern SDLRPCParameterName const SDLRPCParameterNameLeftRearInflatableBelted;
extern SDLRPCParameterName const SDLRPCParameterNameLeftRow2BuckleBelted;
extern SDLRPCParameterName const SDLRPCParameterNameLeftRow3BuckleBelted;
extern SDLRPCParameterName const SDLRPCParameterNameLength;
+extern SDLRPCParameterName const SDLRPCParameterNameLevel;
+extern SDLRPCParameterName const SDLRPCParameterNameLevels;
+extern SDLRPCParameterName const SDLRPCParameterNameLevelSpan;
extern SDLRPCParameterName const SDLRPCParameterNameLightControlCapabilities;
extern SDLRPCParameterName const SDLRPCParameterNameLightControlData;
extern SDLRPCParameterName const SDLRPCParameterNameLightState;
@@ -387,6 +398,9 @@ extern SDLRPCParameterName const SDLRPCParameterNameMinuteForecast;
extern SDLRPCParameterName const SDLRPCParameterNameMinutes;
extern SDLRPCParameterName const SDLRPCParameterNameModel;
extern SDLRPCParameterName const SDLRPCParameterNameModuleData;
+extern SDLRPCParameterName const SDLRPCParameterNameModuleId;
+extern SDLRPCParameterName const SDLRPCParameterNameModuleIds;
+extern SDLRPCParameterName const SDLRPCParameterNameModuleInfo;
extern SDLRPCParameterName const SDLRPCParameterNameModuleName;
extern SDLRPCParameterName const SDLRPCParameterNameModuleType;
extern SDLRPCParameterName const SDLRPCParameterNameModelYear;
@@ -495,6 +509,7 @@ extern SDLRPCParameterName const SDLRPCParameterNameRect;
extern SDLRPCParameterName const SDLRPCParameterNameRed;
extern SDLRPCParameterName const SDLRPCParameterNameRegion;
extern SDLRPCParameterName const SDLRPCParameterNameRegions;
+extern SDLRPCParameterName const SDLRPCParameterNameRemoteControl;
extern SDLRPCParameterName const SDLRPCParameterNameRemoteControlCapability;
extern SDLRPCParameterName const SDLRPCParameterNameRequest;
extern SDLRPCParameterName const SDLRPCParameterNameRequestServiceActive;
@@ -513,7 +528,9 @@ extern SDLRPCParameterName const SDLRPCParameterNameRightRearInflatableBelted;
extern SDLRPCParameterName const SDLRPCParameterNameRightRow2BuckleBelted;
extern SDLRPCParameterName const SDLRPCParameterNameRightRow3BuckleBelted;
extern SDLRPCParameterName const SDLRPCParameterNameRolloverEvent;
+extern SDLRPCParameterName const SDLRPCParameterNameRow;
extern SDLRPCParameterName const SDLRPCParameterNameRows;
+extern SDLRPCParameterName const SDLRPCParameterNameRowSpan;
extern SDLRPCParameterName const SDLRPCParameterNameRPCName;
extern SDLRPCParameterName const SDLRPCParameterNameRPCSpecVersion;
extern SDLRPCParameterName const SDLRPCParameterNameRPM;
@@ -526,6 +543,9 @@ extern SDLRPCParameterName const SDLRPCParameterNameSDLVersion;
extern SDLRPCParameterName const SDLRPCParameterNameSearchAddress;
extern SDLRPCParameterName const SDLRPCParameterNameSeatControlData;
extern SDLRPCParameterName const SDLRPCParameterNameSeatControlCapabilities;
+extern SDLRPCParameterName const SDLRPCParameterNameSeatLocation;
+extern SDLRPCParameterName const SDLRPCParameterNameSeatLocationCapability;
+extern SDLRPCParameterName const SDLRPCParameterNameSeats;
extern SDLRPCParameterName const SDLRPCParameterNameSecondaryColor;
extern SDLRPCParameterName const SDLRPCParameterNameSecondaryGraphic;
extern SDLRPCParameterName const SDLRPCParameterNameSecondaryImage;
@@ -534,6 +554,7 @@ extern SDLRPCParameterName const SDLRPCParameterNameSecond;
extern SDLRPCParameterName const SDLRPCParameterNameSeconds;
extern SDLRPCParameterName const SDLRPCParameterNameSendLocationEnabled;
extern SDLRPCParameterName const SDLRPCParameterNameServiceActive;
+extern SDLRPCParameterName const SDLRPCParameterNameServiceArea;
extern SDLRPCParameterName const SDLRPCParameterNameServiceData;
extern SDLRPCParameterName const SDLRPCParameterNameServiceIcon;
extern SDLRPCParameterName const SDLRPCParameterNameServiceID;
@@ -650,6 +671,7 @@ extern SDLRPCParameterName const SDLRPCParameterNameUpDownAvailable;
extern SDLRPCParameterName const SDLRPCParameterNameURL;
extern SDLRPCParameterName const SDLRPCParameterNameURLUppercase;
extern SDLRPCParameterName const SDLRPCParameterNameUserDisallowed;
+extern SDLRPCParameterName const SDLRPCParameterNameUserLocation;
extern SDLRPCParameterName const SDLRPCParameterNameUserSelected;
extern SDLRPCParameterName const SDLRPCParameterNameUTCDay;
extern SDLRPCParameterName const SDLRPCParameterNameUTCHours;
diff --git a/SmartDeviceLink/SDLRPCParameterNames.m b/SmartDeviceLink/SDLRPCParameterNames.m
index 7dc70c057..43831f07b 100644
--- a/SmartDeviceLink/SDLRPCParameterNames.m
+++ b/SmartDeviceLink/SDLRPCParameterNames.m
@@ -26,6 +26,7 @@ SDLRPCParameterName const SDLRPCParameterNameAlertText3 = @"alertText3";
SDLRPCParameterName const SDLRPCParameterNameAlignment = @"alignment";
SDLRPCParameterName const SDLRPCParameterNameAllowAppConsumers = @"allowAppConsumers";
SDLRPCParameterName const SDLRPCParameterNameAllowed = @"allowed";
+SDLRPCParameterName const SDLRPCParameterNameAllowMultipleAccess = @"allowMultipleAccess";
SDLRPCParameterName const SDLRPCParameterNameAllocatedModules = @"allocatedModules";
SDLRPCParameterName const SDLRPCParameterNameAltitude = @"altitude";
SDLRPCParameterName const SDLRPCParameterNameAltitudeMeters = @"altitudeMeters";
@@ -83,6 +84,7 @@ SDLRPCParameterName const SDLRPCParameterNameButtonCapabilities = @"buttonCapabi
SDLRPCParameterName const SDLRPCParameterNameButtonEventMode = @"buttonEventMode";
SDLRPCParameterName const SDLRPCParameterNameButtonName = @"buttonName";
SDLRPCParameterName const SDLRPCParameterNameButtonPressMode = @"buttonPressMode";
+SDLRPCParameterName const SDLRPCParameterNameCancelID = @"cancelID";
SDLRPCParameterName const SDLRPCParameterNameCoolingEnabled = @"coolingEnabled";
SDLRPCParameterName const SDLRPCParameterNameCoolingEnabledAvailable = @"coolingEnabledAvailable";
SDLRPCParameterName const SDLRPCParameterNameCoolingLevel = @"coolingLevel";
@@ -105,6 +107,9 @@ SDLRPCParameterName const SDLRPCParameterNameCloudCover = @"cloudCover";
SDLRPCParameterName const SDLRPCParameterNameClusterModes = @"clusterModes";
SDLRPCParameterName const SDLRPCParameterNameClusterModeStatus = @"clusterModeStatus";
SDLRPCParameterName const SDLRPCParameterNameColor = @"color";
+SDLRPCParameterName const SDLRPCParameterNameCol = @"col";
+SDLRPCParameterName const SDLRPCParameterNameColSpan = @"colspan";
+SDLRPCParameterName const SDLRPCParameterNameColumns = @"columns";
SDLRPCParameterName const SDLRPCParameterNameCommandIcon = @"cmdIcon";
SDLRPCParameterName const SDLRPCParameterNameCommandId = @"cmdID";
SDLRPCParameterName const SDLRPCParameterNameCompassDirection = @"compassDirection";
@@ -142,6 +147,7 @@ SDLRPCParameterName const SDLRPCParameterNameDialNumberEnabled = @"dialNumberEna
SDLRPCParameterName const SDLRPCParameterNameDIDLocation = @"didLocation";
SDLRPCParameterName const SDLRPCParameterNameDIDResult = @"didResult";
SDLRPCParameterName const SDLRPCParameterNameDimension = @"dimension";
+SDLRPCParameterName const SDLRPCParameterNameDisplays = @"displays";
SDLRPCParameterName const SDLRPCParameterNameDisplayCapabilities = @"displayCapabilities";
SDLRPCParameterName const SDLRPCParameterNameDisplayLayout = @"displayLayout";
SDLRPCParameterName const SDLRPCParameterNameDisplayMode = @"displayMode";
@@ -209,12 +215,14 @@ SDLRPCParameterName const SDLRPCParameterNameFuelLevel = @"fuelLevel";
SDLRPCParameterName const SDLRPCParameterNameFuelLevelState = @"fuelLevel_State";
SDLRPCParameterName const SDLRPCParameterNameFuelMaintenanceMode = @"fuelMaintenanceMode";
SDLRPCParameterName const SDLRPCParameterNameFuelRange = @"fuelRange";
+SDLRPCParameterName const SDLRPCParameterNameFunctionID = @"functionID";
SDLRPCParameterName const SDLRPCParameterNameFullAppID = @"fullAppID";
SDLRPCParameterName const SDLRPCParameterNameGetWayPointsEnabled = @"getWayPointsEnabled";
SDLRPCParameterName const SDLRPCParameterNameGPS = @"gps";
SDLRPCParameterName const SDLRPCParameterNameGraphic = @"graphic";
SDLRPCParameterName const SDLRPCParameterNameGraphicSupported = @"graphicSupported";
SDLRPCParameterName const SDLRPCParameterNameGreen = @"green";
+SDLRPCParameterName const SDLRPCParameterNameGrid = @"grid";
SDLRPCParameterName const SDLRPCParameterNameHandledRPCs = @"handledRPCs";
SDLRPCParameterName const SDLRPCParameterNameHapticRectData = @"hapticRectData";
SDLRPCParameterName const SDLRPCParameterNameHapticSpatialDataSupported = @"hapticSpatialDataSupported";
@@ -306,6 +314,9 @@ SDLRPCParameterName const SDLRPCParameterNameLeftRearInflatableBelted = @"leftRe
SDLRPCParameterName const SDLRPCParameterNameLeftRow2BuckleBelted = @"leftRow2BuckleBelted";
SDLRPCParameterName const SDLRPCParameterNameLeftRow3BuckleBelted = @"leftRow3BuckleBelted";
SDLRPCParameterName const SDLRPCParameterNameLength = @"length";
+SDLRPCParameterName const SDLRPCParameterNameLevel = @"level";
+SDLRPCParameterName const SDLRPCParameterNameLevels = @"levels";
+SDLRPCParameterName const SDLRPCParameterNameLevelSpan = @"levelspan";
SDLRPCParameterName const SDLRPCParameterNameLightControlCapabilities = @"lightControlCapabilities";
SDLRPCParameterName const SDLRPCParameterNameLightControlData = @"lightControlData";
SDLRPCParameterName const SDLRPCParameterNameLightState = @"lightState";
@@ -380,6 +391,9 @@ SDLRPCParameterName const SDLRPCParameterNameMinuteForecast = @"minuteForecast";
SDLRPCParameterName const SDLRPCParameterNameMinutes = @"minutes";
SDLRPCParameterName const SDLRPCParameterNameModel = @"model";
SDLRPCParameterName const SDLRPCParameterNameModuleData = @"moduleData";
+SDLRPCParameterName const SDLRPCParameterNameModuleId = @"moduleId";
+SDLRPCParameterName const SDLRPCParameterNameModuleIds = @"moduleIds";
+SDLRPCParameterName const SDLRPCParameterNameModuleInfo = @"moduleInfo";
SDLRPCParameterName const SDLRPCParameterNameModuleName = @"moduleName";
SDLRPCParameterName const SDLRPCParameterNameModuleType = @"moduleType";
SDLRPCParameterName const SDLRPCParameterNameModelYear = @"modelYear";
@@ -489,6 +503,7 @@ SDLRPCParameterName const SDLRPCParameterNameRed = @"red";
SDLRPCParameterName const SDLRPCParameterNameRect = @"rect";
SDLRPCParameterName const SDLRPCParameterNameRegion = @"REG";
SDLRPCParameterName const SDLRPCParameterNameRegions = @"regions";
+SDLRPCParameterName const SDLRPCParameterNameRemoteControl = @"remoteControl";
SDLRPCParameterName const SDLRPCParameterNameRemoteControlCapability = @"remoteControlCapability";
SDLRPCParameterName const SDLRPCParameterNameRequest = @"request";
SDLRPCParameterName const SDLRPCParameterNameRequestServiceActive = @"requestServiceActive";
@@ -508,7 +523,9 @@ SDLRPCParameterName const SDLRPCParameterNameRightRearInflatableBelted = @"right
SDLRPCParameterName const SDLRPCParameterNameRightRow2BuckleBelted = @"rightRow2BuckleBelted";
SDLRPCParameterName const SDLRPCParameterNameRightRow3BuckleBelted = @"rightRow3BuckleBelted";
SDLRPCParameterName const SDLRPCParameterNameRolloverEvent = @"rolloverEvent";
+SDLRPCParameterName const SDLRPCParameterNameRow = @"row";
SDLRPCParameterName const SDLRPCParameterNameRows = @"rows";
+SDLRPCParameterName const SDLRPCParameterNameRowSpan = @"rowspan";
SDLRPCParameterName const SDLRPCParameterNameRPCName = @"rpcName";
SDLRPCParameterName const SDLRPCParameterNameRPCSpecVersion = @"rpcSpecVersion";
SDLRPCParameterName const SDLRPCParameterNameRPM = @"rpm";
@@ -521,6 +538,9 @@ SDLRPCParameterName const SDLRPCParameterNameSDLVersion = @"sdlVersion";
SDLRPCParameterName const SDLRPCParameterNameSearchAddress = @"searchAddress";
SDLRPCParameterName const SDLRPCParameterNameSeatControlData = @"seatControlData";
SDLRPCParameterName const SDLRPCParameterNameSeatControlCapabilities = @"seatControlCapabilities";
+SDLRPCParameterName const SDLRPCParameterNameSeatLocation = @"seatLocation";
+SDLRPCParameterName const SDLRPCParameterNameSeatLocationCapability = @"seatLocationCapability";
+SDLRPCParameterName const SDLRPCParameterNameSeats = @"seats";
SDLRPCParameterName const SDLRPCParameterNameSecondaryGraphic = @"secondaryGraphic";
SDLRPCParameterName const SDLRPCParameterNameSecondaryImage = @"secondaryImage";
SDLRPCParameterName const SDLRPCParameterNameSecondaryText = @"secondaryText";
@@ -528,6 +548,7 @@ SDLRPCParameterName const SDLRPCParameterNameSecond = @"second";
SDLRPCParameterName const SDLRPCParameterNameSeconds = @"seconds";
SDLRPCParameterName const SDLRPCParameterNameSendLocationEnabled = @"sendLocationEnabled";
SDLRPCParameterName const SDLRPCParameterNameServiceActive = @"serviceActive";
+SDLRPCParameterName const SDLRPCParameterNameServiceArea = @"serviceArea";
SDLRPCParameterName const SDLRPCParameterNameServiceData = @"serviceData";
SDLRPCParameterName const SDLRPCParameterNameServiceIcon = @"serviceIcon";
SDLRPCParameterName const SDLRPCParameterNameServiceID = @"serviceID";
@@ -645,6 +666,7 @@ SDLRPCParameterName const SDLRPCParameterNameUpDownAvailable = @"upDownAvailable
SDLRPCParameterName const SDLRPCParameterNameURL = @"url";
SDLRPCParameterName const SDLRPCParameterNameURLUppercase = @"URL";
SDLRPCParameterName const SDLRPCParameterNameUserDisallowed = @"userDisallowed";
+SDLRPCParameterName const SDLRPCParameterNameUserLocation = @"userLocation";
SDLRPCParameterName const SDLRPCParameterNameUserSelected = @"userSelected";
SDLRPCParameterName const SDLRPCParameterNameUTCDay = @"utcDay";
SDLRPCParameterName const SDLRPCParameterNameUTCHours = @"utcHours";
diff --git a/SmartDeviceLink/SDLRadioControlCapabilities.h b/SmartDeviceLink/SDLRadioControlCapabilities.h
index 2552e406f..0c35df16f 100644
--- a/SmartDeviceLink/SDLRadioControlCapabilities.h
+++ b/SmartDeviceLink/SDLRadioControlCapabilities.h
@@ -3,6 +3,7 @@
//
#import "SDLRPCMessage.h"
+#import "SDLModuleInfo.h"
NS_ASSUME_NONNULL_BEGIN
@@ -37,7 +38,7 @@ NS_ASSUME_NONNULL_BEGIN
@param radioFrequencyAvailable Availability of the control of radio frequency.
@param hdChannelAvailable Availability of the control of HD radio channel.
@param rdsDataAvailable Availability of the getting Radio Data System (RDS) data.
- @param availableHDChannelsAvailable Availability of the list of available HD sub-channel indexes.
+ @param availableHDsAvailable Availability of the getting the number of available HD channels.
@param stateAvailable Availability of the getting the Radio state.
@param signalStrengthAvailable Availability of the getting the signal strength.
@param signalChangeThresholdAvailable Availability of the getting the signal Change Threshold.
@@ -46,18 +47,39 @@ NS_ASSUME_NONNULL_BEGIN
@param sisDataAvailable Availability of sis data.
@return An instance of the SDLRadioControlCapabilities class
*/
-- (instancetype)initWithModuleName:(NSString *)moduleName radioEnableAvailable:(BOOL)radioEnableAvailable radioBandAvailable:(BOOL)radioBandAvailable radioFrequencyAvailable:(BOOL)radioFrequencyAvailable hdChannelAvailable:(BOOL)hdChannelAvailable rdsDataAvailable:(BOOL)rdsDataAvailable availableHDChannelsAvailable:(BOOL)availableHDChannelsAvailable stateAvailable:(BOOL)stateAvailable signalStrengthAvailable:(BOOL)signalStrengthAvailable signalChangeThresholdAvailable:(BOOL)signalChangeThresholdAvailable hdRadioEnableAvailable:(BOOL)hdRadioEnableAvailable siriusXMRadioAvailable:(BOOL)siriusXMRadioAvailable sisDataAvailable:(BOOL)sisDataAvailable;
+- (instancetype)initWithModuleName:(NSString *)moduleName radioEnableAvailable:(BOOL)radioEnableAvailable radioBandAvailable:(BOOL)radioBandAvailable radioFrequencyAvailable:(BOOL)radioFrequencyAvailable hdChannelAvailable:(BOOL)hdChannelAvailable rdsDataAvailable:(BOOL)rdsDataAvailable availableHDsAvailable:(BOOL)availableHDsAvailable stateAvailable:(BOOL)stateAvailable signalStrengthAvailable:(BOOL)signalStrengthAvailable signalChangeThresholdAvailable:(BOOL)signalChangeThresholdAvailable hdRadioEnableAvailable:(BOOL)hdRadioEnableAvailable siriusXMRadioAvailable:(BOOL)siriusXMRadioAvailable sisDataAvailable:(BOOL)sisDataAvailable __deprecated_msg(("Use initWithModuleName:moduleName:radioEnableAvailable radioFrequencyAvailable:hdChannelAvailable:rdsDataAvailable:availableHDChannelsAvailable:stateAvailable:signalStrengthAvailable:signalChangeThresholdAvailable:hdRadioEnableAvailable:siriusXMRadioAvailable:sisDataAvailable: instead"));
/**
Constructs a newly allocated SDLRadioControlCapabilities object with given parameters.
+
+ @param moduleName The short friendly name of the radio control module.
+ @param radioEnableAvailable Availability of the control of enable/disable radio.
+ @param radioBandAvailable Availability of the control of radio band.
+ @param radioFrequencyAvailable Availability of the control of radio frequency.
+ @param hdChannelAvailable Availability of the control of HD radio channel.
+ @param rdsDataAvailable Availability of the getting Radio Data System (RDS) data.
+ @param availableHDChannelsAvailable Availability of the list of available HD sub-channel indexes.
+ @param stateAvailable Availability of the getting the Radio state.
+ @param signalStrengthAvailable Availability of the getting the signal strength.
+ @param signalChangeThresholdAvailable Availability of the getting the signal Change Threshold.
+ @param hdRadioEnableAvailable Availability of the control of enable/disable HD radio.
+ @param siriusXMRadioAvailable Availability of sirius XM radio.
+ @param sisDataAvailable Availability of sis data.
+ @return An instance of the SDLRadioControlCapabilities class
+ */
+- (instancetype)initWithModuleName:(NSString *)moduleName radioEnableAvailable:(BOOL)radioEnableAvailable radioBandAvailable:(BOOL)radioBandAvailable radioFrequencyAvailable:(BOOL)radioFrequencyAvailable hdChannelAvailable:(BOOL)hdChannelAvailable rdsDataAvailable:(BOOL)rdsDataAvailable availableHDChannelsAvailable:(BOOL)availableHDChannelsAvailable stateAvailable:(BOOL)stateAvailable signalStrengthAvailable:(BOOL)signalStrengthAvailable signalChangeThresholdAvailable:(BOOL)signalChangeThresholdAvailable hdRadioEnableAvailable:(BOOL)hdRadioEnableAvailable siriusXMRadioAvailable:(BOOL)siriusXMRadioAvailable sisDataAvailable:(BOOL)sisDataAvailable __deprecated_msg(("Use initWithModuleName:moduleName:moduleInfo:radioEnableAvailable radioFrequencyAvailable:hdChannelAvailable:rdsDataAvailable:availableHDChannelsAvailable:stateAvailable:signalStrengthAvailable:signalChangeThresholdAvailable:hdRadioEnableAvailable:siriusXMRadioAvailable:sisDataAvailable: instead"));
+/**
+ Constructs a newly allocated SDLRadioControlCapabilities object with given parameters.
+
@param moduleName The short friendly name of the radio control module.
+ @param moduleInfo Information about a RC module, including its id.
@param radioEnableAvailable Availability of the control of enable/disable radio.
@param radioBandAvailable Availability of the control of radio band.
@param radioFrequencyAvailable Availability of the control of radio frequency.
@param hdChannelAvailable Availability of the control of HD radio channel.
@param rdsDataAvailable Availability of the getting Radio Data System (RDS) data.
- @param availableHDsAvailable Availability of the getting the number of available HD channels.
+ @param availableHDChannelsAvailable Availability of the list of available HD sub-channel indexes.
@param stateAvailable Availability of the getting the Radio state.
@param signalStrengthAvailable Availability of the getting the signal strength.
@param signalChangeThresholdAvailable Availability of the getting the signal Change Threshold.
@@ -66,7 +88,7 @@ NS_ASSUME_NONNULL_BEGIN
@param sisDataAvailable Availability of sis data.
@return An instance of the SDLRadioControlCapabilities class
*/
-- (instancetype)initWithModuleName:(NSString *)moduleName radioEnableAvailable:(BOOL)radioEnableAvailable radioBandAvailable:(BOOL)radioBandAvailable radioFrequencyAvailable:(BOOL)radioFrequencyAvailable hdChannelAvailable:(BOOL)hdChannelAvailable rdsDataAvailable:(BOOL)rdsDataAvailable availableHDsAvailable:(BOOL)availableHDsAvailable stateAvailable:(BOOL)stateAvailable signalStrengthAvailable:(BOOL)signalStrengthAvailable signalChangeThresholdAvailable:(BOOL)signalChangeThresholdAvailable hdRadioEnableAvailable:(BOOL)hdRadioEnableAvailable siriusXMRadioAvailable:(BOOL)siriusXMRadioAvailable sisDataAvailable:(BOOL)sisDataAvailable __deprecated_msg(("Use initWithModuleName:moduleName:radioEnableAvailable radioFrequencyAvailable:hdChannelAvailable:rdsDataAvailable:availableHDChannelsAvailable:stateAvailable:signalStrengthAvailable:signalChangeThresholdAvailable:hdRadioEnableAvailable:siriusXMRadioAvailable:sisDataAvailable: instead"));
+- (instancetype)initWithModuleName:(NSString *)moduleName moduleInfo:(nullable SDLModuleInfo *)moduleInfo radioEnableAvailable:(BOOL)radioEnableAvailable radioBandAvailable:(BOOL)radioBandAvailable radioFrequencyAvailable:(BOOL)radioFrequencyAvailable hdChannelAvailable:(BOOL)hdChannelAvailable rdsDataAvailable:(BOOL)rdsDataAvailable availableHDChannelsAvailable:(BOOL)availableHDChannelsAvailable stateAvailable:(BOOL)stateAvailable signalStrengthAvailable:(BOOL)signalStrengthAvailable signalChangeThresholdAvailable:(BOOL)signalChangeThresholdAvailable hdRadioEnableAvailable:(BOOL)hdRadioEnableAvailable siriusXMRadioAvailable:(BOOL)siriusXMRadioAvailable sisDataAvailable:(BOOL)sisDataAvailable;
/**
* The short friendly name of the radio control module.
@@ -191,6 +213,13 @@ NS_ASSUME_NONNULL_BEGIN
*/
@property (nullable, strong, nonatomic) NSNumber<SDLBool> *sisDataAvailable;
+/**
+ * Information about a RC module, including its id.
+ *
+ * SDLModuleInfo
+ */
+@property (nullable, strong, nonatomic) SDLModuleInfo *moduleInfo;
+
@end
NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLRadioControlCapabilities.m b/SmartDeviceLink/SDLRadioControlCapabilities.m
index 7846ff267..921e2e651 100644
--- a/SmartDeviceLink/SDLRadioControlCapabilities.m
+++ b/SmartDeviceLink/SDLRadioControlCapabilities.m
@@ -14,6 +14,29 @@ NS_ASSUME_NONNULL_BEGIN
return [self initWithModuleName:moduleName radioEnableAvailable:radioEnableAvailable radioBandAvailable:radioBandAvailable radioFrequencyAvailable:radioFrequencyAvailable hdChannelAvailable:hdChannelAvailable rdsDataAvailable:rdsDataAvailable availableHDsAvailable:availableHDsAvailable stateAvailable:stateAvailable signalStrengthAvailable:signalStrengthAvailable signalChangeThresholdAvailable:signalChangeThresholdAvailable hdRadioEnableAvailable:NO siriusXMRadioAvailable:NO sisDataAvailable:NO];
}
+- (instancetype)initWithModuleName:(NSString *)moduleName radioEnableAvailable:(BOOL)radioEnableAvailable radioBandAvailable:(BOOL)radioBandAvailable radioFrequencyAvailable:(BOOL)radioFrequencyAvailable hdChannelAvailable:(BOOL)hdChannelAvailable rdsDataAvailable:(BOOL)rdsDataAvailable availableHDsAvailable:(BOOL)availableHDsAvailable stateAvailable:(BOOL)stateAvailable signalStrengthAvailable:(BOOL)signalStrengthAvailable signalChangeThresholdAvailable:(BOOL)signalChangeThresholdAvailable hdRadioEnableAvailable:(BOOL)hdRadioEnableAvailable siriusXMRadioAvailable:(BOOL)siriusXMRadioAvailable sisDataAvailable:(BOOL)sisDataAvailable {
+ self = [self init];
+ if(!self){
+ return nil;
+ }
+
+ self.moduleName = moduleName;
+ self.radioEnableAvailable = @(radioEnableAvailable);
+ self.radioBandAvailable = @(radioBandAvailable);
+ self.radioFrequencyAvailable = @(radioFrequencyAvailable);
+ self.hdChannelAvailable = @(hdChannelAvailable);
+ self.rdsDataAvailable = @(rdsDataAvailable);
+ self.availableHDsAvailable = @(availableHDsAvailable);
+ self.stateAvailable = @(stateAvailable);
+ self.signalStrengthAvailable = @(signalStrengthAvailable);
+ self.signalChangeThresholdAvailable = @(signalChangeThresholdAvailable);
+ self.hdRadioEnableAvailable = @(hdRadioEnableAvailable);
+ self.siriusXMRadioAvailable = @(siriusXMRadioAvailable);
+ self.sisDataAvailable = @(sisDataAvailable);
+
+ return self;
+}
+
- (instancetype)initWithModuleName:(NSString *)moduleName radioEnableAvailable:(BOOL)radioEnableAvailable radioBandAvailable:(BOOL)radioBandAvailable radioFrequencyAvailable:(BOOL)radioFrequencyAvailable hdChannelAvailable:(BOOL)hdChannelAvailable rdsDataAvailable:(BOOL)rdsDataAvailable availableHDChannelsAvailable:(BOOL)availableHDChannelsAvailable stateAvailable:(BOOL)stateAvailable signalStrengthAvailable:(BOOL)signalStrengthAvailable signalChangeThresholdAvailable:(BOOL)signalChangeThresholdAvailable hdRadioEnableAvailable:(BOOL)hdRadioEnableAvailable siriusXMRadioAvailable:(BOOL)siriusXMRadioAvailable sisDataAvailable:(BOOL)sisDataAvailable {
self = [self init];
if(!self){
@@ -37,26 +60,27 @@ NS_ASSUME_NONNULL_BEGIN
return self;
}
-- (instancetype)initWithModuleName:(NSString *)moduleName radioEnableAvailable:(BOOL)radioEnableAvailable radioBandAvailable:(BOOL)radioBandAvailable radioFrequencyAvailable:(BOOL)radioFrequencyAvailable hdChannelAvailable:(BOOL)hdChannelAvailable rdsDataAvailable:(BOOL)rdsDataAvailable availableHDsAvailable:(BOOL)availableHDsAvailable stateAvailable:(BOOL)stateAvailable signalStrengthAvailable:(BOOL)signalStrengthAvailable signalChangeThresholdAvailable:(BOOL)signalChangeThresholdAvailable hdRadioEnableAvailable:(BOOL)hdRadioEnableAvailable siriusXMRadioAvailable:(BOOL)siriusXMRadioAvailable sisDataAvailable:(BOOL)sisDataAvailable {
+- (instancetype)initWithModuleName:(NSString *)moduleName moduleInfo:(nullable SDLModuleInfo *)moduleInfo radioEnableAvailable:(BOOL)radioEnableAvailable radioBandAvailable:(BOOL)radioBandAvailable radioFrequencyAvailable:(BOOL)radioFrequencyAvailable hdChannelAvailable:(BOOL)hdChannelAvailable rdsDataAvailable:(BOOL)rdsDataAvailable availableHDChannelsAvailable:(BOOL)availableHDChannelsAvailable stateAvailable:(BOOL)stateAvailable signalStrengthAvailable:(BOOL)signalStrengthAvailable signalChangeThresholdAvailable:(BOOL)signalChangeThresholdAvailable hdRadioEnableAvailable:(BOOL)hdRadioEnableAvailable siriusXMRadioAvailable:(BOOL)siriusXMRadioAvailable sisDataAvailable:(BOOL)sisDataAvailable {
self = [self init];
if(!self){
return nil;
}
-
+
self.moduleName = moduleName;
+ self.moduleInfo = moduleInfo;
self.radioEnableAvailable = @(radioEnableAvailable);
self.radioBandAvailable = @(radioBandAvailable);
self.radioFrequencyAvailable = @(radioFrequencyAvailable);
self.hdChannelAvailable = @(hdChannelAvailable);
self.rdsDataAvailable = @(rdsDataAvailable);
- self.availableHDsAvailable = @(availableHDsAvailable);
+ self.availableHDChannelsAvailable = @(availableHDChannelsAvailable);
self.stateAvailable = @(stateAvailable);
self.signalStrengthAvailable = @(signalStrengthAvailable);
self.signalChangeThresholdAvailable = @(signalChangeThresholdAvailable);
self.hdRadioEnableAvailable = @(hdRadioEnableAvailable);
self.siriusXMRadioAvailable = @(siriusXMRadioAvailable);
self.sisDataAvailable = @(sisDataAvailable);
-
+
return self;
}
@@ -173,6 +197,14 @@ NS_ASSUME_NONNULL_BEGIN
return [self.store sdl_objectForName:SDLRPCParameterNameSISDataAvailable ofClass:NSNumber.class error:nil];
}
+- (void)setModuleInfo:(nullable SDLModuleInfo *)moduleInfo {
+ [self.store sdl_setObject:moduleInfo forName:SDLRPCParameterNameModuleInfo];
+}
+
+- (nullable SDLModuleInfo *)moduleInfo {
+ return [self.store sdl_objectForName:SDLRPCParameterNameModuleInfo ofClass:SDLModuleInfo.class error:nil];
+}
+
@end
NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLReleaseInteriorVehicleDataModule.h b/SmartDeviceLink/SDLReleaseInteriorVehicleDataModule.h
new file mode 100644
index 000000000..e8d946244
--- /dev/null
+++ b/SmartDeviceLink/SDLReleaseInteriorVehicleDataModule.h
@@ -0,0 +1,34 @@
+//
+// SDLReleaseInteriorVehicleDataModule.h
+// SmartDeviceLink
+//
+// Created by standa1 on 7/25/19.
+// Copyright © 2019 smartdevicelink. All rights reserved.
+//
+
+#import "SDLRPCRequest.h"
+#import "SDLModuleType.h"
+
+NS_ASSUME_NONNULL_BEGIN
+
+@interface SDLReleaseInteriorVehicleDataModule : SDLRPCRequest
+
+- (instancetype)initWithModuleType:(SDLModuleType)moduleType moduleId:(NSString *)moduleId;
+
+/**
+ * The module type that the app requests to control.
+ *
+ * Required
+ */
+@property (strong, nonatomic) SDLModuleType moduleType;
+
+/**
+ * Id of a module, published by System Capability.
+ *
+ * Optional
+ */
+@property (strong, nonatomic, nullable) NSString *moduleId;
+
+@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLReleaseInteriorVehicleDataModule.m b/SmartDeviceLink/SDLReleaseInteriorVehicleDataModule.m
new file mode 100644
index 000000000..b28247963
--- /dev/null
+++ b/SmartDeviceLink/SDLReleaseInteriorVehicleDataModule.m
@@ -0,0 +1,56 @@
+//
+// SDLReleaseInteriorVehicleDataModule.m
+// SmartDeviceLink
+//
+// Created by standa1 on 7/25/19.
+// Copyright © 2019 smartdevicelink. All rights reserved.
+//
+
+#import "SDLReleaseInteriorVehicleDataModule.h"
+
+#import "NSMutableDictionary+Store.h"
+#import "SDLRPCParameterNames.h"
+#import "SDLRPCFunctionNames.h"
+
+@implementation SDLReleaseInteriorVehicleDataModule
+
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
+- (instancetype)init {
+ if (self = [super initWithName:SDLRPCFunctionNameReleaseInteriorVehicleDataModule]) {
+ }
+ return self;
+}
+#pragma clang diagnostic pop
+
+- (instancetype)initWithModuleType:(SDLModuleType)moduleType moduleId:(NSString *)moduleId {
+ self = [self init];
+ if (!self) {
+ return nil;
+ }
+
+ self.moduleType = moduleType;
+ self.moduleId = moduleId;
+
+ return self;
+}
+
+- (void)setModuleType:(SDLModuleType)moduleType {
+ [self.parameters sdl_setObject:moduleType forName:SDLRPCParameterNameModuleType];
+}
+
+- (SDLModuleType)moduleType {
+ NSError *error = nil;
+ return [self.parameters sdl_enumForName:SDLRPCParameterNameModuleType error:&error];
+}
+
+- (void)setModuleId:(nullable NSString *)moduleId {
+ [self.parameters sdl_setObject:moduleId forName:SDLRPCParameterNameModuleId];
+}
+
+- (nullable NSString *)moduleId {
+ NSError *error = nil;
+ return [self.parameters sdl_objectForName:SDLRPCParameterNameModuleId ofClass:NSString.class error:&error];
+}
+
+@end
diff --git a/SmartDeviceLink/SDLReleaseInteriorVehicleDataModuleResponse.h b/SmartDeviceLink/SDLReleaseInteriorVehicleDataModuleResponse.h
new file mode 100644
index 000000000..650f4b107
--- /dev/null
+++ b/SmartDeviceLink/SDLReleaseInteriorVehicleDataModuleResponse.h
@@ -0,0 +1,17 @@
+//
+// SDLReleaseInteriorVehicleDataModuleResponse.h
+// SmartDeviceLink
+//
+// Created by standa1 on 7/25/19.
+// Copyright © 2019 smartdevicelink. All rights reserved.
+//
+
+#import "SDLRPCResponse.h"
+
+NS_ASSUME_NONNULL_BEGIN
+
+@interface SDLReleaseInteriorVehicleDataModuleResponse : SDLRPCResponse
+
+@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLReleaseInteriorVehicleDataModuleResponse.m b/SmartDeviceLink/SDLReleaseInteriorVehicleDataModuleResponse.m
new file mode 100644
index 000000000..9013d23c1
--- /dev/null
+++ b/SmartDeviceLink/SDLReleaseInteriorVehicleDataModuleResponse.m
@@ -0,0 +1,23 @@
+//
+// SDLReleaseInteriorVehicleDataModuleResponse.m
+// SmartDeviceLink
+//
+// Created by standa1 on 7/25/19.
+// Copyright © 2019 smartdevicelink. All rights reserved.
+//
+
+#import "SDLReleaseInteriorVehicleDataModuleResponse.h"
+#import "SDLRPCFunctionNames.h"
+
+@implementation SDLReleaseInteriorVehicleDataModuleResponse
+
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
+- (instancetype)init {
+ if (self = [super initWithName:SDLRPCFunctionNameReleaseInteriorVehicleDataModule]) {
+ }
+ return self;
+}
+#pragma clang diagnostic pop
+
+@end
diff --git a/SmartDeviceLink/SDLScreenManager.h b/SmartDeviceLink/SDLScreenManager.h
index 16af28aab..8275d79a0 100644
--- a/SmartDeviceLink/SDLScreenManager.h
+++ b/SmartDeviceLink/SDLScreenManager.h
@@ -8,6 +8,7 @@
#import <Foundation/Foundation.h>
+#import "NSNumber+NumberType.h"
#import "SDLInteractionMode.h"
#import "SDLMetadataType.h"
#import "SDLTextAlignment.h"
@@ -21,6 +22,7 @@
@class SDLMenuCell;
@class SDLMenuConfiguration;
@class SDLSoftButtonObject;
+@class SDLSystemCapabilityManager;
@class SDLVoiceCommand;
@protocol SDLConnectionManagerType;
@@ -177,10 +179,10 @@ If set to `SDLDynamicMenuUpdatesModeForceOff`, menu updates will work the legacy
@param connectionManager The connection manager used to send RPCs
@param fileManager The file manager used to upload files
+ @param systemCapabilityManager The system capability manager object for reading window capabilities
@return The screen manager
*/
-
-- (instancetype)initWithConnectionManager:(id<SDLConnectionManagerType>)connectionManager fileManager:(SDLFileManager *)fileManager;
+- (instancetype)initWithConnectionManager:(id<SDLConnectionManagerType>)connectionManager fileManager:(SDLFileManager *)fileManager systemCapabilityManager:(SDLSystemCapabilityManager *)systemCapabilityManager;
/**
Starts the manager and all sub-managers
@@ -291,10 +293,21 @@ If set to `SDLDynamicMenuUpdatesModeForceOff`, menu updates will work the legacy
@param initialText The initial text within the keyboard input field. It will disappear once the user selects the field in order to enter text
@param delegate The keyboard delegate called when the user interacts with the keyboard
+ @return A unique cancelID that can be used to cancel this keyboard
*/
-- (void)presentKeyboardWithInitialText:(NSString *)initialText delegate:(id<SDLKeyboardDelegate>)delegate;
+- (nullable NSNumber<SDLInt> *)presentKeyboardWithInitialText:(NSString *)initialText delegate:(id<SDLKeyboardDelegate>)delegate;
+
+/**
+ Cancels the keyboard-only interface if it is currently showing. If the keyboard has not yet been sent to Core, it will not be sent.
+
+ This will only dismiss an already presented keyboard if connected to head units running SDL 6.0+.
+
+ @param cancelID The unique ID assigned to the keyboard, passed as the return value from `presentKeyboardWithInitialText:keyboardDelegate:`
+ */
+- (void)dismissKeyboardWithCancelID:(NSNumber<SDLInt> *)cancelID;
#pragma mark Menu
+
/**
Present the top-level of your application menu. This method should be called if the menu needs to be opened programmatically because the built in menu button is hidden.
*/
diff --git a/SmartDeviceLink/SDLScreenManager.m b/SmartDeviceLink/SDLScreenManager.m
index 282aa122c..fac9ca4c0 100644
--- a/SmartDeviceLink/SDLScreenManager.m
+++ b/SmartDeviceLink/SDLScreenManager.m
@@ -13,6 +13,7 @@
#import "SDLSoftButtonManager.h"
#import "SDLTextAndGraphicManager.h"
#import "SDLVoiceCommandManager.h"
+
NS_ASSUME_NONNULL_BEGIN
@interface SDLScreenManager()
@@ -25,28 +26,32 @@ NS_ASSUME_NONNULL_BEGIN
@property (weak, nonatomic) id<SDLConnectionManagerType> connectionManager;
@property (weak, nonatomic) SDLFileManager *fileManager;
+@property (weak, nonatomic) SDLSystemCapabilityManager *systemCapabilityManager;
@end
@implementation SDLScreenManager
-- (instancetype)initWithConnectionManager:(id<SDLConnectionManagerType>)connectionManager fileManager:(SDLFileManager *)fileManager {
+- (instancetype)initWithConnectionManager:(id<SDLConnectionManagerType>)connectionManager fileManager:(SDLFileManager *)fileManager systemCapabilityManager:(SDLSystemCapabilityManager *)systemCapabilityManager {
self = [super init];
if (!self) { return nil; }
_connectionManager = connectionManager;
_fileManager = fileManager;
+ _systemCapabilityManager = systemCapabilityManager;
- _textAndGraphicManager = [[SDLTextAndGraphicManager alloc] initWithConnectionManager:connectionManager fileManager:fileManager];
- _softButtonManager = [[SDLSoftButtonManager alloc] initWithConnectionManager:connectionManager fileManager:fileManager];
- _menuManager = [[SDLMenuManager alloc] initWithConnectionManager:connectionManager fileManager:fileManager];
+ _textAndGraphicManager = [[SDLTextAndGraphicManager alloc] initWithConnectionManager:connectionManager fileManager:fileManager systemCapabilityManager:systemCapabilityManager];
+ _softButtonManager = [[SDLSoftButtonManager alloc] initWithConnectionManager:connectionManager fileManager:fileManager systemCapabilityManager:systemCapabilityManager];
+ _menuManager = [[SDLMenuManager alloc] initWithConnectionManager:connectionManager fileManager:fileManager systemCapabilityManager:systemCapabilityManager];
_voiceCommandMenuManager = [[SDLVoiceCommandManager alloc] initWithConnectionManager:connectionManager];
- _choiceSetManager = [[SDLChoiceSetManager alloc] initWithConnectionManager:connectionManager fileManager:fileManager];
+ _choiceSetManager = [[SDLChoiceSetManager alloc] initWithConnectionManager:connectionManager fileManager:fileManager systemCapabilityManager:systemCapabilityManager];
return self;
}
- (void)startWithCompletionHandler:(void (^)(NSError * _Nullable))handler {
+ [self.textAndGraphicManager start];
+ [self.softButtonManager start];
[self.choiceSetManager start];
handler(nil);
@@ -271,8 +276,12 @@ NS_ASSUME_NONNULL_BEGIN
[self.choiceSetManager presentChoiceSet:choiceSet mode:mode withKeyboardDelegate:delegate];
}
-- (void)presentKeyboardWithInitialText:(NSString *)initialText delegate:(id<SDLKeyboardDelegate>)delegate {
- [self.choiceSetManager presentKeyboardWithInitialText:initialText delegate:delegate];
+- (nullable NSNumber<SDLInt> *)presentKeyboardWithInitialText:(NSString *)initialText delegate:(id<SDLKeyboardDelegate>)delegate {
+ return [self.choiceSetManager presentKeyboardWithInitialText:initialText delegate:delegate];
+}
+
+- (void)dismissKeyboardWithCancelID:(NSNumber<SDLInt> *)cancelID{
+ [self.choiceSetManager dismissKeyboardWithCancelID:cancelID];
}
#pragma mark - Menu
@@ -285,7 +294,6 @@ NS_ASSUME_NONNULL_BEGIN
return [self.menuManager openSubmenu:cell];
}
-
@end
NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLScrollableMessage.h b/SmartDeviceLink/SDLScrollableMessage.h
index 67fab47d9..f2abda1ed 100644
--- a/SmartDeviceLink/SDLScrollableMessage.h
+++ b/SmartDeviceLink/SDLScrollableMessage.h
@@ -6,50 +6,83 @@
@class SDLSoftButton;
+NS_ASSUME_NONNULL_BEGIN
+
/**
- * Creates a full screen overlay containing a large block of formatted text that
- * can be scrolled with up to 8 SoftButtons defined
- * <p>
- * Function Group: ScrollableMessage
- * <p>
- * <b>HMILevel needs to be FULL</b>
- * <p>
- */
+ Creates a full screen overlay containing a large block of formatted text that can be scrolled with buttons available.
-NS_ASSUME_NONNULL_BEGIN
+ If connecting to SDL Core v.6.0+, the scrollable message can be canceled programmatically using the `cancelID`. On older versions of SDL Core, the scrollable message will persist until the user has interacted with the scrollable message or the specified timeout has elapsed.
+ @since SDL 2.0
+ */
@interface SDLScrollableMessage : SDLRPCRequest
+/**
+ Convenience init for creating a scrolling message with text.
+
+ @param message Body of text that can include newlines and tabs
+ @return A SDLScrollableMessage object
+ */
- (instancetype)initWithMessage:(NSString *)message;
-- (instancetype)initWithMessage:(NSString *)message timeout:(UInt16)timeout softButtons:(nullable NSArray<SDLSoftButton *> *)softButtons;
+/**
+ Convenience init for creating a scrolling message with text and buttons.
+
+ @param message Body of text that can include newlines and tabs
+ @param timeout Indicates how long of a timeout from the last action (i.e. scrolling message resets timeout)
+ @param softButtons Buttons for the displayed scrollable message
+ @param cancelID An ID for this specific scrollable message to allow cancellation through the `CancelInteraction` RPC
+ @return A SDLScrollableMessage object
+ */
+- (instancetype)initWithMessage:(NSString *)message timeout:(UInt16)timeout softButtons:(nullable NSArray<SDLSoftButton *> *)softButtons cancelID:(UInt32)cancelID;
+
+/**
+ Convenience init for creating a scrolling message with text and buttons.
+
+ @param message Body of text that can include newlines and tabs
+ @param timeout Indicates how long of a timeout from the last action (i.e. scrolling message resets timeout)
+ @param softButtons Buttons for the displayed scrollable message
+ @return A SDLScrollableMessage object
+ */
+- (instancetype)initWithMessage:(NSString *)message timeout:(UInt16)timeout softButtons:(nullable NSArray<SDLSoftButton *> *)softButtons __deprecated_msg("Use initWithMessage:timeout:softButtons:cancelID: instead");
/**
- * A Body of text that can include newlines and tabs
- * @discussion A String value representing the Body of text that can include
- * newlines and tabs
- * <p>
- * <b>Notes: </b>Maxlength=500
+ Body of text that can include newlines and tabs.
+
+ String, Required, Max length 500 chars
+
+ @since SDL 2.0
*/
@property (strong, nonatomic) NSString *scrollableMessageBody;
+
/**
- * Gets/Sets an App defined timeout. Indicates how long of a timeout in milliseconds from the
- * last action
- * @discussion An Integer value representing an App defined timeout in milliseconds
- * <p>
- * <b>Notes</b>:Minval=0; Maxval=65535;Default=30000
+ App defined timeout. Indicates how long of a timeout from the last action (i.e. scrolling message resets timeout). If not set, a default value of 30 seconds is used by Core.
+
+ Integer, Optional, Min value: 1000, Max value: 65535, Default value: 30000
+
+ @since SDL 2.0
*/
@property (nullable, strong, nonatomic) NSNumber<SDLInt> *timeout;
+
/**
- * Gets/Sets App defined SoftButtons.If omitted on supported displays, only the
- * system defined "Close" SoftButton will be displayed
- * @discussion A Vector<SoftButton> value representing App defined
- * SoftButtons
- * <p>
- * <b>Notes: </b>Minsize=0, Maxsize=8
+ Buttons for the displayed scrollable message. If omitted on supported displays, only the system defined "Close" SoftButton will be displayed.
+
+ Array of SDLSoftButton, Optional, Array size: 0-8
+
+ Since SDL 2.0
*/
@property (nullable, strong, nonatomic) NSArray<SDLSoftButton *> *softButtons;
+/**
+ An ID for this specific scrollable message to allow cancellation through the `CancelInteraction` RPC.
+
+ Integer, Optional
+
+ @see SDLCancelInteraction
+ @since SDL 6.0
+ */
+@property (nullable, strong, nonatomic) NSNumber<SDLInt> *cancelID;
+
@end
NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLScrollableMessage.m b/SmartDeviceLink/SDLScrollableMessage.m
index 774ccb996..994becaa8 100644
--- a/SmartDeviceLink/SDLScrollableMessage.m
+++ b/SmartDeviceLink/SDLScrollableMessage.m
@@ -22,27 +22,30 @@ NS_ASSUME_NONNULL_BEGIN
}
#pragma clang diagnostic pop
-- (instancetype)initWithMessage:(NSString *)message timeout:(UInt16)timeout softButtons:(nullable NSArray<SDLSoftButton *> *)softButtons {
- self = [self initWithMessage:message];
+- (instancetype)initWithScrollableMessageBody:(NSString *)message timeout:(nullable NSNumber *)timeout softButtons:(nullable NSArray<SDLSoftButton *> *)softButtons cancelID:(nullable NSNumber *)cancelID {
+ self = [self init];
if (!self) {
return nil;
}
- self.timeout = @(timeout);
- self.softButtons = [softButtons mutableCopy];
+ self.scrollableMessageBody = message;
+ self.timeout = timeout;
+ self.softButtons = softButtons;
+ self.cancelID = cancelID;
return self;
}
-- (instancetype)initWithMessage:(NSString *)message {
- self = [self init];
- if (!self) {
- return nil;
- }
+- (instancetype)initWithMessage:(NSString *)message timeout:(UInt16)timeout softButtons:(nullable NSArray<SDLSoftButton *> *)softButtons cancelID:(UInt32)cancelID {
+ return [self initWithScrollableMessageBody:message timeout:@(timeout) softButtons:softButtons cancelID:@(cancelID)];
+}
- self.scrollableMessageBody = message;
+- (instancetype)initWithMessage:(NSString *)message timeout:(UInt16)timeout softButtons:(nullable NSArray<SDLSoftButton *> *)softButtons {
+ return [self initWithScrollableMessageBody:message timeout:@(timeout) softButtons:softButtons cancelID:nil];
+}
- return self;
+- (instancetype)initWithMessage:(NSString *)message {
+ return [self initWithScrollableMessageBody:message timeout:nil softButtons:nil cancelID:nil];
}
- (void)setScrollableMessageBody:(NSString *)scrollableMessageBody {
@@ -70,6 +73,14 @@ NS_ASSUME_NONNULL_BEGIN
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/SDLSeatControlCapabilities.h b/SmartDeviceLink/SDLSeatControlCapabilities.h
index de166d34d..b54287086 100644
--- a/SmartDeviceLink/SDLSeatControlCapabilities.h
+++ b/SmartDeviceLink/SDLSeatControlCapabilities.h
@@ -3,6 +3,7 @@
#import "SDLRPCStruct.h"
+#import "SDLModuleInfo.h"
NS_ASSUME_NONNULL_BEGIN
@@ -11,10 +12,16 @@ NS_ASSUME_NONNULL_BEGIN
*/
@interface SDLSeatControlCapabilities : SDLRPCStruct
-- (instancetype)initWithName:(NSString *)moduleName;
+- (instancetype)initWithName:(NSString *)moduleName __deprecated_msg("Use initWithName:moduleInfo:");
+
+- (instancetype)initWithName:(NSString *)moduleName moduleInfo:(nullable SDLModuleInfo *)moduleInfo;
- (instancetype)initWithName:(NSString *)moduleName heatingEnabledAvailable:(BOOL)heatingEnabledAvail
- coolingEnabledAvailable:(BOOL)coolingEnabledAvail heatingLevelAvailable:(BOOL)heatingLevelAvail coolingLevelAvailable:(BOOL)coolingLevelAvail horizontalPositionAvailable:(BOOL)horizontalPositionAvail verticalPositionAvailable:(BOOL)verticalPositionAvail frontVerticalPositionAvailable:(BOOL)frontVerticalPositionAvail backVerticalPositionAvailable:(BOOL)backVerticalPositionAvail backTiltAngleAvailable:(BOOL)backTitlAngleAvail headSupportHorizontalPositionAvailable:(BOOL)headSupportHorizontalPositionAvail headSupportVerticalPositionAvailable:(BOOL)headSupportVerticalPositionAvail massageEnabledAvailable:(BOOL)massageEnabledAvail massageModeAvailable:(BOOL)massageModeAvail massageCushionFirmnessAvailable:(BOOL)massageCushionFirmnessAvail memoryAvailable:(BOOL)memoryAvail;
+ coolingEnabledAvailable:(BOOL)coolingEnabledAvail heatingLevelAvailable:(BOOL)heatingLevelAvail coolingLevelAvailable:(BOOL)coolingLevelAvail horizontalPositionAvailable:(BOOL)horizontalPositionAvail verticalPositionAvailable:(BOOL)verticalPositionAvail frontVerticalPositionAvailable:(BOOL)frontVerticalPositionAvail backVerticalPositionAvailable:(BOOL)backVerticalPositionAvail backTiltAngleAvailable:(BOOL)backTitlAngleAvail headSupportHorizontalPositionAvailable:(BOOL)headSupportHorizontalPositionAvail headSupportVerticalPositionAvailable:(BOOL)headSupportVerticalPositionAvail massageEnabledAvailable:(BOOL)massageEnabledAvail massageModeAvailable:(BOOL)massageModeAvail massageCushionFirmnessAvailable:(BOOL)massageCushionFirmnessAvail memoryAvailable:(BOOL)memoryAvail __deprecated_msg("Use initWithName:moduleInfo:heatingEnabledAvailable:coolingEnabledAvailable:heatingLevelAvailable:coolingLevelAvailable:horizontalPositionAvailable:verticalPositionAvailable:frontVerticalPositionAvailable:backVerticalPositionAvailable:backTiltAngleAvailable:headSupportHorizontalPositionAvailable:headSupportVerticalPositionAvailable:massageEnabledAvailable:massageModeAvailable:massageCushionFirmnessAvailable:memoryAvailable:");
+
+- (instancetype)initWithName:(NSString *)moduleName moduleInfo:(nullable SDLModuleInfo *)moduleInfo heatingEnabledAvailable:(BOOL)heatingEnabledAvail
+ coolingEnabledAvailable:(BOOL)coolingEnabledAvail heatingLevelAvailable:(BOOL)heatingLevelAvail coolingLevelAvailable:(BOOL)coolingLevelAvail horizontalPositionAvailable:(BOOL)horizontalPositionAvail verticalPositionAvailable:(BOOL)verticalPositionAvail frontVerticalPositionAvailable:(BOOL)frontVerticalPositionAvail backVerticalPositionAvailable:(BOOL)backVerticalPositionAvail backTiltAngleAvailable:(BOOL)backTitlAngleAvail headSupportHorizontalPositionAvailable:(BOOL)headSupportHorizontalPositionAvail headSupportVerticalPositionAvailable:(BOOL)headSupportVerticalPositionAvail massageEnabledAvailable:(BOOL)massageEnabledAvail massageModeAvailable:(BOOL)massageModeAvail massageCushionFirmnessAvailable:(BOOL)massageCushionFirmnessAvail memoryAvailable:(BOOL)memoryAvail;
+
/**
* @abstract The short friendly name of the light control module.
* It should not be used to identify a module by mobile application.
@@ -128,6 +135,12 @@ NS_ASSUME_NONNULL_BEGIN
*/
@property (nullable, strong, nonatomic) NSNumber<SDLBool> *memoryAvailable;
+/**
+ * @abstract Information about a RC module, including its id.
+ *
+ * Optional
+ */
+@property (nullable, strong, nonatomic) SDLModuleInfo *moduleInfo;
@end
diff --git a/SmartDeviceLink/SDLSeatControlCapabilities.m b/SmartDeviceLink/SDLSeatControlCapabilities.m
index 7aa4c2b5d..248c87db0 100644
--- a/SmartDeviceLink/SDLSeatControlCapabilities.m
+++ b/SmartDeviceLink/SDLSeatControlCapabilities.m
@@ -16,6 +16,14 @@ NS_ASSUME_NONNULL_BEGIN
return self;
}
+- (instancetype)initWithName:(NSString *)moduleName moduleInfo:(nullable SDLModuleInfo *)moduleInfo {
+ if (self = [super init]) {
+ self.moduleName = moduleName;
+ self.moduleInfo = moduleInfo;
+ }
+ return self;
+}
+
- (instancetype)initWithName:(NSString *)moduleName heatingEnabledAvailable:(BOOL)heatingEnabledAvail coolingEnabledAvailable:(BOOL)coolingEnabledAvail heatingLevelAvailable:(BOOL)heatingLevelAvail coolingLevelAvailable:(BOOL)coolingLevelAvail horizontalPositionAvailable:(BOOL)horizontalPositionAvail verticalPositionAvailable:(BOOL)verticalPositionAvail frontVerticalPositionAvailable:(BOOL)frontVerticalPositionAvail backVerticalPositionAvailable:(BOOL)backVerticalPositionAvail backTiltAngleAvailable:(BOOL)backTitlAngleAvail headSupportHorizontalPositionAvailable:(BOOL)headSupportHorizontalPositionAvail headSupportVerticalPositionAvailable:(BOOL)headSupportVerticalPositionAvail massageEnabledAvailable:(BOOL)massageEnabledAvail massageModeAvailable:(BOOL)massageModeAvail massageCushionFirmnessAvailable:(BOOL)massageCushionFirmnessAvail memoryAvailable:(BOOL)memoryAvail {
self = [super init];
@@ -43,6 +51,35 @@ NS_ASSUME_NONNULL_BEGIN
return self;
}
+- (instancetype)initWithName:(NSString *)moduleName moduleInfo:(nullable SDLModuleInfo *)moduleInfo heatingEnabledAvailable:(BOOL)heatingEnabledAvail
+ coolingEnabledAvailable:(BOOL)coolingEnabledAvail heatingLevelAvailable:(BOOL)heatingLevelAvail coolingLevelAvailable:(BOOL)coolingLevelAvail horizontalPositionAvailable:(BOOL)horizontalPositionAvail verticalPositionAvailable:(BOOL)verticalPositionAvail frontVerticalPositionAvailable:(BOOL)frontVerticalPositionAvail backVerticalPositionAvailable:(BOOL)backVerticalPositionAvail backTiltAngleAvailable:(BOOL)backTitlAngleAvail headSupportHorizontalPositionAvailable:(BOOL)headSupportHorizontalPositionAvail headSupportVerticalPositionAvailable:(BOOL)headSupportVerticalPositionAvail massageEnabledAvailable:(BOOL)massageEnabledAvail massageModeAvailable:(BOOL)massageModeAvail massageCushionFirmnessAvailable:(BOOL)massageCushionFirmnessAvail memoryAvailable:(BOOL)memoryAvail {
+
+ self = [super init];
+ if (!self) {
+ return nil;
+ }
+
+ self.moduleName = moduleName;
+ self.moduleInfo = moduleInfo;
+ self.heatingEnabledAvailable = @(heatingEnabledAvail);
+ self.coolingEnabledAvailable = @(coolingEnabledAvail);
+ self.heatingLevelAvailable = @(heatingLevelAvail);
+ self.coolingLevelAvailable = @(coolingLevelAvail);
+ self.horizontalPositionAvailable = @(horizontalPositionAvail);
+ self.verticalPositionAvailable = @(verticalPositionAvail);
+ self.frontVerticalPositionAvailable = @(frontVerticalPositionAvail);
+ self.backVerticalPositionAvailable = @(backVerticalPositionAvail);
+ self.backTiltAngleAvailable = @(backTitlAngleAvail);
+ self.headSupportVerticalPositionAvailable = @(headSupportVerticalPositionAvail);
+ self.headSupportHorizontalPositionAvailable = @(headSupportHorizontalPositionAvail);
+ self.massageEnabledAvailable = @(massageEnabledAvail);
+ self.massageModeAvailable = @(massageModeAvail);
+ self.massageCushionFirmnessAvailable = @(massageCushionFirmnessAvail);
+ self.memoryAvailable = @(memoryAvail);
+
+ return self;
+}
+
- (void)setModuleName:(NSString *)moduleName {
[self.store sdl_setObject:moduleName forName:SDLRPCParameterNameModuleName];
}
@@ -199,6 +236,14 @@ NS_ASSUME_NONNULL_BEGIN
return [self.store sdl_objectForName:SDLRPCParameterNameMemoryAvailable ofClass:NSNumber.class error:nil];
}
+- (void)setModuleInfo:(nullable SDLModuleInfo *)moduleInfo {
+ [self.store sdl_setObject:moduleInfo forName:SDLRPCParameterNameModuleInfo];
+}
+
+- (nullable SDLModuleInfo *)moduleInfo {
+ return [self.store sdl_objectForName:SDLRPCParameterNameModuleInfo ofClass:SDLModuleInfo.class error:nil];
+}
+
@end
NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLSeatControlData.h b/SmartDeviceLink/SDLSeatControlData.h
index e08492d28..73cd8a6e0 100644
--- a/SmartDeviceLink/SDLSeatControlData.h
+++ b/SmartDeviceLink/SDLSeatControlData.h
@@ -23,7 +23,10 @@ NS_ASSUME_NONNULL_BEGIN
@param supportedSeat id of remote controllable seat.
@return An instance of the SDLSeatControlData class
*/
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
- (instancetype)initWithId:(SDLSupportedSeat)supportedSeat;
+#pragma clang diagnostic pop
/**
Constructs a newly allocated SDLSeatControlData object with cushion and firmness
@@ -46,14 +49,21 @@ NS_ASSUME_NONNULL_BEGIN
@param memoryAction type of action to be performed.
@return An instance of the SDLSeatControlData class
*/
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
- (instancetype)initWithId:(SDLSupportedSeat)supportedSeat heatingEnabled:(BOOL)heatingEnable coolingEnable:(BOOL)coolingEnable heatingLevel:(UInt8)heatingLevel coolingLevel:(UInt8)coolingLevel horizontalPostion:(UInt8)horizontal verticalPostion:(UInt8)vertical frontVerticalPostion:(UInt8)frontVertical backVerticalPostion:(UInt8)backVertical backTiltAngle:(UInt8)backAngle headSupportedHorizontalPostion:(UInt8)headSupportedHorizontal headSupportedVerticalPostion:(UInt8)headSupportedVertical massageEnabled:(BOOL)massageEnable massageMode:(NSArray<SDLMassageModeData *> *)massageMode massageCussionFirmness:(NSArray<SDLMassageCushionFirmness *> *)firmness memory:(SDLSeatMemoryAction *)memoryAction;
+#pragma clang diagnostic pop
/**
* @abstract id of seat that is a remote controllable seat.
+ * @warning This should not be used to identify a seat, this is a deprecated parameter.
*
* Required
*/
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
@property (strong, nonatomic) SDLSupportedSeat id;
+#pragma clang diagnostic pop
/**
* @abstract Whether or not heating is enabled.
diff --git a/SmartDeviceLink/SDLSeatControlData.m b/SmartDeviceLink/SDLSeatControlData.m
index 7fbebb67b..6054cb908 100644
--- a/SmartDeviceLink/SDLSeatControlData.m
+++ b/SmartDeviceLink/SDLSeatControlData.m
@@ -13,7 +13,10 @@ NS_ASSUME_NONNULL_BEGIN
@implementation SDLSeatControlData
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
- (instancetype)initWithId:(SDLSupportedSeat)supportedSeat {
+#pragma clang diagnostic pop
self = [self init];
if (!self) {
return nil;
@@ -23,7 +26,10 @@ NS_ASSUME_NONNULL_BEGIN
return self;
}
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
- (instancetype)initWithId:(SDLSupportedSeat)supportedSeat heatingEnabled:(BOOL)heatingEnable coolingEnable:(BOOL)coolingEnabled heatingLevel:(UInt8)heatingLevel coolingLevel:(UInt8)coolingLevel horizontalPostion:(UInt8)horizontal verticalPostion:(UInt8)vertical frontVerticalPostion:(UInt8)frontVertical backVerticalPostion:(UInt8)backVertical backTiltAngle:(UInt8)backAngle headSupportedHorizontalPostion:(UInt8)headSupportedHorizontal headSupportedVerticalPostion:(UInt8)headSupportedVertical massageEnabled:(BOOL)massageEnable massageMode:(NSArray<SDLMassageModeData *> *)massageMode massageCussionFirmness:(NSArray<SDLMassageCushionFirmness *> *)firmness memory:(SDLSeatMemoryAction *)memoryAction {
+#pragma clang diagnostic pop
self = [super init];
if (!self) {
@@ -53,11 +59,17 @@ NS_ASSUME_NONNULL_BEGIN
return self;
}
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
- (void)setId:(SDLSupportedSeat)id {
+#pragma clang diagnostic pop
[self.store sdl_setObject:id forName:SDLRPCParameterNameId];
}
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
- (SDLSupportedSeat)id {
+#pragma clang diagnostic pop
NSError *error = nil;
return [self.store sdl_enumForName:SDLRPCParameterNameId error:&error];
}
diff --git a/SmartDeviceLink/SDLSeatLocation.h b/SmartDeviceLink/SDLSeatLocation.h
new file mode 100644
index 000000000..0c4d70597
--- /dev/null
+++ b/SmartDeviceLink/SDLSeatLocation.h
@@ -0,0 +1,26 @@
+//
+// SDLSeatLocation.h
+// SmartDeviceLink
+//
+// Created by standa1 on 7/11/19.
+// Copyright © 2019 smartdevicelink. All rights reserved.
+//
+
+#import "SDLRPCMessage.h"
+#import "SDLGrid.h"
+
+NS_ASSUME_NONNULL_BEGIN
+
+/**
+ * Describes the location of a seat
+ */
+@interface SDLSeatLocation : SDLRPCStruct
+
+/**
+ * Optional
+ */
+@property (strong, nonatomic, nullable) SDLGrid *grid;
+
+@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLSeatLocation.m b/SmartDeviceLink/SDLSeatLocation.m
new file mode 100644
index 000000000..82fc28940
--- /dev/null
+++ b/SmartDeviceLink/SDLSeatLocation.m
@@ -0,0 +1,25 @@
+//
+// SDLSeatLocation.m
+// SmartDeviceLink
+//
+// Created by standa1 on 7/11/19.
+// Copyright © 2019 smartdevicelink. All rights reserved.
+//
+
+#import "SDLSeatLocation.h"
+
+#import "NSMutableDictionary+Store.h"
+#import "SDLRPCParameterNames.h"
+
+@implementation SDLSeatLocation
+
+- (void)setGrid:(nullable SDLGrid *)grid {
+ [self.store sdl_setObject:grid forName:SDLRPCParameterNameGrid];
+}
+
+- (nullable SDLGrid *)grid {
+ NSError *error = nil;
+ return [self.store sdl_objectForName:SDLRPCParameterNameGrid ofClass:SDLGrid.class error:&error];
+}
+
+@end
diff --git a/SmartDeviceLink/SDLSeatLocationCapability.h b/SmartDeviceLink/SDLSeatLocationCapability.h
new file mode 100644
index 000000000..9f7d6a15f
--- /dev/null
+++ b/SmartDeviceLink/SDLSeatLocationCapability.h
@@ -0,0 +1,48 @@
+//
+// SDLSeatLocationCapability.h
+// SmartDeviceLink
+//
+// Created by standa1 on 7/11/19.
+// Copyright © 2019 smartdevicelink. All rights reserved.
+//
+
+#import "SDLRPCMessage.h"
+
+#import "SDLSeatLocation.h"
+
+NS_ASSUME_NONNULL_BEGIN
+
+/**
+ * Contains information about the locations of each seat.
+ */
+@interface SDLSeatLocationCapability : SDLRPCStruct
+
+- (instancetype)initWithSeats:(NSArray<SDLSeatLocation *> *)seats cols:(NSNumber<SDLInt> *)cols rows:(NSNumber<SDLInt> *)rows levels:(NSNumber<SDLInt> *)levels;
+
+/**
+ *
+ * Optional, Integer, 1 - 100
+ */
+@property (strong, nonatomic, nullable) NSNumber<SDLInt> *cols;
+
+/**
+ *
+ * Optional, Integer, 1 - 100
+ */
+@property (strong, nonatomic, nullable) NSNumber<SDLInt> *rows;
+
+/**
+ *
+ * Optional, Integer, 1 - 100
+ */
+@property (strong, nonatomic, nullable) NSNumber<SDLInt> *levels;
+
+/**
+ * Contains a list of SeatLocation in the vehicle, the first element is the driver's seat
+ * Optional
+ */
+@property (strong, nonatomic, nullable) NSArray<SDLSeatLocation *> *seats;
+
+@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLSeatLocationCapability.m b/SmartDeviceLink/SDLSeatLocationCapability.m
new file mode 100644
index 000000000..f6c59e58c
--- /dev/null
+++ b/SmartDeviceLink/SDLSeatLocationCapability.m
@@ -0,0 +1,70 @@
+//
+// SDLSeatLocationCapability.m
+// SmartDeviceLink
+//
+// Created by standa1 on 7/11/19.
+// Copyright © 2019 smartdevicelink. All rights reserved.
+//
+
+#import "SDLSeatLocationCapability.h"
+
+#import "NSMutableDictionary+Store.h"
+#import "SDLRPCParameterNames.h"
+
+NS_ASSUME_NONNULL_BEGIN
+
+@implementation SDLSeatLocationCapability
+
+- (instancetype)initWithSeats:(NSArray<SDLSeatLocation *> *)seats cols:(NSNumber<SDLInt> *)cols rows:(NSNumber<SDLInt> *)rows levels:(NSNumber<SDLInt> *)levels {
+ self = [self init];
+ if (!self) {
+ return self;
+ }
+
+ self.seats = seats;
+ self.cols = cols;
+ self.rows = rows;
+ self.levels = levels;
+
+ return self;
+}
+
+- (void)setCols:(nullable NSNumber<SDLInt> *)cols {
+ [self.store sdl_setObject:cols forName:SDLRPCParameterNameColumns];
+}
+
+- (nullable NSNumber<SDLInt> *)cols {
+ NSError *error = nil;
+ return [self.store sdl_objectForName:SDLRPCParameterNameColumns ofClass:NSNumber.class error:&error];
+}
+
+- (void)setRows:(nullable NSNumber<SDLInt> *)rows {
+ [self.store sdl_setObject:rows forName:SDLRPCParameterNameRows];
+}
+
+- (nullable NSNumber<SDLInt> *)rows {
+ NSError *error = nil;
+ return [self.store sdl_objectForName:SDLRPCParameterNameRows ofClass:NSNumber.class error:&error];
+}
+
+- (void)setLevels:(nullable NSNumber<SDLInt> *)levels {
+ [self.store sdl_setObject:levels forName:SDLRPCParameterNameLevels];
+}
+
+- (nullable NSNumber<SDLInt> *)levels {
+ NSError *error = nil;
+ return [self.store sdl_objectForName:SDLRPCParameterNameLevels ofClass:NSNumber.class error:&error];
+}
+
+- (void)setSeats:(nullable NSArray<SDLSeatLocation *> *)seats {
+ [self.store sdl_setObject:seats forName:SDLRPCParameterNameSeats];
+}
+
+- (nullable NSArray<SDLSeatLocation *> *)seats {
+ NSError *error = nil;
+ return [self.store sdl_objectsForName:SDLRPCParameterNameSeats ofClass:SDLSeatLocation.class error:&error];
+}
+
+@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLSequentialRPCRequestOperation.m b/SmartDeviceLink/SDLSequentialRPCRequestOperation.m
index 43b025947..96c44b82c 100644
--- a/SmartDeviceLink/SDLSequentialRPCRequestOperation.m
+++ b/SmartDeviceLink/SDLSequentialRPCRequestOperation.m
@@ -54,6 +54,7 @@ NS_ASSUME_NONNULL_BEGIN
- (void)start {
[super start];
+ if (self.isCancelled) { return; }
[self sdl_sendNextRequest];
}
diff --git a/SmartDeviceLink/SDLSetGlobalProperties.h b/SmartDeviceLink/SDLSetGlobalProperties.h
index 10f8a35a2..ef1746ad5 100644
--- a/SmartDeviceLink/SDLSetGlobalProperties.h
+++ b/SmartDeviceLink/SDLSetGlobalProperties.h
@@ -9,6 +9,7 @@
@class SDLKeyboardProperties;
@class SDLTTSChunk;
@class SDLVRHelpItem;
+@class SDLSeatLocation;
NS_ASSUME_NONNULL_BEGIN
@@ -122,6 +123,13 @@ NS_ASSUME_NONNULL_BEGIN
@property (strong, nonatomic, nullable) SDLKeyboardProperties *keyboardProperties;
/**
+ Location of the user's seat. Default is driver's seat location if it is not set yet
+
+ Optional
+ */
+@property (strong, nonatomic, nullable) SDLSeatLocation *userLocation;
+
+/**
The main menu layout. If this is sent while a menu is already on-screen, the head unit will change the display to the new layout type. See available menu layouts on DisplayCapabilities.menuLayoutsAvailable. Defaults to the head unit default.
*/
@property (strong, nonatomic, nullable) SDLMenuLayout menuLayout;
diff --git a/SmartDeviceLink/SDLSetGlobalProperties.m b/SmartDeviceLink/SDLSetGlobalProperties.m
index c8d08c723..b502fcfd1 100644
--- a/SmartDeviceLink/SDLSetGlobalProperties.m
+++ b/SmartDeviceLink/SDLSetGlobalProperties.m
@@ -11,6 +11,7 @@
#import "SDLRPCFunctionNames.h"
#import "SDLTTSChunk.h"
#import "SDLVrHelpItem.h"
+#import "SDLSeatLocation.h"
NS_ASSUME_NONNULL_BEGIN
@@ -111,6 +112,14 @@ NS_ASSUME_NONNULL_BEGIN
return [self.parameters sdl_objectForName:SDLRPCParameterNameKeyboardProperties ofClass:SDLKeyboardProperties.class error:nil];
}
+- (void)setUserLocation:(nullable SDLSeatLocation *)userLocation {
+ [self.parameters sdl_setObject:userLocation forName:SDLRPCParameterNameUserLocation];
+}
+
+- (nullable SDLSeatLocation *)userLocation {
+ return [self.parameters sdl_objectForName:SDLRPCParameterNameUserLocation ofClass:SDLSeatLocation.class error:nil];
+}
+
- (void)setMenuLayout:(nullable SDLMenuLayout)menuLayout {
[self.parameters sdl_setObject:menuLayout forName:SDLRPCParameterNameMenuLayout];
}
diff --git a/SmartDeviceLink/SDLSetInteriorVehicleDataResponse.h b/SmartDeviceLink/SDLSetInteriorVehicleDataResponse.h
index 100509051..57690e013 100644
--- a/SmartDeviceLink/SDLSetInteriorVehicleDataResponse.h
+++ b/SmartDeviceLink/SDLSetInteriorVehicleDataResponse.h
@@ -14,8 +14,10 @@ NS_ASSUME_NONNULL_BEGIN
/**
The new module data for the requested module
+
+ Optional
*/
-@property (strong, nonatomic) SDLModuleData *moduleData;
+@property (nullable, strong, nonatomic) SDLModuleData *moduleData;
@end
diff --git a/SmartDeviceLink/SDLSetInteriorVehicleDataResponse.m b/SmartDeviceLink/SDLSetInteriorVehicleDataResponse.m
index 12a00779b..c99551675 100644
--- a/SmartDeviceLink/SDLSetInteriorVehicleDataResponse.m
+++ b/SmartDeviceLink/SDLSetInteriorVehicleDataResponse.m
@@ -21,11 +21,11 @@ NS_ASSUME_NONNULL_BEGIN
}
#pragma clang diagnostic pop
-- (void)setModuleData:(SDLModuleData *)moduleData {
+- (void)setModuleData:(nullable SDLModuleData *)moduleData {
[self.parameters sdl_setObject:moduleData forName:SDLRPCParameterNameModuleData];
}
-- (SDLModuleData *)moduleData {
+- (nullable SDLModuleData *)moduleData {
NSError *error = nil;
return [self.parameters sdl_objectForName:SDLRPCParameterNameModuleData ofClass:SDLModuleData.class error:&error];
}
diff --git a/SmartDeviceLink/SDLSlider.h b/SmartDeviceLink/SDLSlider.h
index 2b3b187a6..13cef4c39 100644
--- a/SmartDeviceLink/SDLSlider.h
+++ b/SmartDeviceLink/SDLSlider.h
@@ -4,98 +4,123 @@
#import "SDLRPCRequest.h"
+NS_ASSUME_NONNULL_BEGIN
+
/**
- * Creates a full screen or pop-up overlay (depending on platform) with a single user controlled slider
- *
- * HMILevel needs to be FULL
- *
- * Since SmartDeviceLink 2.0
- */
+ Creates a full screen or pop-up overlay (depending on platform) with a single user controlled slider.
-NS_ASSUME_NONNULL_BEGIN
+ If connecting to SDL Core v.6.0+, the slider can be canceled programmatically using the `cancelID`. On older versions of SDL Core, the slider will persist until the user has interacted with the slider or the specified timeout has elapsed.
+ Since SDL 2.0
+ */
@interface SDLSlider : SDLRPCRequest
/**
- Create an SDLSlider with only the number of ticks and position. Note that this is not enough to get a SUCCESS response. You must supply additional data. See below for required parameters.
+ Convenience init with all parameters.
+
+ @param numTicks Number of selectable items on a horizontal axis
+ @param position Initial position of slider control
+ @param sliderHeader Text header to display
+ @param sliderFooters Text footers to display. See the `sliderFooter` documentation for how placing various numbers of footers will affect the display
+ @param timeout Indicates how long of a timeout from the last action (i.e. sliding control resets timeout)
+ @param cancelID An ID for this specific slider to allow cancellation through the `CancelInteraction` RPC.
+ @return An SDLSlider object
+ */
+- (instancetype)initWithNumTicks:(UInt8)numTicks position:(UInt8)position sliderHeader:(NSString *)sliderHeader sliderFooters:(nullable NSArray<NSString *> *)sliderFooters timeout:(UInt16)timeout cancelID:(UInt32)cancelID;
+
+/**
+ Creates a slider with only the number of ticks and position. Note that this is not enough to get a SUCCESS response. You must supply additional data. See below for required parameters.
- @param numTicks The number of ticks present on the slider.
- @param position The default starting position of the slider.
- @return An SDLSlider RPC Request.
+ @param numTicks Number of selectable items on a horizontal axis
+ @param position Initial position of slider control
+ @return An SDLSlider object
*/
- (instancetype)initWithNumTicks:(UInt8)numTicks position:(UInt8)position;
/**
- Create an SDLSlider with all required data and a static footer (or no footer).
-
- @param numTicks The number of ticks present on the slider.
- @param position The default starting position of the slider.
- @param sliderHeader The header describing the slider.
- @param sliderFooter A static footer with text, or nil for no footer.
- @param timeout The length of time in milliseconds the popup should be displayed before automatically disappearing.
- @return An SDLSlider RPC Request.
+ Creates a slider with all required data and a static footer (or no footer).
+
+ @param numTicks Number of selectable items on a horizontal axis
+ @param position Initial position of slider control
+ @param sliderHeader Text header to display
+ @param sliderFooter Text footer to display
+ @param timeout Indicates how long of a timeout from the last action (i.e. sliding control resets timeout)
+ @return An SDLSlider object
*/
- (instancetype)initWithNumTicks:(UInt8)numTicks position:(UInt8)position sliderHeader:(NSString *)sliderHeader sliderFooter:(nullable NSString *)sliderFooter timeout:(UInt16)timeout;
/**
- Create an SDLSlider with all required data and a dynamic footer (or no footer).
-
- @param numTicks The number of ticks present on the slider.
- @param position The default starting position of the slider.
- @param sliderHeader The header describing the slider.
- @param sliderFooters An array of footers. This should be the same length as `numTicks` as each footer should correspond to a tick, or no footer if nil.
- @param timeout The length of time in milliseconds the popup should be displayed before automatically disappearing.
- @return An SDLSlider RPC Request.
+ Creates an slider with all required data and a dynamic footer (or no footer).
+
+ @param numTicks Number of selectable items on a horizontal axis
+ @param position Initial position of slider control
+ @param sliderHeader Text header to display
+ @param sliderFooters Text footers to display
+ @param timeout Indicates how long of a timeout from the last action (i.e. sliding control resets timeout)
+ @return An SDLSlider object
*/
- (instancetype)initWithNumTicks:(UInt8)numTicks position:(UInt8)position sliderHeader:(NSString *)sliderHeader sliderFooters:(nullable NSArray<NSString *> *)sliderFooters timeout:(UInt16)timeout;
/**
- * Represents a number of selectable items on a horizontal axis
- *
- * Required, Integer, 2 - 26
+ Represents a number of selectable items on a horizontal axis.
+
+ Integer, Required, Min value: 2, Max Value: 26
+
+ Since SDL 2.0
*/
@property (strong, nonatomic) NSNumber<SDLInt> *numTicks;
/**
- * An Initial position of slider control
- *
- * Required, Integer, 1 - 26
+ Initial position of slider control (cannot exceed numTicks).
+
+ Integer, Required, Min Value: 1, Max Value: 26
+
+ @since SDL 2.0
*/
@property (strong, nonatomic) NSNumber<SDLInt> *position;
/**
- * A text header to display
- *
- * Required, Max length 500 chars
+ Text header to display.
+
+ String, Required, Max length 500 chars
+
+ Since SDL 2.0
*/
@property (strong, nonatomic) NSString *sliderHeader;
/**
- * A text footer to display
- *
- * @discussion For a static text footer, only one footer string shall be provided in the array.
- *
- * For a dynamic text footer, the number of footer text string in the array must match the numTicks value.
- *
- * For a dynamic text footer, text array string should correlate with potential slider position index.
- *
- * If omitted on supported displays, no footer text shall be displayed.
- *
- * Optional, Array of Strings, Array length 1 - 26, Max string length 500 chars
+ Text footer to display.
+
+ For a static text footer, only one footer string shall be provided in the array.
+ For a dynamic text footer, the number of footer text string in the array must match the numTicks value.
+ For a dynamic text footer, text array string should correlate with potential slider position index.
+ If omitted on supported displays, no footer text shall be displayed.
+
+ Array of Strings, Optional, Array length 1 - 26, Max length 500 chars
+
+ Since SDL 2.0
*/
@property (strong, nonatomic, nullable) NSArray<NSString *> *sliderFooter;
/**
- * An App defined timeout in milliseconds
- *
- * @discussion Indicates how long of a timeout from the last action (i.e. sliding control resets timeout).
- *
- * If omitted, the value is set to 10000.
- *
- * Optional, Integer, 1000 - 65535
+ App defined timeout. Indicates how long of a timeout from the last action (i.e. sliding control resets timeout). If omitted, the value is set to 10 seconds.
+
+ Integer, Optional, Min value: 1000, Max value: 65535, Default value: 10000
+
+ Since SDL 2.0
*/
@property (strong, nonatomic, nullable) NSNumber<SDLInt> *timeout;
+/**
+ An ID for this specific slider to allow cancellation through the `CancelInteraction` RPC.
+
+ Integer, Optional
+
+ @see SDLCancelInteraction
+ @since SDL 6.0
+ */
+@property (nullable, strong, nonatomic) NSNumber<SDLInt> *cancelID;
+
@end
NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLSlider.m b/SmartDeviceLink/SDLSlider.m
index f0072c171..488b428d6 100644
--- a/SmartDeviceLink/SDLSlider.m
+++ b/SmartDeviceLink/SDLSlider.m
@@ -21,6 +21,22 @@ NS_ASSUME_NONNULL_BEGIN
}
#pragma clang diagnostic pop
+- (instancetype)initWithNumTicks:(UInt8)numTicks position:(UInt8)position sliderHeader:(NSString *)sliderHeader sliderFooters:(nullable NSArray<NSString *> *)sliderFooters timeout:(UInt16)timeout cancelID:(UInt32)cancelID {
+ self = [self init];
+ if (!self) {
+ return nil;
+ }
+
+ self.numTicks = @(numTicks);
+ self.position = @(position);
+ self.sliderHeader = sliderHeader;
+ self.sliderFooter = sliderFooters;
+ self.timeout = @(timeout);
+ self.cancelID = @(cancelID);
+
+ return self;
+}
+
- (instancetype)initWithNumTicks:(UInt8)numTicks position:(UInt8)position sliderHeader:(NSString *)sliderHeader sliderFooter:(nullable NSString *)sliderFooter timeout:(UInt16)timeout {
NSArray<NSString *> *footer = nil;
if (sliderFooter != nil) {
@@ -37,7 +53,7 @@ NS_ASSUME_NONNULL_BEGIN
}
self.sliderHeader = sliderHeader;
- self.sliderFooter = [sliderFooters mutableCopy];
+ self.sliderFooter = sliderFooters;
self.timeout = @(timeout);
return self;
@@ -98,6 +114,14 @@ NS_ASSUME_NONNULL_BEGIN
return [self.parameters sdl_objectForName:SDLRPCParameterNameTimeout ofClass:NSNumber.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/SDLSoftButtonManager.h b/SmartDeviceLink/SDLSoftButtonManager.h
index dfd3d7104..d7a6b4506 100644
--- a/SmartDeviceLink/SDLSoftButtonManager.h
+++ b/SmartDeviceLink/SDLSoftButtonManager.h
@@ -13,6 +13,7 @@
@class SDLFileManager;
@class SDLSoftButtonObject;
@class SDLSoftButtonState;
+@class SDLSystemCapabilityManager;
NS_ASSUME_NONNULL_BEGIN
@@ -47,9 +48,13 @@ typedef void(^SDLSoftButtonUpdateCompletionHandler)(NSError *__nullable error);
@param connectionManager The manager that forwards RPCs
@param fileManager The manager that updates images
+ @param systemCapabilityManager The system capability manager object for reading window capabilities
@return A new instance of a soft button manager
*/
-- (instancetype)initWithConnectionManager:(id<SDLConnectionManagerType>)connectionManager fileManager:(SDLFileManager *)fileManager;
+- (instancetype)initWithConnectionManager:(id<SDLConnectionManagerType>)connectionManager fileManager:(SDLFileManager *)fileManager systemCapabilityManager:(SDLSystemCapabilityManager *)systemCapabilityManager;
+
+/// Starts the manager. This method is used internally.
+- (void)start;
/**
* Stops the manager. This method is used internally.
diff --git a/SmartDeviceLink/SDLSoftButtonManager.m b/SmartDeviceLink/SDLSoftButtonManager.m
index 6a79c811d..a8dd84629 100644
--- a/SmartDeviceLink/SDLSoftButtonManager.m
+++ b/SmartDeviceLink/SDLSoftButtonManager.m
@@ -9,7 +9,6 @@
#import "SDLSoftButtonManager.h"
#import "SDLConnectionManagerType.h"
-#import "SDLDisplayCapabilities.h"
#import "SDLError.h"
#import "SDLFileManager.h"
#import "SDLLogMacros.h"
@@ -26,6 +25,10 @@
#import "SDLSoftButtonReplaceOperation.h"
#import "SDLSoftButtonState.h"
#import "SDLSoftButtonTransitionOperation.h"
+#import "SDLSystemCapabilityManager.h"
+#import "SDLWindowCapability.h"
+#import "SDLSystemCapability.h"
+#import "SDLDisplayCapability.h"
NS_ASSUME_NONNULL_BEGIN
@@ -40,12 +43,12 @@ NS_ASSUME_NONNULL_BEGIN
@property (weak, nonatomic) id<SDLConnectionManagerType> connectionManager;
@property (weak, nonatomic) SDLFileManager *fileManager;
+@property (weak, nonatomic) SDLSystemCapabilityManager *systemCapabilityManager;
@property (strong, nonatomic) NSOperationQueue *transactionQueue;
+@property (strong, nonatomic, nullable) SDLWindowCapability *windowCapability;
@property (copy, nonatomic, nullable) SDLHMILevel currentLevel;
-@property (strong, nonatomic, nullable) SDLDisplayCapabilities *displayCapabilities;
-@property (strong, nonatomic, nullable) SDLSoftButtonCapabilities *softButtonCapabilities;
@property (strong, nonatomic) NSMutableArray<SDLAsynchronousOperation *> *batchQueue;
@@ -53,34 +56,38 @@ NS_ASSUME_NONNULL_BEGIN
@implementation SDLSoftButtonManager
-- (instancetype)initWithConnectionManager:(id<SDLConnectionManagerType>)connectionManager fileManager:(SDLFileManager *)fileManager {
+- (instancetype)initWithConnectionManager:(id<SDLConnectionManagerType>)connectionManager fileManager:(SDLFileManager *)fileManager systemCapabilityManager:(SDLSystemCapabilityManager *)systemCapabilityManager{
self = [super init];
if (!self) { return nil; }
_connectionManager = connectionManager;
_fileManager = fileManager;
+ _systemCapabilityManager = systemCapabilityManager;
_softButtonObjects = @[];
_currentLevel = nil;
_transactionQueue = [self sdl_newTransactionQueue];
_batchQueue = [NSMutableArray array];
- [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(sdl_registerResponse:) name:SDLDidReceiveRegisterAppInterfaceResponse object:nil];
- [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(sdl_displayLayoutResponse:) name:SDLDidReceiveSetDisplayLayoutResponse object:nil];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(sdl_hmiStatusNotification:) name:SDLDidChangeHMIStatusNotification object:nil];
return self;
}
+- (void)start {
+ [self.systemCapabilityManager subscribeToCapabilityType:SDLSystemCapabilityTypeDisplays withObserver:self selector:@selector(sdl_displayCapabilityDidUpdate:)];
+}
+
- (void)stop {
_softButtonObjects = @[];
_currentMainField1 = nil;
_currentLevel = nil;
- _displayCapabilities = nil;
- _softButtonCapabilities = nil;
+ _windowCapability = nil;
[_transactionQueue cancelAllOperations];
self.transactionQueue = [self sdl_newTransactionQueue];
+
+ [self.systemCapabilityManager unsubscribeFromCapabilityType:SDLSystemCapabilityTypeDisplays withObserver:self];
}
- (NSOperationQueue *)sdl_newTransactionQueue {
@@ -121,7 +128,7 @@ NS_ASSUME_NONNULL_BEGIN
_softButtonObjects = softButtonObjects;
- SDLSoftButtonReplaceOperation *op = [[SDLSoftButtonReplaceOperation alloc] initWithConnectionManager:self.connectionManager fileManager:self.fileManager capabilities:self.softButtonCapabilities softButtonObjects:_softButtonObjects mainField1:self.currentMainField1];
+ SDLSoftButtonReplaceOperation *op = [[SDLSoftButtonReplaceOperation alloc] initWithConnectionManager:self.connectionManager fileManager:self.fileManager capabilities:self.windowCapability.softButtonCapabilities.firstObject softButtonObjects:_softButtonObjects mainField1:self.currentMainField1];
if (self.isBatchingUpdates) {
[self.batchQueue removeAllObjects];
@@ -133,7 +140,7 @@ NS_ASSUME_NONNULL_BEGIN
}
- (void)sdl_transitionSoftButton:(SDLSoftButtonObject *)softButton {
- SDLSoftButtonTransitionOperation *op = [[SDLSoftButtonTransitionOperation alloc] initWithConnectionManager:self.connectionManager capabilities:self.softButtonCapabilities softButtons:self.softButtonObjects mainField1:self.currentMainField1];
+ SDLSoftButtonTransitionOperation *op = [[SDLSoftButtonTransitionOperation alloc] initWithConnectionManager:self.connectionManager capabilities:self.windowCapability.softButtonCapabilities.firstObject softButtons:self.softButtonObjects mainField1:self.currentMainField1];
if (self.isBatchingUpdates) {
for (SDLAsynchronousOperation *sbOperation in self.batchQueue) {
@@ -190,36 +197,12 @@ NS_ASSUME_NONNULL_BEGIN
#pragma mark - RPC Responses
-- (void)sdl_registerResponse:(SDLRPCResponseNotification *)notification {
- SDLRegisterAppInterfaceResponse *response = (SDLRegisterAppInterfaceResponse *)notification.response;
-
- if (!response.success.boolValue) { return; }
-#pragma clang diagnostic push
-#pragma clang diagnostic ignored "-Wdeprecated"
- if (response.displayCapabilities == nil) {
- SDLLogE(@"RegisterAppInterface succeeded but didn't send a display capabilities. A lot of things will probably break.");
- return;
- }
-
- self.softButtonCapabilities = response.softButtonCapabilities ? response.softButtonCapabilities.firstObject : nil;
- self.displayCapabilities = response.displayCapabilities;
-#pragma clang diagnostic pop
-}
-
-- (void)sdl_displayLayoutResponse:(SDLRPCResponseNotification *)notification {
- SDLSetDisplayLayoutResponse *response = (SDLSetDisplayLayoutResponse *)notification.response;
- if (!response.success.boolValue) { return; }
- if (response.displayCapabilities == nil) {
- SDLLogE(@"SetDisplayLayout succeeded but didn't send a display capabilities. A lot of things will probably break.");
- return;
- }
-
- self.softButtonCapabilities = response.softButtonCapabilities ? response.softButtonCapabilities.firstObject : nil;
- self.displayCapabilities = response.displayCapabilities;
+- (void)sdl_displayCapabilityDidUpdate:(SDLSystemCapability *)systemCapability {
+ self.windowCapability = self.systemCapabilityManager.defaultMainWindowCapability;
// Auto-send an updated Show to account for changes to the capabilities
if (self.softButtonObjects.count > 0) {
- SDLSoftButtonReplaceOperation *op = [[SDLSoftButtonReplaceOperation alloc] initWithConnectionManager:self.connectionManager fileManager:self.fileManager capabilities:self.softButtonCapabilities softButtonObjects:self.softButtonObjects mainField1:self.currentMainField1];
+ SDLSoftButtonReplaceOperation *op = [[SDLSoftButtonReplaceOperation alloc] initWithConnectionManager:self.connectionManager fileManager:self.fileManager capabilities:self.windowCapability.softButtonCapabilities.firstObject softButtonObjects:self.softButtonObjects mainField1:self.currentMainField1];
[self.transactionQueue addOperation:op];
}
}
diff --git a/SmartDeviceLink/SDLSoftButtonReplaceOperation.m b/SmartDeviceLink/SDLSoftButtonReplaceOperation.m
index c967e10a9..7f377a620 100644
--- a/SmartDeviceLink/SDLSoftButtonReplaceOperation.m
+++ b/SmartDeviceLink/SDLSoftButtonReplaceOperation.m
@@ -10,7 +10,6 @@
#import "SDLArtwork.h"
#import "SDLConnectionManagerType.h"
-#import "SDLDisplayCapabilities+ShowManagerExtensions.h"
#import "SDLFileManager.h"
#import "SDLLogMacros.h"
#import "SDLShow.h"
@@ -49,6 +48,7 @@ NS_ASSUME_NONNULL_BEGIN
- (void)start {
[super start];
+ if (self.isCancelled) { return; }
// Check the state of our images
if (![self sdl_supportsSoftButtonImages]) {
diff --git a/SmartDeviceLink/SDLSoftButtonTransitionOperation.m b/SmartDeviceLink/SDLSoftButtonTransitionOperation.m
index 862df6c5e..add03489c 100644
--- a/SmartDeviceLink/SDLSoftButtonTransitionOperation.m
+++ b/SmartDeviceLink/SDLSoftButtonTransitionOperation.m
@@ -44,6 +44,7 @@ NS_ASSUME_NONNULL_BEGIN
- (void)start {
[super start];
+ if (self.isCancelled) { return; }
[self sdl_sendNewSoftButtons];
}
diff --git a/SmartDeviceLink/SDLStreamingVideoLifecycleManager.m b/SmartDeviceLink/SDLStreamingVideoLifecycleManager.m
index 2469582d3..1cde09fd6 100644
--- a/SmartDeviceLink/SDLStreamingVideoLifecycleManager.m
+++ b/SmartDeviceLink/SDLStreamingVideoLifecycleManager.m
@@ -44,6 +44,7 @@
#import "SDLVehicleType.h"
#import "SDLVideoEncoderDelegate.h"
#import "SDLVideoStreamingCapability.h"
+#import "SDLVersion.h"
static NSUInteger const FramesToSendOnBackground = 30;
@@ -65,7 +66,8 @@ typedef void(^SDLVideoCapabilityResponseHandler)(SDLVideoStreamingCapability *_N
@property (strong, nonatomic, readwrite, nullable) SDLVideoStreamingFormat *videoFormat;
@property (strong, nonatomic, nullable) SDLH264VideoEncoder *videoEncoder;
-@property (copy, nonatomic) NSDictionary<NSString *, id> *videoEncoderSettings;
+@property (strong, nonatomic) NSMutableDictionary *videoEncoderSettings;
+@property (copy, nonatomic) NSDictionary<NSString *, id> *customEncoderSettings;
@property (copy, nonatomic) NSArray<NSString *> *secureMakes;
@property (copy, nonatomic) NSString *connectedVehicleMake;
@@ -102,7 +104,9 @@ typedef void(^SDLVideoCapabilityResponseHandler)(SDLVideoStreamingCapability *_N
_appName = configuration.lifecycleConfig.appName;
_connectionManager = connectionManager;
- _videoEncoderSettings = configuration.streamingMediaConfig.customVideoEncoderSettings ?: SDLH264VideoEncoder.defaultVideoEncoderSettings;
+ _videoEncoderSettings = [NSMutableDictionary dictionary];
+ [_videoEncoderSettings addEntriesFromDictionary: SDLH264VideoEncoder.defaultVideoEncoderSettings];
+ _customEncoderSettings = configuration.streamingMediaConfig.customVideoEncoderSettings;
if (configuration.streamingMediaConfig.rootViewController != nil) {
NSAssert(configuration.streamingMediaConfig.enableForcedFramerateSync, @"When using CarWindow (rootViewController != nil), forceFrameRateSync must be YES");
@@ -344,6 +348,9 @@ typedef void(^SDLVideoCapabilityResponseHandler)(SDLVideoStreamingCapability *_N
// If we got a response, get the head unit's preferred formats and resolutions
weakSelf.preferredFormats = capability.supportedFormats;
weakSelf.preferredResolutions = @[capability.preferredResolution];
+ if (capability.maxBitrate != nil) {
+ weakSelf.videoEncoderSettings[(__bridge NSString *) kVTCompressionPropertyKey_AverageBitRate] = [[NSNumber alloc] initWithUnsignedLongLong:(capability.maxBitrate.unsignedLongLongValue * 1000)];
+ }
if (weakSelf.dataSource != nil) {
SDLLogV(@"Calling data source for modified preferred formats");
@@ -369,6 +376,11 @@ typedef void(^SDLVideoCapabilityResponseHandler)(SDLVideoStreamingCapability *_N
SDLLogD(@"Using generic video capabilites, preferred formats: %@, resolutions: %@, haptics disabled", weakSelf.preferredFormats, weakSelf.preferredResolutions);
}
+ // Apply customEncoderSettings here. Note that value from HMI (such as maxBitrate) will be overwritten by custom settings.
+ for (id key in self.customEncoderSettings.keyEnumerator) {
+ self.videoEncoderSettings[key] = [self.customEncoderSettings valueForKey:key];
+ }
+
if (weakSelf.dataSource != nil) {
SDLLogV(@"Calling data source for modified preferred resolutions");
weakSelf.preferredResolutions = [weakSelf.dataSource resolutionFromHeadUnitPreferredResolution:weakSelf.preferredResolutions.firstObject];
@@ -554,9 +566,12 @@ typedef void(^SDLVideoCapabilityResponseHandler)(SDLVideoStreamingCapability *_N
SDLLogV(@"Determining whether streaming is supported");
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated"
- _streamingSupported = registerResponse.hmiCapabilities.videoStreaming ? registerResponse.hmiCapabilities.videoStreaming.boolValue : registerResponse.displayCapabilities.graphicSupported.boolValue;
+ if ([SDLGlobals.sharedGlobals.rpcVersion isGreaterThanOrEqualToVersion:[[SDLVersion alloc] initWithMajor:4 minor:5 patch:0]]) {
+ _streamingSupported = registerResponse.hmiCapabilities.videoStreaming.boolValue;
+ } else {
+ _streamingSupported = YES;
+ }
#pragma clang diagnostic pop
-
if (!self.isStreamingSupported) {
SDLLogE(@"Graphics are not supported on this head unit. We are are assuming screen size is also unavailable and exiting.");
return;
diff --git a/SmartDeviceLink/SDLSupportedSeat.h b/SmartDeviceLink/SDLSupportedSeat.h
index 7c7df2f9d..63badc582 100644
--- a/SmartDeviceLink/SDLSupportedSeat.h
+++ b/SmartDeviceLink/SDLSupportedSeat.h
@@ -5,16 +5,22 @@
/**
* List possible seats that is a remote controllable seat.
- *
+ * @warning This should not be used to supported seats, this is a deprecated parameter.
*/
-typedef SDLEnum SDLSupportedSeat SDL_SWIFT_ENUM;
+typedef SDLEnum SDLSupportedSeat SDL_SWIFT_ENUM __deprecated;
/**
* @abstract Save current seat postions and settings to seat memory.
*/
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
extern SDLSupportedSeat const SDLSupportedSeatDriver;
+#pragma clang diagnostic pop
/**
* @abstract Restore / apply the seat memory settings to the current seat.
*/
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
extern SDLSupportedSeat const SDLSupportedSeatFrontPassenger;
+#pragma clang diagnostic pop
diff --git a/SmartDeviceLink/SDLSupportedSeat.m b/SmartDeviceLink/SDLSupportedSeat.m
index f97678bb1..1260ced9d 100644
--- a/SmartDeviceLink/SDLSupportedSeat.m
+++ b/SmartDeviceLink/SDLSupportedSeat.m
@@ -3,5 +3,8 @@
#import "SDLSupportedSeat.h"
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
SDLSupportedSeat const SDLSupportedSeatDriver = @"DRIVER";
SDLSupportedSeat const SDLSupportedSeatFrontPassenger = @"FRONT_PASSENGER";
+#pragma clang diagnostic pop
diff --git a/SmartDeviceLink/SDLSystemCapability.h b/SmartDeviceLink/SDLSystemCapability.h
index 1e88443e6..f0ac7b2d8 100755
--- a/SmartDeviceLink/SDLSystemCapability.h
+++ b/SmartDeviceLink/SDLSystemCapability.h
@@ -14,6 +14,7 @@
@class SDLNavigationCapability;
@class SDLVideoStreamingCapability;
@class SDLRemoteControlCapabilities;
+@class SDLSeatLocationCapability;
@class SDLDisplayCapability;
NS_ASSUME_NONNULL_BEGIN
@@ -66,6 +67,22 @@ NS_ASSUME_NONNULL_BEGIN
- (instancetype)initWithRemoteControlCapability:(SDLRemoteControlCapabilities *)capability;
/**
+ Convenience init for DisplayCapability list
+
+ @param capabilities Contains capabilities related to a physical screen and any associated windows
+ @return A SDLSystemCapability object
+ */
+- (instancetype)initWithDisplayCapabilities:(NSArray<SDLDisplayCapability *> *)capabilities;
+
+/**
+ * Convenience init for a Remote Control Capability
+ *
+ * @param capability Describes information about the locations of each seat
+ * @return A SDLSystemCapability object
+ */
+- (instancetype)initWithSeatLocationCapability:(SDLSeatLocationCapability *)capability;
+
+/**
* Used as a descriptor of what data to expect in this struct. The corresponding param to this enum should be included and the only other parameter included.
*/
@property (strong, nonatomic) SDLSystemCapabilityType systemCapabilityType;
@@ -106,6 +123,13 @@ NS_ASSUME_NONNULL_BEGIN
@property (nullable, strong, nonatomic) SDLRemoteControlCapabilities *remoteControlCapability;
/**
+ * Describes information about the locations of each seat
+ *
+ * Optional
+ */
+@property (nullable, strong, nonatomic) SDLSeatLocationCapability *seatLocationCapability;
+
+/**
Contain the display related information and all windows related to that display
Optional
diff --git a/SmartDeviceLink/SDLSystemCapability.m b/SmartDeviceLink/SDLSystemCapability.m
index 1b887736e..3936e463b 100755
--- a/SmartDeviceLink/SDLSystemCapability.m
+++ b/SmartDeviceLink/SDLSystemCapability.m
@@ -16,6 +16,7 @@
#import "SDLSystemCapabilityType.h"
#import "SDLVideoStreamingCapability.h"
#import "SDLRemoteControlCapabilities.h"
+#import "SDLSeatLocationCapability.h"
#import "SDLDisplayCapability.h"
NS_ASSUME_NONNULL_BEGIN
@@ -82,6 +83,30 @@ NS_ASSUME_NONNULL_BEGIN
return self;
}
+- (instancetype)initWithDisplayCapabilities:(NSArray<SDLDisplayCapability *> *)capabilities {
+ self = [self init];
+ if (!self) {
+ return nil;
+ }
+
+ self.systemCapabilityType = SDLSystemCapabilityTypeDisplays;
+ self.displayCapabilities = [capabilities copy];
+
+ return self;
+}
+
+- (instancetype)initWithSeatLocationCapability:(SDLSeatLocationCapability *)capability {
+ self = [self init];
+ if (!self) {
+ return nil;
+ }
+
+ self.systemCapabilityType = SDLSystemCapabilityTypeSeatLocation;
+ self.seatLocationCapability = capability;
+
+ return self;
+}
+
- (void)setSystemCapabilityType:(SDLSystemCapabilityType)type {
[self.store sdl_setObject:type forName:SDLRPCParameterNameSystemCapabilityType];
}
@@ -131,6 +156,13 @@ NS_ASSUME_NONNULL_BEGIN
return [self.store sdl_objectForName:SDLRPCParameterNameRemoteControlCapability ofClass:SDLRemoteControlCapabilities.class error:nil];
}
+- (void)setSeatLocationCapability:(nullable SDLSeatLocationCapability *)seatLocationCapability {
+ [self.store sdl_setObject:seatLocationCapability forName:SDLRPCParameterNameSeatLocationCapability];
+}
+
+- (nullable SDLSeatLocationCapability *)seatLocationCapability {
+ return [self.store sdl_objectForName:SDLRPCParameterNameSeatLocationCapability ofClass:SDLSeatLocationCapability.class error:nil];
+}
- (void)setDisplayCapabilities:(nullable NSArray<SDLDisplayCapability *> *)displayCapabilities {
[self.store sdl_setObject:displayCapabilities forName:SDLRPCParameterNameDisplayCapabilities];
diff --git a/SmartDeviceLink/SDLSystemCapabilityManager.h b/SmartDeviceLink/SDLSystemCapabilityManager.h
index 2a86d77c8..f5695b3bf 100644
--- a/SmartDeviceLink/SDLSystemCapabilityManager.h
+++ b/SmartDeviceLink/SDLSystemCapabilityManager.h
@@ -17,16 +17,19 @@
@class SDLAppServicesCapabilities;
@class SDLAudioPassThruCapabilities;
@class SDLButtonCapabilities;
+@class SDLDisplayCapability;
@class SDLDisplayCapabilities;
@class SDLHMICapabilities;
@class SDLNavigationCapability;
@class SDLPhoneCapability;
@class SDLPresetBankCapabilities;
@class SDLRemoteControlCapabilities;
+@class SDLSeatLocationCapability;
@class SDLSoftButtonCapabilities;
@class SDLSystemCapability;
@class SDLSystemCapabilityManager;
@class SDLVideoStreamingCapability;
+@class SDLWindowCapability;
@protocol SDLConnectionManagerType;
@@ -58,11 +61,20 @@ typedef void (^SDLCapabilityUpdateHandler)(SDLSystemCapability *capability);
@property (assign, nonatomic, readonly) BOOL supportsSubscriptions;
/**
+ * Provides window capabilities of all displays connected with SDL. By default, one display is connected and supported which includes window capability information of the default main window of the display. May be nil if the system has not provided display and window capability information yet.
+ *
+ * @see SDLDisplayCapability
+ *
+ * Optional, @since SDL 6.0
+ */
+@property (nullable, strong, nonatomic, readonly) NSArray<SDLDisplayCapability *> *displays;
+
+/**
* @see SDLDisplayCapabilities
*
* Optional
*/
-@property (nullable, strong, nonatomic, readonly) SDLDisplayCapabilities *displayCapabilities;
+@property (nullable, strong, nonatomic, readonly) SDLDisplayCapabilities *displayCapabilities __deprecated_msg("Use displays, windowCapabilityWithID: or defaultMainWindowCapability instead to access capabilities of a display/window.");
/**
* @see SDLHMICapabilities
@@ -78,14 +90,14 @@ typedef void (^SDLCapabilityUpdateHandler)(SDLSystemCapability *capability);
*
* Optional, Array of length 1 - 100, of SDLSoftButtonCapabilities
*/
-@property (nullable, copy, nonatomic, readonly) NSArray<SDLSoftButtonCapabilities *> *softButtonCapabilities;
+@property (nullable, copy, nonatomic, readonly) NSArray<SDLSoftButtonCapabilities *> *softButtonCapabilities __deprecated_msg("Use displays, windowCapabilityWithID: or defaultMainWindowCapability instead to access soft button capabilities of a window.");
/**
* @see SDLButtonCapabilities
*
* Optional, Array of length 1 - 100, of SDLButtonCapabilities
*/
-@property (nullable, copy, nonatomic, readonly) NSArray<SDLButtonCapabilities *> *buttonCapabilities;
+@property (nullable, copy, nonatomic, readonly) NSArray<SDLButtonCapabilities *> *buttonCapabilities __deprecated_msg("Use displays, windowCapabilityWithID: or defaultMainWindowCapability instead to access button capabilities of a window.");
/**
* If returned, the platform supports custom on-screen Presets
@@ -94,7 +106,7 @@ typedef void (^SDLCapabilityUpdateHandler)(SDLSystemCapability *capability);
*
* Optional
*/
-@property (nullable, strong, nonatomic, readonly) SDLPresetBankCapabilities *presetBankCapabilities;
+@property (nullable, strong, nonatomic, readonly) SDLPresetBankCapabilities *presetBankCapabilities __deprecated_msg("Use displays, windowCapabilityWithID: or defaultMainWindowCapability instead to access preset bank capabilities of a window.");
/**
* @see SDLHMIZoneCapabilities
@@ -184,6 +196,23 @@ typedef void (^SDLCapabilityUpdateHandler)(SDLSystemCapability *capability);
@property (nullable, strong, nonatomic, readonly) SDLRemoteControlCapabilities *remoteControlCapability;
/**
+ If returned, the platform supports remote control capabilities for seats
+
+ @see SDLSeatLocationCapability
+
+ Optional
+ */
+@property (nullable, strong, nonatomic, readonly) SDLSeatLocationCapability *seatLocationCapability;
+
+
+/**
+ * Returns the window capability object of the default main window which is always pre-created by the connected system. This is a convenience method for easily accessing the capabilities of the default main window.
+ *
+ * @returns The window capability object representing the default main window capabilities or nil if no window capabilities exist.
+ */
+@property (nullable, strong, nonatomic, readonly) SDLWindowCapability *defaultMainWindowCapability;
+
+/**
Init is unavailable. Dependencies must be injected using initWithConnectionManager:
@return nil
@@ -249,6 +278,14 @@ typedef void (^SDLCapabilityUpdateHandler)(SDLSystemCapability *capability);
*/
- (void)unsubscribeFromCapabilityType:(SDLSystemCapabilityType)type withObserver:(id)observer;
+/**
+ * Returns the window capability object of the primary display with the specified window ID. This is a convenient method to easily access capabilities of windows for instance widget windows of the main display.
+ *
+ * @param windowID The ID of the window to get capabilities
+ * @returns The window capability object representing the window capabilities of the window with the specified window ID or nil if the window is not known or no window capabilities exist.
+ */
+- (nullable SDLWindowCapability *)windowCapabilityWithWindowID:(NSUInteger)windowID;
+
@end
NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLSystemCapabilityManager.m b/SmartDeviceLink/SDLSystemCapabilityManager.m
index 7fb690c52..cf1a9e19a 100644
--- a/SmartDeviceLink/SDLSystemCapabilityManager.m
+++ b/SmartDeviceLink/SDLSystemCapabilityManager.m
@@ -12,6 +12,8 @@
#import "SDLAppServiceRecord.h"
#import "SDLAppServicesCapabilities.h"
#import "SDLConnectionManagerType.h"
+#import "SDLDisplayCapabilities.h"
+#import "SDLDisplayCapability.h"
#import "SDLError.h"
#import "SDLGenericResponse.h"
#import "SDLGetSystemCapability.h"
@@ -28,12 +30,14 @@
#import "SDLRemoteControlCapabilities.h"
#import "SDLRPCNotificationNotification.h"
#import "SDLRPCResponseNotification.h"
+#import "SDLSeatLocationCapability.h"
#import "SDLSetDisplayLayoutResponse.h"
#import "SDLSystemCapability.h"
#import "SDLSystemCapabilityObserver.h"
#import "SDLVersion.h"
#import "SDLVideoStreamingCapability.h"
-
+#import "SDLWindowCapability.h"
+#import "SDLWindowTypeCapabilities.h"
NS_ASSUME_NONNULL_BEGIN
@@ -43,6 +47,7 @@ typedef NSString * SDLServiceID;
@property (weak, nonatomic) id<SDLConnectionManagerType> connectionManager;
+@property (nullable, strong, nonatomic, readwrite) NSArray<SDLDisplayCapability *> *displays;
@property (nullable, strong, nonatomic, readwrite) SDLDisplayCapabilities *displayCapabilities;
@property (nullable, strong, nonatomic, readwrite) SDLHMICapabilities *hmiCapabilities;
@property (nullable, copy, nonatomic, readwrite) NSArray<SDLSoftButtonCapabilities *> *softButtonCapabilities;
@@ -58,6 +63,7 @@ typedef NSString * SDLServiceID;
@property (nullable, strong, nonatomic, readwrite) SDLPhoneCapability *phoneCapability;
@property (nullable, strong, nonatomic, readwrite) SDLVideoStreamingCapability *videoStreamingCapability;
@property (nullable, strong, nonatomic, readwrite) SDLRemoteControlCapabilities *remoteControlCapability;
+@property (nullable, strong, nonatomic, readwrite) SDLSeatLocationCapability *seatLocationCapability;
@property (nullable, strong, nonatomic) NSMutableDictionary<SDLServiceID, SDLAppServiceCapability *> *appServicesCapabilitiesDictionary;
@@ -68,6 +74,8 @@ typedef NSString * SDLServiceID;
@property (assign, nonatomic) BOOL isFirstHMILevelFull;
+@property (assign, nonatomic) BOOL shouldConvertDeprecatedDisplayCapabilities;
+
@end
@implementation SDLSystemCapabilityManager
@@ -82,6 +90,7 @@ typedef NSString * SDLServiceID;
_connectionManager = manager;
_isFirstHMILevelFull = NO;
+ _shouldConvertDeprecatedDisplayCapabilities = YES;
_appServicesCapabilitiesDictionary = [NSMutableDictionary dictionary];
_capabilityObservers = [NSMutableDictionary dictionary];
@@ -122,6 +131,7 @@ typedef NSString * SDLServiceID;
_phoneCapability = nil;
_videoStreamingCapability = nil;
_remoteControlCapability = nil;
+ _seatLocationCapability = nil;
_appServicesCapabilitiesDictionary = [NSMutableDictionary dictionary];
_supportsSubscriptions = NO;
@@ -130,6 +140,7 @@ typedef NSString * SDLServiceID;
}
_isFirstHMILevelFull = NO;
+ _shouldConvertDeprecatedDisplayCapabilities = YES;
}
#pragma mark - Getters
@@ -145,7 +156,7 @@ typedef NSString * SDLServiceID;
/**
* Registers for notifications and responses from Core
*/
--(void)sdl_registerForNotifications {
+- (void)sdl_registerForNotifications {
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(sdl_registerResponse:) name:SDLDidReceiveRegisterAppInterfaceResponse object:nil];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(sdl_displayLayoutResponse:) name:SDLDidReceiveSetDisplayLayoutResponse object:nil];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(sdl_systemCapabilityUpdatedNotification:) name:SDLDidReceiveSystemCapabilityUpdatedNotification object:nil];
@@ -158,45 +169,59 @@ typedef NSString * SDLServiceID;
*
* @param notification The `RegisterAppInterfaceResponse` response received from Core
*/
-
- (void)sdl_registerResponse:(SDLRPCResponseNotification *)notification {
SDLRegisterAppInterfaceResponse *response = (SDLRegisterAppInterfaceResponse *)notification.response;
if (!response.success.boolValue) { return; }
+
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated"
self.displayCapabilities = response.displayCapabilities;
-#pragma clang diagnostic pop
- self.hmiCapabilities = response.hmiCapabilities;
-#pragma clang diagnostic push
-#pragma clang diagnostic ignored "-Wdeprecated"
self.softButtonCapabilities = response.softButtonCapabilities;
self.buttonCapabilities = response.buttonCapabilities;
self.presetBankCapabilities = response.presetBankCapabilities;
#pragma clang diagnostic pop
+
+ self.hmiCapabilities = response.hmiCapabilities;
self.hmiZoneCapabilities = response.hmiZoneCapabilities;
self.speechCapabilities = response.speechCapabilities;
self.prerecordedSpeechCapabilities = response.prerecordedSpeech;
self.vrCapability = (response.vrCapabilities.count > 0 && [response.vrCapabilities.firstObject isEqualToEnum:SDLVRCapabilitiesText]) ? YES : NO;
self.audioPassThruCapabilities = response.audioPassThruCapabilities;
self.pcmStreamCapability = response.pcmStreamCapabilities;
+
+ self.shouldConvertDeprecatedDisplayCapabilities = YES;
+ self.displays = [self sdl_createDisplayCapabilityListFromRegisterResponse:response];
+
+ // call the observers in case the new display capability list is created from deprecated types
+ SDLSystemCapability *systemCapability = [[SDLSystemCapability alloc] initWithDisplayCapabilities:self.displays];
+ [self sdl_callObserversForCapabilityUpdate:systemCapability handler:nil];
}
-
-
-
/**
* Called when a `SetDisplayLayoutResponse` response is received from Core. If the template was set successfully, the the new capabilities for the template are saved.
*
* @param notification The `SetDisplayLayoutResponse` response received from Core
*/
- (void)sdl_displayLayoutResponse:(SDLRPCResponseNotification *)notification {
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated"
SDLSetDisplayLayoutResponse *response = (SDLSetDisplayLayoutResponse *)notification.response;
+#pragma clang diagnostic pop
if (!response.success.boolValue) { return; }
+ // If we've received a display capability update then we should not convert our deprecated display capabilities and we should just return
+ if (!self.shouldConvertDeprecatedDisplayCapabilities) { return; }
+
self.displayCapabilities = response.displayCapabilities;
self.buttonCapabilities = response.buttonCapabilities;
self.softButtonCapabilities = response.softButtonCapabilities;
self.presetBankCapabilities = response.presetBankCapabilities;
+
+ self.displays = [self sdl_createDisplayCapabilityListFromSetDisplayLayoutResponse:response];
+
+ // Call the observers in case the new display capability list is created from deprecated types
+ SDLSystemCapability *systemCapability = [[SDLSystemCapability alloc] initWithDisplayCapabilities:self.displays];
+ [self sdl_callObserversForCapabilityUpdate:systemCapability handler:nil];
}
@@ -240,7 +265,126 @@ typedef NSString * SDLServiceID;
[self sdl_subscribeToSystemCapabilityUpdates];
}
-#pragma mark - System Capabilities
+#pragma mark - Window And Display Capabilities
+
+- (nullable SDLWindowCapability *)windowCapabilityWithWindowID:(NSUInteger)windowID {
+ NSArray<SDLDisplayCapability *> *capabilities = self.displays;
+ if (capabilities == nil || capabilities.count == 0) {
+ return nil;
+ }
+
+ SDLDisplayCapability *mainDisplay = capabilities.firstObject;
+ for (SDLWindowCapability *windowCapability in mainDisplay.windowCapabilities) {
+ NSUInteger currentWindowID = windowCapability.windowID != nil ? windowCapability.windowID.unsignedIntegerValue : SDLPredefinedWindowsDefaultWindow;
+ if (currentWindowID == windowID) {
+ return windowCapability;
+ }
+ }
+ return nil;
+}
+
+- (nullable SDLWindowCapability *)defaultMainWindowCapability {
+ return [self windowCapabilityWithWindowID:SDLPredefinedWindowsDefaultWindow];
+}
+
+#pragma mark Convert Deprecated to New
+
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated"
+/// Convert the capabilities from a `RegisterAppInterfaceResponse` into a new-style `DisplayCapability` for the main display.
+/// @param rpc The `RegisterAppInterfaceResponse` RPC
+- (NSArray<SDLDisplayCapability *> *)sdl_createDisplayCapabilityListFromRegisterResponse:(SDLRegisterAppInterfaceResponse *)rpc {
+ return [self sdl_createDisplayCapabilityListFromDeprecatedDisplayCapabilities:rpc.displayCapabilities buttons:rpc.buttonCapabilities softButtons:rpc.softButtonCapabilities];
+}
+
+- (NSArray<SDLDisplayCapability *> *)sdl_createDisplayCapabilityListFromSetDisplayLayoutResponse:(SDLSetDisplayLayoutResponse *)rpc {
+ return [self sdl_createDisplayCapabilityListFromDeprecatedDisplayCapabilities:rpc.displayCapabilities buttons:rpc.buttonCapabilities softButtons:rpc.softButtonCapabilities];
+}
+#pragma clang diagnostic pop
+
+/// Creates a "new-style" display capability from the "old-style" `SDLDisplayCapabilities` object and other "old-style" objects that were returned in `RegisterAppInterfaceResponse` and `SetDisplayLayoutResponse`
+/// @param display The old-style `SDLDisplayCapabilities` object to convert
+/// @param buttons The old-style `SDLButtonCapabilities` object to convert
+/// @param softButtons The old-style `SDLSoftButtonCapabilities` to convert
+- (NSArray<SDLDisplayCapability *> *)sdl_createDisplayCapabilityListFromDeprecatedDisplayCapabilities:(SDLDisplayCapabilities *)display buttons:(NSArray<SDLButtonCapabilities *> *)buttons softButtons:(NSArray<SDLSoftButtonCapabilities *> *)softButtons {
+ // Based on deprecated Display capabilities we don't know if widgets are supported. The default MAIN window is the only window we know is supported, so it's the only one we will expose.
+ SDLWindowTypeCapabilities *windowTypeCapabilities = [[SDLWindowTypeCapabilities alloc] initWithType:SDLWindowTypeMain maximumNumberOfWindows:1];
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated"
+ NSString *displayName = display.displayName ?: display.displayType;
+#pragma clang diagnostic pop
+ SDLDisplayCapability *displayCapability = [[SDLDisplayCapability alloc] initWithDisplayName:displayName];
+ displayCapability.windowTypeSupported = @[windowTypeCapabilities];
+
+ // Create a window capability object for the default MAIN window
+ SDLWindowCapability *defaultWindowCapability = [[SDLWindowCapability alloc] init];
+ defaultWindowCapability.windowID = @(SDLPredefinedWindowsDefaultWindow);
+ defaultWindowCapability.buttonCapabilities = [buttons copy];
+ defaultWindowCapability.softButtonCapabilities = [softButtons copy];
+
+ // return if display capabilities don't exist.
+ if (display == nil) {
+ displayCapability.windowCapabilities = @[defaultWindowCapability];
+ return @[displayCapability];
+ }
+
+ // Copy all available display capability properties
+ defaultWindowCapability.templatesAvailable = [display.templatesAvailable copy];
+ defaultWindowCapability.numCustomPresetsAvailable = [display.numCustomPresetsAvailable copy];
+ defaultWindowCapability.textFields = [display.textFields copy];
+ defaultWindowCapability.imageFields = [display.imageFields copy];
+
+ /*
+ The description from the mobile API to "graphicSupported:
+ > The display's persistent screen supports referencing a static or dynamic image.
+ For backward compatibility (AppLink 2.0) static image type is always presented
+ */
+ if (display.graphicSupported.boolValue) {
+ defaultWindowCapability.imageTypeSupported = @[SDLImageTypeStatic, SDLImageTypeDynamic];
+ } else {
+ defaultWindowCapability.imageTypeSupported = @[SDLImageTypeStatic];
+ }
+
+ displayCapability.windowCapabilities = @[defaultWindowCapability];
+ return @[displayCapability];
+}
+
+#pragma mark Convert New to Deprecated
+
+/// Convert from a WindowCapability (should be the main display's main window capability) to the deprecated old-style DisplayCapabilities
+/// @param displayName The display name of the display to be converted
+/// @param windowCapability The window capability to be converted
+- (SDLDisplayCapabilities *)sdl_createDeprecatedDisplayCapabilitiesWithDisplayName:(NSString *)displayName windowCapability:(SDLWindowCapability *)windowCapability {
+ SDLDisplayCapabilities *convertedCapabilities = [[SDLDisplayCapabilities alloc] init];
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated"
+ convertedCapabilities.displayType = SDLDisplayTypeGeneric; // deprecated but it is mandatory
+#pragma clang diagnostic pop
+ convertedCapabilities.displayName = displayName;
+ convertedCapabilities.textFields = [windowCapability.textFields copy];
+ convertedCapabilities.imageFields = [windowCapability.imageFields copy];
+ convertedCapabilities.templatesAvailable = [windowCapability.templatesAvailable copy];
+ convertedCapabilities.numCustomPresetsAvailable = [windowCapability.numCustomPresetsAvailable copy];
+ convertedCapabilities.mediaClockFormats = @[]; // mandatory field but allows empty array
+ convertedCapabilities.graphicSupported = @([windowCapability.imageTypeSupported containsObject:SDLImageTypeDynamic]);
+
+ return convertedCapabilities;
+}
+
+/// Update the internal deprecated display capability methods with new values based on the current value of the default main window capability and the primary display
+- (void)sdl_updateDeprecatedDisplayCapabilities {
+ SDLWindowCapability *defaultMainWindowCapabilities = self.defaultMainWindowCapability;
+ if (self.displays.count == 0) {
+ return;
+ }
+
+ // Create the deprecated capabilities for backward compatibility if developers try to access them
+ self.displayCapabilities = [self sdl_createDeprecatedDisplayCapabilitiesWithDisplayName:self.displays.firstObject.displayName windowCapability:defaultMainWindowCapabilities];
+ self.buttonCapabilities = defaultMainWindowCapabilities.buttonCapabilities;
+ self.softButtonCapabilities = defaultMainWindowCapabilities.softButtonCapabilities;
+}
+
+#pragma mark - System Capability Updates
- (void)updateCapabilityType:(SDLSystemCapabilityType)type completionHandler:(SDLUpdateCapabilityHandler)handler {
if (self.supportsSubscriptions) {
@@ -259,9 +403,11 @@ typedef NSString * SDLServiceID;
* @return An array of all possible system capability types
*/
+ (NSArray<SDLSystemCapabilityType> *)sdl_systemCapabilityTypes {
- return @[SDLSystemCapabilityTypeAppServices, SDLSystemCapabilityTypeNavigation, SDLSystemCapabilityTypePhoneCall, SDLSystemCapabilityTypeVideoStreaming, SDLSystemCapabilityTypeRemoteControl];
+ return @[SDLSystemCapabilityTypeAppServices, SDLSystemCapabilityTypeNavigation, SDLSystemCapabilityTypePhoneCall, SDLSystemCapabilityTypeVideoStreaming, SDLSystemCapabilityTypeRemoteControl, SDLSystemCapabilityTypeDisplays, SDLSystemCapabilityTypeSeatLocation];
}
+# pragma mark Subscribing
+
/**
* Sends a subscribe request for all possible system capabilites. If connecting to Core versions 4.5+, the requested capability will be returned in the response. If connecting to Core versions 5.1+, the manager will received `OnSystemCapabilityUpdated` notifications when the capability updates if the subscription was successful.
*/
@@ -296,6 +442,8 @@ typedef NSString * SDLServiceID;
}];
}
+#pragma mark Saving Capability Responses
+
/**
Saves a system capability. All system capabilities will update with the full object except for app services. For app services only the updated app service capabilities will be included in the `SystemCapability` sent from Core. The cached `appServicesCapabilities` will be updated with the new `appService` data.
@@ -305,27 +453,49 @@ typedef NSString * SDLServiceID;
*/
- (BOOL)sdl_saveSystemCapability:(SDLSystemCapability *)systemCapability completionHandler:(nullable SDLUpdateCapabilityHandler)handler {
if ([self.lastReceivedCapability isEqual:systemCapability]) {
- return [self sdl_callSaveHandlerForCapability:systemCapability andReturnWithValue:NO handler:handler];
+ [self sdl_callObserversForCapabilityUpdate:systemCapability handler:handler];
+ return NO;
}
self.lastReceivedCapability = systemCapability;
SDLSystemCapabilityType systemCapabilityType = systemCapability.systemCapabilityType;
if ([systemCapabilityType isEqualToEnum:SDLSystemCapabilityTypePhoneCall]) {
- if ([self.phoneCapability isEqual:systemCapability.phoneCapability]) { return [self sdl_callSaveHandlerForCapability:systemCapability andReturnWithValue:NO handler:handler]; }
+ if ([self.phoneCapability isEqual:systemCapability.phoneCapability]) {
+ [self sdl_callObserversForCapabilityUpdate:systemCapability handler:handler];
+ return NO;
+ }
self.phoneCapability = systemCapability.phoneCapability;
} else if ([systemCapabilityType isEqualToEnum:SDLSystemCapabilityTypeNavigation]) {
- if ([self.navigationCapability isEqual:systemCapability.navigationCapability]) { return [self sdl_callSaveHandlerForCapability:systemCapability andReturnWithValue:NO handler:handler]; }
+ if ([self.navigationCapability isEqual:systemCapability.navigationCapability]) {
+ [self sdl_callObserversForCapabilityUpdate:systemCapability handler:handler];
+ return NO;
+ }
self.navigationCapability = systemCapability.navigationCapability;
} else if ([systemCapabilityType isEqualToEnum:SDLSystemCapabilityTypeRemoteControl]) {
- if ([self.remoteControlCapability isEqual:systemCapability.remoteControlCapability]) { return [self sdl_callSaveHandlerForCapability:systemCapability andReturnWithValue:NO handler:handler]; }
+ if ([self.remoteControlCapability isEqual:systemCapability.remoteControlCapability]) {
+ [self sdl_callObserversForCapabilityUpdate:systemCapability handler:handler];
+ return NO;
+ }
self.remoteControlCapability = systemCapability.remoteControlCapability;
+ } else if ([systemCapabilityType isEqualToEnum:SDLSystemCapabilityTypeSeatLocation]) {
+ if ([self.seatLocationCapability isEqual:systemCapability.seatLocationCapability]) {
+ [self sdl_callObserversForCapabilityUpdate:systemCapability handler:handler];
+ return NO;
+ }
+ self.seatLocationCapability = systemCapability.seatLocationCapability;
} else if ([systemCapabilityType isEqualToEnum:SDLSystemCapabilityTypeVideoStreaming]) {
- if ([self.videoStreamingCapability isEqual:systemCapability.videoStreamingCapability]) { return [self sdl_callSaveHandlerForCapability:systemCapability andReturnWithValue:NO handler:handler]; }
+ if ([self.videoStreamingCapability isEqual:systemCapability.videoStreamingCapability]) {
+ [self sdl_callObserversForCapabilityUpdate:systemCapability handler:handler];
+ return NO;
+ }
self.videoStreamingCapability = systemCapability.videoStreamingCapability;
} else if ([systemCapabilityType isEqualToEnum:SDLSystemCapabilityTypeAppServices]) {
[self sdl_saveAppServicesCapabilitiesUpdate:systemCapability.appServicesCapabilities];
systemCapability = [[SDLSystemCapability alloc] initWithAppServicesCapabilities:self.appServicesCapabilities];
+ } else if ([systemCapabilityType isEqualToEnum:SDLSystemCapabilityTypeDisplays]) {
+ self.shouldConvertDeprecatedDisplayCapabilities = NO;
+ [self sdl_saveDisplayCapabilityListUpdate:systemCapability.displayCapabilities];
} else {
SDLLogW(@"Received response for unknown System Capability Type: %@", systemCapabilityType);
return NO;
@@ -333,37 +503,11 @@ typedef NSString * SDLServiceID;
SDLLogD(@"Updated system capability manager with new data: %@", systemCapability);
- return [self sdl_callSaveHandlerForCapability:systemCapability andReturnWithValue:YES handler:handler];
+ [self sdl_callObserversForCapabilityUpdate:systemCapability handler:handler];
+ return YES;
}
-- (BOOL)sdl_callSaveHandlerForCapability:(SDLSystemCapability *)capability andReturnWithValue:(BOOL)value handler:(nullable SDLUpdateCapabilityHandler)handler {
- for (SDLSystemCapabilityObserver *observer in self.capabilityObservers[capability.systemCapabilityType]) {
- if (observer.block != nil) {
- observer.block(capability);
- } else {
- NSUInteger numberOfParametersInSelector = [NSStringFromSelector(observer.selector) componentsSeparatedByString:@":"].count - 1;
-#pragma clang diagnostic push
-#pragma clang diagnostic ignored "-Warc-performSelector-leaks"
- if (numberOfParametersInSelector == 0) {
- if ([observer.observer respondsToSelector:observer.selector]) {
- [observer.observer performSelector:observer.selector];
- }
- } else if (numberOfParametersInSelector == 1) {
- if ([observer.observer respondsToSelector:observer.selector]) {
- [observer.observer performSelector:observer.selector withObject:capability];
- }
- } else {
- @throw [NSException sdl_invalidSelectorExceptionWithSelector:observer.selector];
- }
-#pragma clang diagnostic pop
- }
- }
-
- if (handler == nil) { return value; }
- handler(nil, self);
-
- return value;
-}
+#pragma mark Merge Capability Deltas
- (void)sdl_saveAppServicesCapabilitiesUpdate:(SDLAppServicesCapabilities *)newCapabilities {
for (SDLAppServiceCapability *capability in newCapabilities.appServices) {
@@ -379,10 +523,52 @@ typedef NSString * SDLServiceID;
}
}
-#pragma mark - Subscriptions
+/// Save a new new-style `DisplayCapability` update (only contains the delta) that was received by merging it with the existing version.
+/// @param newCapabilities The new `DisplayCapability` update delta.
+- (void)sdl_saveDisplayCapabilityListUpdate:(NSArray<SDLDisplayCapability *> *)newCapabilities {
+ NSArray<SDLDisplayCapability *> *oldCapabilities = self.displays;
+
+ if (oldCapabilities == nil) {
+ self.displays = newCapabilities;
+ [self sdl_updateDeprecatedDisplayCapabilities];
+ return;
+ }
+
+ SDLDisplayCapability *oldDefaultDisplayCapabilities = oldCapabilities.firstObject;
+ NSMutableArray<SDLWindowCapability *> *copyWindowCapabilities = [oldDefaultDisplayCapabilities.windowCapabilities mutableCopy];
+
+ SDLDisplayCapability *newDefaultDisplayCapabilities = newCapabilities.firstObject;
+ NSArray<SDLWindowCapability *> *newWindowCapabilities = newDefaultDisplayCapabilities.windowCapabilities;
+
+ for (SDLWindowCapability *newWindow in newWindowCapabilities) {
+ BOOL oldFound = NO;
+ for (NSUInteger i = 0; i < copyWindowCapabilities.count; i++) {
+ SDLWindowCapability *oldWindow = copyWindowCapabilities[i];
+ NSUInteger newWindowID = newWindow.windowID ? newWindow.windowID.unsignedIntegerValue : SDLPredefinedWindowsDefaultWindow;
+ NSUInteger oldWindowID = oldWindow.windowID ? oldWindow.windowID.unsignedIntegerValue : SDLPredefinedWindowsDefaultWindow;
+ if (newWindowID == oldWindowID) {
+ copyWindowCapabilities[i] = newWindow; // replace the old window caps with new ones
+ oldFound = true;
+ break;
+ }
+ }
+
+ if (!oldFound) {
+ [copyWindowCapabilities addObject:newWindow]; // this is a new unknown window
+ }
+ }
+
+ // replace the window capabilities array with the merged one.
+ newDefaultDisplayCapabilities.windowCapabilities = [copyWindowCapabilities copy];
+ self.displays = @[newDefaultDisplayCapabilities];
+ [self sdl_updateDeprecatedDisplayCapabilities];
+}
+
+#pragma mark - Manager Subscriptions
- (nullable id<NSObject>)subscribeToCapabilityType:(SDLSystemCapabilityType)type withBlock:(SDLCapabilityUpdateHandler)block {
- if (!self.supportsSubscriptions) { return nil; }
+ // DISPLAYS always works due to old-style SetDisplayLayoutRepsonse updates, but otherwise, subscriptions won't work
+ if (!self.supportsSubscriptions && ![type isEqualToEnum:SDLSystemCapabilityTypeDisplays]) { return nil; }
SDLSystemCapabilityObserver *observerObject = [[SDLSystemCapabilityObserver alloc] initWithObserver:[[NSObject alloc] init] block:block];
[self.capabilityObservers[type] addObject:observerObject];
@@ -391,7 +577,8 @@ typedef NSString * SDLServiceID;
}
- (BOOL)subscribeToCapabilityType:(SDLSystemCapabilityType)type withObserver:(id<NSObject>)observer selector:(SEL)selector {
- if (!self.supportsSubscriptions) { return NO; }
+ // DISPLAYS always works due to old-style SetDisplayLayoutRepsonse updates, but otherwise, subscriptions won't work
+ if (!self.supportsSubscriptions && ![type isEqualToEnum:SDLSystemCapabilityTypeDisplays]) { return nil; }
NSUInteger numberOfParametersInSelector = [NSStringFromSelector(selector) componentsSeparatedByString:@":"].count - 1;
if (numberOfParametersInSelector > 1) { return NO; }
@@ -411,6 +598,36 @@ typedef NSString * SDLServiceID;
}
}
+/// Calls all observers of a capability type with an updated capability
+/// @param capability The new capability update
+/// @param handler The update handler to call, if one exists after the observers are called
+- (void)sdl_callObserversForCapabilityUpdate:(SDLSystemCapability *)capability handler:(nullable SDLUpdateCapabilityHandler)handler {
+ for (SDLSystemCapabilityObserver *observer in self.capabilityObservers[capability.systemCapabilityType]) {
+ if (observer.block != nil) {
+ observer.block(capability);
+ } else {
+ NSUInteger numberOfParametersInSelector = [NSStringFromSelector(observer.selector) componentsSeparatedByString:@":"].count - 1;
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Warc-performSelector-leaks"
+ if (numberOfParametersInSelector == 0) {
+ if ([observer.observer respondsToSelector:observer.selector]) {
+ [observer.observer performSelector:observer.selector];
+ }
+ } else if (numberOfParametersInSelector == 1) {
+ if ([observer.observer respondsToSelector:observer.selector]) {
+ [observer.observer performSelector:observer.selector withObject:capability];
+ }
+ } else {
+ @throw [NSException sdl_invalidSelectorExceptionWithSelector:observer.selector];
+ }
+#pragma clang diagnostic pop
+ }
+ }
+
+ if (handler == nil) { return; }
+ handler(nil, self);
+}
+
@end
NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLSystemCapabilityObserver.m b/SmartDeviceLink/SDLSystemCapabilityObserver.m
index 64832f1a7..7ccbd38af 100644
--- a/SmartDeviceLink/SDLSystemCapabilityObserver.m
+++ b/SmartDeviceLink/SDLSystemCapabilityObserver.m
@@ -32,6 +32,14 @@ NS_ASSUME_NONNULL_BEGIN
return self;
}
+- (NSString *)description {
+ if (self.selector) {
+ return [NSString stringWithFormat:@"Observer: %@[%@] - %@", [_observer class], _observer, NSStringFromSelector(_selector)];
+ } else {
+ return [NSString stringWithFormat:@"Block Observer: %@", _observer];
+ }
+}
+
@end
NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLSystemCapabilityType.h b/SmartDeviceLink/SDLSystemCapabilityType.h
index 1f7bd2178..60f11a78a 100755
--- a/SmartDeviceLink/SDLSystemCapabilityType.h
+++ b/SmartDeviceLink/SDLSystemCapabilityType.h
@@ -39,6 +39,11 @@ extern SDLSystemCapabilityType const SDLSystemCapabilityTypeVideoStreaming;
extern SDLSystemCapabilityType const SDLSystemCapabilityTypeRemoteControl;
/**
+ Contains information about the locations of each seat
+ */
+extern SDLSystemCapabilityType const SDLSystemCapabilityTypeSeatLocation;
+
+/**
The Display type capability
@since SDL 6.0
diff --git a/SmartDeviceLink/SDLSystemCapabilityType.m b/SmartDeviceLink/SDLSystemCapabilityType.m
index 2fb81a7fe..4185345e6 100755
--- a/SmartDeviceLink/SDLSystemCapabilityType.m
+++ b/SmartDeviceLink/SDLSystemCapabilityType.m
@@ -13,4 +13,5 @@ SDLSystemCapabilityType const SDLSystemCapabilityTypeNavigation = @"NAVIGATION";
SDLSystemCapabilityType const SDLSystemCapabilityTypePhoneCall = @"PHONE_CALL";
SDLSystemCapabilityType const SDLSystemCapabilityTypeVideoStreaming = @"VIDEO_STREAMING";
SDLSystemCapabilityType const SDLSystemCapabilityTypeRemoteControl = @"REMOTE_CONTROL";
+SDLSystemCapabilityType const SDLSystemCapabilityTypeSeatLocation = @"SEAT_LOCATION";
SDLSystemCapabilityType const SDLSystemCapabilityTypeDisplays = @"DISPLAYS";
diff --git a/SmartDeviceLink/SDLTextAndGraphicManager.h b/SmartDeviceLink/SDLTextAndGraphicManager.h
index 48c9c7332..c916e0426 100644
--- a/SmartDeviceLink/SDLTextAndGraphicManager.h
+++ b/SmartDeviceLink/SDLTextAndGraphicManager.h
@@ -14,6 +14,7 @@
@class SDLArtwork;
@class SDLFileManager;
@class SDLTextAndGraphicConfiguration;
+@class SDLSystemCapabilityManager;
@protocol SDLConnectionManagerType;
@@ -62,7 +63,10 @@ typedef void(^SDLTextAndGraphicUpdateCompletionHandler)(NSError *__nullable erro
@return A new SDLTextAndImageManager
*/
-- (instancetype)initWithConnectionManager:(id<SDLConnectionManagerType>)connectionManager fileManager:(SDLFileManager *)fileManager;
+- (instancetype)initWithConnectionManager:(id<SDLConnectionManagerType>)connectionManager fileManager:(SDLFileManager *)fileManager systemCapabilityManager:(SDLSystemCapabilityManager *)systemCapabilityManager;
+
+/// Starts the manager. This method is used internally.
+- (void)start;
/**
* Stops the manager. This method is used internally.
diff --git a/SmartDeviceLink/SDLTextAndGraphicManager.m b/SmartDeviceLink/SDLTextAndGraphicManager.m
index 4e0551459..fcd83432d 100644
--- a/SmartDeviceLink/SDLTextAndGraphicManager.m
+++ b/SmartDeviceLink/SDLTextAndGraphicManager.m
@@ -10,8 +10,6 @@
#import "SDLArtwork.h"
#import "SDLConnectionManagerType.h"
-#import "SDLDisplayCapabilities.h"
-#import "SDLDisplayCapabilities+ShowManagerExtensions.h"
#import "SDLError.h"
#import "SDLFileManager.h"
#import "SDLImage.h"
@@ -25,8 +23,11 @@
#import "SDLRPCResponseNotification.h"
#import "SDLSetDisplayLayoutResponse.h"
#import "SDLShow.h"
+#import "SDLSystemCapability.h"
+#import "SDLSystemCapabilityManager.h"
#import "SDLTextField.h"
-
+#import "SDLWindowCapability.h"
+#import "SDLWindowCapability+ShowManagerExtensions.h"
NS_ASSUME_NONNULL_BEGIN
@@ -35,6 +36,7 @@ NS_ASSUME_NONNULL_BEGIN
// Dependencies
@property (weak, nonatomic) id<SDLConnectionManagerType> connectionManager;
@property (weak, nonatomic) SDLFileManager *fileManager;
+@property (weak, nonatomic) SDLSystemCapabilityManager *systemCapabilityManager;
/**
A show describing the current text and images on the screen (not soft buttons, etc.)
@@ -51,7 +53,7 @@ NS_ASSUME_NONNULL_BEGIN
@property (assign, nonatomic) BOOL hasQueuedUpdate;
@property (copy, nonatomic, nullable) SDLTextAndGraphicUpdateCompletionHandler queuedUpdateHandler;
-@property (strong, nonatomic, nullable) SDLDisplayCapabilities *displayCapabilities;
+@property (strong, nonatomic, nullable) SDLWindowCapability *windowCapability;
@property (strong, nonatomic, nullable) SDLHMILevel currentLevel;
@property (strong, nonatomic, nullable) SDLArtwork *blankArtwork;
@@ -63,12 +65,13 @@ NS_ASSUME_NONNULL_BEGIN
@implementation SDLTextAndGraphicManager
-- (instancetype)initWithConnectionManager:(id<SDLConnectionManagerType>)connectionManager fileManager:(nonnull SDLFileManager *)fileManager {
+- (instancetype)initWithConnectionManager:(id<SDLConnectionManagerType>)connectionManager fileManager:(SDLFileManager *)fileManager systemCapabilityManager:(SDLSystemCapabilityManager *)systemCapabilityManager {
self = [super init];
if (!self) { return nil; }
_connectionManager = connectionManager;
_fileManager = fileManager;
+ _systemCapabilityManager = systemCapabilityManager;
_alignment = SDLTextAlignmentCenter;
@@ -78,13 +81,15 @@ NS_ASSUME_NONNULL_BEGIN
_waitingOnHMILevelUpdateToUpdate = NO;
_isDirty = NO;
- [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(sdl_registerResponse:) name:SDLDidReceiveRegisterAppInterfaceResponse object:nil];
- [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(sdl_displayLayoutResponse:) name:SDLDidReceiveSetDisplayLayoutResponse object:nil];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(sdl_hmiStatusNotification:) name:SDLDidChangeHMIStatusNotification object:nil];
return self;
}
+- (void)start {
+ [self.systemCapabilityManager subscribeToCapabilityType:SDLSystemCapabilityTypeDisplays withObserver:self selector:@selector(sdl_displayCapabilityDidUpdate:)];
+}
+
- (void)stop {
_textField1 = nil;
_textField2 = nil;
@@ -105,11 +110,13 @@ NS_ASSUME_NONNULL_BEGIN
_queuedImageUpdate = nil;
_hasQueuedUpdate = NO;
_queuedUpdateHandler = nil;
- _displayCapabilities = nil;
+ _windowCapability = nil;
_currentLevel = SDLHMILevelNone;
_blankArtwork = nil;
_waitingOnHMILevelUpdateToUpdate = NO;
_isDirty = NO;
+
+ [self.systemCapabilityManager unsubscribeFromCapabilityType:SDLSystemCapabilityTypeDisplays withObserver:self];
}
#pragma mark - Upload / Send
@@ -294,7 +301,7 @@ NS_ASSUME_NONNULL_BEGIN
NSArray *nonNilFields = [self sdl_findNonNilTextFields];
if (nonNilFields.count == 0) { return show; }
- NSUInteger numberOfLines = self.displayCapabilities ? self.displayCapabilities.maxNumberOfMainFieldLines : 4;
+ NSUInteger numberOfLines = self.windowCapability ? self.windowCapability.maxNumberOfMainFieldLines : 4;
if (numberOfLines == 1) {
show = [self sdl_assembleOneLineShowText:show withShowFields:nonNilFields];
} else if (numberOfLines == 2) {
@@ -505,7 +512,7 @@ NS_ASSUME_NONNULL_BEGIN
}
- (BOOL)sdl_shouldUpdatePrimaryImage {
- BOOL templateSupportsPrimaryArtwork = self.displayCapabilities ? [self.displayCapabilities hasImageFieldOfName:SDLImageFieldNameGraphic] : YES;
+ BOOL templateSupportsPrimaryArtwork = self.windowCapability ? [self.windowCapability hasImageFieldOfName:SDLImageFieldNameGraphic] : YES;
return (templateSupportsPrimaryArtwork
&& ![self.currentScreenData.graphic.value isEqualToString:self.primaryGraphic.name]
@@ -513,7 +520,7 @@ NS_ASSUME_NONNULL_BEGIN
}
- (BOOL)sdl_shouldUpdateSecondaryImage {
- BOOL templateSupportsSecondaryArtwork = self.displayCapabilities ? ([self.displayCapabilities hasImageFieldOfName:SDLImageFieldNameGraphic] || [self.displayCapabilities hasImageFieldOfName:SDLImageFieldNameSecondaryGraphic]) : YES;
+ BOOL templateSupportsSecondaryArtwork = self.windowCapability ? ([self.windowCapability hasImageFieldOfName:SDLImageFieldNameGraphic] || [self.windowCapability hasImageFieldOfName:SDLImageFieldNameSecondaryGraphic]) : YES;
// Cannot detect if there is a secondary image, so we'll just try to detect if there's a primary image and allow it if there is.
return (templateSupportsSecondaryArtwork
@@ -689,37 +696,13 @@ NS_ASSUME_NONNULL_BEGIN
return _blankArtwork;
}
-#pragma mark - RPC Responses
-
-- (void)sdl_registerResponse:(SDLRPCResponseNotification *)notification {
- SDLRegisterAppInterfaceResponse *response = (SDLRegisterAppInterfaceResponse *)notification.response;
+#pragma mark - Subscribed notifications
- if (!response.success.boolValue) { return; }
-#pragma clang diagnostic push
-#pragma clang diagnostic ignored "-Wdeprecated"
- if (response.displayCapabilities == nil) {
-#pragma clang diagnostic pop
- SDLLogE(@"RegisterAppInterface succeeded but didn't send a display capabilities. A lot of things will probably break.");
- return;
- }
+- (void)sdl_displayCapabilityDidUpdate:(SDLSystemCapability *)systemCapability {
+ // we won't use the object in the parameter but the convenience method of the system capability manager
+ NSLog(@"PING");
+ self.windowCapability = self.systemCapabilityManager.defaultMainWindowCapability;
-#pragma clang diagnostic push
-#pragma clang diagnostic ignored "-Wdeprecated"
- self.displayCapabilities = response.displayCapabilities;
-#pragma clang diagnostic pop
-}
-
-- (void)sdl_displayLayoutResponse:(SDLRPCResponseNotification *)notification {
- SDLSetDisplayLayoutResponse *response = (SDLSetDisplayLayoutResponse *)notification.response;
- if (!response.success.boolValue) { return; }
- if (!response.success.boolValue) { return; }
- if (response.displayCapabilities == nil) {
- SDLLogE(@"SetDisplayLayout succeeded but didn't send a display capabilities. A lot of things will probably break.");
- return;
- }
-
- self.displayCapabilities = response.displayCapabilities;
-
// Auto-send an updated show
if ([self sdl_hasData]) {
[self sdl_updateWithCompletionHandler:nil];
diff --git a/SmartDeviceLink/SDLUploadFileOperation.m b/SmartDeviceLink/SDLUploadFileOperation.m
index f9edfe2f5..b87629b28 100644
--- a/SmartDeviceLink/SDLUploadFileOperation.m
+++ b/SmartDeviceLink/SDLUploadFileOperation.m
@@ -53,6 +53,7 @@ NS_ASSUME_NONNULL_BEGIN
- (void)start {
[super start];
+ if (self.isCancelled) { return; }
[self sdl_sendFile:self.fileWrapper.file mtuSize:[[SDLGlobals sharedGlobals] mtuSizeForServiceType:SDLServiceTypeRPC] withCompletion:self.fileWrapper.completionHandler];
}
diff --git a/SmartDeviceLink/SDLWindowCapability+ShowManagerExtensions.h b/SmartDeviceLink/SDLWindowCapability+ShowManagerExtensions.h
new file mode 100644
index 000000000..14bfc9ffa
--- /dev/null
+++ b/SmartDeviceLink/SDLWindowCapability+ShowManagerExtensions.h
@@ -0,0 +1,26 @@
+//
+// SDLWindowCapability+ShowManagerExtensions.h
+// SmartDeviceLink
+//
+// Created by Joel Fischer on 2/28/18.
+// Updated by Kujtim Shala (Ford) on 13.09.19.
+// - Renamed and adapted for WindowCapability
+// Copyright © 2019 smartdevicelink. All rights reserved.
+//
+
+#import "SDLImageFieldName.h"
+#import "SDLTextFieldName.h"
+#import "SDLWindowCapability.h"
+
+NS_ASSUME_NONNULL_BEGIN
+
+@interface SDLWindowCapability (ShowManagerExtensions)
+
+@property (assign, nonatomic, readonly) NSUInteger maxNumberOfMainFieldLines;
+
+- (BOOL)hasTextFieldOfName:(SDLTextFieldName)name;
+- (BOOL)hasImageFieldOfName:(SDLImageFieldName)name;
+
+@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLDisplayCapabilities+ShowManagerExtensions.m b/SmartDeviceLink/SDLWindowCapability+ShowManagerExtensions.m
index 026fb16dc..c6b808e22 100644
--- a/SmartDeviceLink/SDLDisplayCapabilities+ShowManagerExtensions.m
+++ b/SmartDeviceLink/SDLWindowCapability+ShowManagerExtensions.m
@@ -1,16 +1,18 @@
//
-// SDLDisplayCapabilities+ShowManagerExtensions.m
+// SDLWindowCapability+ShowManagerExtensions.m
// SmartDeviceLink
//
// Created by Joel Fischer on 2/28/18.
-// Copyright © 2018 smartdevicelink. All rights reserved.
+// Updated by Kujtim Shala (Ford) on 13.09.19.
+// - Renamed and adapted for WindowCapability
+// Copyright © 2019 smartdevicelink. All rights reserved.
//
-#import "SDLDisplayCapabilities+ShowManagerExtensions.h"
+#import "SDLWindowCapability+ShowManagerExtensions.h"
#import "SDLImageField.h"
#import "SDLTextField.h"
-@implementation SDLDisplayCapabilities (ShowManagerExtensions)
+@implementation SDLWindowCapability (ShowManagerExtension)
- (BOOL)hasTextFieldOfName:(SDLTextFieldName)name {
for (SDLTextField *textField in self.textFields) {
@@ -41,10 +43,6 @@
}
- (BOOL)hasImageFieldOfName:(SDLImageFieldName)name {
- if (!self.graphicSupported.boolValue) {
- return NO;
- }
-
for (SDLImageField *imageField in self.imageFields) {
if ([imageField.name isEqualToString:name]) {
return YES;
diff --git a/SmartDeviceLink/SDLWindowCapability.m b/SmartDeviceLink/SDLWindowCapability.m
index fc52b3efb..509e2aa96 100644
--- a/SmartDeviceLink/SDLWindowCapability.m
+++ b/SmartDeviceLink/SDLWindowCapability.m
@@ -45,6 +45,14 @@
return [self.store sdl_enumsForName:SDLRPCParameterNameImageTypeSupported error:nil];
}
+- (void)setTemplatesAvailable:(nullable NSArray<NSString *> *)templatesAvailable {
+ [self.store sdl_setObject:templatesAvailable forName:SDLRPCParameterNameTemplatesAvailable];
+}
+
+- (nullable NSArray<NSString *> *)templatesAvailable {
+ return [self.store sdl_objectsForName:SDLRPCParameterNameTemplatesAvailable ofClass:NSString.class error:nil];
+}
+
- (void)setNumCustomPresetsAvailable:(nullable NSNumber<SDLInt> *)numCustomPresetsAvailable {
[self.store sdl_setObject:numCustomPresetsAvailable forName:SDLRPCParameterNameNumberCustomPresetsAvailable];
}
diff --git a/SmartDeviceLink/SmartDeviceLink.h b/SmartDeviceLink/SmartDeviceLink.h
index 6ec18e5b2..a4890893d 100644
--- a/SmartDeviceLink/SmartDeviceLink.h
+++ b/SmartDeviceLink/SmartDeviceLink.h
@@ -24,6 +24,7 @@ FOUNDATION_EXPORT const unsigned char SmartDeviceLinkVersionString[];
#import "SDLAlert.h"
#import "SDLAlertManeuver.h"
#import "SDLButtonPress.h"
+#import "SDLCancelInteraction.h"
#import "SDLChangeRegistration.h"
#import "SDLCloseApplication.h"
#import "SDLCreateInteractionChoiceSet.h"
@@ -42,6 +43,7 @@ FOUNDATION_EXPORT const unsigned char SmartDeviceLinkVersionString[];
#import "SDLGetDTCs.h"
#import "SDLGetFile.h"
#import "SDLGetInteriorVehicleData.h"
+#import "SDLGetInteriorVehicleDataConsent.h"
#import "SDLGetSystemCapability.h"
#import "SDLGetVehicleData.h"
#import "SDLGetWayPoints.h"
@@ -74,6 +76,7 @@ FOUNDATION_EXPORT const unsigned char SmartDeviceLinkVersionString[];
#import "SDLSyncPData.h"
#import "SDLSystemRequest.h"
#import "SDLUnpublishAppService.h"
+#import "SDLReleaseInteriorVehicleDataModule.h"
#import "SDLUnregisterAppInterface.h"
#import "SDLUnsubscribeButton.h"
#import "SDLUnsubscribeVehicleData.h"
@@ -86,6 +89,7 @@ FOUNDATION_EXPORT const unsigned char SmartDeviceLinkVersionString[];
#import "SDLAlertManeuverResponse.h"
#import "SDLAlertResponse.h"
#import "SDLButtonPressResponse.h"
+#import "SDLCancelInteractionResponse.h"
#import "SDLChangeRegistrationResponse.h"
#import "SDLCloseApplicationResponse.h"
#import "SDLCreateInteractionChoiceSetResponse.h"
@@ -104,6 +108,7 @@ FOUNDATION_EXPORT const unsigned char SmartDeviceLinkVersionString[];
#import "SDLGetAppServiceDataResponse.h"
#import "SDLGetDTCsResponse.h"
#import "SDLGetFileResponse.h"
+#import "SDLGetInteriorVehicleDataConsentResponse.h"
#import "SDLGetInteriorVehicleDataResponse.h"
#import "SDLGetSystemCapabilityResponse.h"
#import "SDLGetVehicleDataResponse.h"
@@ -136,6 +141,7 @@ FOUNDATION_EXPORT const unsigned char SmartDeviceLinkVersionString[];
#import "SDLSubscribeWayPointsResponse.h"
#import "SDLSyncPDataResponse.h"
#import "SDLUnpublishAppServiceResponse.h"
+#import "SDLReleaseInteriorVehicleDataModuleResponse.h"
#import "SDLUnregisterAppInterfaceResponse.h"
#import "SDLUnsubscribeButtonResponse.h"
#import "SDLUnsubscribeVehicleDataResponse.h"
@@ -197,6 +203,7 @@ FOUNDATION_EXPORT const unsigned char SmartDeviceLinkVersionString[];
#import "SDLFuelRange.h"
#import "SDLEqualizerSettings.h"
#import "SDLGPSData.h"
+#import "SDLGrid.h"
#import "SDLHapticRect.h"
#import "SDLHMICapabilities.h"
#import "SDLHMIPermissions.h"
@@ -220,6 +227,7 @@ FOUNDATION_EXPORT const unsigned char SmartDeviceLinkVersionString[];
#import "SDLMenuParams.h"
#import "SDLMetadataTags.h"
#import "SDLModuleData.h"
+#import "SDLModuleInfo.h"
#import "SDLMyKey.h"
#import "SDLNavigationCapability.h"
#import "SDLNavigationInstruction.h"
@@ -240,6 +248,8 @@ FOUNDATION_EXPORT const unsigned char SmartDeviceLinkVersionString[];
#import "SDLSeatControlCapabilities.h"
#import "SDLSeatControlData.h"
#import "SDLSeatMemoryAction.h"
+#import "SDLSeatLocation.h"
+#import "SDLSeatLocationCapability.h"
#import "SDLSingleTireStatus.h"
#import "SDLSISData.h"
#import "SDLSoftButton.h"
diff --git a/SmartDeviceLinkTests/DevAPISpecs/SDLChoiceSetManagerSpec.m b/SmartDeviceLinkTests/DevAPISpecs/SDLChoiceSetManagerSpec.m
index 813bed28c..71d74c5bc 100644
--- a/SmartDeviceLinkTests/DevAPISpecs/SDLChoiceSetManagerSpec.m
+++ b/SmartDeviceLinkTests/DevAPISpecs/SDLChoiceSetManagerSpec.m
@@ -9,7 +9,6 @@
#import "SDLChoiceSet.h"
#import "SDLChoiceSetDelegate.h"
#import "SDLDeleteChoicesOperation.h"
-#import "SDLDisplayCapabilities.h"
#import "SDLFileManager.h"
#import "SDLHMILevel.h"
#import "SDLKeyboardDelegate.h"
@@ -17,9 +16,13 @@
#import "SDLPreloadChoicesOperation.h"
#import "SDLPresentChoiceSetOperation.h"
#import "SDLPresentKeyboardOperation.h"
+#import "SDLGlobals.h"
#import "SDLStateMachine.h"
#import "SDLSystemContext.h"
+#import "SDLSystemCapabilityManager.h"
#import "TestConnectionManager.h"
+#import "SDLVersion.h"
+
@interface SDLPresentChoiceSetOperation()
@@ -40,7 +43,6 @@
@property (copy, nonatomic, nullable) SDLHMILevel currentHMILevel;
@property (copy, nonatomic, nullable) SDLSystemContext currentSystemContext;
-@property (strong, nonatomic, nullable) SDLDisplayCapabilities *displayCapabilities;
@property (strong, nonatomic) NSMutableSet<SDLChoiceCell *> *preloadedMutableChoices;
@property (strong, nonatomic, readonly) NSSet<SDLChoiceCell *> *pendingPreloadChoices;
@@ -59,6 +61,7 @@ describe(@"choice set manager tests", ^{
__block TestConnectionManager *testConnectionManager = nil;
__block SDLFileManager *testFileManager = nil;
+ __block SDLSystemCapabilityManager *testSystemCapabilityManager = nil;
__block SDLChoiceCell *testCell1 = nil;
__block SDLChoiceCell *testCell2 = nil;
@@ -67,8 +70,9 @@ describe(@"choice set manager tests", ^{
beforeEach(^{
testConnectionManager = [[TestConnectionManager alloc] init];
testFileManager = OCMClassMock([SDLFileManager class]);
+ testSystemCapabilityManager = OCMClassMock([SDLSystemCapabilityManager class]);
- testManager = [[SDLChoiceSetManager alloc] initWithConnectionManager:testConnectionManager fileManager:testFileManager];
+ testManager = [[SDLChoiceSetManager alloc] initWithConnectionManager:testConnectionManager fileManager:testFileManager systemCapabilityManager:testSystemCapabilityManager];
testCell1 = [[SDLChoiceCell alloc] initWithText:@"test1"];
testCell2 = [[SDLChoiceCell alloc] initWithText:@"test2"];
@@ -78,7 +82,7 @@ describe(@"choice set manager tests", ^{
it(@"should be in the correct startup state", ^{
expect(testManager.currentState).to(equal(SDLChoiceManagerStateShutdown));
- SDLKeyboardProperties *defaultProperties = [[SDLKeyboardProperties alloc] initWithLanguage:SDLLanguageEnUs layout:SDLKeyboardLayoutQWERTY keypressMode:SDLKeypressModeResendCurrentEntry limitedCharacterList:nil autoCompleteText:nil];
+ SDLKeyboardProperties *defaultProperties = [[SDLKeyboardProperties alloc] initWithLanguage:SDLLanguageEnUs layout:SDLKeyboardLayoutQWERTY keypressMode:SDLKeypressModeResendCurrentEntry limitedCharacterList:nil autoCompleteText:nil autoCompleteList:nil];
expect(testManager.keyboardConfiguration).to(equal(defaultProperties));
});
@@ -329,15 +333,63 @@ describe(@"choice set manager tests", ^{
pendingPresentOp = OCMClassMock([SDLPresentChoiceSetOperation class]);
testManager.pendingPresentOperation = pendingPresentOp;
testManager.pendingPresentationSet = [[SDLChoiceSet alloc] init];
-
- [testManager presentKeyboardWithInitialText:testInitialText delegate:testKeyboardDelegate];
});
- it(@"should properly start the keyboard presentation", ^{
+ it(@"should return a cancelID and should properly start the keyboard presentation with presentKeyboardWithInitialText:keyboardDelegate:", ^{
+ NSNumber *cancelID = [testManager presentKeyboardWithInitialText:testInitialText delegate:testKeyboardDelegate];
+
+ expect(cancelID).toNot(beNil());
OCMVerify([pendingPresentOp cancel]);
expect(testManager.transactionQueue.operations).to(haveCount(1));
expect(testManager.pendingPresentOperation).to(beAnInstanceOf([SDLPresentKeyboardOperation class]));
});
+
+ it(@"should return nil and should not start the keyboard presentation if the the keyboard can not be sent to Core", ^{
+ [testManager.stateMachine setToState:SDLChoiceManagerStateCheckingVoiceOptional fromOldState:SDLChoiceManagerStateShutdown callEnterTransition:NO];
+ NSNumber *cancelID = [testManager presentKeyboardWithInitialText:testInitialText delegate:testKeyboardDelegate];
+
+ expect(cancelID).to(beNil());
+ OCMReject([pendingPresentOp cancel]);
+ expect(testManager.transactionQueue.operations).to(haveCount(0));
+ expect(testManager.pendingPresentOperation).toNot(beAnInstanceOf([SDLPresentKeyboardOperation class]));
+ });
+ });
+
+ describe(@"dismissing the keyboard", ^{
+ __block SDLPresentKeyboardOperation *mockKeyboardOp1 = nil;
+ __block SDLPresentKeyboardOperation *mockKeyboardOp2 = nil;
+ __block NSOperationQueue *mockQueue = nil;
+ __block UInt16 testCancelId = 387;
+
+ beforeEach(^{
+ mockKeyboardOp1 = OCMPartialMock([[SDLPresentKeyboardOperation alloc] init]);
+ OCMStub([mockKeyboardOp1 cancelId]).andReturn(88);
+
+ mockKeyboardOp2 = OCMPartialMock([[SDLPresentKeyboardOperation alloc] init]);
+ OCMStub([mockKeyboardOp2 cancelId]).andReturn(testCancelId);
+
+ mockQueue = OCMPartialMock([[NSOperationQueue alloc] init]);
+ NSArray<SDLAsynchronousOperation *> *keyboardOps = @[mockKeyboardOp1, mockKeyboardOp2];
+ OCMStub([mockQueue operations]).andReturn(keyboardOps);
+
+ testManager.transactionQueue = mockQueue;
+ });
+
+ it(@"should dismiss the keyboard operation with the matching cancelID if it is executing", ^{
+ OCMStub([mockKeyboardOp2 isExecuting]).andReturn(true);
+ [testManager dismissKeyboardWithCancelID:@(testCancelId)];
+
+ OCMReject([mockKeyboardOp1 dismissKeyboard]);
+ OCMVerify([mockKeyboardOp2 dismissKeyboard]);
+ });
+
+ it(@"should dismiss the keyboard operation with the matching cancelID if it is not executing", ^{
+ OCMStub([mockKeyboardOp2 isExecuting]).andReturn(false);
+ [testManager dismissKeyboardWithCancelID:@(testCancelId)];
+
+ OCMReject([mockKeyboardOp1 dismissKeyboard]);
+ OCMVerify([mockKeyboardOp2 dismissKeyboard]);
+ });
});
});
});
diff --git a/SmartDeviceLinkTests/DevAPISpecs/SDLChoiceSetSpec.m b/SmartDeviceLinkTests/DevAPISpecs/SDLChoiceSetSpec.m
index bce012034..76d1e4338 100644
--- a/SmartDeviceLinkTests/DevAPISpecs/SDLChoiceSetSpec.m
+++ b/SmartDeviceLinkTests/DevAPISpecs/SDLChoiceSetSpec.m
@@ -9,6 +9,12 @@
#import "SDLTTSChunk.h"
#import "SDLVrHelpItem.h"
+@interface SDLChoiceSet()
+
+@property (nullable, copy, nonatomic) SDLChoiceSetCanceledHandler canceledHandler;
+
+@end
+
QuickSpecBegin(SDLChoiceSetSpec)
describe(@"an SDLChoiceSet", ^{
@@ -27,7 +33,6 @@ describe(@"an SDLChoiceSet", ^{
testCell = [[SDLChoiceCell alloc] initWithText:@"cell text"];
testDelegate = OCMProtocolMock(@protocol(SDLChoiceSetDelegate));
testHelpItem = [[SDLVRHelpItem alloc] initWithText:@"help item" image:nil];
-
testChoiceSet = nil;
});
@@ -45,6 +50,33 @@ describe(@"an SDLChoiceSet", ^{
expect(SDLChoiceSet.defaultTimeout).to(equal(6));
});
+ it(@"should get and set correctly", ^{
+ NSArray<SDLTTSChunk *> *testTTSInitialPrompt = [SDLTTSChunk textChunksFromString:testInitialPrompt];
+ NSArray<SDLTTSChunk *> *testTTSTimeoutPrompt = [SDLTTSChunk textChunksFromString:testTimeoutPrompt];
+ NSArray<SDLTTSChunk *> *testTTSHelpPrompt = [SDLTTSChunk textChunksFromString:testHelpPrompt];
+
+ testChoiceSet = [[SDLChoiceSet alloc] init];
+ testChoiceSet.title = testTitle;
+ testChoiceSet.initialPrompt = testTTSInitialPrompt;
+ testChoiceSet.layout = testLayout;
+ testChoiceSet.timeout = testTimeout;
+ testChoiceSet.timeoutPrompt = testTTSTimeoutPrompt;
+ testChoiceSet.helpPrompt = testTTSHelpPrompt;
+ testChoiceSet.helpList = @[testHelpItem];
+ testChoiceSet.delegate = testDelegate;
+ testChoiceSet.choices = @[testCell];
+
+ expect(testChoiceSet.title).to(equal(testTitle));
+ expect(testChoiceSet.initialPrompt).to(equal(testTTSInitialPrompt));
+ expect(@(testChoiceSet.layout)).to(equal(testLayout));
+ expect(testChoiceSet.timeout).to(equal(testTimeout));
+ expect(testChoiceSet.timeoutPrompt).to(equal(testTTSTimeoutPrompt));
+ expect(testChoiceSet.helpPrompt).to(equal(testTTSHelpPrompt));
+ expect(testChoiceSet.helpList).to(equal(@[testHelpItem]));
+ expect(testChoiceSet.delegate).to(equal(testDelegate));
+ expect(testChoiceSet.choices).to(equal(@[testCell]));
+ });
+
it(@"should initialize correctly with initWithTitle:delegate:choices:", ^{
testChoiceSet = [[SDLChoiceSet alloc] initWithTitle:testTitle delegate:testDelegate choices:@[testCell]];
@@ -152,6 +184,23 @@ describe(@"an SDLChoiceSet", ^{
});
});
+ describe(@"canceling the choice set", ^{
+ __block BOOL canceledHandlerCalled = NO;
+
+ beforeEach(^{
+ testChoiceSet = [[SDLChoiceSet alloc] init];
+ testChoiceSet.canceledHandler = ^{
+ canceledHandlerCalled = YES;
+ };
+ expect(canceledHandlerCalled).to(beFalse());
+ });
+
+ it(@"should call the cancelled handler", ^{
+ [testChoiceSet cancel];
+ expect(canceledHandlerCalled).to(beTrue());
+ });
+ });
+
describe(@"setting data", ^{
beforeEach(^{
testChoiceSet = [[SDLChoiceSet alloc] init];
diff --git a/SmartDeviceLinkTests/DevAPISpecs/SDLFileManagerSpec.m b/SmartDeviceLinkTests/DevAPISpecs/SDLFileManagerSpec.m
index 5cb8377f4..1d1599cad 100644
--- a/SmartDeviceLinkTests/DevAPISpecs/SDLFileManagerSpec.m
+++ b/SmartDeviceLinkTests/DevAPISpecs/SDLFileManagerSpec.m
@@ -875,7 +875,7 @@ describe(@"uploading/deleting multiple files in the file manager", ^{
[testFileManager uploadArtworks:testArtworks progressHandler:^BOOL(NSString * _Nonnull artworkName, float uploadPercentage, NSError * _Nullable error) {
artworksDone++;
expect(artworkName).to(equal(expectedArtworkNames[artworksDone - 1]));
- expect(uploadPercentage).to(beCloseTo((float)artworksDone / 200.0));
+ expect(uploadPercentage).to(beCloseTo((float)artworksDone / 200.0).within(0.01));
expect(error).to(beNil());
return YES;
} completionHandler:^(NSArray<NSString *> * _Nonnull artworkNames, NSError * _Nullable error) {
diff --git a/SmartDeviceLinkTests/DevAPISpecs/SDLLockScreenConfigurationSpec.m b/SmartDeviceLinkTests/DevAPISpecs/SDLLockScreenConfigurationSpec.m
index d35717658..2963efb96 100644
--- a/SmartDeviceLinkTests/DevAPISpecs/SDLLockScreenConfigurationSpec.m
+++ b/SmartDeviceLinkTests/DevAPISpecs/SDLLockScreenConfigurationSpec.m
@@ -14,8 +14,11 @@ describe(@"a lock screen configuration", ^{
});
it(@"should properly set properties", ^{
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
expect(testConfig.enableAutomaticLockScreen).to(beFalse());
expect(testConfig.showInOptionalState).to(beFalse());
+#pragma clang diagnostic pop
expect(testConfig.enableDismissGesture).to(beFalse());
expect(testConfig.showDeviceLogo).to(beFalse());
expect(testConfig.backgroundColor).to(equal([UIColor colorWithRed:(57.0/255.0) green:(78.0/255.0) blue:(96.0/255.0) alpha:1.0]));
@@ -30,8 +33,11 @@ describe(@"a lock screen configuration", ^{
});
it(@"should properly set properties", ^{
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
expect(testConfig.enableAutomaticLockScreen).to(beTrue());
expect(testConfig.showInOptionalState).to(beFalse());
+#pragma clang diagnostic pop
expect(testConfig.enableDismissGesture).to(beTrue());
expect(testConfig.showDeviceLogo).to(beTrue());
expect(testConfig.backgroundColor).to(equal([UIColor colorWithRed:(57.0/255.0) green:(78.0/255.0) blue:(96.0/255.0) alpha:1.0]));
@@ -52,8 +58,11 @@ describe(@"a lock screen configuration", ^{
});
it(@"should properly set properties", ^{
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
expect(testConfig.enableAutomaticLockScreen).to(beTrue());
expect(testConfig.showInOptionalState).to(beFalse());
+#pragma clang diagnostic pop
expect(testConfig.enableDismissGesture).to(beTrue());
expect(testConfig.showDeviceLogo).to(beTrue());
expect(testConfig.backgroundColor).to(equal([UIColor blueColor]));
@@ -72,8 +81,11 @@ describe(@"a lock screen configuration", ^{
});
it(@"should properly set properties", ^{
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
expect(testConfig.enableAutomaticLockScreen).to(beTrue());
expect(testConfig.showInOptionalState).to(beFalse());
+#pragma clang diagnostic pop
expect(testConfig.enableDismissGesture).to(beTrue());
expect(testConfig.showDeviceLogo).to(beTrue());
expect(testConfig.backgroundColor).to(equal([UIColor colorWithRed:(57.0/255.0) green:(78.0/255.0) blue:(96.0/255.0) alpha:1.0]));
diff --git a/SmartDeviceLinkTests/DevAPISpecs/SDLMenuManagerSpec.m b/SmartDeviceLinkTests/DevAPISpecs/SDLMenuManagerSpec.m
index 38457fd33..5913be833 100644
--- a/SmartDeviceLinkTests/DevAPISpecs/SDLMenuManagerSpec.m
+++ b/SmartDeviceLinkTests/DevAPISpecs/SDLMenuManagerSpec.m
@@ -20,10 +20,11 @@
@property (weak, nonatomic) id<SDLConnectionManagerType> connectionManager;
@property (weak, nonatomic) SDLFileManager *fileManager;
+@property (weak, nonatomic) SDLSystemCapabilityManager *systemCapabilityManager;
@property (copy, nonatomic, nullable) SDLHMILevel currentHMILevel;
@property (copy, nonatomic, nullable) SDLSystemContext currentSystemContext;
-@property (strong, nonatomic, nullable) SDLDisplayCapabilities *displayCapabilities;
+
@property (strong, nonatomic, nullable) NSArray<SDLRPCRequest *> *inProgressUpdate;
@property (assign, nonatomic) BOOL hasQueuedUpdate;
@@ -41,9 +42,7 @@ describe(@"menu manager", ^{
__block SDLMenuManager *testManager = nil;
__block TestConnectionManager *mockConnectionManager = nil;
__block SDLFileManager *mockFileManager = nil;
- __block SDLSetDisplayLayoutResponse *testSetDisplayLayoutResponse = nil;
- __block SDLDisplayCapabilities *testDisplayCapabilities = nil;
- __block SDLRegisterAppInterfaceResponse *testRegisterAppInterfaceResponse = nil;
+ __block SDLSystemCapabilityManager *mockSystemCapabilityManager = nil;
__block SDLArtwork *testArtwork = nil;
__block SDLArtwork *testArtwork2 = nil;
@@ -70,15 +69,29 @@ describe(@"menu manager", ^{
mockConnectionManager = [[TestConnectionManager alloc] init];
mockFileManager = OCMClassMock([SDLFileManager class]);
- testManager = [[SDLMenuManager alloc] initWithConnectionManager:mockConnectionManager fileManager:mockFileManager];
+ mockSystemCapabilityManager = OCMClassMock([SDLSystemCapabilityManager class]);
+ testManager = [[SDLMenuManager alloc] initWithConnectionManager:mockConnectionManager fileManager:mockFileManager systemCapabilityManager:mockSystemCapabilityManager];
+
+ SDLImageField *commandIconField = [[SDLImageField alloc] init];
+ commandIconField.name = SDLImageFieldNameCommandIcon;
+ SDLWindowCapability *windowCapability = [[SDLWindowCapability alloc] init];
+ windowCapability.windowID = @(SDLPredefinedWindowsDefaultWindow);
+ windowCapability.imageFields = @[commandIconField];
+ windowCapability.imageTypeSupported = @[SDLImageTypeDynamic, SDLImageTypeStatic];
+
+ SDLDisplayCapability *displayCapability = [[SDLDisplayCapability alloc] initWithDisplayName:SDLDisplayTypeGeneric];
+ displayCapability.windowCapabilities = @[windowCapability];
+
+ OCMStub(mockSystemCapabilityManager.defaultMainWindowCapability).andReturn(windowCapability);
+ OCMStub(mockSystemCapabilityManager.displays).andReturn(@[displayCapability]);
});
it(@"should instantiate correctly", ^{
expect(testManager.menuCells).to(beEmpty());
expect(testManager.connectionManager).to(equal(mockConnectionManager));
expect(testManager.fileManager).to(equal(mockFileManager));
+ expect(testManager.systemCapabilityManager).to(equal(mockSystemCapabilityManager));
expect(testManager.currentHMILevel).to(beNil());
- expect(testManager.displayCapabilities).to(beNil());
expect(testManager.inProgressUpdate).to(beNil());
expect(testManager.hasQueuedUpdate).to(beFalse());
expect(testManager.waitingOnHMIUpdate).to(beFalse());
@@ -147,47 +160,10 @@ describe(@"menu manager", ^{
});
});
- describe(@"Notification Responses", ^{
- it(@"should set display capabilities when SDLDidReceiveSetDisplayLayoutResponse is received", ^{
- testDisplayCapabilities = [[SDLDisplayCapabilities alloc] init];
-
- testSetDisplayLayoutResponse = [[SDLSetDisplayLayoutResponse alloc] init];
- testSetDisplayLayoutResponse.success = @YES;
- testSetDisplayLayoutResponse.displayCapabilities = testDisplayCapabilities;
-
- SDLRPCResponseNotification *notification = [[SDLRPCResponseNotification alloc] initWithName:SDLDidReceiveRegisterAppInterfaceResponse object:self rpcResponse:testSetDisplayLayoutResponse];
- [[NSNotificationCenter defaultCenter] postNotification:notification];
-
- expect(testManager.displayCapabilities).to(equal(testDisplayCapabilities));
- });
-
- it(@"should set display capabilities when SDLDidReceiveRegisterAppInterfaceResponse is received", ^{
- testDisplayCapabilities = [[SDLDisplayCapabilities alloc] init];
-
- testRegisterAppInterfaceResponse = [[SDLRegisterAppInterfaceResponse alloc] init];
- testRegisterAppInterfaceResponse.success = @YES;
-#pragma clang diagnostic push
-#pragma clang diagnostic ignored "-Wdeprecated"
- testRegisterAppInterfaceResponse.displayCapabilities = testDisplayCapabilities;
-#pragma clang diagnostic pop
-
- SDLRPCResponseNotification *notification = [[SDLRPCResponseNotification alloc] initWithName:SDLDidReceiveSetDisplayLayoutResponse object:self rpcResponse:testRegisterAppInterfaceResponse];
- [[NSNotificationCenter defaultCenter] postNotification:notification];
-
- expect(testManager.displayCapabilities).to(equal(testDisplayCapabilities));
- });
- });
-
describe(@"updating menu cells", ^{
beforeEach(^{
testManager.currentHMILevel = SDLHMILevelFull;
testManager.currentSystemContext = SDLSystemContextMain;
-
- testManager.displayCapabilities = [[SDLDisplayCapabilities alloc] init];
- SDLImageField *commandIconField = [[SDLImageField alloc] init];
- commandIconField.name = SDLImageFieldNameCommandIcon;
- testManager.displayCapabilities.imageFields = @[commandIconField];
- testManager.displayCapabilities.graphicSupported = @YES;
});
context(@"duplicate titles", ^{
@@ -532,12 +508,6 @@ describe(@"menu manager", ^{
testManager.currentHMILevel = SDLHMILevelFull;
testManager.currentSystemContext = SDLSystemContextMain;
- testManager.displayCapabilities = [[SDLDisplayCapabilities alloc] init];
- SDLImageField *commandIconField = [[SDLImageField alloc] init];
- commandIconField.name = SDLImageFieldNameCommandIcon;
- testManager.displayCapabilities.imageFields = @[commandIconField];
- testManager.displayCapabilities.graphicSupported = @YES;
-
cellCalled = NO;
testTriggerSource = nil;
});
@@ -643,7 +613,6 @@ describe(@"menu manager", ^{
expect(testManager.menuCells).to(beEmpty());
expect(testManager.currentHMILevel).to(beNil());
- expect(testManager.displayCapabilities).to(beNil());
expect(testManager.inProgressUpdate).to(beNil());
expect(testManager.hasQueuedUpdate).to(beFalse());
expect(testManager.waitingOnHMIUpdate).to(beFalse());
@@ -658,7 +627,6 @@ describe(@"menu manager", ^{
beforeEach(^{
testManager.currentHMILevel = SDLHMILevelFull;
testManager.currentSystemContext = SDLSystemContextMain;
- testManager.displayCapabilities = [[SDLDisplayCapabilities alloc] init];
});
context(@"when open menu RPC can be sent", ^{
diff --git a/SmartDeviceLinkTests/DevAPISpecs/SDLPreloadChoicesOperationSpec.m b/SmartDeviceLinkTests/DevAPISpecs/SDLPreloadChoicesOperationSpec.m
index 5bcf2d5de..f4056cccb 100644
--- a/SmartDeviceLinkTests/DevAPISpecs/SDLPreloadChoicesOperationSpec.m
+++ b/SmartDeviceLinkTests/DevAPISpecs/SDLPreloadChoicesOperationSpec.m
@@ -7,12 +7,13 @@
#import "SDLChoice.h"
#import "SDLChoiceCell.h"
#import "SDLCreateInteractionChoiceSet.h"
-#import "SDLDisplayCapabilities.h"
+#import "SDLDisplayType.h"
#import "SDLFileManager.h"
#import "SDLImageField.h"
#import "SDLImageFieldName.h"
#import "SDLTextField.h"
#import "SDLTextFieldName.h"
+#import "SDLWindowCapability.h"
#import "TestConnectionManager.h"
QuickSpecBegin(SDLPreloadChoicesOperationSpec)
@@ -42,13 +43,13 @@ describe(@"a preload choices operation", ^{
});
describe(@"running the operation", ^{
- __block SDLDisplayCapabilities *displayCapabilities = nil;
+ __block SDLWindowCapability *windowCapability = nil;
beforeEach(^{
- displayCapabilities = [[SDLDisplayCapabilities alloc] init];
- displayCapabilities.graphicSupported = @YES;
+ windowCapability = [[SDLWindowCapability alloc] init];
+ windowCapability.imageTypeSupported = @[SDLImageTypeStatic, SDLImageTypeDynamic];
SDLTextField *primaryTextField = [[SDLTextField alloc] init];
primaryTextField.name = SDLTextFieldNameMenuName;
- displayCapabilities.textFields = @[primaryTextField];
+ windowCapability.textFields = @[primaryTextField];
OCMStub([testFileManager uploadArtworks:[OCMArg any] completionHandler:[OCMArg invokeBlock]]);
});
@@ -77,9 +78,9 @@ describe(@"a preload choices operation", ^{
it(@"should not send any requests", ^{
SDLTextField *primaryTextField = [[SDLTextField alloc] init];
primaryTextField.name = SDLTextFieldNameMenuName;
- displayCapabilities.textFields = @[];
+ windowCapability.textFields = @[];
- testOp = [[SDLPreloadChoicesOperation alloc] initWithConnectionManager:testConnectionManager fileManager:testFileManager displayCapabilities:displayCapabilities isVROptional:NO cellsToPreload:cellsWithArtwork];
+ testOp = [[SDLPreloadChoicesOperation alloc] initWithConnectionManager:testConnectionManager fileManager:testFileManager displayName:SDLDisplayTypeGeneric defaultMainWindowCapability:windowCapability isVROptional:NO cellsToPreload:cellsWithArtwork];
[testOp start];
NSArray<SDLCreateInteractionChoiceSet *> *receivedRequests = (NSArray<SDLCreateInteractionChoiceSet *> *)testConnectionManager.receivedRequests;
@@ -90,7 +91,7 @@ describe(@"a preload choices operation", ^{
context(@"disallowed display capabilities", ^{
it(@"should skip to preloading cells", ^{
- testOp = [[SDLPreloadChoicesOperation alloc] initWithConnectionManager:testConnectionManager fileManager:testFileManager displayCapabilities:displayCapabilities isVROptional:NO cellsToPreload:cellsWithArtwork];
+ testOp = [[SDLPreloadChoicesOperation alloc] initWithConnectionManager:testConnectionManager fileManager:testFileManager displayName:SDLDisplayTypeGeneric defaultMainWindowCapability:windowCapability isVROptional:NO cellsToPreload:cellsWithArtwork];
[testOp start];
expect(@(testOp.currentState)).to(equal(SDLPreloadChoicesOperationStatePreloadingChoices));
@@ -101,12 +102,11 @@ describe(@"a preload choices operation", ^{
beforeEach(^{
SDLImageField *choiceField = [[SDLImageField alloc] init];
choiceField.name = SDLImageFieldNameChoiceImage;
-
- displayCapabilities.imageFields = @[choiceField];
+ windowCapability.imageFields = @[choiceField];
OCMStub([testFileManager hasUploadedFile:[OCMArg isNotNil]]).andReturn(NO);
- testOp = [[SDLPreloadChoicesOperation alloc] initWithConnectionManager:testConnectionManager fileManager:testFileManager displayCapabilities:displayCapabilities isVROptional:NO cellsToPreload:cellsWithArtwork];
+ testOp = [[SDLPreloadChoicesOperation alloc] initWithConnectionManager:testConnectionManager fileManager:testFileManager displayName:SDLDisplayTypeGeneric defaultMainWindowCapability:windowCapability isVROptional:NO cellsToPreload:cellsWithArtwork];
[testOp start];
});
@@ -126,14 +126,14 @@ describe(@"a preload choices operation", ^{
SDLImageField *choiceSecondaryField = [[SDLImageField alloc] init];
choiceSecondaryField.name = SDLImageFieldNameChoiceSecondaryImage;
- displayCapabilities.imageFields = @[choiceField, choiceSecondaryField];
+ windowCapability.imageFields = @[choiceField, choiceSecondaryField];
});
context(@"when artworks are already on the system", ^{
beforeEach(^{
OCMStub([testFileManager hasUploadedFile:[OCMArg isNotNil]]).andReturn(YES);
- testOp = [[SDLPreloadChoicesOperation alloc] initWithConnectionManager:testConnectionManager fileManager:testFileManager displayCapabilities:displayCapabilities isVROptional:NO cellsToPreload:cellsWithArtwork];
+ testOp = [[SDLPreloadChoicesOperation alloc] initWithConnectionManager:testConnectionManager fileManager:testFileManager displayName:SDLDisplayTypeGeneric defaultMainWindowCapability:windowCapability isVROptional:NO cellsToPreload:cellsWithArtwork];
[testOp start];
});
@@ -148,7 +148,7 @@ describe(@"a preload choices operation", ^{
context(@"when artworks are static icons", ^{
beforeEach(^{
- testOp = [[SDLPreloadChoicesOperation alloc] initWithConnectionManager:testConnectionManager fileManager:testFileManager displayCapabilities:displayCapabilities isVROptional:NO cellsToPreload:cellsWithStaticIcon];
+ testOp = [[SDLPreloadChoicesOperation alloc] initWithConnectionManager:testConnectionManager fileManager:testFileManager displayName:SDLDisplayTypeGeneric defaultMainWindowCapability:windowCapability isVROptional:NO cellsToPreload:cellsWithStaticIcon];
[testOp start];
});
@@ -161,7 +161,7 @@ describe(@"a preload choices operation", ^{
beforeEach(^{
OCMStub([testFileManager hasUploadedFile:[OCMArg isNotNil]]).andReturn(NO);
- testOp = [[SDLPreloadChoicesOperation alloc] initWithConnectionManager:testConnectionManager fileManager:testFileManager displayCapabilities:displayCapabilities isVROptional:NO cellsToPreload:cellsWithArtwork];
+ testOp = [[SDLPreloadChoicesOperation alloc] initWithConnectionManager:testConnectionManager fileManager:testFileManager displayName:SDLDisplayTypeGeneric defaultMainWindowCapability:windowCapability isVROptional:NO cellsToPreload:cellsWithArtwork];
[testOp start];
});
@@ -191,7 +191,7 @@ describe(@"a preload choices operation", ^{
describe(@"assembling choices", ^{
it(@"should be correct with no text and VR required", ^{
- testOp = [[SDLPreloadChoicesOperation alloc] initWithConnectionManager:testConnectionManager fileManager:testFileManager displayCapabilities:displayCapabilities isVROptional:NO cellsToPreload:cellsWithoutArtwork];
+ testOp = [[SDLPreloadChoicesOperation alloc] initWithConnectionManager:testConnectionManager fileManager:testFileManager displayName:SDLDisplayTypeGeneric defaultMainWindowCapability:windowCapability isVROptional:NO cellsToPreload:cellsWithoutArtwork];
[testOp start];
NSArray<SDLCreateInteractionChoiceSet *> *receivedRequests = (NSArray<SDLCreateInteractionChoiceSet *> *)testConnectionManager.receivedRequests;
@@ -205,9 +205,9 @@ describe(@"a preload choices operation", ^{
it(@"should be correct with only primary text", ^{
SDLTextField *primaryTextField = [[SDLTextField alloc] init];
primaryTextField.name = SDLTextFieldNameMenuName;
- displayCapabilities.textFields = @[primaryTextField];
+ windowCapability.textFields = @[primaryTextField];
- testOp = [[SDLPreloadChoicesOperation alloc] initWithConnectionManager:testConnectionManager fileManager:testFileManager displayCapabilities:displayCapabilities isVROptional:NO cellsToPreload:cellsWithoutArtwork];
+ testOp = [[SDLPreloadChoicesOperation alloc] initWithConnectionManager:testConnectionManager fileManager:testFileManager displayName:SDLDisplayTypeGeneric defaultMainWindowCapability:windowCapability isVROptional:NO cellsToPreload:cellsWithoutArtwork];
[testOp start];
NSArray<SDLCreateInteractionChoiceSet *> *receivedRequests = (NSArray<SDLCreateInteractionChoiceSet *> *)testConnectionManager.receivedRequests;
@@ -224,9 +224,9 @@ describe(@"a preload choices operation", ^{
primaryTextField.name = SDLTextFieldNameMenuName;
SDLTextField *secondaryTextField = [[SDLTextField alloc] init];
secondaryTextField.name = SDLTextFieldNameSecondaryText;
- displayCapabilities.textFields = @[primaryTextField, secondaryTextField];
+ windowCapability.textFields = @[primaryTextField, secondaryTextField];
- testOp = [[SDLPreloadChoicesOperation alloc] initWithConnectionManager:testConnectionManager fileManager:testFileManager displayCapabilities:displayCapabilities isVROptional:NO cellsToPreload:cellsWithoutArtwork];
+ testOp = [[SDLPreloadChoicesOperation alloc] initWithConnectionManager:testConnectionManager fileManager:testFileManager displayName:SDLDisplayTypeGeneric defaultMainWindowCapability:windowCapability isVROptional:NO cellsToPreload:cellsWithoutArtwork];
[testOp start];
NSArray<SDLCreateInteractionChoiceSet *> *receivedRequests = (NSArray<SDLCreateInteractionChoiceSet *> *)testConnectionManager.receivedRequests;
@@ -245,9 +245,9 @@ describe(@"a preload choices operation", ^{
secondaryTextField.name = SDLTextFieldNameSecondaryText;
SDLTextField *tertiaryTextField = [[SDLTextField alloc] init];
tertiaryTextField.name = SDLTextFieldNameTertiaryText;
- displayCapabilities.textFields = @[primaryTextField, secondaryTextField, tertiaryTextField];
+ windowCapability.textFields = @[primaryTextField, secondaryTextField, tertiaryTextField];
- testOp = [[SDLPreloadChoicesOperation alloc] initWithConnectionManager:testConnectionManager fileManager:testFileManager displayCapabilities:displayCapabilities isVROptional:NO cellsToPreload:cellsWithoutArtwork];
+ testOp = [[SDLPreloadChoicesOperation alloc] initWithConnectionManager:testConnectionManager fileManager:testFileManager displayName:SDLDisplayTypeGeneric defaultMainWindowCapability:windowCapability isVROptional:NO cellsToPreload:cellsWithoutArtwork];
[testOp start];
NSArray<SDLCreateInteractionChoiceSet *> *receivedRequests = (NSArray<SDLCreateInteractionChoiceSet *> *)testConnectionManager.receivedRequests;
@@ -261,7 +261,7 @@ describe(@"a preload choices operation", ^{
it(@"should be correct with VR optional", ^{
- testOp = [[SDLPreloadChoicesOperation alloc] initWithConnectionManager:testConnectionManager fileManager:testFileManager displayCapabilities:displayCapabilities isVROptional:YES cellsToPreload:cellsWithoutArtwork];
+ testOp = [[SDLPreloadChoicesOperation alloc] initWithConnectionManager:testConnectionManager fileManager:testFileManager displayName:SDLDisplayTypeGeneric defaultMainWindowCapability:windowCapability isVROptional:YES cellsToPreload:cellsWithoutArtwork];
[testOp start];
NSArray<SDLCreateInteractionChoiceSet *> *receivedRequests = (NSArray<SDLCreateInteractionChoiceSet *> *)testConnectionManager.receivedRequests;
diff --git a/SmartDeviceLinkTests/DevAPISpecs/SDLPresentChoiceSetOperationSpec.m b/SmartDeviceLinkTests/DevAPISpecs/SDLPresentChoiceSetOperationSpec.m
index dda02c40d..7ca891608 100644
--- a/SmartDeviceLinkTests/DevAPISpecs/SDLPresentChoiceSetOperationSpec.m
+++ b/SmartDeviceLinkTests/DevAPISpecs/SDLPresentChoiceSetOperationSpec.m
@@ -4,19 +4,31 @@
#import "SDLPresentChoiceSetOperation.h"
+#import "SDLCancelInteraction.h"
+#import "SDLCancelInteractionResponse.h"
#import "SDLChoiceCell.h"
#import "SDLChoiceSet.h"
#import "SDLChoiceSetDelegate.h"
+#import "SDLError.h"
+#import "SDLFunctionID.h"
#import "SDLKeyboardDelegate.h"
#import "SDLOnKeyboardInput.h"
#import "SDLKeyboardProperties.h"
#import "SDLPerformInteraction.h"
#import "SDLPerformInteractionResponse.h"
#import "SDLRPCNotificationNotification.h"
+#import "SDLGlobals.h"
#import "SDLSetGlobalProperties.h"
#import "SDLSetGlobalPropertiesResponse.h"
+#import "SDLVersion.h"
#import "TestConnectionManager.h"
+@interface SDLChoiceSet()
+
+@property (nullable, copy, nonatomic) SDLChoiceSetCanceledHandler canceledHandler;
+
+@end
+
QuickSpecBegin(SDLPresentChoiceSetOperationSpec)
describe(@"present choice operation", ^{
@@ -27,6 +39,7 @@ describe(@"present choice operation", ^{
__block SDLChoiceSet *testChoiceSet = nil;
__block id<SDLChoiceSetDelegate> testChoiceDelegate = nil;
__block NSArray<SDLChoiceCell *> *testChoices = nil;
+ __block int testCancelID = 98;
__block id<SDLKeyboardDelegate> testKeyboardDelegate = nil;
__block SDLKeyboardProperties *testKeyboardProperties = nil;
@@ -47,7 +60,7 @@ describe(@"present choice operation", ^{
testKeyboardDelegate = OCMProtocolMock(@protocol(SDLKeyboardDelegate));
OCMStub([testKeyboardDelegate customKeyboardConfiguration]).andReturn(nil);
- testKeyboardProperties = [[SDLKeyboardProperties alloc] initWithLanguage:SDLLanguageArSa layout:SDLKeyboardLayoutAZERTY keypressMode:SDLKeypressModeResendCurrentEntry limitedCharacterList:nil autoCompleteText:nil];
+ testKeyboardProperties = [[SDLKeyboardProperties alloc] initWithLanguage:SDLLanguageArSa layout:SDLKeyboardLayoutAZERTY keypressMode:SDLKeypressModeResendCurrentEntry limitedCharacterList:nil autoCompleteText:nil autoCompleteList:nil];
});
it(@"should have a priority of 'normal'", ^{
@@ -58,7 +71,7 @@ describe(@"present choice operation", ^{
describe(@"running a non-searchable choice set operation", ^{
beforeEach(^{
- testOp = [[SDLPresentChoiceSetOperation alloc] initWithConnectionManager:testConnectionManager choiceSet:testChoiceSet mode:testInteractionMode keyboardProperties:nil keyboardDelegate:nil];
+ testOp = [[SDLPresentChoiceSetOperation alloc] initWithConnectionManager:testConnectionManager choiceSet:testChoiceSet mode:testInteractionMode keyboardProperties:nil keyboardDelegate:nil cancelID:testCancelID];
testOp.completionBlock = ^{
hasCalledOperationCompletionHandler = YES;
};
@@ -82,6 +95,7 @@ describe(@"present choice operation", ^{
expect(request.timeout).to(equal(testChoiceSet.timeout * 1000));
expect(request.vrHelp).to(beNil());
expect(request.interactionChoiceSetIDList).to(equal(@[@65535]));
+ expect(request.cancelID).to(equal(testCancelID));
});
describe(@"after a perform interaction response", ^{
@@ -97,7 +111,6 @@ describe(@"present choice operation", ^{
[testConnectionManager respondToLastRequestWithResponse:response];
});
-
it(@"should not reset the keyboard properties and should be finished", ^{
expect(testConnectionManager.receivedRequests.lastObject).toNot(beAnInstanceOf([SDLSetGlobalProperties class]));
expect(hasCalledOperationCompletionHandler).toEventually(beTrue());
@@ -107,11 +120,200 @@ describe(@"present choice operation", ^{
});
});
});
+
+ describe(@"Canceling the choice set", ^{
+ __block SDLPresentChoiceSetOperation *testCancelOp = nil;
+
+ beforeEach(^{
+ testCancelOp = [[SDLPresentChoiceSetOperation alloc] initWithConnectionManager:testConnectionManager choiceSet:testChoiceSet mode:testInteractionMode keyboardProperties:nil keyboardDelegate:nil cancelID:testCancelID];
+ testCancelOp.completionBlock = ^{
+ hasCalledOperationCompletionHandler = YES;
+ };
+ });
+
+ context(@"Head unit supports the `CancelInteration` RPC", ^{
+ beforeEach(^{
+ SDLVersion *supportedVersion = [SDLVersion versionWithMajor:6 minor:0 patch:0];
+ id globalMock = OCMPartialMock([SDLGlobals sharedGlobals]);
+ OCMStub([globalMock rpcVersion]).andReturn(supportedVersion);
+ });
+
+ context(@"If the operation is executing", ^{
+ beforeEach(^{
+ [testCancelOp start];
+
+ expect(testCancelOp.isExecuting).to(beTrue());
+ expect(testCancelOp.isFinished).to(beFalse());
+ expect(testCancelOp.isCancelled).to(beFalse());
+
+ [testChoiceSet cancel];
+ });
+
+ it(@"should attempt to send a cancel interaction", ^{
+ SDLCancelInteraction *lastRequest = testConnectionManager.receivedRequests.lastObject;
+ expect(lastRequest).to(beAnInstanceOf([SDLCancelInteraction class]));
+ expect(lastRequest.cancelID).to(equal(testCancelID));
+ expect(lastRequest.functionID).to(equal([SDLFunctionID.sharedInstance functionIdForName:SDLRPCFunctionNamePerformInteraction]));
+ });
+
+ context(@"If the cancel interaction was successful", ^{
+ beforeEach(^{
+ SDLCancelInteractionResponse *testCancelInteractionResponse = [[SDLCancelInteractionResponse alloc] init];
+ testCancelInteractionResponse.success = @YES;
+ [testConnectionManager respondToLastRequestWithResponse:testCancelInteractionResponse];
+ });
+
+ it(@"should not error", ^{
+ expect(testCancelOp.error).to(beNil());
+ });
+
+ it(@"should not finish", ^{
+ expect(hasCalledOperationCompletionHandler).to(beFalse());
+ expect(testCancelOp.isExecuting).to(beTrue());
+ expect(testCancelOp.isFinished).to(beFalse());
+ expect(testCancelOp.isCancelled).to(beFalse());
+ });
+ });
+
+ context(@"If the cancel interaction was not successful", ^{
+ __block NSError *testError = [NSError sdl_lifecycle_notConnectedError];
+
+ beforeEach(^{
+ SDLCancelInteractionResponse *testCancelInteractionResponse = [[SDLCancelInteractionResponse alloc] init];
+ testCancelInteractionResponse.success = @NO;
+ [testConnectionManager respondToLastRequestWithResponse:testCancelInteractionResponse error:testError];
+ });
+
+ it(@"should error", ^{
+ expect(testCancelOp.error).to(equal(testError));
+ });
+
+ it(@"should not finish", ^{
+ expect(hasCalledOperationCompletionHandler).to(beFalse());
+ expect(testCancelOp.isExecuting).to(beTrue());
+ expect(testCancelOp.isFinished).to(beFalse());
+ expect(testCancelOp.isCancelled).to(beFalse());
+ });
+ });
+ });
+
+ context(@"If the operation has already finished", ^{
+ beforeEach(^{
+ [testCancelOp finishOperation];
+
+ expect(testCancelOp.isExecuting).to(beFalse());
+ expect(testCancelOp.isFinished).to(beTrue());
+ expect(testCancelOp.isCancelled).to(beFalse());
+
+ [testChoiceSet cancel];
+ });
+
+ it(@"should not attempt to send a cancel interaction", ^{
+ SDLCancelInteraction *lastRequest = testConnectionManager.receivedRequests.lastObject;
+ expect(lastRequest).toNot(beAnInstanceOf([SDLCancelInteraction class]));
+ });
+ });
+
+ context(@"If the started operation has been canceled", ^{
+ beforeEach(^{
+ [testCancelOp start];
+ [testCancelOp cancel];
+
+ expect(testCancelOp.isExecuting).to(beTrue());
+ expect(testCancelOp.isFinished).to(beFalse());
+ expect(testCancelOp.isCancelled).to(beTrue());
+
+ [testChoiceSet cancel];
+ });
+
+ it(@"should not attempt to send a cancel interaction", ^{
+ SDLCancelInteraction *lastRequest = testConnectionManager.receivedRequests.lastObject;
+ expect(lastRequest).toNot(beAnInstanceOf([SDLCancelInteraction class]));
+ });
+
+ it(@"should not finish", ^{
+ expect(hasCalledOperationCompletionHandler).toEventually(beFalse());
+ expect(testCancelOp.isExecuting).toEventually(beTrue());
+ expect(testCancelOp.isFinished).toEventually(beFalse());
+ expect(testCancelOp.isCancelled).toEventually(beTrue());
+ });
+ });
+
+ context(@"If the operation has not started", ^{
+ beforeEach(^{
+ expect(testCancelOp.isExecuting).to(beFalse());
+ expect(testCancelOp.isFinished).to(beFalse());
+ expect(testCancelOp.isCancelled).to(beFalse());
+
+ [testChoiceSet cancel];
+ });
+
+ it(@"should not attempt to send a cancel interaction", ^{
+ SDLCancelInteraction *lastRequest = testConnectionManager.receivedRequests.lastObject;
+ expect(lastRequest).toNot(beAnInstanceOf([SDLCancelInteraction class]));
+ });
+
+ context(@"Once the operation has started", ^{
+ beforeEach(^{
+ [testCancelOp start];
+ });
+
+ it(@"should not attempt to send a cancel interaction", ^{
+ SDLCancelInteraction *lastRequest = testConnectionManager.receivedRequests.lastObject;
+ expect(lastRequest).toNot(beAnInstanceOf([SDLCancelInteraction class]));
+ });
+
+ it(@"should finish", ^{
+ expect(hasCalledOperationCompletionHandler).toEventually(beTrue());
+ expect(testCancelOp.isExecuting).toEventually(beFalse());
+ expect(testCancelOp.isFinished).toEventually(beTrue());
+ expect(testCancelOp.isCancelled).toEventually(beTrue());
+ });
+ });
+ });
+ });
+
+ context(@"Head unit does not support the `CancelInteration` RPC", ^{
+ beforeEach(^{
+ SDLVersion *unsupportedVersion = [SDLVersion versionWithMajor:5 minor:1 patch:0];
+ id globalMock = OCMPartialMock([SDLGlobals sharedGlobals]);
+ OCMStub([globalMock rpcVersion]).andReturn(unsupportedVersion);
+ });
+
+ it(@"should not attempt to send a cancel interaction if the operation is executing", ^{
+ [testCancelOp start];
+
+ expect(testCancelOp.isExecuting).to(beTrue());
+ expect(testCancelOp.isFinished).to(beFalse());
+ expect(testCancelOp.isCancelled).to(beFalse());
+
+ [testChoiceSet cancel];
+
+ SDLCancelInteraction *lastRequest = testConnectionManager.receivedRequests.lastObject;
+ expect(lastRequest).toNot(beAnInstanceOf([SDLCancelInteraction class]));
+ });
+
+ it(@"should cancel the operation if it has not yet been run", ^{
+ expect(testCancelOp.isExecuting).to(beFalse());
+ expect(testCancelOp.isFinished).to(beFalse());
+ expect(testCancelOp.isCancelled).to(beFalse());
+
+ [testChoiceSet cancel];
+
+ SDLCancelInteraction *lastRequest = testConnectionManager.receivedRequests.lastObject;
+ expect(lastRequest).toNot(beAnInstanceOf([SDLCancelInteraction class]));
+
+ expect(testCancelOp.isExecuting).to(beFalse());
+ expect(testCancelOp.isFinished).to(beFalse());
+ expect(testCancelOp.isCancelled).to(beTrue());
+ });
+ });
+ });
});
describe(@"running a searchable choice set operation", ^{
beforeEach(^{
- testOp = [[SDLPresentChoiceSetOperation alloc] initWithConnectionManager:testConnectionManager choiceSet:testChoiceSet mode:testInteractionMode keyboardProperties:testKeyboardProperties keyboardDelegate:testKeyboardDelegate];
+ testOp = [[SDLPresentChoiceSetOperation alloc] initWithConnectionManager:testConnectionManager choiceSet:testChoiceSet mode:testInteractionMode keyboardProperties:testKeyboardProperties keyboardDelegate:testKeyboardDelegate cancelID:testCancelID];
testOp.completionBlock = ^{
hasCalledOperationCompletionHandler = YES;
@@ -146,6 +348,7 @@ describe(@"present choice operation", ^{
expect(request.timeout).to(equal(testChoiceSet.timeout * 1000));
expect(request.vrHelp).to(beNil());
expect(request.interactionChoiceSetIDList).to(equal(@[@65535]));
+ expect(request.cancelID).to(equal(testCancelID));
});
it(@"should respond to submitted notifications", ^{
diff --git a/SmartDeviceLinkTests/DevAPISpecs/SDLPresentKeyboardOperationSpec.m b/SmartDeviceLinkTests/DevAPISpecs/SDLPresentKeyboardOperationSpec.m
index e8a5abdec..08424949d 100644
--- a/SmartDeviceLinkTests/DevAPISpecs/SDLPresentKeyboardOperationSpec.m
+++ b/SmartDeviceLinkTests/DevAPISpecs/SDLPresentKeyboardOperationSpec.m
@@ -4,15 +4,21 @@
#import "SDLPresentKeyboardOperation.h"
+#import "SDLCancelInteraction.h"
+#import "SDLCancelInteractionResponse.h"
+#import "SDLError.h"
+#import "SDLFunctionID.h"
+#import "SDLGlobals.h"
#import "SDLKeyboardDelegate.h"
-#import "SDLOnKeyboardInput.h"
#import "SDLKeyboardProperties.h"
+#import "SDLOnKeyboardInput.h"
#import "SDLPerformInteraction.h"
#import "SDLPerformInteractionResponse.h"
#import "SDLRPCNotificationNotification.h"
#import "SDLSetGlobalProperties.h"
#import "SDLSetGlobalPropertiesResponse.h"
#import "TestConnectionManager.h"
+#import "SDLVersion.h"
QuickSpecBegin(SDLPresentKeyboardOperationSpec)
@@ -23,11 +29,13 @@ describe(@"present keyboard operation", ^{
__block NSString *testInitialText = @"Initial Text";
__block id<SDLKeyboardDelegate> testDelegate = nil;
__block SDLKeyboardProperties *testInitialProperties = nil;
+ __block int testCancelID = 256;
__block BOOL hasCalledOperationCompletionHandler = NO;
__block NSError *resultError = nil;
beforeEach(^{
+ testOp = nil;
resultError = nil;
hasCalledOperationCompletionHandler = NO;
@@ -46,7 +54,7 @@ describe(@"present keyboard operation", ^{
describe(@"running the operation", ^{
beforeEach(^{
- testOp = [[SDLPresentKeyboardOperation alloc] initWithConnectionManager:testConnectionManager keyboardProperties:testInitialProperties initialText:testInitialText keyboardDelegate:testDelegate];
+ testOp = [[SDLPresentKeyboardOperation alloc] initWithConnectionManager:testConnectionManager keyboardProperties:testInitialProperties initialText:testInitialText keyboardDelegate:testDelegate cancelID:testCancelID];
testOp.completionBlock = ^{
hasCalledOperationCompletionHandler = YES;
};
@@ -246,6 +254,194 @@ describe(@"present keyboard operation", ^{
});
});
});
+
+ describe(@"Canceling the keyboard", ^{
+ beforeEach(^{
+ testOp = [[SDLPresentKeyboardOperation alloc] initWithConnectionManager:testConnectionManager keyboardProperties:testInitialProperties initialText:testInitialText keyboardDelegate:testDelegate cancelID:testCancelID];
+ testOp.completionBlock = ^{
+ hasCalledOperationCompletionHandler = YES;
+ };
+ });
+
+ context(@"If the operation is executing", ^{
+ beforeEach(^{
+ SDLVersion *supportedVersion = [SDLVersion versionWithMajor:6 minor:0 patch:0];
+ id globalMock = OCMPartialMock([SDLGlobals sharedGlobals]);
+ OCMStub([globalMock rpcVersion]).andReturn(supportedVersion);
+
+ [testOp start];
+
+ expect(testOp.isExecuting).to(beTrue());
+ expect(testOp.isFinished).to(beFalse());
+ expect(testOp.isCancelled).to(beFalse());
+
+ [testOp dismissKeyboard];
+ });
+
+ it(@"should attempt to send a cancel interaction", ^{
+ SDLCancelInteraction *lastRequest = testConnectionManager.receivedRequests.lastObject;
+ expect(lastRequest).to(beAnInstanceOf([SDLCancelInteraction class]));
+ expect(lastRequest.cancelID).to(equal(testCancelID));
+ expect(lastRequest.functionID).to(equal([SDLFunctionID.sharedInstance functionIdForName:SDLRPCFunctionNamePerformInteraction]));
+ });
+
+ context(@"If the cancel interaction was successful", ^{
+ beforeEach(^{
+ SDLCancelInteractionResponse *testCancelInteractionResponse = [[SDLCancelInteractionResponse alloc] init];
+ testCancelInteractionResponse.success = @YES;
+ [testConnectionManager respondToLastRequestWithResponse:testCancelInteractionResponse];
+
+ SDLSetGlobalPropertiesResponse *response = [[SDLSetGlobalPropertiesResponse alloc] init];
+ response.success = @YES;
+ [testConnectionManager respondToLastRequestWithResponse:response];
+ });
+
+ it(@"should not error", ^{
+ expect(testOp.error).to(beNil());
+ });
+
+ it(@"should not finish", ^{
+ expect(hasCalledOperationCompletionHandler).to(beFalse());
+ expect(testOp.isExecuting).to(beTrue());
+ expect(testOp.isFinished).to(beFalse());
+ expect(testOp.isCancelled).to(beFalse());
+ });
+ });
+
+ context(@"If the cancel interaction was not successful", ^{
+ __block NSError *testError = [NSError sdl_lifecycle_notConnectedError];
+
+ beforeEach(^{
+ SDLCancelInteractionResponse *testCancelInteractionResponse = [[SDLCancelInteractionResponse alloc] init];
+ testCancelInteractionResponse.success = @NO;
+ [testConnectionManager respondToLastRequestWithResponse:testCancelInteractionResponse error:testError];
+
+ SDLSetGlobalPropertiesResponse *response = [[SDLSetGlobalPropertiesResponse alloc] init];
+ response.success = @YES;
+ [testConnectionManager respondToLastRequestWithResponse:response];
+ });
+
+ it(@"should error", ^{
+ expect(testOp.error).to(equal(testError));
+ });
+
+ it(@"should not finish", ^{
+ expect(hasCalledOperationCompletionHandler).toEventually(beFalse());
+ expect(testOp.isExecuting).toEventually(beTrue());
+ expect(testOp.isFinished).toEventually(beFalse());
+ expect(testOp.isCancelled).toEventually(beFalse());
+ });
+ });
+ });
+
+ context(@"The head unit does not support the `CancelInteraction` RPC", ^{
+ beforeEach(^{
+ SDLVersion *unsupportedVersion = [SDLVersion versionWithMajor:4 minor:5 patch:2];
+ id globalMock = OCMPartialMock([SDLGlobals sharedGlobals]);
+ OCMStub([globalMock rpcVersion]).andReturn(unsupportedVersion);
+ });
+
+ it(@"should not attempt to send a cancel interaction if the operation is executing", ^{
+ [testOp start];
+
+ expect(testOp.isExecuting).to(beTrue());
+ expect(testOp.isFinished).to(beFalse());
+ expect(testOp.isCancelled).to(beFalse());
+
+ [testOp dismissKeyboard];
+
+ SDLCancelInteraction *lastRequest = testConnectionManager.receivedRequests.lastObject;
+ expect(lastRequest).toNot(beAnInstanceOf([SDLCancelInteraction class]));
+ });
+
+ it(@"should cancel the operation if it has not yet been run", ^{
+ expect(testOp.isExecuting).to(beFalse());
+ expect(testOp.isFinished).to(beFalse());
+ expect(testOp.isCancelled).to(beFalse());
+
+ [testOp dismissKeyboard];
+
+ SDLCancelInteraction *lastRequest = testConnectionManager.receivedRequests.lastObject;
+ expect(lastRequest).to(beNil());
+
+ expect(testOp.isExecuting).to(beFalse());
+ expect(testOp.isFinished).to(beFalse());
+ expect(testOp.isCancelled).to(beTrue());
+ });
+ });
+
+ context(@"If the operation has already finished", ^{
+ beforeEach(^{
+ [testOp start];
+ [testOp finishOperation];
+
+ SDLSetGlobalPropertiesResponse *response = [[SDLSetGlobalPropertiesResponse alloc] init];
+ response.success = @YES;
+ [testConnectionManager respondToLastRequestWithResponse:response];
+
+ [testOp dismissKeyboard];
+ });
+
+ it(@"should not attempt to send a cancel interaction", ^{
+ expect(testOp.isExecuting).to(beFalse());
+ expect(testOp.isFinished).to(beTrue());
+ expect(testOp.isCancelled).to(beFalse());
+
+ SDLCancelInteraction *lastRequest = testConnectionManager.receivedRequests.lastObject;
+ expect(lastRequest).toNot(beAnInstanceOf([SDLCancelInteraction class]));
+ });
+ });
+
+ context(@"If the started operation has been canceled", ^{
+ beforeEach(^{
+ [testOp start];
+ [testOp cancel];
+
+ [testOp dismissKeyboard];
+ });
+
+ it(@"should not finish or send a cancel interaction", ^{
+ SDLCancelInteraction *lastRequest = testConnectionManager.receivedRequests.lastObject;
+ expect(lastRequest).toNot(beAnInstanceOf([SDLCancelInteraction class]));
+
+ expect(hasCalledOperationCompletionHandler).to(beFalse());
+ expect(testOp.isExecuting).to(beTrue());
+ expect(testOp.isFinished).to(beFalse());
+ expect(testOp.isCancelled).to(beTrue());
+ });
+ });
+
+ context(@"If the operation has not started", ^{
+ beforeEach(^{
+ [testOp dismissKeyboard];
+ });
+
+ it(@"should not attempt to send a cancel interaction", ^{
+ expect(testOp.isExecuting).to(beFalse());
+ expect(testOp.isFinished).to(beFalse());
+ expect(testOp.isCancelled).to(beTrue());
+
+ SDLCancelInteraction *lastRequest = testConnectionManager.receivedRequests.lastObject;
+ expect(lastRequest).to(beNil());
+ });
+
+ context(@"Once the operation has started", ^{
+ beforeEach(^{
+ [testOp start];
+ });
+
+ it(@"should not attempt to send a cancel interaction but should finish", ^{
+ expect(hasCalledOperationCompletionHandler).toEventually(beTrue());
+ expect(testOp.isExecuting).toEventually(beFalse());
+ expect(testOp.isFinished).toEventually(beTrue());
+ expect(testOp.isCancelled).toEventually(beTrue());
+
+ SDLCancelInteraction *lastRequest = testConnectionManager.receivedRequests.lastObject;
+ expect(lastRequest).to(beNil());
+ });
+ });
+ });
+ });
});
QuickSpecEnd
diff --git a/SmartDeviceLinkTests/DevAPISpecs/SDLSoftButtonManagerSpec.m b/SmartDeviceLinkTests/DevAPISpecs/SDLSoftButtonManagerSpec.m
index 3a7ac4a65..6534b49df 100644
--- a/SmartDeviceLinkTests/DevAPISpecs/SDLSoftButtonManagerSpec.m
+++ b/SmartDeviceLinkTests/DevAPISpecs/SDLSoftButtonManagerSpec.m
@@ -15,6 +15,7 @@
#import "SDLSoftButtonReplaceOperation.h"
#import "SDLSoftButtonState.h"
#import "SDLSoftButtonTransitionOperation.h"
+#import "SDLSystemCapabilityManager.h"
#import "TestConnectionManager.h"
@interface SDLSoftButtonObject()
@@ -33,9 +34,8 @@
@property (strong, nonatomic) NSOperationQueue *transactionQueue;
+@property (strong, nonatomic, nullable, readonly) SDLWindowCapability *windowCapability;
@property (copy, nonatomic, nullable) SDLHMILevel currentLevel;
-@property (strong, nonatomic, nullable) SDLDisplayCapabilities *displayCapabilities;
-@property (strong, nonatomic, nullable) SDLSoftButtonCapabilities *softButtonCapabilities;
@property (strong, nonatomic) NSMutableArray<SDLAsynchronousOperation *> *batchQueue;
@@ -47,6 +47,7 @@ describe(@"a soft button manager", ^{
__block SDLSoftButtonManager *testManager = nil;
__block SDLFileManager *testFileManager = nil;
+ __block SDLSystemCapabilityManager *testSystemCapabilityManager = nil;
__block TestConnectionManager *testConnectionManager = nil;
__block SDLSoftButtonObject *testObject1 = nil;
@@ -68,9 +69,11 @@ describe(@"a soft button manager", ^{
beforeEach(^{
testFileManager = OCMClassMock([SDLFileManager class]);
+ testSystemCapabilityManager = OCMClassMock([SDLSystemCapabilityManager class]);
testConnectionManager = [[TestConnectionManager alloc] init];
- testManager = [[SDLSoftButtonManager alloc] initWithConnectionManager:testConnectionManager fileManager:testFileManager];
+ testManager = [[SDLSoftButtonManager alloc] initWithConnectionManager:testConnectionManager fileManager:testFileManager systemCapabilityManager:testSystemCapabilityManager];
+ [testManager start];
expect(testManager.currentLevel).to(beNil());
testManager.currentLevel = SDLHMILevelFull;
@@ -82,8 +85,7 @@ describe(@"a soft button manager", ^{
expect(testManager.softButtonObjects).to(beEmpty());
expect(testManager.currentMainField1).to(beNil());
- expect(testManager.displayCapabilities).to(beNil());
- expect(testManager.softButtonCapabilities).to(beNil());
+ expect(testManager.windowCapability).to(beNil());
expect(testManager.transactionQueue).toNot(beNil());
});
@@ -244,8 +246,7 @@ describe(@"a soft button manager", ^{
expect(testManager.currentMainField1).to(beNil());
expect(testManager.transactionQueue.operationCount).to(equal(0));
expect(testManager.currentLevel).to(beNil());
- expect(testManager.displayCapabilities).to(beNil());
- expect(testManager.softButtonCapabilities).to(beNil());
+ expect(testManager.windowCapability).to(beNil());
});
});
});
diff --git a/SmartDeviceLinkTests/DevAPISpecs/SDLStreamingVideoLifecycleManagerSpec.m b/SmartDeviceLinkTests/DevAPISpecs/SDLStreamingVideoLifecycleManagerSpec.m
index 6dd0b2c2e..1f305fb08 100644
--- a/SmartDeviceLinkTests/DevAPISpecs/SDLStreamingVideoLifecycleManagerSpec.m
+++ b/SmartDeviceLinkTests/DevAPISpecs/SDLStreamingVideoLifecycleManagerSpec.m
@@ -36,6 +36,8 @@
#import "SDLVideoStreamingCapability.h"
#import "SDLVideoStreamingState.h"
#import "TestConnectionManager.h"
+#import "SDLVersion.h"
+#import "SDLHMICapabilities.h"
@interface SDLStreamingVideoLifecycleManager ()
@property (copy, nonatomic, readonly) NSString *appName;
@@ -131,6 +133,7 @@ describe(@"the streaming video manager", ^{
__block SDLDisplayCapabilities *someDisplayCapabilities = nil;
__block SDLScreenParams *someScreenParams = nil;
__block SDLImageResolution *someImageResolution = nil;
+ __block SDLHMICapabilities *someHMICapabilities = nil;
beforeEach(^{
someImageResolution = [[SDLImageResolution alloc] init];
@@ -141,34 +144,67 @@ describe(@"the streaming video manager", ^{
someScreenParams.resolution = someImageResolution;
});
- context(@"that does not support graphics", ^{
+ context(@"that does not support video streaming", ^{
beforeEach(^{
- someDisplayCapabilities = [[SDLDisplayCapabilities alloc] init];
- someDisplayCapabilities.graphicSupported = @NO;
+ SDLVersion *version = [SDLVersion versionWithMajor:6 minor:0 patch:0];
+ id globalMock = OCMPartialMock([SDLGlobals sharedGlobals]);
+ OCMStub([globalMock rpcVersion]).andReturn(version);
+
+ someHMICapabilities = [[SDLHMICapabilities alloc] init];
+ someHMICapabilities.videoStreaming = @NO;
+
+ someRegisterAppInterfaceResponse = [[SDLRegisterAppInterfaceResponse alloc] init];
+ someRegisterAppInterfaceResponse.hmiCapabilities = someHMICapabilities;
+
+ SDLRPCResponseNotification *notification = [[SDLRPCResponseNotification alloc] initWithName:SDLDidReceiveRegisterAppInterfaceResponse object:self rpcResponse:someRegisterAppInterfaceResponse];
+
+ [[NSNotificationCenter defaultCenter] postNotification:notification];
+ [NSThread sleepForTimeInterval:0.1];
+ });
+
+ it(@"should not support streaming", ^{
+ expect(@(streamingLifecycleManager.isStreamingSupported)).to(equal(@NO));
+ });
+ });
+ context(@"that supports video streaming", ^{
+ beforeEach(^{
+ SDLVersion *version = [SDLVersion versionWithMajor:6 minor:0 patch:0];
+ id globalMock = OCMPartialMock([SDLGlobals sharedGlobals]);
+ OCMStub([globalMock rpcVersion]).andReturn(version);
+
+ someHMICapabilities = [[SDLHMICapabilities alloc] init];
+ someHMICapabilities.videoStreaming = @YES;
+
+ someDisplayCapabilities = [[SDLDisplayCapabilities alloc] init];
someDisplayCapabilities.screenParams = someScreenParams;
someRegisterAppInterfaceResponse = [[SDLRegisterAppInterfaceResponse alloc] init];
+ someRegisterAppInterfaceResponse.hmiCapabilities = someHMICapabilities;
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated"
someRegisterAppInterfaceResponse.displayCapabilities = someDisplayCapabilities;
#pragma clang diagnostic pop
+
SDLRPCResponseNotification *notification = [[SDLRPCResponseNotification alloc] initWithName:SDLDidReceiveRegisterAppInterfaceResponse object:self rpcResponse:someRegisterAppInterfaceResponse];
[[NSNotificationCenter defaultCenter] postNotification:notification];
[NSThread sleepForTimeInterval:0.1];
});
- it(@"should not support streaming", ^{
- expect(@(streamingLifecycleManager.isStreamingSupported)).to(equal(@NO));
+ it(@"should support streaming", ^{
+ expect(@(streamingLifecycleManager.isStreamingSupported)).to(equal(@YES));
+ expect(@(CGSizeEqualToSize(streamingLifecycleManager.screenSize, CGSizeMake(600, 100)))).to(equal(@YES));
});
});
- context(@"that supports graphics", ^{
+ context(@"version is less then 4.5.0", ^{
beforeEach(^{
- someDisplayCapabilities = [[SDLDisplayCapabilities alloc] init];
- someDisplayCapabilities.graphicSupported = @YES;
+ SDLVersion *version = [SDLVersion versionWithMajor:4 minor:0 patch:0];
+ id globalMock = OCMPartialMock([SDLGlobals sharedGlobals]);
+ OCMStub([globalMock rpcVersion]).andReturn(version);
+ someDisplayCapabilities = [[SDLDisplayCapabilities alloc] init];
someDisplayCapabilities.screenParams = someScreenParams;
someRegisterAppInterfaceResponse = [[SDLRegisterAppInterfaceResponse alloc] init];
@@ -182,7 +218,7 @@ describe(@"the streaming video manager", ^{
[NSThread sleepForTimeInterval:0.1];
});
- it(@"should support streaming", ^{
+ it(@"should support streaming even though hmiCapabilities.videoStreaming is nil", ^{
expect(@(streamingLifecycleManager.isStreamingSupported)).to(equal(@YES));
expect(@(CGSizeEqualToSize(streamingLifecycleManager.screenSize, CGSizeMake(600, 100)))).to(equal(@YES));
});
@@ -524,7 +560,7 @@ describe(@"the streaming video manager", ^{
it(@"should have set all the right properties", ^{
expect([[SDLGlobals sharedGlobals] mtuSizeForServiceType:SDLServiceTypeVideo]).to(equal(testMTU));
- expect(CGSizeEqualToSize(streamingLifecycleManager.screenSize, CGSizeMake(testVideoWidth, testVideoHeight))).to(equal(YES));
+ expect(@(CGSizeEqualToSize(streamingLifecycleManager.screenSize, CGSizeMake(testVideoWidth, testVideoHeight)))).to(beTrue());
expect(streamingLifecycleManager.videoEncrypted).to(equal(YES));
expect(streamingLifecycleManager.videoFormat).to(equal([[SDLVideoStreamingFormat alloc] initWithCodec:testVideoCodec protocol:testVideoProtocol]));
expect(streamingLifecycleManager.currentVideoStreamState).to(equal(SDLVideoStreamManagerStateReady));
@@ -539,7 +575,7 @@ describe(@"the streaming video manager", ^{
});
it(@"should fall back correctly", ^{
- expect(CGSizeEqualToSize(streamingLifecycleManager.screenSize, CGSizeMake(testVideoWidth, testVideoHeight))).to(equal(YES));
+ expect(@(CGSizeEqualToSize(streamingLifecycleManager.screenSize, CGSizeMake(testVideoWidth, testVideoHeight)))).to(beTrue());
expect(streamingLifecycleManager.videoFormat).to(equal([[SDLVideoStreamingFormat alloc] initWithCodec:SDLVideoStreamingCodecH264 protocol:SDLVideoStreamingProtocolRAW]));
expect(streamingLifecycleManager.currentVideoStreamState).to(equal(SDLVideoStreamManagerStateReady));
});
@@ -551,14 +587,8 @@ describe(@"the streaming video manager", ^{
beforeEach(^{
- preferredResolutionLow = [[SDLImageResolution alloc] initWithWidth:10 height:10];
- preferredResolutionHigh = [[SDLImageResolution alloc] initWithWidth:100 height:100];
- streamingLifecycleManager.preferredResolutions = @[preferredResolutionLow, preferredResolutionHigh];
-
testVideoStartServicePayload = [[SDLControlFramePayloadVideoStartServiceAck alloc] initWithMTU:testMTU height:SDLControlFrameInt32NotFound width:SDLControlFrameInt32NotFound protocol:nil codec:nil];
testVideoMessage = [[SDLV2ProtocolMessage alloc] initWithHeader:testVideoHeader andPayload:testVideoStartServicePayload.data];
-
- expect(CGSizeEqualToSize(streamingLifecycleManager.screenSize, CGSizeZero));
});
context(@"If the data source is nil", ^{
@@ -568,20 +598,24 @@ describe(@"the streaming video manager", ^{
});
it(@"should not replace the existing screen resolution", ^{
- expect(CGSizeEqualToSize(streamingLifecycleManager.screenSize, CGSizeZero));
+ expect(@(CGSizeEqualToSize(streamingLifecycleManager.screenSize, CGSizeZero))).to(beTrue());
expect(streamingLifecycleManager.dataSource).to(beNil());
});
});
context(@"If the preferred resolution was set in the data source", ^{
beforeEach(^{
+ preferredResolutionLow = [[SDLImageResolution alloc] initWithWidth:10 height:10];
+ preferredResolutionHigh = [[SDLImageResolution alloc] initWithWidth:100 height:100];
+ streamingLifecycleManager.preferredResolutions = @[preferredResolutionLow, preferredResolutionHigh];
+
streamingLifecycleManager.dataSource = testDataSource;
[streamingLifecycleManager handleProtocolStartServiceACKMessage:testVideoMessage];
});
it(@"should set the screen size using the first provided preferred resolution", ^{
CGSize preferredFormat = CGSizeMake(preferredResolutionLow.resolutionWidth.floatValue, preferredResolutionLow.resolutionHeight.floatValue);
- expect(CGSizeEqualToSize(streamingLifecycleManager.screenSize, preferredFormat));
+ expect(@(CGSizeEqualToSize(streamingLifecycleManager.screenSize, preferredFormat))).to(beTrue());
expect(streamingLifecycleManager.dataSource).toNot(beNil());
});
});
diff --git a/SmartDeviceLinkTests/DevAPISpecs/SDLTextAndGraphicManagerSpec.m b/SmartDeviceLinkTests/DevAPISpecs/SDLTextAndGraphicManagerSpec.m
index 71a434df7..35c3f0a08 100644
--- a/SmartDeviceLinkTests/DevAPISpecs/SDLTextAndGraphicManagerSpec.m
+++ b/SmartDeviceLinkTests/DevAPISpecs/SDLTextAndGraphicManagerSpec.m
@@ -11,6 +11,8 @@
#import "SDLShow.h"
#import "SDLTextAndGraphicManager.h"
#import "SDLTextField.h"
+#import "SDLSystemCapabilityManager.h"
+#import "SDLWindowCapability.h"
#import "TestConnectionManager.h"
@interface SDLTextAndGraphicManager()
@@ -28,7 +30,7 @@
@property (assign, nonatomic) BOOL hasQueuedUpdate;
@property (copy, nonatomic, nullable) SDLTextAndGraphicUpdateCompletionHandler queuedUpdateHandler;
-@property (strong, nonatomic, nullable) SDLDisplayCapabilities *displayCapabilities;
+@property (strong, nonatomic, nullable) SDLWindowCapability *windowCapability;
@property (strong, nonatomic, nullable) SDLHMILevel currentLevel;
@property (strong, nonatomic) SDLArtwork *blankArtwork;
@@ -43,6 +45,7 @@ describe(@"text and graphic manager", ^{
__block SDLTextAndGraphicManager *testManager = nil;
__block TestConnectionManager *mockConnectionManager = [[TestConnectionManager alloc] init];
__block SDLFileManager *mockFileManager = nil;
+ __block SDLSystemCapabilityManager *mockSystemCapabilityManager = nil;
__block NSString *testString = @"some string";
__block NSString *testArtworkName = @"some artwork name";
@@ -51,7 +54,9 @@ describe(@"text and graphic manager", ^{
beforeEach(^{
mockFileManager = OCMClassMock([SDLFileManager class]);
- testManager = [[SDLTextAndGraphicManager alloc] initWithConnectionManager:mockConnectionManager fileManager:mockFileManager];
+ mockSystemCapabilityManager = OCMClassMock([SDLSystemCapabilityManager class]);
+ testManager = [[SDLTextAndGraphicManager alloc] initWithConnectionManager:mockConnectionManager fileManager:mockFileManager systemCapabilityManager:mockSystemCapabilityManager];
+ [testManager start];
});
it(@"should instantiate correctly", ^{
@@ -76,7 +81,7 @@ describe(@"text and graphic manager", ^{
expect(testManager.inProgressUpdate).to(beNil());
expect(testManager.queuedImageUpdate).to(beNil());
expect(testManager.hasQueuedUpdate).to(beFalse());
- expect(testManager.displayCapabilities).to(beNil());
+ expect(testManager.windowCapability).to(beNil());
expect(testManager.currentLevel).to(equal(SDLHMILevelNone));
expect(testManager.blankArtwork).toNot(beNil());
expect(testManager.isDirty).to(beFalse());
@@ -367,10 +372,10 @@ describe(@"text and graphic manager", ^{
context(@"with one line available", ^{
beforeEach(^{
- testManager.displayCapabilities = [[SDLDisplayCapabilities alloc] init];
+ testManager.windowCapability = [[SDLWindowCapability alloc] init];
SDLTextField *lineOneField = [[SDLTextField alloc] init];
lineOneField.name = SDLTextFieldNameMainField1;
- testManager.displayCapabilities.textFields = @[lineOneField];
+ testManager.windowCapability.textFields = @[lineOneField];
});
it(@"should set mediatrack properly", ^{
@@ -468,10 +473,10 @@ describe(@"text and graphic manager", ^{
context(@"with two lines available", ^{
beforeEach(^{
- testManager.displayCapabilities = [[SDLDisplayCapabilities alloc] init];
+ testManager.windowCapability = [[SDLWindowCapability alloc] init];
SDLTextField *lineTwoField = [[SDLTextField alloc] init];
lineTwoField.name = SDLTextFieldNameMainField2;
- testManager.displayCapabilities.textFields = @[lineTwoField];
+ testManager.windowCapability.textFields = @[lineTwoField];
});
it(@"should set mediatrack properly", ^{
@@ -578,10 +583,10 @@ describe(@"text and graphic manager", ^{
context(@"with three lines available", ^{
beforeEach(^{
- testManager.displayCapabilities = [[SDLDisplayCapabilities alloc] init];
+ testManager.windowCapability = [[SDLWindowCapability alloc] init];
SDLTextField *lineThreeField = [[SDLTextField alloc] init];
lineThreeField.name = SDLTextFieldNameMainField3;
- testManager.displayCapabilities.textFields = @[lineThreeField];
+ testManager.windowCapability.textFields = @[lineThreeField];
});
it(@"should set mediatrack properly", ^{
@@ -692,10 +697,10 @@ describe(@"text and graphic manager", ^{
context(@"with four lines available", ^{
beforeEach(^{
- testManager.displayCapabilities = [[SDLDisplayCapabilities alloc] init];
+ testManager.windowCapability = [[SDLWindowCapability alloc] init];
SDLTextField *lineFourField = [[SDLTextField alloc] init];
lineFourField.name = SDLTextFieldNameMainField4;
- testManager.displayCapabilities.textFields = @[lineFourField];
+ testManager.windowCapability.textFields = @[lineFourField];
});
it(@"should set mediatrack properly", ^{
@@ -964,7 +969,7 @@ describe(@"text and graphic manager", ^{
expect(testManager.inProgressUpdate).to(beNil());
expect(testManager.queuedImageUpdate).to(beNil());
expect(testManager.hasQueuedUpdate).to(beFalse());
- expect(testManager.displayCapabilities).to(beNil());
+ expect(testManager.windowCapability).to(beNil());
expect(testManager.currentLevel).to(equal(SDLHMILevelNone));
expect(testManager.blankArtwork).toNot(beNil());
expect(testManager.isDirty).to(beFalse());
diff --git a/SmartDeviceLinkTests/Notifications/SDLResponseDispatcherSpec.m b/SmartDeviceLinkTests/Notifications/SDLResponseDispatcherSpec.m
index 410d24386..0eb289928 100644
--- a/SmartDeviceLinkTests/Notifications/SDLResponseDispatcherSpec.m
+++ b/SmartDeviceLinkTests/Notifications/SDLResponseDispatcherSpec.m
@@ -480,7 +480,7 @@ describe(@"a response dispatcher", ^{
__block SDLSoftButton *testSoftButton1 = nil;
beforeEach(^{
- testAlert = [[SDLAlert alloc] initWithAlertText1:@"test 1" alertText2:@"test 1" alertText3:nil duration:1 softButtons:nil];
+ testAlert = [[SDLAlert alloc] initWithAlertText1:@"test 1" alertText2:@"test 2" alertText3:nil softButtons:nil playTone:false ttsChunks:nil duration:1 progressIndicator:false alertIcon:nil cancelID:0];
testAlert.correlationID = @1;
});
@@ -591,7 +591,7 @@ describe(@"a response dispatcher", ^{
__block SDLSoftButton *testSoftButton1 = nil;
beforeEach(^{
- testScrollableMessage = [[SDLScrollableMessage alloc] initWithMessage:@"test" timeout:1 softButtons:nil];
+ testScrollableMessage = [[SDLScrollableMessage alloc] initWithMessage:@"test" timeout:1 softButtons:nil cancelID:0];
testScrollableMessage.correlationID = @1;
});
diff --git a/SmartDeviceLinkTests/ProtocolSpecs/ControlFramePayloadSpecs/SDLControlFramePayloadNakSpec.m b/SmartDeviceLinkTests/ProtocolSpecs/ControlFramePayloadSpecs/SDLControlFramePayloadNakSpec.m
index df7bd1305..282ce9bc7 100644
--- a/SmartDeviceLinkTests/ProtocolSpecs/ControlFramePayloadSpecs/SDLControlFramePayloadNakSpec.m
+++ b/SmartDeviceLinkTests/ProtocolSpecs/ControlFramePayloadSpecs/SDLControlFramePayloadNakSpec.m
@@ -19,7 +19,8 @@ describe(@"Test encoding data", ^{
});
it(@"should create the correct data", ^{
- expect(testPayload.data.description).to(equal(@"<3e000000 0472656a 65637465 64506172 616d7300 29000000 0230000b 00000074 65737450 6172616d 31000231 000b0000 00746573 74506172 616d3200 0000>"));
+ NSString *base64Encoded = [testPayload.data base64EncodedStringWithOptions:0];
+ expect(base64Encoded).to(equal(@"PgAAAARyZWplY3RlZFBhcmFtcwApAAAAAjAACwAAAHRlc3RQYXJhbTEAAjEACwAAAHRlc3RQYXJhbTIAAAA="));
});
});
diff --git a/SmartDeviceLinkTests/ProtocolSpecs/ControlFramePayloadSpecs/SDLControlFramePayloadRegisterSecondaryTransportNakSpec.m b/SmartDeviceLinkTests/ProtocolSpecs/ControlFramePayloadSpecs/SDLControlFramePayloadRegisterSecondaryTransportNakSpec.m
index e01d268f0..e8e346ac9 100644
--- a/SmartDeviceLinkTests/ProtocolSpecs/ControlFramePayloadSpecs/SDLControlFramePayloadRegisterSecondaryTransportNakSpec.m
+++ b/SmartDeviceLinkTests/ProtocolSpecs/ControlFramePayloadSpecs/SDLControlFramePayloadRegisterSecondaryTransportNakSpec.m
@@ -26,7 +26,8 @@ describe(@"Test encoding data", ^{
});
it(@"should create the correct data", ^{
- expect(testPayload.data.description).to(equal(@"<28000000 02726561 736f6e00 17000000 61207361 6d706c65 20726561 736f6e20 6f66204e 414b0000>"));
+ NSString *base64Encoded = [testPayload.data base64EncodedStringWithOptions:0];
+ expect(base64Encoded).to(equal(@"KAAAAAJyZWFzb24AFwAAAGEgc2FtcGxlIHJlYXNvbiBvZiBOQUsAAA=="));
});
});
diff --git a/SmartDeviceLinkTests/ProtocolSpecs/ControlFramePayloadSpecs/SDLControlFramePayloadTransportEventUpdateSpec.m b/SmartDeviceLinkTests/ProtocolSpecs/ControlFramePayloadSpecs/SDLControlFramePayloadTransportEventUpdateSpec.m
index e6a79fc08..c0a78c756 100644
--- a/SmartDeviceLinkTests/ProtocolSpecs/ControlFramePayloadSpecs/SDLControlFramePayloadTransportEventUpdateSpec.m
+++ b/SmartDeviceLinkTests/ProtocolSpecs/ControlFramePayloadSpecs/SDLControlFramePayloadTransportEventUpdateSpec.m
@@ -29,7 +29,8 @@ describe(@"Test encoding data", ^{
});
it(@"should create the correct data", ^{
- expect(testPayload.data.description).to(equal(@"<31000000 10746370 506f7274 00393000 00027463 70497041 64647265 7373000d 00000031 302e3230 2e33302e 32353400 00>"));
+ NSString *base64Encoded = [testPayload.data base64EncodedStringWithOptions:0];
+ expect(base64Encoded).to(equal(@"MQAAABB0Y3BQb3J0ADkwAAACdGNwSXBBZGRyZXNzAA0AAAAxMC4yMC4zMC4yNTQAAA=="));
});
});
diff --git a/SmartDeviceLinkTests/ProtocolSpecs/ControlFramePayloadSpecs/SDLControlFramePayloadVideoStartServiceSpec.m b/SmartDeviceLinkTests/ProtocolSpecs/ControlFramePayloadSpecs/SDLControlFramePayloadVideoStartServiceSpec.m
index c93d72c9b..f5ae8b52c 100644
--- a/SmartDeviceLinkTests/ProtocolSpecs/ControlFramePayloadSpecs/SDLControlFramePayloadVideoStartServiceSpec.m
+++ b/SmartDeviceLinkTests/ProtocolSpecs/ControlFramePayloadSpecs/SDLControlFramePayloadVideoStartServiceSpec.m
@@ -29,7 +29,8 @@ describe(@"Test encoding data", ^{
});
it(@"should create the correct data", ^{
- expect(testPayload.data.description).to(equal(@"<49000000 02766964 656f5072 6f746f63 6f6c0005 00000052 544d5000 10776964 7468006b 01000002 76696465 6f436f64 65630005 00000048 32363500 10686569 67687400 92e90000 00>"));
+ NSString *base64Encoded = [testPayload.data base64EncodedStringWithOptions:0];
+ expect(base64Encoded).to(equal(@"SQAAAAJ2aWRlb1Byb3RvY29sAAUAAABSVE1QABB3aWR0aABrAQAAAnZpZGVvQ29kZWMABQAAAEgyNjUAEGhlaWdodACS6QAAAA=="));
});
});
diff --git a/SmartDeviceLinkTests/ProtocolSpecs/ControlFramePayloadSpecs/SDLControlFrameVideoStartServiceAckSpec.m b/SmartDeviceLinkTests/ProtocolSpecs/ControlFramePayloadSpecs/SDLControlFrameVideoStartServiceAckSpec.m
index c817f44f4..4298ec826 100644
--- a/SmartDeviceLinkTests/ProtocolSpecs/ControlFramePayloadSpecs/SDLControlFrameVideoStartServiceAckSpec.m
+++ b/SmartDeviceLinkTests/ProtocolSpecs/ControlFramePayloadSpecs/SDLControlFrameVideoStartServiceAckSpec.m
@@ -31,7 +31,8 @@ describe(@"Test encoding data", ^{
});
it(@"should create the correct data", ^{
- expect(testPayload.data.description).to(equal(@"<55000000 126d7475 00f40a13 00000000 00027669 64656f50 726f746f 636f6c00 04000000 52415700 10776964 74680024 00000002 76696465 6f436f64 65630005 00000048 32363400 10686569 67687400 56170000 00>"));
+ NSString *base64Encoded = [testPayload.data base64EncodedStringWithOptions:0];
+ expect(base64Encoded).to(equal(@"VQAAABJtdHUA9AoTAAAAAAACdmlkZW9Qcm90b2NvbAAEAAAAUkFXABB3aWR0aAAkAAAAAnZpZGVvQ29kZWMABQAAAEgyNjQAEGhlaWdodABWFwAAAA=="));
});
});
diff --git a/SmartDeviceLinkTests/ProtocolSpecs/SDLControlFramePayloadAudioStartServiceAckSpec.m b/SmartDeviceLinkTests/ProtocolSpecs/SDLControlFramePayloadAudioStartServiceAckSpec.m
index 548110d0d..8c66f6937 100644
--- a/SmartDeviceLinkTests/ProtocolSpecs/SDLControlFramePayloadAudioStartServiceAckSpec.m
+++ b/SmartDeviceLinkTests/ProtocolSpecs/SDLControlFramePayloadAudioStartServiceAckSpec.m
@@ -21,7 +21,8 @@ describe(@"Test encoding data", ^{
});
it(@"should create the correct data", ^{
- expect(testPayload.data.description).to(equal(@"<12000000 126d7475 00d3d9ab 23000000 0000>"));
+ NSString *base64Encoded = [testPayload.data base64EncodedStringWithOptions:0];
+ expect(base64Encoded).to(equal(@"EgAAABJtdHUA09mrIwAAAAAA"));
});
});
diff --git a/SmartDeviceLinkTests/ProtocolSpecs/SDLControlFramePayloadEndServiceSpec.m b/SmartDeviceLinkTests/ProtocolSpecs/SDLControlFramePayloadEndServiceSpec.m
index a59c95811..c814cee7d 100644
--- a/SmartDeviceLinkTests/ProtocolSpecs/SDLControlFramePayloadEndServiceSpec.m
+++ b/SmartDeviceLinkTests/ProtocolSpecs/SDLControlFramePayloadEndServiceSpec.m
@@ -20,7 +20,8 @@ describe(@"Test encoding data", ^{
});
it(@"should create the correct data", ^{
- expect(testPayload.data.description).to(equal(@"<11000000 10686173 68496400 fd41b008 00>"));
+ NSString *base64Encoded = [testPayload.data base64EncodedStringWithOptions:0];
+ expect(base64Encoded).to(equal(@"EQAAABBoYXNoSWQA/UGwCAA="));
});
});
diff --git a/SmartDeviceLinkTests/ProtocolSpecs/SDLControlFramePayloadRPCStartServiceAckSpec.m b/SmartDeviceLinkTests/ProtocolSpecs/SDLControlFramePayloadRPCStartServiceAckSpec.m
index 682d53678..63e927d5f 100644
--- a/SmartDeviceLinkTests/ProtocolSpecs/SDLControlFramePayloadRPCStartServiceAckSpec.m
+++ b/SmartDeviceLinkTests/ProtocolSpecs/SDLControlFramePayloadRPCStartServiceAckSpec.m
@@ -28,7 +28,8 @@ describe(@"Test encoding data", ^{
});
it(@"should create the correct data", ^{
- expect(testPayload.data.description).to(equal(@"<3b000000 10686173 68496400 193e1600 126d7475 0089515b 00000000 00027072 6f746f63 6f6c5665 7273696f 6e000800 0000312e 33322e33 320000>"));
+ NSString *base64Encoded = [testPayload.data base64EncodedStringWithOptions:0];
+ expect(base64Encoded).to(equal(@"OwAAABBoYXNoSWQAGT4WABJtdHUAiVFbAAAAAAACcHJvdG9jb2xWZXJzaW9uAAgAAAAxLjMyLjMyAAA="));
});
});
@@ -45,7 +46,8 @@ describe(@"Test encoding data", ^{
});
it(@"should create the correct data", ^{
- expect(testPayload.data.description).to(equal(@"<c3000000 04766964 656f5365 72766963 65547261 6e73706f 72747300 13000000 10300002 00000010 31000100 00000010 68617368 49640006 120f0012 6d747500 00100000 00000000 04736563 6f6e6461 72795472 616e7370 6f727473 00240000 00023000 09000000 5443505f 57494649 00023100 08000000 4941505f 55534200 00046175 64696f53 65727669 63655472 616e7370 6f727473 000c0000 00103000 02000000 00027072 6f746f63 6f6c5665 7273696f 6e000800 0000352e 31302e30 310000>"));
+ NSString *base64Encoded = [testPayload.data base64EncodedStringWithOptions:0];
+ expect(base64Encoded).to(equal(@"wwAAAAR2aWRlb1NlcnZpY2VUcmFuc3BvcnRzABMAAAAQMAACAAAAEDEAAQAAAAAQaGFzaElkAAYSDwASbXR1AAAQAAAAAAAABHNlY29uZGFyeVRyYW5zcG9ydHMAJAAAAAIwAAkAAABUQ1BfV0lGSQACMQAIAAAASUFQX1VTQgAABGF1ZGlvU2VydmljZVRyYW5zcG9ydHMADAAAABAwAAIAAAAAAnByb3RvY29sVmVyc2lvbgAIAAAANS4xMC4wMQAA"));
});
});
diff --git a/SmartDeviceLinkTests/ProtocolSpecs/SDLControlFramePayloadRPCStartServiceSpec.m b/SmartDeviceLinkTests/ProtocolSpecs/SDLControlFramePayloadRPCStartServiceSpec.m
index f39204330..b021c4057 100644
--- a/SmartDeviceLinkTests/ProtocolSpecs/SDLControlFramePayloadRPCStartServiceSpec.m
+++ b/SmartDeviceLinkTests/ProtocolSpecs/SDLControlFramePayloadRPCStartServiceSpec.m
@@ -21,7 +21,8 @@ describe(@"Test encoding data", ^{
});
it(@"should create the correct data", ^{
- expect(testPayload.data.description).to(equal(@"<22000000 0270726f 746f636f 6c566572 73696f6e 00080000 0037342e 33322e32 0000>"));
+ NSString *base64Encoded = [testPayload.data base64EncodedStringWithOptions:0];
+ expect(base64Encoded).to(equal(@"IgAAAAJwcm90b2NvbFZlcnNpb24ACAAAADc0LjMyLjIAAA=="));
});
});
diff --git a/SmartDeviceLinkTests/RPCSpecs/EnumSpecs/SDLGlobalProperySpec.m b/SmartDeviceLinkTests/RPCSpecs/EnumSpecs/SDLGlobalProperySpec.m
index 34d2c4fb6..ecdf7bece 100644
--- a/SmartDeviceLinkTests/RPCSpecs/EnumSpecs/SDLGlobalProperySpec.m
+++ b/SmartDeviceLinkTests/RPCSpecs/EnumSpecs/SDLGlobalProperySpec.m
@@ -21,6 +21,7 @@ describe(@"Individual Enum Value Tests", ^ {
expect(SDLGlobalPropertyMenuName).to(equal(@"MENUNAME"));
expect(SDLGlobalPropertyMenuIcon).to(equal(@"MENUICON"));
expect(SDLGlobalPropertyKeyboard).to(equal(@"KEYBOARDPROPERTIES"));
+ expect(SDLGlobalPropertyUserLocation).to(equal(@"USER_LOCATION"));
});
});
diff --git a/SmartDeviceLinkTests/RPCSpecs/RequestSpecs/SDLAlertSpec.m b/SmartDeviceLinkTests/RPCSpecs/RequestSpecs/SDLAlertSpec.m
index 22fc58cba..ec30bbbd9 100644
--- a/SmartDeviceLinkTests/RPCSpecs/RequestSpecs/SDLAlertSpec.m
+++ b/SmartDeviceLinkTests/RPCSpecs/RequestSpecs/SDLAlertSpec.m
@@ -2,9 +2,6 @@
// SDLAlertSpec.m
// SmartDeviceLink
-
-#import <Foundation/Foundation.h>
-
#import <Quick/Quick.h>
#import <Nimble/Nimble.h>
@@ -17,310 +14,323 @@
QuickSpecBegin(SDLAlertSpec)
-SDLTTSChunk *tts = [[SDLTTSChunk alloc] init];
-SDLSoftButton *button = [[SDLSoftButton alloc] init];
-SDLImage *testImage = [[SDLImage alloc] initWithName:@"testImage" isTemplate:YES];
-
-describe(@"Alert spec", ^{
- UInt16 defaultDuration = 5000;
-
- NSString *testText1 = @"Test Text 1";
- NSString *testText2 = @"Test Text 2";
- NSString *testText3 = @"Test Text 3";
- NSString *testTTSString = @"Test TTS";
- BOOL testPlayTone = YES;
- BOOL testProgressIndicator = YES;
- UInt16 testDuration = 7847;
-
- describe(@"initializer tests", ^{
- it(@"should initialize correctly with initWithAlertText1:alertText2:duration:", ^{
-#pragma clang diagnostic push
-#pragma clang diagnostic ignored "-Wdeprecated-declarations"
- SDLAlert *testAlert = [[SDLAlert alloc] initWithAlertText1:testText1 alertText2:testText2 duration:testDuration];
-#pragma clang diagnostic pop
-
- expect(testAlert.alertText1).to(equal(testText1));
- expect(testAlert.alertText2).to(equal(testText2));
- expect(testAlert.alertText3).to(beNil());
- expect(testAlert.ttsChunks).to(beNil());
- expect(testAlert.duration).to(equal(testDuration));
- expect(testAlert.playTone).to(beFalse());
- expect(testAlert.progressIndicator).to(beFalse());
- expect(testAlert.softButtons).to(beNil());
- expect(testAlert.alertIcon).to(beNil());
- });
+static UInt16 const SDLDefaultDuration = 5000;
+
+describe(@"Getter/Setter Tests", ^ {
+ __block SDLAlert *testRequest = nil;
+ __block NSString *testAlertText1 = @"alert#1";
+ __block NSString *testAlertText2 = @"alert#2";
+ __block NSString *testAlertText3 = @"alert#3";
+ __block int testDuration = 45;
+ __block BOOL testPlayTone = YES;
+ __block BOOL testProgressIndicator = NO;
+ __block NSArray<SDLSoftButton *> *testSoftButtons = nil;
+ __block NSArray<SDLTTSChunk *> *testTTSChunks = nil;
+ __block NSString *testTTSString = nil;
+ __block SDLImage *testImage = nil;
+ __block int testCancelID = 456;
+
+ beforeEach(^{
+ testTTSChunks = @[[[SDLTTSChunk alloc] init]];
+ testTTSString = @"Hello World";
+ testSoftButtons = @[[[SDLSoftButton alloc] init]];
+ testImage = [[SDLImage alloc] initWithStaticIconName:SDLStaticIconNameBack];
+ });
- it(@"should initialize correctly with initWithAlertText1:alertText2:alertText3:", ^{
-#pragma clang diagnostic push
-#pragma clang diagnostic ignored "-Wdeprecated-declarations"
- SDLAlert *testAlert = [[SDLAlert alloc] initWithAlertText1:testText1 alertText2:testText2 alertText3:testText3];
-#pragma clang diagnostic pop
-
- expect(testAlert.alertText1).to(equal(testText1));
- expect(testAlert.alertText2).to(equal(testText2));
- expect(testAlert.alertText3).to(equal(testText3));
- expect(testAlert.ttsChunks).to(beNil());
- expect(testAlert.duration).to(equal(defaultDuration));
- expect(testAlert.playTone).to(beFalse());
- expect(testAlert.progressIndicator).to(beFalse());
- expect(testAlert.softButtons).to(beNil());
- expect(testAlert.alertIcon).to(beNil());
- });
+ context(@"Getter/Setter Tests", ^{
+ it(@"Should set and get correctly", ^{
+ testRequest = [[SDLAlert alloc] init];
+
+ testRequest.alertText1 = testAlertText1;
+ testRequest.alertText2 = testAlertText2;
+ testRequest.alertText3 = testAlertText3;
+ testRequest.ttsChunks = testTTSChunks;
+ testRequest.duration = @(testDuration);
+ testRequest.playTone = @(testPlayTone);
+ testRequest.progressIndicator = @(testProgressIndicator);
+ testRequest.softButtons = testSoftButtons;
+ testRequest.alertIcon = testImage;
+ testRequest.cancelID = @(testCancelID);
+
+ expect(testRequest.alertText1).to(equal(testAlertText1));
+ expect(testRequest.alertText2).to(equal(testAlertText2));
+ expect(testRequest.alertText3).to(equal(testAlertText3));
+ expect(testRequest.ttsChunks).to(equal(testTTSChunks));
+ expect(testRequest.duration).to(equal(testDuration));
+ expect(testRequest.playTone).to(equal(testPlayTone));
+ expect(testRequest.progressIndicator).to(equal(testProgressIndicator));
+ expect(testRequest.softButtons).to(equal(testSoftButtons));
+ expect(testRequest.alertIcon).to(equal(testImage));
+ expect(testRequest.cancelID).to(equal(testCancelID));
- it(@"should initialize correctly with initWithAlertText1:alertText2:alertText3:duration:", ^{
-#pragma clang diagnostic push
-#pragma clang diagnostic ignored "-Wdeprecated-declarations"
- SDLAlert *testAlert = [[SDLAlert alloc] initWithAlertText1:testText1 alertText2:testText2 alertText3:testText3 duration:testDuration];
-#pragma clang diagnostic pop
-
- expect(testAlert.alertText1).to(equal(testText1));
- expect(testAlert.alertText2).to(equal(testText2));
- expect(testAlert.alertText3).to(equal(testText3));
- expect(testAlert.ttsChunks).to(beNil());
- expect(testAlert.duration).to(equal(testDuration));
- expect(testAlert.playTone).to(beFalse());
- expect(testAlert.progressIndicator).to(beFalse());
- expect(testAlert.softButtons).to(beNil());
- expect(testAlert.alertIcon).to(beNil());
+ expect(testRequest.parameters.count).to(equal(10));
});
- it(@"should initialize correctly with initWithAlertText1:alertText2:alertText3:duration:softButtons:", ^{
-#pragma clang diagnostic push
-#pragma clang diagnostic ignored "-Wdeprecated-declarations"
- SDLAlert *testAlert = [[SDLAlert alloc] initWithAlertText1:testText1 alertText2:testText2 alertText3:testText3 duration:testDuration softButtons:@[button]];
-#pragma clang diagnostic pop
-
- expect(testAlert.alertText1).to(equal(testText1));
- expect(testAlert.alertText2).to(equal(testText2));
- expect(testAlert.alertText3).to(equal(testText3));
- expect(testAlert.ttsChunks).to(beNil());
- expect(testAlert.duration).to(equal(testDuration));
- expect(testAlert.playTone).to(beFalse());
- expect(testAlert.progressIndicator).to(beFalse());
- expect(testAlert.softButtons).to(haveCount(1));
- expect(testAlert.alertIcon).to(beNil());
- });
+ it(@"Should return nil if not set", ^{
+ testRequest = [[SDLAlert alloc] init];
- it(@"should initialize correctly with initWithTTS:alertText1:alertText2:playTone:duration:", ^{
-#pragma clang diagnostic push
-#pragma clang diagnostic ignored "-Wdeprecated-declarations"
- SDLAlert *testAlert = [[SDLAlert alloc] initWithTTS:testTTSString alertText1:testText1 alertText2:testText2 playTone:testPlayTone duration:testDuration];
-#pragma clang diagnostic pop
-
- expect(testAlert.alertText1).to(equal(testText1));
- expect(testAlert.alertText2).to(equal(testText2));
- expect(testAlert.alertText3).to(beNil());
- expect(testAlert.ttsChunks.firstObject.text).to(equal(testTTSString));
- expect(testAlert.duration).to(equal(testDuration));
- expect(testAlert.playTone).to(beTrue());
- expect(testAlert.progressIndicator).to(beFalse());
- expect(testAlert.softButtons).to(beNil());
- expect(testAlert.alertIcon).to(beNil());
+ expect(testRequest.alertText1).to(beNil());
+ expect(testRequest.alertText2).to(beNil());
+ expect(testRequest.alertText3).to(beNil());
+ expect(testRequest.ttsChunks).to(beNil());
+ expect(testRequest.duration).to(beNil());
+ expect(testRequest.playTone).to(beNil());
+ expect(testRequest.progressIndicator).to(beNil());
+ expect(testRequest.softButtons).to(beNil());
+ expect(testRequest.alertIcon).to(beNil());
+ expect(testRequest.cancelID).to(beNil());
+
+ expect(testRequest.parameters.count).to(equal(0));
});
+ });
+
+ describe(@"Initializing", ^{
+ it(@"Should initialize correctly with a dictionary", ^{
+ NSDictionary<NSString *, id> *dict = @{SDLRPCParameterNameRequest:
+ @{SDLRPCParameterNameParameters:
+ @{SDLRPCParameterNameAlertText1:testAlertText1,
+ SDLRPCParameterNameAlertText2:testAlertText2,
+ SDLRPCParameterNameAlertText3:testAlertText3,
+ SDLRPCParameterNameTTSChunks:testTTSChunks,
+ SDLRPCParameterNameDuration:@(testDuration),
+ SDLRPCParameterNamePlayTone:@(testPlayTone),
+ SDLRPCParameterNameProgressIndicator:@(testProgressIndicator),
+ SDLRPCParameterNameSoftButtons:testSoftButtons,
+ SDLRPCParameterNameAlertIcon:testImage,
+ SDLRPCParameterNameCancelID:@(testCancelID)},
+ SDLRPCParameterNameOperationName:SDLRPCFunctionNameAlert}};
+ #pragma clang diagnostic push
+ #pragma clang diagnostic ignored "-Wdeprecated-declarations"
+ testRequest = [[SDLAlert alloc] initWithDictionary:dict];
+ #pragma clang diagnostic pop
+
+ expect(testRequest.alertText1).to(equal(testAlertText1));
+ expect(testRequest.alertText2).to(equal(testAlertText2));
+ expect(testRequest.alertText3).to(equal(testAlertText3));
+ expect(testRequest.ttsChunks).to(equal(testTTSChunks));
+ expect(testRequest.duration).to(equal(testDuration));
+ expect(testRequest.playTone).to(equal(testPlayTone));
+ expect(testRequest.progressIndicator).to(equal(testProgressIndicator));
+ expect(testRequest.softButtons).to(equal(testSoftButtons));
+ expect(testRequest.alertIcon).to(equal(testImage));
+ expect(testRequest.cancelID).to(equal(testCancelID));
- it(@"should initialize correctly with initWithTTS:alertText1:alertText2:alertText3:playTone:duration:", ^{
-#pragma clang diagnostic push
-#pragma clang diagnostic ignored "-Wdeprecated-declarations"
- SDLAlert *testAlert = [[SDLAlert alloc] initWithTTS:testTTSString alertText1:testText1 alertText2:testText2 alertText3:testText3 playTone:testPlayTone duration:testDuration];
-#pragma clang diagnostic pop
-
- expect(testAlert.alertText1).to(equal(testText1));
- expect(testAlert.alertText2).to(equal(testText2));
- expect(testAlert.alertText3).to(equal(testText3));
- expect(testAlert.ttsChunks.firstObject.text).to(equal(testTTSString));
- expect(testAlert.duration).to(equal(testDuration));
- expect(testAlert.playTone).to(equal(testPlayTone));
- expect(testAlert.progressIndicator).to(beFalse());
- expect(testAlert.softButtons).to(beNil());
- expect(testAlert.alertIcon).to(beNil());
+ expect(testRequest.parameters.count).to(equal(10));
});
- it(@"should initialize correctly with initWithTTS:playTone:", ^{
-#pragma clang diagnostic push
-#pragma clang diagnostic ignored "-Wdeprecated-declarations"
- SDLAlert *testAlert = [[SDLAlert alloc] initWithTTS:testTTSString playTone:testPlayTone];
-#pragma clang diagnostic pop
-
- expect(testAlert.alertText1).to(beNil());
- expect(testAlert.alertText2).to(beNil());
- expect(testAlert.alertText3).to(beNil());
- expect(testAlert.ttsChunks.firstObject.text).to(equal(testTTSString));
- expect(testAlert.duration).to(equal(defaultDuration));
- expect(testAlert.playTone).to(equal(testPlayTone));
- expect(testAlert.progressIndicator).to(beFalse());
- expect(testAlert.softButtons).to(beNil());
- expect(testAlert.alertIcon).to(beNil());
+ it(@"Should initialize correctly with initWithAlertText:softButtons:playTone:ttsChunks:cancelID:", ^{
+ testRequest = [[SDLAlert alloc] initWithAlertText:testAlertText1 softButtons:testSoftButtons playTone:testPlayTone ttsChunks:testTTSChunks alertIcon:testImage cancelID:testCancelID];
+
+ expect(testRequest.alertText1).to(equal(testAlertText1));
+ expect(testRequest.alertText2).to(beNil());
+ expect(testRequest.alertText3).to(beNil());
+ expect(testRequest.ttsChunks).to(equal(testTTSChunks));
+ expect(testRequest.duration).to(beNil());
+ expect(testRequest.playTone).to(equal(testPlayTone));
+ expect(testRequest.progressIndicator).to(beFalse());
+ expect(testRequest.softButtons).to(equal(testSoftButtons));
+ expect(testRequest.alertIcon).to(equal(testImage));
+ expect(testRequest.cancelID).to(equal(testCancelID));
});
- it(@"should initialize correctly with initWithTTSChunks:alertText1:alertText2:alertText3:playTone:softButtons:", ^{
-#pragma clang diagnostic push
-#pragma clang diagnostic ignored "-Wdeprecated-declarations"
- SDLAlert *testAlert = [[SDLAlert alloc] initWithTTSChunks:@[tts] alertText1:testText1 alertText2:testText2 alertText3:testText3 playTone:testPlayTone softButtons:@[button]];
-#pragma clang diagnostic pop
-
- expect(testAlert.alertText1).to(equal(testText1));
- expect(testAlert.alertText2).to(equal(testText2));
- expect(testAlert.alertText3).to(equal(testText3));
- expect(testAlert.ttsChunks).to(haveCount(1));
- expect(testAlert.duration).to(equal(defaultDuration));
- expect(testAlert.playTone).to(equal(testPlayTone));
- expect(testAlert.progressIndicator).to(beFalse());
- expect(testAlert.softButtons).to(haveCount(1));
- expect(testAlert.alertIcon).to(beNil());
+ it(@"Should initialize correctly with initWithAlertText:softButtons:playTone:ttsChunks:cancelID:", ^{
+ testRequest = [[SDLAlert alloc] initWithAlertText1:testAlertText1 alertText2:testAlertText2 alertText3:testAlertText3 softButtons:testSoftButtons playTone:testPlayTone ttsChunks:testTTSChunks duration:testDuration progressIndicator:testProgressIndicator alertIcon:testImage cancelID:testCancelID];
+
+ expect(testRequest.alertText1).to(equal(testAlertText1));
+ expect(testRequest.alertText2).to(equal(testAlertText2));
+ expect(testRequest.alertText3).to(equal(testAlertText3));
+ expect(testRequest.ttsChunks).to(equal(testTTSChunks));
+ expect(testRequest.duration).to(equal(testDuration));
+ expect(testRequest.playTone).to(equal(testPlayTone));
+ expect(testRequest.progressIndicator).to(equal(testProgressIndicator));
+ expect(testRequest.softButtons).to(equal(testSoftButtons));
+ expect(testRequest.alertIcon).to(equal(testImage));
+ expect(testRequest.cancelID).to(equal(testCancelID));
});
- it(@"should initialize correctly with initWithTTSChunks:alertText1:alertText2:alertText3:playTone:duration:softButtons:", ^{
-#pragma clang diagnostic push
-#pragma clang diagnostic ignored "-Wdeprecated-declarations"
- SDLAlert *testAlert = [[SDLAlert alloc] initWithTTSChunks:@[tts] alertText1:testText1 alertText2:testText2 alertText3:testText3 playTone:testPlayTone duration:testDuration softButtons:@[button]];
-#pragma clang diagnostic pop
-
- expect(testAlert.alertText1).to(equal(testText1));
- expect(testAlert.alertText2).to(equal(testText2));
- expect(testAlert.alertText3).to(equal(testText3));
- expect(testAlert.ttsChunks).to(haveCount(1));
- expect(testAlert.duration).to(equal(testDuration));
- expect(testAlert.playTone).to(equal(testPlayTone));
- expect(testAlert.progressIndicator).to(beFalse());
- expect(testAlert.softButtons).to(haveCount(1));
- expect(testAlert.alertIcon).to(beNil());
+ it(@"Should initialize correctly with initWithAlertText1:alertText2:duration:", ^{
+ #pragma clang diagnostic push
+ #pragma clang diagnostic ignored "-Wdeprecated-declarations"
+ testRequest = [[SDLAlert alloc] initWithAlertText1:testAlertText1 alertText2:testAlertText2 duration:testDuration];
+ #pragma clang diagnostic pop
+
+ expect(testRequest.alertText1).to(equal(testAlertText1));
+ expect(testRequest.alertText2).to(equal(testAlertText2));
+ expect(testRequest.alertText3).to(beNil());
+ expect(testRequest.ttsChunks).to(beNil());
+ expect(testRequest.duration).to(equal(testDuration));
+ expect(testRequest.playTone).to(beFalse());
+ expect(testRequest.progressIndicator).to(beFalse());
+ expect(testRequest.softButtons).to(beNil());
+ expect(testRequest.alertIcon).to(beNil());
+ expect(testRequest.cancelID).to(beNil());
});
- it(@"should initialize correctly with initWithAlertText1:alertText2:", ^{
- SDLAlert *testAlert = [[SDLAlert alloc] initWithAlertText1:testText1 alertText2:testText2];
-
- expect(testAlert.alertText1).to(equal(testText1));
- expect(testAlert.alertText2).to(equal(testText2));
- expect(testAlert.alertText3).to(beNil());
- expect(testAlert.ttsChunks).to(beNil());
- expect(testAlert.duration).to(equal(defaultDuration));
- expect(testAlert.playTone).to(beFalse());
- expect(testAlert.progressIndicator).to(beFalse());
- expect(testAlert.softButtons).to(beNil());
- expect(testAlert.alertIcon).to(beNil());
+ it(@"Should initialize correctly with initWithAlertText1:alertText2:alertText3:", ^{
+ #pragma clang diagnostic push
+ #pragma clang diagnostic ignored "-Wdeprecated-declarations"
+ testRequest = [[SDLAlert alloc] initWithAlertText1:testAlertText1 alertText2:testAlertText2 alertText3:testAlertText3];
+ #pragma clang diagnostic pop
+
+ expect(testRequest.alertText1).to(equal(testAlertText1));
+ expect(testRequest.alertText2).to(equal(testAlertText2));
+ expect(testRequest.alertText3).to(equal(testAlertText3));
+ expect(testRequest.ttsChunks).to(beNil());
+ expect(testRequest.duration).to(equal(SDLDefaultDuration));
+ expect(testRequest.playTone).to(beFalse());
+ expect(testRequest.progressIndicator).to(beFalse());
+ expect(testRequest.softButtons).to(beNil());
+ expect(testRequest.alertIcon).to(beNil());
+ expect(testRequest.cancelID).to(beNil());
});
- it(@"should initialize correctly with initWithTTSChunks:playTone:", ^{
- SDLAlert *testAlert = [[SDLAlert alloc] initWithTTSChunks:@[tts] playTone:testPlayTone];
-
- expect(testAlert.alertText1).to(beNil());
- expect(testAlert.alertText2).to(beNil());
- expect(testAlert.alertText3).to(beNil());
- expect(testAlert.ttsChunks).to(haveCount(1));
- expect(testAlert.duration).to(equal(defaultDuration));
- expect(testAlert.playTone).to(equal(testPlayTone));
- expect(testAlert.progressIndicator).to(beFalse());
- expect(testAlert.softButtons).to(beNil());
- expect(testAlert.alertIcon).to(beNil());
+ it(@"Should initialize correctly with initWithAlertText1:alertText2:alertText3:duration", ^{
+ #pragma clang diagnostic push
+ #pragma clang diagnostic ignored "-Wdeprecated-declarations"
+ testRequest = [[SDLAlert alloc] initWithAlertText1:testAlertText1 alertText2:testAlertText2 alertText3:testAlertText3 duration:testDuration];
+ #pragma clang diagnostic pop
+
+ expect(testRequest.alertText1).to(equal(testAlertText1));
+ expect(testRequest.alertText2).to(equal(testAlertText2));
+ expect(testRequest.alertText3).to(equal(testAlertText3));
+ expect(testRequest.ttsChunks).to(beNil());
+ expect(testRequest.duration).to(equal(testDuration));
+ expect(testRequest.playTone).to(beFalse());
+ expect(testRequest.progressIndicator).to(beFalse());
+ expect(testRequest.softButtons).to(beNil());
+ expect(testRequest.alertIcon).to(beNil());
+ expect(testRequest.cancelID).to(beNil());
});
- it(@"should initialize correctly with initWithAlertText1:alertText2:alertText3:ttsChunks:playTone:progressIndicator:duration:softButtons:alertIcon:", ^{
- SDLAlert *testAlert = [[SDLAlert alloc] initWithAlertText1:testText1 alertText2:testText2 alertText3:testText3 ttsChunks:@[tts] playTone:testPlayTone progressIndicator:testProgressIndicator duration:testDuration softButtons:@[button] alertIcon:testImage];
-
- expect(testAlert.alertText1).to(equal(testText1));
- expect(testAlert.alertText2).to(equal(testText2));
- expect(testAlert.alertText3).to(equal(testText3));
- expect(testAlert.ttsChunks).to(haveCount(1));
- expect(testAlert.duration).to(equal(testDuration));
- expect(testAlert.playTone).to(equal(testPlayTone));
- expect(testAlert.progressIndicator).to(beTrue());
- expect(testAlert.softButtons).to(haveCount(1));
- expect(testAlert.alertIcon.value).to(equal(testImage.value));
+ it(@"Should initialize correctly with initWithAlertText1:alertText2:alertText3:duration:softButtons:", ^{
+ #pragma clang diagnostic push
+ #pragma clang diagnostic ignored "-Wdeprecated-declarations"
+ testRequest = [[SDLAlert alloc] initWithAlertText1:testAlertText1 alertText2:testAlertText2 alertText3:testAlertText3 duration:testDuration softButtons:testSoftButtons];
+ #pragma clang diagnostic pop
+
+ expect(testRequest.alertText1).to(equal(testAlertText1));
+ expect(testRequest.alertText2).to(equal(testAlertText2));
+ expect(testRequest.alertText3).to(equal(testAlertText3));
+ expect(testRequest.ttsChunks).to(beNil());
+ expect(testRequest.duration).to(equal(testDuration));
+ expect(testRequest.playTone).to(beFalse());
+ expect(testRequest.progressIndicator).to(beFalse());
+ expect(testRequest.softButtons).to(equal(testSoftButtons));
+ expect(testRequest.alertIcon).to(beNil());
+ expect(testRequest.cancelID).to(beNil());
});
- });
- describe(@"Getter/Setter Tests", ^ {
- it(@"Should set and get correctly", ^ {
- SDLAlert* testRequest = [[SDLAlert alloc] init];
-
- testRequest.alertText1 = @"alert#1";
- testRequest.alertText2 = @"alert#2";
- testRequest.alertText3 = @"alert#3";
- testRequest.ttsChunks = @[tts];
- testRequest.duration = @4357;
- testRequest.playTone = @YES;
- testRequest.progressIndicator = @NO;
- testRequest.softButtons = @[button];
- testRequest.alertIcon = testImage;
+ it(@"Should initialize correctly with initWithTTS:playTone:", ^{
+ #pragma clang diagnostic push
+ #pragma clang diagnostic ignored "-Wdeprecated-declarations"
+ testRequest = [[SDLAlert alloc] initWithTTS:testTTSString playTone:testPlayTone];
+ #pragma clang diagnostic pop
- expect(testRequest.alertText1).to(equal(@"alert#1"));
- expect(testRequest.alertText2).to(equal(@"alert#2"));
- expect(testRequest.alertText3).to(equal(@"alert#3"));
- expect(testRequest.ttsChunks).to(equal(@[tts]));
- expect(testRequest.duration).to(equal(@4357));
- expect(testRequest.playTone).to(equal(@YES));
- expect(testRequest.progressIndicator).to(equal(@NO));
- expect(testRequest.softButtons).to(equal(@[button]));
- expect(testRequest.alertIcon).to(equal(testImage));
+ expect(testRequest.alertText1).to(beNil());
+ expect(testRequest.alertText2).to(beNil());
+ expect(testRequest.alertText3).to(beNil());
+ expect(testRequest.ttsChunks).to(equal([SDLTTSChunk textChunksFromString:testTTSString]));
+ expect(testRequest.duration).to(equal(SDLDefaultDuration));
+ expect(testRequest.playTone).to(equal(testPlayTone));
+ expect(testRequest.progressIndicator).to(beFalse());
+ expect(testRequest.softButtons).to(beNil());
+ expect(testRequest.alertIcon).to(beNil());
+ expect(testRequest.cancelID).to(beNil());
});
- it(@"Should get correctly when initialized", ^ {
- NSDictionary<NSString *, id> *dict = @{SDLRPCParameterNameRequest:
- @{SDLRPCParameterNameParameters:
- @{SDLRPCParameterNameAlertText1: @"alert#1",
- SDLRPCParameterNameAlertText2: @"alert#2",
- SDLRPCParameterNameAlertText3: @"alert#3",
- SDLRPCParameterNameTTSChunks: @[tts],
- SDLRPCParameterNameDuration: @4357,
- SDLRPCParameterNamePlayTone: @YES,
- SDLRPCParameterNameProgressIndicator: @NO,
- SDLRPCParameterNameSoftButtons: @[button],
- SDLRPCParameterNameAlertIcon: testImage
- },
- SDLRPCParameterNameOperationName: SDLRPCFunctionNameAlert
- }
- };
-#pragma clang diagnostic push
-#pragma clang diagnostic ignored "-Wdeprecated-declarations"
- SDLAlert* testRequest = [[SDLAlert alloc] initWithDictionary:dict];
-#pragma clang diagnostic pop
-
- expect(testRequest.alertText1).to(equal(@"alert#1"));
- expect(testRequest.alertText2).to(equal(@"alert#2"));
- expect(testRequest.alertText3).to(equal(@"alert#3"));
- expect(testRequest.ttsChunks).to(equal([@[tts] mutableCopy]));
- expect(testRequest.duration).to(equal(@4357));
- expect(testRequest.playTone).to(equal(@YES));
- expect(testRequest.progressIndicator).to(equal(@NO));
- expect(testRequest.softButtons).to(equal([@[button] mutableCopy]));
+ it(@"Should initialize correctly with initWithTTS:alertText1:alertText2:playTone:duration:", ^{
+ #pragma clang diagnostic push
+ #pragma clang diagnostic ignored "-Wdeprecated-declarations"
+ testRequest = [[SDLAlert alloc] initWithTTS:testTTSString alertText1:testAlertText1 alertText2:testAlertText2 playTone:testPlayTone duration:testDuration];
+ #pragma clang diagnostic pop
+
+ expect(testRequest.alertText1).to(equal(testAlertText1));
+ expect(testRequest.alertText2).to(equal(testAlertText2));
+ expect(testRequest.alertText3).to(beNil());
+ expect(testRequest.ttsChunks).to(equal([SDLTTSChunk textChunksFromString:testTTSString]));
+ expect(testRequest.duration).to(equal(testDuration));
+ expect(testRequest.playTone).to(equal(testPlayTone));
+ expect(testRequest.progressIndicator).to(beFalse());
+ expect(testRequest.softButtons).to(beNil());
+ expect(testRequest.alertIcon).to(beNil());
+ expect(testRequest.cancelID).to(beNil());
});
- it(@"Should handle NSNull", ^{
- NSDictionary* dict = @{SDLRPCParameterNameRequest:
- @{SDLRPCParameterNameParameters:
- @{SDLRPCParameterNameAlertText1: @"alert#1",
- SDLRPCParameterNameAlertText2: @"alert#2",
- SDLRPCParameterNameAlertText3: @"alert#3",
- SDLRPCParameterNameTTSChunks: @[tts],
- SDLRPCParameterNameDuration: @4357,
- SDLRPCParameterNamePlayTone: @YES,
- SDLRPCParameterNameProgressIndicator: @NO,
- SDLRPCParameterNameSoftButtons: [NSNull null],
- SDLRPCParameterNameAlertIcon: testImage
- },
- SDLRPCParameterNameOperationName:SDLRPCFunctionNameAlert}
- };
-#pragma clang diagnostic push
-#pragma clang diagnostic ignored "-Wdeprecated-declarations"
- SDLAlert* testRequest = [[SDLAlert alloc] initWithDictionary:dict];
-#pragma clang diagnostic pop
- expectAction(^{
- NSArray<SDLSoftButton *> *softButtons = testRequest.softButtons;
- }).to(raiseException());
+ it(@"Should initialize correctly with initWithTTS:alertText1:alertText2:alertText3:playTone:duration:", ^{
+ #pragma clang diagnostic push
+ #pragma clang diagnostic ignored "-Wdeprecated-declarations"
+ testRequest = [[SDLAlert alloc] initWithTTS:testTTSString alertText1:testAlertText1 alertText2:testAlertText2 alertText3:testAlertText3 playTone:testPlayTone duration:testDuration];
+ #pragma clang diagnostic pop
+
+ expect(testRequest.alertText1).to(equal(testAlertText1));
+ expect(testRequest.alertText2).to(equal(testAlertText2));
+ expect(testRequest.alertText3).to(equal(testAlertText3));
+ expect(testRequest.ttsChunks).to(equal([SDLTTSChunk textChunksFromString:testTTSString]));
+ expect(testRequest.duration).to(equal(testDuration));
+ expect(testRequest.playTone).to(equal(testPlayTone));
+ expect(testRequest.progressIndicator).to(beFalse());
+ expect(testRequest.softButtons).to(beNil());
+ expect(testRequest.alertIcon).to(beNil());
+ expect(testRequest.cancelID).to(beNil());
});
- it(@"Should return nil if not set", ^ {
- SDLAlert* testRequest = [[SDLAlert alloc] init];
+ it(@"Should initialize correctly with initWithTTSChunks:playTone:", ^{
+ #pragma clang diagnostic push
+ #pragma clang diagnostic ignored "-Wdeprecated-declarations"
+ testRequest = [[SDLAlert alloc] initWithTTSChunks:testTTSChunks playTone:testPlayTone];
+ #pragma clang diagnostic pop
expect(testRequest.alertText1).to(beNil());
expect(testRequest.alertText2).to(beNil());
expect(testRequest.alertText3).to(beNil());
- expect(testRequest.ttsChunks).to(beNil());
+ expect(testRequest.ttsChunks).to(equal(testTTSChunks));
expect(testRequest.duration).to(beNil());
- expect(testRequest.playTone).to(beNil());
- expect(testRequest.progressIndicator).to(beNil());
+ expect(testRequest.playTone).to(equal(testPlayTone));
+ expect(testRequest.progressIndicator).to(beFalse());
expect(testRequest.softButtons).to(beNil());
+ expect(testRequest.alertIcon).to(beNil());
+ expect(testRequest.cancelID).to(beNil());
+ });
+
+ it(@"Should initialize correctly with initWithTTSChunks:alertText1:alertText2:alertText3:playTone:softButtons:", ^{
+ #pragma clang diagnostic push
+ #pragma clang diagnostic ignored "-Wdeprecated-declarations"
+ testRequest = [[SDLAlert alloc] initWithTTSChunks:testTTSChunks alertText1:testAlertText1 alertText2:testAlertText2 alertText3:testAlertText3 playTone:testPlayTone softButtons:testSoftButtons];
+ #pragma clang diagnostic pop
+
+ expect(testRequest.alertText1).to(equal(testAlertText1));
+ expect(testRequest.alertText2).to(equal(testAlertText2));
+ expect(testRequest.alertText3).to(equal(testAlertText3));
+ expect(testRequest.ttsChunks).to(equal(testTTSChunks));
+ expect(testRequest.duration).to(equal(SDLDefaultDuration));
+ expect(testRequest.playTone).to(equal(testPlayTone));
+ expect(testRequest.progressIndicator).to(beFalse());
+ expect(testRequest.softButtons).to(equal(testSoftButtons));
+ expect(testRequest.alertIcon).to(beNil());
+ expect(testRequest.cancelID).to(beNil());
});
+
+ it(@"Should initialize correctly with initWithTTSChunks:alertText1:alertText2:alertText3:playTone:duration:softButtons:", ^{
+ #pragma clang diagnostic push
+ #pragma clang diagnostic ignored "-Wdeprecated-declarations"
+ testRequest = [[SDLAlert alloc] initWithTTSChunks:testTTSChunks alertText1:testAlertText1 alertText2:testAlertText2 alertText3:testAlertText3 playTone:testPlayTone duration:testDuration softButtons:testSoftButtons];
+ #pragma clang diagnostic pop
+
+ expect(testRequest.alertText1).to(equal(testAlertText1));
+ expect(testRequest.alertText2).to(equal(testAlertText2));
+ expect(testRequest.alertText3).to(equal(testAlertText3));
+ expect(testRequest.ttsChunks).to(equal(testTTSChunks));
+ expect(testRequest.duration).to(equal(testDuration));
+ expect(testRequest.playTone).to(equal(testPlayTone));
+ expect(testRequest.progressIndicator).to(beFalse());
+ expect(testRequest.softButtons).to(equal(testSoftButtons));
+ expect(testRequest.alertIcon).to(beNil());
+ expect(testRequest.cancelID).to(beNil());
+ });
+ });
+
+ afterEach(^{
+ expect(testRequest.name).to(equal(SDLRPCFunctionNameAlert));
});
});
diff --git a/SmartDeviceLinkTests/RPCSpecs/RequestSpecs/SDLButtonPressSpec.m b/SmartDeviceLinkTests/RPCSpecs/RequestSpecs/SDLButtonPressSpec.m
index 648d4cbc9..f4c4c8a75 100644
--- a/SmartDeviceLinkTests/RPCSpecs/RequestSpecs/SDLButtonPressSpec.m
+++ b/SmartDeviceLinkTests/RPCSpecs/RequestSpecs/SDLButtonPressSpec.m
@@ -22,10 +22,12 @@ describe(@"Getter/Setter Tests", ^ {
SDLButtonPress* testRequest = [[SDLButtonPress alloc] init];
testRequest.moduleType = SDLModuleTypeClimate;
+ testRequest.moduleId = @"123";
testRequest.buttonName = SDLButtonNameAC;
testRequest.buttonPressMode = SDLButtonPressModeShort;
expect(testRequest.moduleType).to(equal(SDLModuleTypeClimate));
+ expect(testRequest.moduleId).to(equal(@"123"));
expect(testRequest.buttonName).to(equal(SDLButtonNameAC));
expect(testRequest.buttonPressMode).to(equal(SDLButtonPressModeShort));
@@ -36,7 +38,9 @@ describe(@"Getter/Setter Tests", ^ {
@{SDLRPCParameterNameParameters:
@{SDLRPCParameterNameModuleType : SDLModuleTypeClimate,
SDLRPCParameterNameButtonName : SDLButtonNameAC,
- SDLRPCParameterNameButtonPressMode : SDLButtonPressModeShort},
+ SDLRPCParameterNameButtonPressMode : SDLButtonPressModeShort,
+ SDLRPCParameterNameModuleId:@"123"
+ },
SDLRPCParameterNameOperationName:SDLRPCFunctionNameButtonPress}} mutableCopy];
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
@@ -44,6 +48,7 @@ describe(@"Getter/Setter Tests", ^ {
#pragma clang diagnostic pop
expect(testRequest.moduleType).to(equal(SDLModuleTypeClimate));
+ expect(testRequest.moduleId).to(equal(@"123"));
expect(testRequest.buttonName).to(equal(SDLButtonNameAC));
expect(testRequest.buttonPressMode).to(equal(SDLButtonPressModeShort));
});
@@ -53,12 +58,14 @@ describe(@"Getter/Setter Tests", ^ {
expect(testRequest.buttonName).to(equal(SDLButtonNameAC));
expect(testRequest.moduleType).to(equal(SDLModuleTypeClimate));
+ expect(testRequest.moduleId).to(beNil());
});
it(@"Should return nil if not set", ^ {
SDLButtonPress* testRequest = [[SDLButtonPress alloc] init];
expect(testRequest.moduleType).to(beNil());
+ expect(testRequest.moduleId).to(beNil());
expect(testRequest.buttonName).to(beNil());
expect(testRequest.buttonPressMode).to(beNil());
});
diff --git a/SmartDeviceLinkTests/RPCSpecs/RequestSpecs/SDLCancelInteractionSpec.m b/SmartDeviceLinkTests/RPCSpecs/RequestSpecs/SDLCancelInteractionSpec.m
new file mode 100644
index 000000000..c36c5de29
--- /dev/null
+++ b/SmartDeviceLinkTests/RPCSpecs/RequestSpecs/SDLCancelInteractionSpec.m
@@ -0,0 +1,142 @@
+//
+// SDLCancelInteractionSpec.m
+// SmartDeviceLinkTests
+//
+// Created by Nicole on 7/12/19.
+// Copyright © 2019 smartdevicelink. All rights reserved.
+//
+
+#import <Quick/Quick.h>
+#import <Nimble/Nimble.h>
+
+#import "SDLCancelInteraction.h"
+#import "SDLFunctionID.h"
+#import "SDLRPCFunctionNames.h"
+#import "SDLRPCParameterNames.h"
+
+QuickSpecBegin(SDLCancelInteractionSpec)
+
+describe(@"Getter/Setter Tests", ^{
+ __block SDLCancelInteraction *testRequest = nil;
+ __block UInt32 testFunctionID = 45;
+ __block UInt32 testCancelID = 23;
+
+ it(@"Should set and get correctly", ^{
+ testRequest = [[SDLCancelInteraction alloc] init];
+ testRequest.cancelID = @(testCancelID);
+ testRequest.functionID = @(testFunctionID);
+
+ expect(testRequest.cancelID).to(equal(testCancelID));
+ expect(testRequest.functionID).to(equal(testFunctionID));
+
+ expect(testRequest.name).to(match(SDLRPCFunctionNameCancelInteraction));
+ expect(testRequest.parameters.count).to(equal(2));
+ });
+
+ it(@"Should return nil if not set", ^{
+ testRequest = [[SDLCancelInteraction alloc] init];
+
+ expect(testRequest.cancelID).to(beNil());
+ expect(testRequest.functionID).to(beNil());
+
+ expect(testRequest.parameters.count).to(equal(0));
+ });
+
+ describe(@"initializing", ^{
+ it(@"Should initialize correctly with a dictionary", ^{
+ NSDictionary *dict = @{SDLRPCParameterNameRequest:@{
+ SDLRPCParameterNameParameters:@{
+ SDLRPCParameterNameCancelID:@(testCancelID),
+ SDLRPCParameterNameFunctionID:@(testFunctionID)
+ },
+ SDLRPCParameterNameOperationName:SDLRPCFunctionNameCancelInteraction}};
+ #pragma clang diagnostic push
+ #pragma clang diagnostic ignored "-Wdeprecated-declarations"
+ testRequest = [[SDLCancelInteraction alloc] initWithDictionary:dict];
+ #pragma clang diagnostic pop
+
+ expect(testRequest.cancelID).to(equal(testCancelID));
+ expect(testRequest.functionID).to(equal(testFunctionID));
+
+ expect(testRequest.parameters.count).to(equal(2));
+ });
+
+ it(@"Should initialize correctly with initWithfunctionID:", ^{
+ testRequest = [[SDLCancelInteraction alloc] initWithFunctionID:testFunctionID];
+
+ expect(testRequest.functionID).to(equal(testFunctionID));
+ expect(testRequest.cancelID).to(beNil());
+ });
+
+ it(@"Should initialize correctly with initWithfunctionID:cancelID:", ^{
+ testRequest = [[SDLCancelInteraction alloc] initWithFunctionID:testFunctionID cancelID:testCancelID];
+
+ expect(testRequest.functionID).to(equal(testFunctionID));
+ expect(testRequest.cancelID).to(equal(testCancelID));
+ });
+
+ it(@"Should initialize correctly with initWithAlertCancelID:", ^{
+ testRequest = [[SDLCancelInteraction alloc] initWithAlertCancelID:testCancelID];
+
+ expect(testRequest.functionID).to(equal([SDLFunctionID.sharedInstance functionIdForName:SDLRPCFunctionNameAlert]));
+ expect(testRequest.cancelID).to(equal(testCancelID));
+ });
+
+ it(@"Should initialize correctly with initWithSliderCancelID:", ^{
+ testRequest = [[SDLCancelInteraction alloc] initWithSliderCancelID:testCancelID];
+
+ expect(testRequest.functionID).to(equal([SDLFunctionID.sharedInstance functionIdForName:SDLRPCFunctionNameSlider]));
+ expect(testRequest.cancelID).to(equal(testCancelID));
+ });
+
+ it(@"Should initialize correctly with initWithScrollableMessageCancelID:", ^{
+ testRequest = [[SDLCancelInteraction alloc] initWithScrollableMessageCancelID:testCancelID];
+
+ expect(testRequest.functionID).to(equal([SDLFunctionID.sharedInstance functionIdForName:SDLRPCFunctionNameScrollableMessage]));
+ expect(testRequest.cancelID).to(equal(testCancelID));
+ });
+
+ it(@"Should initialize correctly with initWithPerformInteractionCancelID:", ^{
+ testRequest = [[SDLCancelInteraction alloc] initWithPerformInteractionCancelID:testCancelID];
+
+ expect(testRequest.functionID).to(equal([SDLFunctionID.sharedInstance functionIdForName:SDLRPCFunctionNamePerformInteraction]));
+ expect(testRequest.cancelID).to(equal(testCancelID));
+ });
+
+ it(@"Should initialize correctly with alert:", ^{
+ testRequest = [SDLCancelInteraction alert];
+
+ expect(testRequest.functionID).to(equal([SDLFunctionID.sharedInstance functionIdForName:SDLRPCFunctionNameAlert]));
+ expect(testRequest.cancelID).to(beNil());
+ });
+
+ it(@"Should initialize correctly with slider:", ^{
+ testRequest = [SDLCancelInteraction slider];
+
+ expect(testRequest.functionID).to(equal([SDLFunctionID.sharedInstance functionIdForName:SDLRPCFunctionNameSlider]));
+ expect(testRequest.cancelID).to(beNil());
+ });
+
+ it(@"Should initialize correctly with scrollableMessage:", ^{
+ testRequest = [SDLCancelInteraction scrollableMessage];
+
+ expect(testRequest.functionID).to(equal([SDLFunctionID.sharedInstance functionIdForName:SDLRPCFunctionNameScrollableMessage]));
+ expect(testRequest.cancelID).to(beNil());
+ });
+
+ it(@"Should initialize correctly with performInteraction:", ^{
+ testRequest = [SDLCancelInteraction performInteraction];
+
+ expect(testRequest.functionID).to(equal([SDLFunctionID.sharedInstance functionIdForName:SDLRPCFunctionNamePerformInteraction]));
+ expect(testRequest.cancelID).to(beNil());
+ });
+ });
+
+ afterEach(^{
+ expect(testRequest.name).to(match(SDLRPCFunctionNameCancelInteraction));
+ });
+});
+
+QuickSpecEnd
+
+
diff --git a/SmartDeviceLinkTests/RPCSpecs/RequestSpecs/SDLGetInteriorVehicleDataConsentSpec.m b/SmartDeviceLinkTests/RPCSpecs/RequestSpecs/SDLGetInteriorVehicleDataConsentSpec.m
new file mode 100644
index 000000000..bc9d19774
--- /dev/null
+++ b/SmartDeviceLinkTests/RPCSpecs/RequestSpecs/SDLGetInteriorVehicleDataConsentSpec.m
@@ -0,0 +1,61 @@
+//
+// SDLGetInteriorVehicleDataConsentSpec.m
+// SmartDeviceLinkTests
+//
+// Created by standa1 on 7/29/19.
+// Copyright © 2019 smartdevicelink. All rights reserved.
+//
+
+#import <Foundation/Foundation.h>
+
+#import <Quick/Quick.h>
+#import <Nimble/Nimble.h>
+
+#import "SDLGetInteriorVehicleDataConsent.h"
+#import "SDLModuleType.h"
+#import "SDLRPCParameterNames.h"
+#import "SDLRPCFunctionNames.h"
+
+QuickSpecBegin(SDLGetInteriorVehicleDataConsentSpec)
+
+describe(@"Getter/Setter Tests", ^ {
+ it(@"Should set and get correctly", ^ {
+ SDLGetInteriorVehicleDataConsent *testRequest = [[SDLGetInteriorVehicleDataConsent alloc] init];
+ testRequest.moduleType = SDLModuleTypeRadio;
+ testRequest.moduleIds = @[@"123", @"456"];
+
+ expect(testRequest.moduleType).to(equal(SDLModuleTypeRadio));
+ expect(testRequest.moduleIds).to(equal(@[@"123", @"456"]));
+ });
+
+ it(@"Should get correctly when initialized with a dictionary", ^ {
+ NSMutableDictionary<NSString *, id> *dict = [@{SDLRPCParameterNameRequest:
+ @{SDLRPCParameterNameParameters:
+ @{SDLRPCParameterNameModuleType : SDLModuleTypeRadio,
+ SDLRPCParameterNameModuleIds: @[@"123", @"456"]},
+ SDLRPCParameterNameOperationName:SDLRPCFunctionNameGetInteriorVehicleData}} mutableCopy];
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
+ SDLGetInteriorVehicleDataConsent *testRequest = [[SDLGetInteriorVehicleDataConsent alloc] initWithDictionary:dict];
+#pragma clang diagnostic pop
+
+ expect(testRequest.moduleType).to(equal(SDLModuleTypeRadio));
+ expect(testRequest.moduleIds).to(equal(@[@"123", @"456"]));
+ });
+
+ it(@"Should get correctly when initialized with module type and module ids", ^ {
+ SDLGetInteriorVehicleDataConsent *testRequest = [[SDLGetInteriorVehicleDataConsent alloc] initWithModuleType:SDLModuleTypeRadio moduleIds:@[@"123", @"456"]];
+
+ expect(testRequest.moduleType).to(equal(SDLModuleTypeRadio));
+ expect(testRequest.moduleIds).to(equal(@[@"123", @"456"]));
+ });
+
+ it(@"Should return nil if not set", ^ {
+ SDLGetInteriorVehicleDataConsent *testRequest = [[SDLGetInteriorVehicleDataConsent alloc] init];
+
+ expect(testRequest.moduleType).to(beNil());
+ expect(testRequest.moduleIds).to(beNil());
+ });
+});
+
+QuickSpecEnd
diff --git a/SmartDeviceLinkTests/RPCSpecs/RequestSpecs/SDLGetInteriorVehicleDataSpec.m b/SmartDeviceLinkTests/RPCSpecs/RequestSpecs/SDLGetInteriorVehicleDataSpec.m
index d3ed4c409..9801a0e1d 100755
--- a/SmartDeviceLinkTests/RPCSpecs/RequestSpecs/SDLGetInteriorVehicleDataSpec.m
+++ b/SmartDeviceLinkTests/RPCSpecs/RequestSpecs/SDLGetInteriorVehicleDataSpec.m
@@ -20,15 +20,18 @@ describe(@"Getter/Setter Tests", ^ {
SDLGetInteriorVehicleData* testRequest = [[SDLGetInteriorVehicleData alloc] init];
testRequest.moduleType = SDLModuleTypeRadio;
testRequest.subscribe = @YES;
+ testRequest.moduleId = @"123";
expect(testRequest.moduleType).to(equal(SDLModuleTypeRadio));
expect(testRequest.subscribe).to(equal(@YES));
+ expect(testRequest.moduleId).to(equal(@"123"));
});
it(@"Should get correctly when initialized with a dictionary", ^ {
NSMutableDictionary<NSString *, id> *dict = [@{SDLRPCParameterNameRequest:
@{SDLRPCParameterNameParameters:
@{SDLRPCParameterNameModuleType : SDLModuleTypeRadio,
+ SDLRPCParameterNameModuleId: @"123",
SDLRPCParameterNameSubscribe : @YES},
SDLRPCParameterNameOperationName:SDLRPCFunctionNameGetInteriorVehicleData}} mutableCopy];
#pragma clang diagnostic push
@@ -38,12 +41,14 @@ describe(@"Getter/Setter Tests", ^ {
expect(testRequest.moduleType).to(equal(SDLModuleTypeRadio));
expect(testRequest.subscribe).to(equal(@YES));
+ expect(testRequest.moduleId).to(equal(@"123"));
});
it(@"Should get correctly when initialized with module type", ^ {
SDLGetInteriorVehicleData* testRequest = [[SDLGetInteriorVehicleData alloc] initWithModuleType:SDLModuleTypeRadio];
expect(testRequest.moduleType).to(equal(SDLModuleTypeRadio));
+ expect(testRequest.moduleId).to(beNil());
});
it(@"Should get correctly when initialized with module type and subscribe", ^ {
@@ -51,6 +56,7 @@ describe(@"Getter/Setter Tests", ^ {
expect(testRequest.moduleType).to(equal(SDLModuleTypeRadio));
expect(testRequest.subscribe).to(equal(@YES));
+ expect(testRequest.moduleId).to(beNil());
});
it(@"Should get correctly when initialized with module type and unsubscribe", ^ {
@@ -58,6 +64,7 @@ describe(@"Getter/Setter Tests", ^ {
expect(testRequest.moduleType).to(equal(SDLModuleTypeRadio));
expect(testRequest.subscribe).to(equal(@NO));
+ expect(testRequest.moduleId).to(beNil());
});
@@ -66,6 +73,7 @@ describe(@"Getter/Setter Tests", ^ {
expect(testRequest.moduleType).to(beNil());
expect(testRequest.subscribe).to(beNil());
+ expect(testRequest.moduleId).to(beNil());
});
});
diff --git a/SmartDeviceLinkTests/RPCSpecs/RequestSpecs/SDLPerformInteractionSpec.m b/SmartDeviceLinkTests/RPCSpecs/RequestSpecs/SDLPerformInteractionSpec.m
index 6424d27f7..aa28359d3 100644
--- a/SmartDeviceLinkTests/RPCSpecs/RequestSpecs/SDLPerformInteractionSpec.m
+++ b/SmartDeviceLinkTests/RPCSpecs/RequestSpecs/SDLPerformInteractionSpec.m
@@ -18,77 +18,292 @@
QuickSpecBegin(SDLPerformInteractionSpec)
-SDLTTSChunk* chunk1 = [[SDLTTSChunk alloc] init];
-SDLTTSChunk* chunk2 = [[SDLTTSChunk alloc] init];
-SDLTTSChunk* chunk3 = [[SDLTTSChunk alloc] init];
-SDLVRHelpItem* helpItem = [[SDLVRHelpItem alloc] init];
-
describe(@"Getter/Setter Tests", ^ {
- it(@"Should set and get correctly", ^ {
- SDLPerformInteraction* testRequest = [[SDLPerformInteraction alloc] init];
-
- testRequest.initialText = @"a";
- testRequest.initialPrompt = [@[chunk1] mutableCopy];
- testRequest.interactionMode = SDLInteractionModeVoiceRecognitionOnly;
- testRequest.interactionChoiceSetIDList = [@[@1, @2, @3] mutableCopy];
- testRequest.helpPrompt = [@[chunk2] mutableCopy];
- testRequest.timeoutPrompt = [@[chunk3] mutableCopy];
- testRequest.timeout = @42000;
- testRequest.vrHelp = [@[helpItem] mutableCopy];
- testRequest.interactionLayout = SDLLayoutModeIconWithSearch;
-
- expect(testRequest.initialText).to(equal(@"a"));
- expect(testRequest.initialPrompt).to(equal([@[chunk1] mutableCopy]));
- expect(testRequest.interactionMode).to(equal(SDLInteractionModeVoiceRecognitionOnly));
- expect(testRequest.interactionChoiceSetIDList).to(equal([@[@1, @2, @3] mutableCopy]));
- expect(testRequest.helpPrompt).to(equal([@[chunk2] mutableCopy]));
- expect(testRequest.timeoutPrompt).to(equal([@[chunk3] mutableCopy]));
- expect(testRequest.timeout).to(equal(@42000));
- expect(testRequest.vrHelp).to(equal([@[helpItem] mutableCopy]));
- expect(testRequest.interactionLayout).to(equal(SDLLayoutModeIconWithSearch));
+ __block SDLPerformInteraction *testRequest = nil;
+ __block NSString *testInitialText = @"initialText";
+ __block NSArray<SDLTTSChunk *> *testInitialPrompt = nil;
+ __block NSString *testInitialPromptString = nil;
+ __block SDLInteractionMode testInteractionMode = SDLInteractionModeVoiceRecognitionOnly;
+ __block NSArray<NSNumber<SDLUInt> *> *testInteractionChoiceSetIDList = nil;
+ __block UInt16 testInteractionChoiceSetID = 48212;
+ __block NSString *testHelpPromptString = nil;
+ __block NSArray<SDLTTSChunk *> *testHelpPrompt = nil;
+ __block NSString *testTimeoutPromptString = nil;
+ __block NSArray<SDLTTSChunk *> *testTimeoutPrompt = nil;
+ __block int testTimeout = 6000;
+ __block NSArray<SDLVRHelpItem *> *testVRHelp = nil;
+ __block SDLLayoutMode testinteractionLayout = SDLLayoutModeKeyboard;
+ __block int testCancelID = 9987;
+
+ beforeEach(^{
+ testInteractionChoiceSetIDList = @[@34, @55, @23];
+ testInitialPromptString = @"test initial prompt";
+ testInitialPrompt = [SDLTTSChunk textChunksFromString:testInitialPromptString];
+ testHelpPromptString = @"test help prompt";
+ testHelpPrompt = [SDLTTSChunk textChunksFromString:testHelpPromptString];
+ testTimeoutPromptString = @"test timeout prompt";
+ testTimeoutPrompt = [SDLTTSChunk textChunksFromString:testTimeoutPromptString];
+ testVRHelp = @[[[SDLVRHelpItem alloc] initWithText:@"test vr help" image:nil]];
});
-
- it(@"Should get correctly when initialized", ^ {
- NSMutableDictionary* dict = [@{SDLRPCParameterNameRequest:
- @{SDLRPCParameterNameParameters:
- @{SDLRPCParameterNameInitialText:@"a",
- SDLRPCParameterNameInitialPrompt:[@[chunk1] mutableCopy],
- SDLRPCParameterNameInteractionMode:SDLInteractionModeVoiceRecognitionOnly,
- SDLRPCParameterNameInteractionChoiceSetIdList:[@[@1, @2, @3] mutableCopy],
- SDLRPCParameterNameHelpPrompt:[@[chunk2] mutableCopy],
- SDLRPCParameterNameTimeoutPrompt:[@[chunk3] mutableCopy],
- SDLRPCParameterNameTimeout:@42000,
- SDLRPCParameterNameVRHelp:[@[helpItem] mutableCopy],
- SDLRPCParameterNameInteractionLayout:SDLLayoutModeIconWithSearch},
- SDLRPCParameterNameOperationName:SDLRPCFunctionNamePerformInteraction}} mutableCopy];
-#pragma clang diagnostic push
-#pragma clang diagnostic ignored "-Wdeprecated-declarations"
- SDLPerformInteraction* testRequest = [[SDLPerformInteraction alloc] initWithDictionary:dict];
-#pragma clang diagnostic pop
-
- expect(testRequest.initialText).to(equal(@"a"));
- expect(testRequest.initialPrompt).to(equal([@[chunk1] mutableCopy]));
- expect(testRequest.interactionMode).to(equal(SDLInteractionModeVoiceRecognitionOnly));
- expect(testRequest.interactionChoiceSetIDList).to(equal([@[@1, @2, @3] mutableCopy]));
- expect(testRequest.helpPrompt).to(equal([@[chunk2] mutableCopy]));
- expect(testRequest.timeoutPrompt).to(equal([@[chunk3] mutableCopy]));
- expect(testRequest.timeout).to(equal(@42000));
- expect(testRequest.vrHelp).to(equal([@[helpItem] mutableCopy]));
- expect(testRequest.interactionLayout).to(equal(SDLLayoutModeIconWithSearch));
+
+ context(@"Getter/Setter Tests", ^{
+ it(@"Should set and get correctly", ^ {
+ testRequest = [[SDLPerformInteraction alloc] init];
+
+ testRequest.initialText = testInitialText;
+ testRequest.initialPrompt = testInitialPrompt;
+ testRequest.interactionMode = testInteractionMode;
+ testRequest.interactionChoiceSetIDList = testInteractionChoiceSetIDList;
+ testRequest.helpPrompt = testHelpPrompt;
+ testRequest.timeoutPrompt = testTimeoutPrompt;
+ testRequest.timeout = @(testTimeout);
+ testRequest.vrHelp = testVRHelp;
+ testRequest.interactionLayout = testinteractionLayout;
+ testRequest.cancelID = @(testCancelID);
+
+ expect(testRequest.initialText).to(equal(testInitialText));
+ expect(testRequest.initialPrompt).to(equal(testInitialPrompt));
+ expect(testRequest.interactionMode).to(equal(testInteractionMode));
+ expect(testRequest.interactionChoiceSetIDList).to(equal(testInteractionChoiceSetIDList));
+ expect(testRequest.helpPrompt).to(equal(testHelpPrompt));
+ expect(testRequest.timeoutPrompt).to(equal(testTimeoutPrompt));
+ expect(testRequest.timeout).to(equal(testTimeout));
+ expect(testRequest.vrHelp).to(equal(testVRHelp));
+ expect(testRequest.interactionLayout).to(equal(testinteractionLayout));
+ expect(testRequest.cancelID).to(equal(testCancelID));
+
+ expect(testRequest.parameters.count).to(equal(10));
+ });
+
+ it(@"Should return nil if not set", ^ {
+ testRequest = [[SDLPerformInteraction alloc] init];
+
+ expect(testRequest.initialText).to(beNil());
+ expect(testRequest.initialPrompt).to(beNil());
+ expect(testRequest.interactionMode).to(beNil());
+ expect(testRequest.interactionChoiceSetIDList).to(beNil());
+ expect(testRequest.helpPrompt).to(beNil());
+ expect(testRequest.timeoutPrompt).to(beNil());
+ expect(testRequest.timeout).to(beNil());
+ expect(testRequest.vrHelp).to(beNil());
+ expect(testRequest.interactionLayout).to(beNil());
+ expect(testRequest.cancelID).to(beNil());
+
+ expect(testRequest.parameters.count).to(equal(0));
+ });
+ });
+
+ describe(@"Initializing", ^{
+ it(@"Should initialize correctly with a dictionary", ^ {
+ NSDictionary<NSString *, id> *dict = @{SDLRPCParameterNameRequest:
+ @{SDLRPCParameterNameParameters:
+ @{SDLRPCParameterNameInitialText:testInitialText,
+ SDLRPCParameterNameInitialPrompt:testInitialPrompt,
+ SDLRPCParameterNameInteractionMode:testInteractionMode,
+ SDLRPCParameterNameInteractionChoiceSetIdList:testInteractionChoiceSetIDList,
+ SDLRPCParameterNameHelpPrompt:testHelpPrompt,
+ SDLRPCParameterNameTimeoutPrompt:testTimeoutPrompt,
+ SDLRPCParameterNameTimeout:@(testTimeout),
+ SDLRPCParameterNameVRHelp:testVRHelp,
+ SDLRPCParameterNameInteractionLayout:testinteractionLayout,
+ SDLRPCParameterNameCancelID:@(testCancelID)},
+ SDLRPCParameterNameOperationName:SDLRPCFunctionNamePerformInteraction}};
+ #pragma clang diagnostic push
+ #pragma clang diagnostic ignored "-Wdeprecated-declarations"
+ testRequest = [[SDLPerformInteraction alloc] initWithDictionary:dict];
+ #pragma clang diagnostic pop
+
+ expect(testRequest.initialText).to(equal(testInitialText));
+ expect(testRequest.initialPrompt).to(equal(testInitialPrompt));
+ expect(testRequest.interactionMode).to(equal(testInteractionMode));
+ expect(testRequest.interactionChoiceSetIDList).to(equal(testInteractionChoiceSetIDList));
+ expect(testRequest.helpPrompt).to(equal(testHelpPrompt));
+ expect(testRequest.timeoutPrompt).to(equal(testTimeoutPrompt));
+ expect(testRequest.timeout).to(equal(testTimeout));
+ expect(testRequest.vrHelp).to(equal(testVRHelp));
+ expect(testRequest.interactionLayout).to(equal(testinteractionLayout));
+ expect(testRequest.cancelID).to(equal(testCancelID));
+
+ expect(testRequest.parameters.count).to(equal(10));
+ });
+
+ it(@"Should initialize correctly with initWithInitialText:interactionMode:interactionChoiceSetIDList:cancelID:", ^{
+ testRequest = [[SDLPerformInteraction alloc] initWithInitialText:testInitialText interactionMode:testInteractionMode interactionChoiceSetIDList:testInteractionChoiceSetIDList cancelID:testCancelID];
+
+ expect(testRequest.initialText).to(equal(testInitialText));
+ expect(testRequest.initialPrompt).to(beNil());
+ expect(testRequest.interactionMode).to(equal(testInteractionMode));
+ expect(testRequest.interactionChoiceSetIDList).to(equal(testInteractionChoiceSetIDList));
+ expect(testRequest.helpPrompt).to(beNil());
+ expect(testRequest.timeoutPrompt).to(beNil());
+ expect(testRequest.timeout).to(beNil());
+ expect(testRequest.vrHelp).to(beNil());
+ expect(testRequest.interactionLayout).to(beNil());
+ expect(testRequest.cancelID).to(equal(testCancelID));
+ });
+
+ it(@"Should initialize correctly with initWithInitialText:initialPrompt:interactionMode:interactionChoiceSetIDList:helpPrompt:timeoutPrompt:timeout:vrHelp:interactionLayout:cancelID:", ^{
+ testRequest = [[SDLPerformInteraction alloc] initWithInitialText:testInitialText initialPrompt:testInitialPrompt interactionMode:testInteractionMode interactionChoiceSetIDList:testInteractionChoiceSetIDList helpPrompt:testHelpPrompt timeoutPrompt:testTimeoutPrompt timeout:testTimeout vrHelp:testVRHelp interactionLayout:testinteractionLayout cancelID:testCancelID];
+
+ expect(testRequest.initialText).to(equal(testInitialText));
+ expect(testRequest.initialPrompt).to(equal(testInitialPrompt));
+ expect(testRequest.interactionMode).to(equal(testInteractionMode));
+ expect(testRequest.interactionChoiceSetIDList).to(equal(testInteractionChoiceSetIDList));
+ expect(testRequest.helpPrompt).to(equal(testHelpPrompt));
+ expect(testRequest.timeoutPrompt).to(equal(testTimeoutPrompt));
+ expect(testRequest.timeout).to(equal(testTimeout));
+ expect(testRequest.vrHelp).to(equal(testVRHelp));
+ expect(testRequest.interactionLayout).to(equal(testinteractionLayout));
+ expect(testRequest.cancelID).to(equal(testCancelID));
+ });
+
+ it(@"Should initialize correctly with initWithInteractionChoiceSetId:", ^{
+ #pragma clang diagnostic push
+ #pragma clang diagnostic ignored "-Wdeprecated-declarations"
+ testRequest = [[SDLPerformInteraction alloc] initWithInteractionChoiceSetId:testInteractionChoiceSetID];
+ #pragma clang diagnostic pop
+
+ expect(testRequest.initialText).to(beNil());
+ expect(testRequest.initialPrompt).to(beNil());
+ expect(testRequest.interactionMode).to(beNil());
+ expect(testRequest.interactionChoiceSetIDList).to(equal(@[@(testInteractionChoiceSetID)]));
+ expect(testRequest.helpPrompt).to(beNil());
+ expect(testRequest.timeoutPrompt).to(beNil());
+ expect(testRequest.timeout).to(beNil());
+ expect(testRequest.vrHelp).to(beNil());
+ expect(testRequest.interactionLayout).to(beNil());
+ expect(testRequest.cancelID).to(beNil());
+ });
+
+ it(@"Should initialize correctly with initWithInteractionChoiceSetIdList:", ^{
+ #pragma clang diagnostic push
+ #pragma clang diagnostic ignored "-Wdeprecated-declarations"
+ testRequest = [[SDLPerformInteraction alloc] initWithInteractionChoiceSetIdList:testInteractionChoiceSetIDList];
+ #pragma clang diagnostic pop
+
+ expect(testRequest.initialText).to(beNil());
+ expect(testRequest.initialPrompt).to(beNil());
+ expect(testRequest.interactionMode).to(beNil());
+ expect(testRequest.interactionChoiceSetIDList).to(equal(testInteractionChoiceSetIDList));
+ expect(testRequest.helpPrompt).to(beNil());
+ expect(testRequest.timeoutPrompt).to(beNil());
+ expect(testRequest.timeout).to(beNil());
+ expect(testRequest.vrHelp).to(beNil());
+ expect(testRequest.interactionLayout).to(beNil());
+ expect(testRequest.cancelID).to(beNil());
+ });
+
+ it(@"Should initialize correctly with initWithInitialPrompt:initialText:interactionChoiceSetID:", ^{
+ #pragma clang diagnostic push
+ #pragma clang diagnostic ignored "-Wdeprecated-declarations"
+ testRequest = [[SDLPerformInteraction alloc] initWithInitialPrompt:testInitialPromptString initialText:testInitialText interactionChoiceSetID:testInteractionChoiceSetID];
+ #pragma clang diagnostic pop
+
+ expect(testRequest.initialText).to(equal(testInitialText));
+ expect(testRequest.initialPrompt).to(equal([SDLTTSChunk textChunksFromString:testInitialPromptString]));
+ expect(testRequest.interactionMode).to(beNil());
+ expect(testRequest.interactionChoiceSetIDList).to(equal(@[@(testInteractionChoiceSetID)]));
+ expect(testRequest.helpPrompt).to(beNil());
+ expect(testRequest.timeoutPrompt).to(beNil());
+ expect(testRequest.timeout).to(beNil());
+ expect(testRequest.vrHelp).to(beNil());
+ expect(testRequest.interactionLayout).to(beNil());
+ expect(testRequest.cancelID).to(beNil());
+ });
+
+ it(@"Should initialize correctly with initWithInitialPrompt:initialText:interactionChoiceSetID:vrHelp:", ^{
+ #pragma clang diagnostic push
+ #pragma clang diagnostic ignored "-Wdeprecated-declarations"
+ testRequest = [[SDLPerformInteraction alloc] initWithInitialPrompt:testInitialPromptString initialText:testInitialText interactionChoiceSetID:testInteractionChoiceSetID vrHelp:testVRHelp];
+ #pragma clang diagnostic pop
+
+ expect(testRequest.initialText).to(equal(testInitialText));
+ expect(testRequest.initialPrompt).to(equal([SDLTTSChunk textChunksFromString:testInitialPromptString]));
+ expect(testRequest.interactionMode).to(beNil());
+ expect(testRequest.interactionChoiceSetIDList).to(equal(@[@(testInteractionChoiceSetID)]));
+ expect(testRequest.helpPrompt).to(beNil());
+ expect(testRequest.timeoutPrompt).to(beNil());
+ expect(testRequest.timeout).to(beNil());
+ expect(testRequest.vrHelp).to(equal(testVRHelp));
+ expect(testRequest.interactionLayout).to(beNil());
+ expect(testRequest.cancelID).to(beNil());
+ });
+
+ it(@"Should initialize correctly with initWithInitialPrompt:initialText:interactionChoiceSetIDList:helpPrompt:timeoutPrompt:interactionMode:timeout:", ^{
+ #pragma clang diagnostic push
+ #pragma clang diagnostic ignored "-Wdeprecated-declarations"
+ testRequest = [[SDLPerformInteraction alloc] initWithInitialPrompt:testInitialPromptString initialText:testInitialText interactionChoiceSetIDList:testInteractionChoiceSetIDList helpPrompt:testHelpPromptString timeoutPrompt:testTimeoutPromptString interactionMode:testInteractionMode timeout:testTimeout];
+ #pragma clang diagnostic pop
+
+ expect(testRequest.initialText).to(equal(testInitialText));
+ expect(testRequest.initialPrompt).to(equal([SDLTTSChunk textChunksFromString:testInitialPromptString]));
+ expect(testRequest.interactionMode).to(equal(testInteractionMode));
+ expect(testRequest.interactionChoiceSetIDList).to(equal(testInteractionChoiceSetIDList));
+ expect(testRequest.helpPrompt).to(equal([SDLTTSChunk textChunksFromString:testHelpPromptString]));
+ expect(testRequest.timeoutPrompt).to(equal([SDLTTSChunk textChunksFromString:testTimeoutPromptString]));
+ expect(testRequest.timeout).to(equal(testTimeout));
+ expect(testRequest.vrHelp).to(beNil());
+ expect(testRequest.interactionLayout).to(beNil());
+ expect(testRequest.cancelID).to(beNil());
+ });
+
+ it(@"Should initialize correctly with initWithInitialPrompt:initialText:interactionChoiceSetIDList:helpPrompt:timeoutPrompt:interactionMode:timeout:vrHelp:", ^{
+ #pragma clang diagnostic push
+ #pragma clang diagnostic ignored "-Wdeprecated-declarations"
+ testRequest = [[SDLPerformInteraction alloc] initWithInitialPrompt:testInitialPromptString initialText:testInitialText interactionChoiceSetIDList:testInteractionChoiceSetIDList helpPrompt:testHelpPromptString timeoutPrompt:testTimeoutPromptString interactionMode:testInteractionMode timeout:testTimeout vrHelp:testVRHelp];
+ #pragma clang diagnostic pop
+
+ expect(testRequest.initialText).to(equal(testInitialText));
+ expect(testRequest.initialPrompt).to(equal([SDLTTSChunk textChunksFromString:testInitialPromptString]));
+ expect(testRequest.interactionMode).to(equal(testInteractionMode));
+ expect(testRequest.interactionChoiceSetIDList).to(equal(testInteractionChoiceSetIDList));
+ expect(testRequest.helpPrompt).to(equal([SDLTTSChunk textChunksFromString:testHelpPromptString]));
+ expect(testRequest.timeoutPrompt).to(equal([SDLTTSChunk textChunksFromString:testTimeoutPromptString]));
+ expect(testRequest.timeout).to(equal(testTimeout));
+ expect(testRequest.vrHelp).to(equal(testVRHelp));
+ expect(testRequest.interactionLayout).to(beNil());
+ expect(testRequest.cancelID).to(beNil());
+ });
+
+ it(@"Should initialize correctly with initWithInitialChunks:initialText:interactionChoiceSetIDList:helpChunks:timeoutChunks:interactionMode:timeout:vrHelp:", ^{
+ #pragma clang diagnostic push
+ #pragma clang diagnostic ignored "-Wdeprecated-declarations"
+ testRequest = [[SDLPerformInteraction alloc] initWithInitialChunks:testInitialPrompt initialText:testInitialText interactionChoiceSetIDList:testInteractionChoiceSetIDList helpChunks:testHelpPrompt timeoutChunks:testTimeoutPrompt interactionMode:testInteractionMode timeout:testTimeout vrHelp:testVRHelp];
+ #pragma clang diagnostic pop
+
+ expect(testRequest.initialText).to(equal(testInitialText));
+ expect(testRequest.initialPrompt).to(equal(testInitialPrompt));
+ expect(testRequest.interactionMode).to(equal(testInteractionMode));
+ expect(testRequest.interactionChoiceSetIDList).to(equal(testInteractionChoiceSetIDList));
+ expect(testRequest.helpPrompt).to(equal(testHelpPrompt));
+ expect(testRequest.timeoutPrompt).to(equal(testTimeoutPrompt));
+ expect(testRequest.timeout).to(equal(testTimeout));
+ expect(testRequest.vrHelp).to(equal(testVRHelp));
+ expect(testRequest.interactionLayout).to(beNil());
+ expect(testRequest.cancelID).to(beNil());
+ });
+
+ it(@"Should initialize correctly with initWithInitialChunks:initialText:interactionChoiceSetIDList:helpChunks:timeoutChunks:interactionMode:timeout:vrHelp:interactionLayout:", ^{
+ #pragma clang diagnostic push
+ #pragma clang diagnostic ignored "-Wdeprecated-declarations"
+ testRequest = [[SDLPerformInteraction alloc] initWithInitialChunks:testInitialPrompt initialText:testInitialText interactionChoiceSetIDList:testInteractionChoiceSetIDList helpChunks:testHelpPrompt timeoutChunks:testTimeoutPrompt interactionMode:testInteractionMode timeout:testTimeout vrHelp:testVRHelp interactionLayout:testinteractionLayout];
+ #pragma clang diagnostic pop
+
+ expect(testRequest.initialText).to(equal(testInitialText));
+ expect(testRequest.initialPrompt).to(equal(testInitialPrompt));
+ expect(testRequest.interactionMode).to(equal(testInteractionMode));
+ expect(testRequest.interactionChoiceSetIDList).to(equal(testInteractionChoiceSetIDList));
+ expect(testRequest.helpPrompt).to(equal(testHelpPrompt));
+ expect(testRequest.timeoutPrompt).to(equal(testTimeoutPrompt));
+ expect(testRequest.timeout).to(equal(testTimeout));
+ expect(testRequest.vrHelp).to(equal(testVRHelp));
+ expect(testRequest.interactionLayout).to(equal(testinteractionLayout));
+ expect(testRequest.cancelID).to(beNil());
+ });
});
-
- it(@"Should return nil if not set", ^ {
- SDLPerformInteraction* testRequest = [[SDLPerformInteraction alloc] init];
-
- expect(testRequest.initialText).to(beNil());
- expect(testRequest.initialPrompt).to(beNil());
- expect(testRequest.interactionMode).to(beNil());
- expect(testRequest.interactionChoiceSetIDList).to(beNil());
- expect(testRequest.helpPrompt).to(beNil());
- expect(testRequest.timeoutPrompt).to(beNil());
- expect(testRequest.timeout).to(beNil());
- expect(testRequest.vrHelp).to(beNil());
- expect(testRequest.interactionLayout).to(beNil());
+
+ afterEach(^{
+ expect(testRequest.name).to(equal(SDLRPCFunctionNamePerformInteraction));
});
});
diff --git a/SmartDeviceLinkTests/RPCSpecs/RequestSpecs/SDLReleaseInteriorVehicleDataModuleSpec.m b/SmartDeviceLinkTests/RPCSpecs/RequestSpecs/SDLReleaseInteriorVehicleDataModuleSpec.m
new file mode 100644
index 000000000..6f98c4f28
--- /dev/null
+++ b/SmartDeviceLinkTests/RPCSpecs/RequestSpecs/SDLReleaseInteriorVehicleDataModuleSpec.m
@@ -0,0 +1,61 @@
+//
+// SDLReleaseInteriorVehicleDataModuleSpec.m
+// SmartDeviceLinkTests
+//
+// Created by standa1 on 7/29/19.
+// Copyright © 2019 smartdevicelink. All rights reserved.
+//
+
+#import <Foundation/Foundation.h>
+
+#import <Quick/Quick.h>
+#import <Nimble/Nimble.h>
+
+#import "SDLReleaseInteriorVehicleDataModule.h"
+#import "SDLModuleType.h"
+#import "SDLRPCParameterNames.h"
+#import "SDLRPCFunctionNames.h"
+
+QuickSpecBegin(SDLReleaseInteriorVehicleDataModuleSpec)
+
+describe(@"Getter/Setter Tests", ^ {
+ it(@"Should set and get correctly", ^ {
+ SDLReleaseInteriorVehicleDataModule *testRequest = [[SDLReleaseInteriorVehicleDataModule alloc] init];
+ testRequest.moduleType = SDLModuleTypeRadio;
+ testRequest.moduleId = @"123";
+
+ expect(testRequest.moduleType).to(equal(SDLModuleTypeRadio));
+ expect(testRequest.moduleId).to(equal(@"123"));
+ });
+
+ it(@"Should get correctly when initialized with a dictionary", ^ {
+ NSMutableDictionary<NSString *, id> *dict = [@{SDLRPCParameterNameRequest:
+ @{SDLRPCParameterNameParameters:
+ @{SDLRPCParameterNameModuleType: SDLModuleTypeRadio,
+ SDLRPCParameterNameModuleId: @"123"},
+ SDLRPCParameterNameOperationName:SDLRPCFunctionNameGetInteriorVehicleData}} mutableCopy];
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
+ SDLReleaseInteriorVehicleDataModule *testRequest = [[SDLReleaseInteriorVehicleDataModule alloc] initWithDictionary:dict];
+#pragma clang diagnostic pop
+
+ expect(testRequest.moduleType).to(equal(SDLModuleTypeRadio));
+ expect(testRequest.moduleId).to(equal(@"123"));
+ });
+
+ it(@"Should get correctly when initialized with module type and module ids", ^ {
+ SDLReleaseInteriorVehicleDataModule *testRequest = [[SDLReleaseInteriorVehicleDataModule alloc] initWithModuleType:SDLModuleTypeRadio moduleId:@"123"];
+
+ expect(testRequest.moduleType).to(equal(SDLModuleTypeRadio));
+ expect(testRequest.moduleId).to(equal(@"123"));
+ });
+
+ it(@"Should return nil if not set", ^ {
+ SDLReleaseInteriorVehicleDataModule *testRequest = [[SDLReleaseInteriorVehicleDataModule alloc] init];
+
+ expect(testRequest.moduleType).to(beNil());
+ expect(testRequest.moduleId).to(beNil());
+ });
+});
+
+QuickSpecEnd
diff --git a/SmartDeviceLinkTests/RPCSpecs/RequestSpecs/SDLScrollableMessageSpec.m b/SmartDeviceLinkTests/RPCSpecs/RequestSpecs/SDLScrollableMessageSpec.m
index 0514b1936..58a86d751 100644
--- a/SmartDeviceLinkTests/RPCSpecs/RequestSpecs/SDLScrollableMessageSpec.m
+++ b/SmartDeviceLinkTests/RPCSpecs/RequestSpecs/SDLScrollableMessageSpec.m
@@ -2,9 +2,6 @@
// SDLScrollableMessageSpec.m
// SmartDeviceLink
-
-#import <Foundation/Foundation.h>
-
#import <Quick/Quick.h>
#import <Nimble/Nimble.h>
@@ -15,44 +12,101 @@
QuickSpecBegin(SDLScrollableMessageSpec)
-SDLSoftButton* button = [[SDLSoftButton alloc] init];
-
describe(@"Getter/Setter Tests", ^ {
- it(@"Should set and get correctly", ^ {
- SDLScrollableMessage* testRequest = [[SDLScrollableMessage alloc] init];
-
- testRequest.scrollableMessageBody = @"thatmessagebody";
- testRequest.timeout = @9182;
- testRequest.softButtons = [@[button] mutableCopy];
-
- expect(testRequest.scrollableMessageBody).to(equal(@"thatmessagebody"));
- expect(testRequest.timeout).to(equal(@9182));
- expect(testRequest.softButtons).to(equal([@[button] mutableCopy]));
+ __block SDLScrollableMessage *testRequest = nil;
+ __block NSString *testScrollableMessageBody = nil;
+ __block int testTimeout = 6542;
+ __block NSArray<SDLSoftButton *> *testSoftButtons = nil;
+ __block int testCancelID = 69;
+
+ beforeEach(^{
+ testScrollableMessageBody = @"Four score and seven years ago our fathers brought forth on this continent, a new nation, conceived in Liberty, and dedicated to the proposition that all men are created equal.\nNow we are engaged in a great civil war, testing whether that nation, or any nation so conceived and so dedicated, can long endure. We are met on a great battle-field of that war.";
+ testSoftButtons = @[[[SDLSoftButton alloc] init]];
+ });
+
+ context(@"Getter/Setter Tests", ^{
+ it(@"Should set and get correctly", ^ {
+ testRequest = [[SDLScrollableMessage alloc] init];
+
+ testRequest.scrollableMessageBody = testScrollableMessageBody;
+ testRequest.timeout = @(testTimeout);
+ testRequest.softButtons = testSoftButtons;
+ testRequest.cancelID = @(testCancelID);
+
+ expect(testRequest.scrollableMessageBody).to(equal(testScrollableMessageBody));
+ expect(testRequest.timeout).to(equal(testTimeout));
+ expect(testRequest.softButtons).to(equal(testSoftButtons));
+ expect(testRequest.cancelID).to(equal(testCancelID));
+
+ expect(testRequest.parameters.count).to(equal(4));
+ });
+
+ it(@"Should return nil if not set", ^{
+ testRequest = [[SDLScrollableMessage alloc] init];
+
+ expect(testRequest.scrollableMessageBody).to(beNil());
+ expect(testRequest.timeout).to(beNil());
+ expect(testRequest.softButtons).to(beNil());
+ expect(testRequest.cancelID).to(beNil());
+
+ expect(testRequest.parameters.count).to(equal(0));
+ });
});
-
- it(@"Should get correctly when initialized", ^ {
- NSMutableDictionary<NSString *, id> *dict = [@{SDLRPCParameterNameRequest:
- @{SDLRPCParameterNameParameters:
- @{SDLRPCParameterNameScrollableMessageBody:@"thatmessagebody",
- SDLRPCParameterNameTimeout:@9182,
- SDLRPCParameterNameSoftButtons:[@[button] mutableCopy]},
- SDLRPCParameterNameOperationName:SDLRPCFunctionNameScrollableMessage}} mutableCopy];
-#pragma clang diagnostic push
-#pragma clang diagnostic ignored "-Wdeprecated-declarations"
- SDLScrollableMessage* testRequest = [[SDLScrollableMessage alloc] initWithDictionary:dict];
-#pragma clang diagnostic pop
-
- expect(testRequest.scrollableMessageBody).to(equal(@"thatmessagebody"));
- expect(testRequest.timeout).to(equal(@9182));
- expect(testRequest.softButtons).to(equal([@[button] mutableCopy]));
+
+ describe(@"Initializing", ^{
+ it(@"Should initialize correctly with a dictionary", ^ {
+ NSDictionary<NSString *, id> *dict = @{SDLRPCParameterNameRequest:
+ @{SDLRPCParameterNameParameters:
+ @{SDLRPCParameterNameScrollableMessageBody:testScrollableMessageBody,
+ SDLRPCParameterNameTimeout:@(testTimeout),
+ SDLRPCParameterNameSoftButtons:testSoftButtons,
+ SDLRPCParameterNameCancelID:@(testCancelID)},
+ SDLRPCParameterNameOperationName:SDLRPCFunctionNameScrollableMessage}};
+ #pragma clang diagnostic push
+ #pragma clang diagnostic ignored "-Wdeprecated-declarations"
+ testRequest = [[SDLScrollableMessage alloc] initWithDictionary:dict];
+ #pragma clang diagnostic pop
+
+ expect(testRequest.scrollableMessageBody).to(equal(testScrollableMessageBody));
+ expect(testRequest.timeout).to(equal(testTimeout));
+ expect(testRequest.softButtons).to(equal(testSoftButtons));
+ expect(testRequest.cancelID).to(equal(testCancelID));
+ });
+
+ it(@"Should initialize correctly with initWithMessage:", ^{
+ testRequest = [[SDLScrollableMessage alloc] initWithMessage:testScrollableMessageBody];
+
+ expect(testRequest.scrollableMessageBody).to(equal(testScrollableMessageBody));
+ expect(testRequest.timeout).to(beNil());
+ expect(testRequest.softButtons).to(beNil());
+ expect(testRequest.cancelID).to(beNil());
+ });
+
+
+ it(@"Should initialize correctly with initWithMessage:timeout:softButtons:cancelID:", ^{
+ testRequest = [[SDLScrollableMessage alloc] initWithMessage:testScrollableMessageBody timeout:testTimeout softButtons:testSoftButtons cancelID:testCancelID];
+
+ expect(testRequest.scrollableMessageBody).to(equal(testScrollableMessageBody));
+ expect(testRequest.timeout).to(equal(testTimeout));
+ expect(testRequest.softButtons).to(equal(testSoftButtons));
+ expect(testRequest.cancelID).to(equal(testCancelID));
+ });
+
+ it(@"Should initialize correctly with initWithMessage:timeout:softButtons:", ^{
+ #pragma clang diagnostic push
+ #pragma clang diagnostic ignored "-Wdeprecated-declarations"
+ testRequest = [[SDLScrollableMessage alloc] initWithMessage:testScrollableMessageBody timeout:testTimeout softButtons:testSoftButtons];
+ #pragma clang diagnostic pop
+
+ expect(testRequest.scrollableMessageBody).to(equal(testScrollableMessageBody));
+ expect(testRequest.timeout).to(equal(testTimeout));
+ expect(testRequest.softButtons).to(equal(testSoftButtons));
+ expect(testRequest.cancelID).to(beNil());
+ });
});
-
- it(@"Should return nil if not set", ^ {
- SDLScrollableMessage* testRequest = [[SDLScrollableMessage alloc] init];
-
- expect(testRequest.scrollableMessageBody).to(beNil());
- expect(testRequest.timeout).to(beNil());
- expect(testRequest.softButtons).to(beNil());
+
+ afterEach(^{
+ expect(testRequest.name).to(equal(SDLRPCFunctionNameScrollableMessage));
});
});
diff --git a/SmartDeviceLinkTests/RPCSpecs/RequestSpecs/SDLSetGlobalPropertiesSpec.m b/SmartDeviceLinkTests/RPCSpecs/RequestSpecs/SDLSetGlobalPropertiesSpec.m
index b12672582..e875e411c 100644
--- a/SmartDeviceLinkTests/RPCSpecs/RequestSpecs/SDLSetGlobalPropertiesSpec.m
+++ b/SmartDeviceLinkTests/RPCSpecs/RequestSpecs/SDLSetGlobalPropertiesSpec.m
@@ -15,6 +15,7 @@
#import "SDLSetGlobalProperties.h"
#import "SDLTTSChunk.h"
#import "SDLVrHelpItem.h"
+#import "SDLSeatLocation.h"
QuickSpecBegin(SDLSetGlobalPropertiesSpec)
@@ -24,6 +25,7 @@ SDLTTSChunk* chunk2 = [[SDLTTSChunk alloc] init];
SDLVRHelpItem* help = [[SDLVRHelpItem alloc] init];
SDLImage* image = [[SDLImage alloc] init];
SDLKeyboardProperties* keyboard = [[SDLKeyboardProperties alloc] init];
+SDLSeatLocation *seatLocation = [[SDLSeatLocation alloc] init];
describe(@"Getter/Setter Tests", ^ {
it(@"Should set and get correctly", ^ {
@@ -36,6 +38,7 @@ describe(@"Getter/Setter Tests", ^ {
testRequest.menuTitle = @"TheNewMenu";
testRequest.menuIcon = image;
testRequest.keyboardProperties = keyboard;
+ testRequest.userLocation = seatLocation;
expect(testRequest.helpPrompt).to(equal([@[chunk1] mutableCopy]));
expect(testRequest.timeoutPrompt).to(equal([@[chunk2] mutableCopy]));
@@ -44,6 +47,7 @@ describe(@"Getter/Setter Tests", ^ {
expect(testRequest.menuTitle).to(equal(@"TheNewMenu"));
expect(testRequest.menuIcon).to(equal(image));
expect(testRequest.keyboardProperties).to(equal(keyboard));
+ expect(testRequest.userLocation).to(equal(seatLocation));
});
it(@"Should get correctly when initialized", ^ {
@@ -54,6 +58,7 @@ describe(@"Getter/Setter Tests", ^ {
SDLRPCParameterNameVRHelpTitle:@"vr",
SDLRPCParameterNameVRHelp:[@[help] mutableCopy],
SDLRPCParameterNameMenuTitle:@"TheNewMenu",
+ SDLRPCParameterNameUserLocation: seatLocation,
SDLRPCParameterNameMenuIcon:image,
SDLRPCParameterNameKeyboardProperties:keyboard},
SDLRPCParameterNameOperationName:SDLRPCFunctionNameSetGlobalProperties}} mutableCopy];
@@ -69,6 +74,7 @@ describe(@"Getter/Setter Tests", ^ {
expect(testRequest.menuTitle).to(equal(@"TheNewMenu"));
expect(testRequest.menuIcon).to(equal(image));
expect(testRequest.keyboardProperties).to(equal(keyboard));
+ expect(testRequest.userLocation).to(equal(seatLocation));
});
it(@"Should return nil if not set", ^ {
@@ -81,6 +87,7 @@ describe(@"Getter/Setter Tests", ^ {
expect(testRequest.menuTitle).to(beNil());
expect(testRequest.menuIcon).to(beNil());
expect(testRequest.keyboardProperties).to(beNil());
+ expect(testRequest.userLocation).to(beNil());
});
});
diff --git a/SmartDeviceLinkTests/RPCSpecs/RequestSpecs/SDLSliderSpec.m b/SmartDeviceLinkTests/RPCSpecs/RequestSpecs/SDLSliderSpec.m
index 7689b8904..b8478240d 100644
--- a/SmartDeviceLinkTests/RPCSpecs/RequestSpecs/SDLSliderSpec.m
+++ b/SmartDeviceLinkTests/RPCSpecs/RequestSpecs/SDLSliderSpec.m
@@ -22,89 +22,115 @@ describe(@"Getter/Setter Tests", ^ {
__block NSString *testHeader = @"Head";
__block NSString *testFooter = @"Foot";
__block NSArray<NSString *> *testFooters = @[@"Foot1", @"Foot2"];
+ __block int testCancelID = 56;
- beforeEach(^{
- testRequest = nil;
- testNumTicks = 4;
- testPosition = 1;
- testTimeout = 2000;
- testHeader = @"Head";
- testFooter = @"Foot";
- testFooters = @[@"Foot1", @"Foot2"];
- });
+ context(@"Getter/Setter Tests", ^{
+ it(@"Should set and get correctly", ^ {
+ testRequest = [[SDLSlider alloc] init];
- it(@"Should set and get correctly", ^ {
- testRequest = [[SDLSlider alloc] init];
-
- testRequest.numTicks = @(testNumTicks);
- testRequest.position = @(testPosition);
- testRequest.sliderHeader = testHeader;
- testRequest.sliderFooter = testFooters;
- testRequest.timeout = @(testTimeout);
-
- expect(testRequest.numTicks).to(equal(testNumTicks));
- expect(testRequest.position).to(equal(testPosition));
- expect(testRequest.sliderHeader).to(equal(testHeader));
- expect(testRequest.sliderFooter).to(equal(testFooters));
- expect(testRequest.timeout).to(equal(testTimeout));
- });
-
- it(@"Should get correctly when initialized with a dictionary", ^ {
- NSDictionary<NSString *, id> *dict = @{SDLRPCParameterNameRequest:
- @{SDLRPCParameterNameParameters:
- @{SDLRPCParameterNameNumberTicks:@(testNumTicks),
- SDLRPCParameterNamePosition:@(testPosition),
- SDLRPCParameterNameSliderHeader:testHeader,
- SDLRPCParameterNameSliderFooter:testFooters,
- SDLRPCParameterNameTimeout:@(testTimeout)},
- SDLRPCParameterNameOperationName:SDLRPCFunctionNameSlider}};
-#pragma clang diagnostic push
-#pragma clang diagnostic ignored "-Wdeprecated-declarations"
- testRequest = [[SDLSlider alloc] initWithDictionary:dict];
-#pragma clang diagnostic pop
-
- expect(testRequest.numTicks).to(equal(testNumTicks));
- expect(testRequest.position).to(equal(testPosition));
- expect(testRequest.sliderHeader).to(equal(testHeader));
- expect(testRequest.sliderFooter).to(equal(testFooters));
- expect(testRequest.timeout).to(equal(testTimeout));
- });
+ testRequest.numTicks = @(testNumTicks);
+ testRequest.position = @(testPosition);
+ testRequest.sliderHeader = testHeader;
+ testRequest.sliderFooter = testFooters;
+ testRequest.timeout = @(testTimeout);
+ testRequest.cancelID = @(testCancelID);
- it(@"should correctly initialize with initWithNumTicks:position:", ^{
- testRequest = [[SDLSlider alloc] initWithNumTicks:testNumTicks position:testPosition];
+ expect(testRequest.numTicks).to(equal(testNumTicks));
+ expect(testRequest.position).to(equal(testPosition));
+ expect(testRequest.sliderHeader).to(equal(testHeader));
+ expect(testRequest.sliderFooter).to(equal(testFooters));
+ expect(testRequest.timeout).to(equal(testTimeout));
+ expect(testRequest.cancelID).to(equal(testCancelID));
- expect(testRequest.numTicks).to(equal(testNumTicks));
- expect(testRequest.position).to(equal(testPosition));
- });
+ expect(testRequest.parameters.count).to(equal(6));
+ });
- it(@"should correctly initialize with initWithNumTicks:position:sliderHeader:sliderFooters:timeout:", ^{
- testRequest = [[SDLSlider alloc] initWithNumTicks:testNumTicks position:testPosition sliderHeader:testHeader sliderFooters:testFooters timeout:testTimeout];
+ it(@"Should return nil if not set", ^ {
+ testRequest = [[SDLSlider alloc] init];
- expect(testRequest.numTicks).to(equal(testNumTicks));
- expect(testRequest.position).to(equal(testPosition));
- expect(testRequest.sliderHeader).to(equal(testHeader));
- expect(testRequest.sliderFooter).to(equal(testFooters));
- expect(testRequest.timeout).to(equal(testTimeout));
+ expect(testRequest.numTicks).to(beNil());
+ expect(testRequest.position).to(beNil());
+ expect(testRequest.sliderHeader).to(beNil());
+ expect(testRequest.sliderFooter).to(beNil());
+ expect(testRequest.timeout).to(beNil());
+ expect(testRequest.cancelID).to(beNil());
+
+ expect(testRequest.parameters.count).to(equal(0));
+ });
});
- it(@"should correctly initialize with initWithNumTicks:position:sliderHeader:sliderFooter:timeout:", ^{
- testRequest = [[SDLSlider alloc] initWithNumTicks:testNumTicks position:testPosition sliderHeader:testHeader sliderFooter:testFooter timeout:testTimeout];
+ describe(@"Initializing", ^{
+ it(@"Should get correctly when initialized with a dictionary", ^ {
+ NSDictionary<NSString *, id> *dict = @{SDLRPCParameterNameRequest:
+ @{SDLRPCParameterNameParameters:
+ @{SDLRPCParameterNameNumberTicks:@(testNumTicks),
+ SDLRPCParameterNamePosition:@(testPosition),
+ SDLRPCParameterNameSliderHeader:testHeader,
+ SDLRPCParameterNameSliderFooter:testFooters,
+ SDLRPCParameterNameTimeout:@(testTimeout),
+ SDLRPCParameterNameCancelID:@(testCancelID)
+ },
+ SDLRPCParameterNameOperationName:SDLRPCFunctionNameSlider}};
+ #pragma clang diagnostic push
+ #pragma clang diagnostic ignored "-Wdeprecated-declarations"
+ testRequest = [[SDLSlider alloc] initWithDictionary:dict];
+ #pragma clang diagnostic pop
+
+ expect(testRequest.numTicks).to(equal(testNumTicks));
+ expect(testRequest.position).to(equal(testPosition));
+ expect(testRequest.sliderHeader).to(equal(testHeader));
+ expect(testRequest.sliderFooter).to(equal(testFooters));
+ expect(testRequest.timeout).to(equal(testTimeout));
+ expect(testRequest.cancelID).to(equal(testCancelID));
+ });
+
+ it(@"should correctly initialize with initWithNumTicks:position:sliderHeader:sliderFooters:timeout:cancelID:", ^{
+ testRequest = [[SDLSlider alloc] initWithNumTicks:testNumTicks position:testPosition sliderHeader:testHeader sliderFooters:testFooters timeout:testTimeout cancelID:testCancelID];
- expect(testRequest.numTicks).to(equal(testNumTicks));
- expect(testRequest.position).to(equal(testPosition));
- expect(testRequest.sliderHeader).to(equal(testHeader));
- expect(testRequest.sliderFooter).to(equal(@[testFooter]));
- expect(testRequest.timeout).to(equal(testTimeout));
+ expect(testRequest.numTicks).to(equal(testNumTicks));
+ expect(testRequest.position).to(equal(testPosition));
+ expect(testRequest.sliderHeader).to(equal(testHeader));
+ expect(testRequest.sliderFooter).to(equal(testFooters));
+ expect(testRequest.timeout).to(equal(testTimeout));
+ expect(testRequest.cancelID).to(equal(testCancelID));
+ });
+
+ it(@"should correctly initialize with initWithNumTicks:position:", ^{
+ testRequest = [[SDLSlider alloc] initWithNumTicks:testNumTicks position:testPosition];
+
+ expect(testRequest.numTicks).to(equal(testNumTicks));
+ expect(testRequest.position).to(equal(testPosition));
+ expect(testRequest.sliderHeader).to(beNil());
+ expect(testRequest.sliderFooter).to(beNil());
+ expect(testRequest.timeout).to(beNil());
+ expect(testRequest.cancelID).to(beNil());
+ });
+
+ it(@"should correctly initialize with initWithNumTicks:position:sliderHeader:sliderFooters:timeout:", ^{
+ testRequest = [[SDLSlider alloc] initWithNumTicks:testNumTicks position:testPosition sliderHeader:testHeader sliderFooters:testFooters timeout:testTimeout];
+
+ expect(testRequest.numTicks).to(equal(testNumTicks));
+ expect(testRequest.position).to(equal(testPosition));
+ expect(testRequest.sliderHeader).to(equal(testHeader));
+ expect(testRequest.sliderFooter).to(equal(testFooters));
+ expect(testRequest.timeout).to(equal(testTimeout));
+ expect(testRequest.cancelID).to(beNil());
+ });
+
+ it(@"should correctly initialize with initWithNumTicks:position:sliderHeader:sliderFooter:timeout:", ^{
+ testRequest = [[SDLSlider alloc] initWithNumTicks:testNumTicks position:testPosition sliderHeader:testHeader sliderFooter:testFooter timeout:testTimeout];
+
+ expect(testRequest.numTicks).to(equal(testNumTicks));
+ expect(testRequest.position).to(equal(testPosition));
+ expect(testRequest.sliderHeader).to(equal(testHeader));
+ expect(testRequest.sliderFooter).to(equal(@[testFooter]));
+ expect(testRequest.timeout).to(equal(testTimeout));
+ expect(testRequest.cancelID).to(beNil());
+ });
});
-
- it(@"Should return nil if not set", ^ {
- testRequest = [[SDLSlider alloc] init];
-
- expect(testRequest.numTicks).to(beNil());
- expect(testRequest.position).to(beNil());
- expect(testRequest.sliderHeader).to(beNil());
- expect(testRequest.sliderFooter).to(beNil());
- expect(testRequest.timeout).to(beNil());
+
+ afterEach(^{
+ expect(testRequest.name).to(equal(SDLRPCFunctionNameSlider));
});
});
diff --git a/SmartDeviceLinkTests/RPCSpecs/ResponseSpecs/SDLCancelInteractionResponseSpec.m b/SmartDeviceLinkTests/RPCSpecs/ResponseSpecs/SDLCancelInteractionResponseSpec.m
new file mode 100644
index 000000000..f1f677cba
--- /dev/null
+++ b/SmartDeviceLinkTests/RPCSpecs/ResponseSpecs/SDLCancelInteractionResponseSpec.m
@@ -0,0 +1,41 @@
+//
+// SDLCancelInteractionResponseSpec.m
+// SmartDeviceLinkTests
+//
+// Created by Nicole on 7/12/19.
+// Copyright © 2019 smartdevicelink. All rights reserved.
+//
+
+#import <Quick/Quick.h>
+#import <Nimble/Nimble.h>
+
+#import "SDLCancelInteractionResponse.h"
+#import "SDLRPCFunctionNames.h"
+#import "SDLRPCParameterNames.h"
+
+QuickSpecBegin(SDLCancelInteractionResponseSpec)
+
+describe(@"Getter/Setter Tests", ^{
+ __block SDLCancelInteractionResponse *testResponse = nil;
+
+ it(@"Should initialize correctly", ^{
+ testResponse = [[SDLCancelInteractionResponse alloc] init];
+ });
+
+ it(@"Should initialize correctly with a dictionary", ^{
+ NSDictionary *dict = @{SDLRPCParameterNameRequest:@{
+ SDLRPCParameterNameParameters:@{},
+ SDLRPCParameterNameOperationName:SDLRPCFunctionNameCancelInteraction}};
+ #pragma clang diagnostic push
+ #pragma clang diagnostic ignored "-Wdeprecated-declarations"
+ testResponse = [[SDLCancelInteractionResponse alloc] initWithDictionary:dict];
+ #pragma clang diagnostic pop
+ });
+
+ afterEach(^{
+ expect(testResponse.name).to(match(SDLRPCFunctionNameCancelInteraction));
+ expect(testResponse.parameters).to(beEmpty());
+ });
+});
+
+QuickSpecEnd
diff --git a/SmartDeviceLinkTests/RPCSpecs/ResponseSpecs/SDLGetInteriorVehicleDataConsentResponseSpec.m b/SmartDeviceLinkTests/RPCSpecs/ResponseSpecs/SDLGetInteriorVehicleDataConsentResponseSpec.m
new file mode 100644
index 000000000..479220441
--- /dev/null
+++ b/SmartDeviceLinkTests/RPCSpecs/ResponseSpecs/SDLGetInteriorVehicleDataConsentResponseSpec.m
@@ -0,0 +1,58 @@
+//
+// SDLGetInteriorVehicleDataConsent.m
+// SmartDeviceLinkTests
+//
+// Created by standa1 on 7/29/19.
+// Copyright © 2019 smartdevicelink. All rights reserved.
+//
+
+#import <Foundation/Foundation.h>
+
+#import <Quick/Quick.h>
+#import <Nimble/Nimble.h>
+
+#import "SDLGetInteriorVehicleDataConsentResponse.h"
+#import "SDLModuleData.h"
+#import "SDLRPCParameterNames.h"
+#import "SDLRPCFunctionNames.h"
+
+QuickSpecBegin(SDLGetInteriorVehicleDataConsentResponseSpec)
+
+describe(@"Getter/Setter Tests", ^ {
+ __block NSArray<NSNumber<SDLBool> *> *allowed = nil;
+
+ beforeEach(^{
+ allowed = @[@YES, @NO];
+ });
+
+ it(@"Should set and get correctly", ^ {
+ SDLGetInteriorVehicleDataConsentResponse *testResponse = [[SDLGetInteriorVehicleDataConsentResponse alloc] init];
+
+ testResponse.allowed = allowed;
+
+ expect(testResponse.allowed).to(equal(allowed));
+ });
+
+
+
+ it(@"Should get correctly when initialized", ^ {
+ NSMutableDictionary<NSString *, id> *dict = [@{SDLRPCParameterNameResponse:
+ @{SDLRPCParameterNameParameters:
+ @{SDLRPCParameterNameAllowed:allowed},
+ SDLRPCParameterNameOperationName:SDLRPCFunctionNameGetInteriorVehicleData}} mutableCopy];
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
+ SDLGetInteriorVehicleDataConsentResponse *testResponse = [[SDLGetInteriorVehicleDataConsentResponse alloc] initWithDictionary:dict];
+#pragma clang diagnostic pop
+
+ expect(testResponse.allowed).to(equal(allowed));
+ });
+
+ it(@"Should return nil if not set", ^ {
+ SDLGetInteriorVehicleDataConsentResponse *testResponse = [[SDLGetInteriorVehicleDataConsentResponse alloc] init];
+
+ expect(testResponse.allowed).to(beNil());
+ });
+});
+
+QuickSpecEnd
diff --git a/SmartDeviceLinkTests/RPCSpecs/ResponseSpecs/SDLReleaseInteriorVehicleDataModuleResponseSpec.m b/SmartDeviceLinkTests/RPCSpecs/ResponseSpecs/SDLReleaseInteriorVehicleDataModuleResponseSpec.m
new file mode 100644
index 000000000..463f6c6fd
--- /dev/null
+++ b/SmartDeviceLinkTests/RPCSpecs/ResponseSpecs/SDLReleaseInteriorVehicleDataModuleResponseSpec.m
@@ -0,0 +1,19 @@
+//
+// SDLReleaseInteriorVehicleDataModuleResponseSpec.m
+// SmartDeviceLinkTests
+//
+// Created by standa1 on 7/29/19.
+// Copyright © 2019 smartdevicelink. All rights reserved.
+//
+#import <Foundation/Foundation.h>
+
+#import <Quick/Quick.h>
+#import <Nimble/Nimble.h>
+
+#import "SDLReleaseInteriorVehicleDataModuleResponse.h"
+#import "SDLRPCParameterNames.h"
+
+QuickSpecBegin(SDLReleaseInteriorVehicleDataModuleResponseSpec)
+
+QuickSpecEnd
+
diff --git a/SmartDeviceLinkTests/RPCSpecs/StructSpecs/SDLAudioControlCapabilitiesSpec.m b/SmartDeviceLinkTests/RPCSpecs/StructSpecs/SDLAudioControlCapabilitiesSpec.m
index d4ba87009..d23b64eba 100644
--- a/SmartDeviceLinkTests/RPCSpecs/StructSpecs/SDLAudioControlCapabilitiesSpec.m
+++ b/SmartDeviceLinkTests/RPCSpecs/StructSpecs/SDLAudioControlCapabilitiesSpec.m
@@ -15,10 +15,28 @@
QuickSpecBegin( SDLAudioControlCapabilitiesSpec)
describe(@"Getter/Setter Tests", ^ {
+ __block SDLModuleInfo *testModuleInfo = nil;
+ __block SDLGrid *testGird = nil;
+
+ beforeEach(^{
+ testGird.col = @0;
+ testGird.row = @0;
+ testGird.level = @0;
+ testGird.rowspan = @2;
+ testGird.colspan = @3;
+ testGird.levelspan = @1;
+ testModuleInfo = [[SDLModuleInfo alloc] init];
+ testModuleInfo.moduleId = @"123";
+ testModuleInfo.allowMultipleAccess = @YES;
+ testModuleInfo.serviceArea = testGird;
+ testModuleInfo.location = testGird;
+ });
+
it(@"Should set and get correctly", ^ {
SDLAudioControlCapabilities* testStruct = [[SDLAudioControlCapabilities alloc] init];
testStruct.moduleName = @"module";
+ testStruct.moduleInfo = testModuleInfo;
testStruct.sourceAvailable = @(YES);
testStruct.keepContextAvailable = @YES;
testStruct.volumeAvailable = @(NO);
@@ -26,6 +44,7 @@ describe(@"Getter/Setter Tests", ^ {
testStruct.equalizerMaxChannelId = @56;
expect(testStruct.moduleName).to(equal(@"module"));
+ expect(testStruct.moduleInfo).to(equal(testModuleInfo));
expect(testStruct.keepContextAvailable).to(equal(@YES));
expect(testStruct.sourceAvailable).to(equal(@(YES)));
expect(testStruct.volumeAvailable).to(equal(@(NO)));
@@ -34,9 +53,13 @@ describe(@"Getter/Setter Tests", ^ {
});
it(@"Should set and get correctly", ^ {
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
SDLAudioControlCapabilities* testStruct = [[SDLAudioControlCapabilities alloc] initWithModuleName:@"module"];
+#pragma clang diagnostic pop
expect(testStruct.moduleName).to(equal(@"module"));
+ expect(testStruct.moduleInfo).to(beNil());
expect(testStruct.sourceAvailable).to(beNil());
expect(testStruct.keepContextAvailable).to(beNil());
expect(testStruct.volumeAvailable).to(beNil());
@@ -45,9 +68,40 @@ describe(@"Getter/Setter Tests", ^ {
});
it(@"Should set and get correctly", ^ {
+ SDLAudioControlCapabilities* testStruct = [[SDLAudioControlCapabilities alloc] initWithModuleName:@"module" moduleInfo:testModuleInfo];
+
+ expect(testStruct.moduleName).to(equal(@"module"));
+ expect(testStruct.moduleInfo).to(equal(testModuleInfo));
+ expect(testStruct.sourceAvailable).to(beNil());
+ expect(testStruct.keepContextAvailable).to(beNil());
+ expect(testStruct.volumeAvailable).to(beNil());
+ expect(testStruct.equalizerAvailable).to(beNil());
+ expect(testStruct.equalizerMaxChannelId).to(beNil());
+ });
+
+ it(@"Should set and get correctly", ^ {
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
SDLAudioControlCapabilities* testStruct = [[SDLAudioControlCapabilities alloc] initWithModuleName:@"module" sourceAvailable:@NO keepContextAvailable:@NO volumeAvailable:@YES equalizerAvailable:@NO equalizerMaxChannelID:@34];
+#pragma clang diagnostic pop
expect(testStruct.moduleName).to(equal(@"module"));
+ expect(testStruct.moduleInfo).to(beNil());
+ expect(testStruct.sourceAvailable).to(equal(@(NO)));
+ expect(testStruct.keepContextAvailable).to(equal(@NO));
+ expect(testStruct.volumeAvailable).to(equal(@(YES)));
+ expect(testStruct.equalizerAvailable).to(equal(@(NO)));
+ expect(testStruct.equalizerMaxChannelId).to(equal(@34));
+ });
+
+ it(@"Should set and get correctly", ^ {
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
+ SDLAudioControlCapabilities* testStruct = [[SDLAudioControlCapabilities alloc] initWithModuleName:@"module" moduleInfo:testModuleInfo sourceAvailable:@NO keepContextAvailable:@NO volumeAvailable:@YES equalizerAvailable:@NO equalizerMaxChannelID:@34];
+#pragma clang diagnostic pop
+
+ expect(testStruct.moduleName).to(equal(@"module"));
+ expect(testStruct.moduleInfo).to(equal(testModuleInfo));
expect(testStruct.sourceAvailable).to(equal(@(NO)));
expect(testStruct.keepContextAvailable).to(equal(@NO));
expect(testStruct.volumeAvailable).to(equal(@(YES)));
@@ -55,8 +109,10 @@ describe(@"Getter/Setter Tests", ^ {
expect(testStruct.equalizerMaxChannelId).to(equal(@34));
});
+
it(@"Should get correctly when initialized", ^ {
NSMutableDictionary* dict = [@{SDLRPCParameterNameModuleName:@"module",
+ SDLRPCParameterNameModuleInfo:testModuleInfo,
SDLRPCParameterNameSourceAvailable:@(NO),
SDLRPCParameterNameKeepContextAvailable: @YES,
SDLRPCParameterNameVolumeAvailable:@(YES),
@@ -69,6 +125,7 @@ describe(@"Getter/Setter Tests", ^ {
#pragma clang diagnostic pop
expect(testStruct.moduleName).to(equal(@"module"));
+ expect(testStruct.moduleInfo).to(equal(testModuleInfo));
expect(testStruct.sourceAvailable).to(equal(@(NO)));
expect(testStruct.keepContextAvailable).to(equal(@YES));
expect(testStruct.volumeAvailable).to(equal(@(YES)));
@@ -81,6 +138,7 @@ describe(@"Getter/Setter Tests", ^ {
SDLAudioControlCapabilities* testStruct = [[SDLAudioControlCapabilities alloc] init];
expect(testStruct.moduleName).to(beNil());
+ expect(testStruct.moduleInfo).to(beNil());
expect(testStruct.sourceAvailable).to(beNil());
expect(testStruct.keepContextAvailable).to(beNil());
expect(testStruct.volumeAvailable).to(beNil());
diff --git a/SmartDeviceLinkTests/RPCSpecs/StructSpecs/SDLButtonCapabilitiesSpec.m b/SmartDeviceLinkTests/RPCSpecs/StructSpecs/SDLButtonCapabilitiesSpec.m
index f60e67998..eb3f8eea5 100644
--- a/SmartDeviceLinkTests/RPCSpecs/StructSpecs/SDLButtonCapabilitiesSpec.m
+++ b/SmartDeviceLinkTests/RPCSpecs/StructSpecs/SDLButtonCapabilitiesSpec.m
@@ -16,6 +16,23 @@
QuickSpecBegin(SDLButtonCapabilitiesSpec)
describe(@"Getter/Setter Tests", ^ {
+ __block SDLModuleInfo *testModuleInfo = nil;
+ __block SDLGrid *testGird = nil;
+
+ beforeEach(^{
+ testGird.col = @0;
+ testGird.row = @0;
+ testGird.level = @0;
+ testGird.rowspan = @2;
+ testGird.colspan = @3;
+ testGird.levelspan = @1;
+ testModuleInfo = [[SDLModuleInfo alloc] init];
+ testModuleInfo.moduleId = @"123";
+ testModuleInfo.allowMultipleAccess = @YES;
+ testModuleInfo.serviceArea = testGird;
+ testModuleInfo.location = testGird;
+ });
+
it(@"Should set and get correctly", ^ {
SDLButtonCapabilities* testStruct = [[SDLButtonCapabilities alloc] init];
@@ -25,6 +42,7 @@ describe(@"Getter/Setter Tests", ^ {
testStruct.upDownAvailable = @NO;
expect(testStruct.name).to(equal(SDLButtonNameTuneUp));
+ expect(testStruct.moduleInfo).to(beNil());
expect(testStruct.shortPressAvailable).to(equal(@YES));
expect(testStruct.longPressAvailable).to(equal(@YES));
expect(testStruct.upDownAvailable).to(equal(@NO));
@@ -32,6 +50,7 @@ describe(@"Getter/Setter Tests", ^ {
it(@"Should get correctly when initialized", ^ {
NSMutableDictionary* dict = [@{SDLRPCParameterNameName:SDLButtonNameCustomButton,
+ SDLRPCParameterNameModuleInfo:testModuleInfo,
SDLRPCParameterNameShortPressAvailable:@YES,
SDLRPCParameterNameLongPressAvailable:@YES,
SDLRPCParameterNameUpDownAvailable:@NO} mutableCopy];
@@ -41,6 +60,7 @@ describe(@"Getter/Setter Tests", ^ {
#pragma clang diagnostic pop
expect(testStruct.name).to(equal(SDLButtonNameCustomButton));
+ expect(testStruct.moduleInfo).to(equal(testModuleInfo));
expect(testStruct.shortPressAvailable).to(equal(@YES));
expect(testStruct.longPressAvailable).to(equal(@YES));
expect(testStruct.upDownAvailable).to(equal(@NO));
@@ -50,6 +70,7 @@ describe(@"Getter/Setter Tests", ^ {
SDLButtonCapabilities* testStruct = [[SDLButtonCapabilities alloc] init];
expect(testStruct.name).to(beNil());
+ expect(testStruct.moduleInfo).to(beNil());
expect(testStruct.shortPressAvailable).to(beNil());
expect(testStruct.longPressAvailable).to(beNil());
expect(testStruct.upDownAvailable).to(beNil());
diff --git a/SmartDeviceLinkTests/RPCSpecs/StructSpecs/SDLClimateControlCapabilitiesSpec.m b/SmartDeviceLinkTests/RPCSpecs/StructSpecs/SDLClimateControlCapabilitiesSpec.m
index 41b919542..ce3b93301 100644
--- a/SmartDeviceLinkTests/RPCSpecs/StructSpecs/SDLClimateControlCapabilitiesSpec.m
+++ b/SmartDeviceLinkTests/RPCSpecs/StructSpecs/SDLClimateControlCapabilitiesSpec.m
@@ -17,10 +17,28 @@
QuickSpecBegin(SDLClimateControlCapabilitiesSpec)
describe(@"Getter/Setter Tests", ^ {
+ __block SDLModuleInfo *testModuleInfo = nil;
+ __block SDLGrid *testGird = nil;
+
+ beforeEach(^{
+ testGird.col = @0;
+ testGird.row = @0;
+ testGird.level = @0;
+ testGird.rowspan = @2;
+ testGird.colspan = @3;
+ testGird.levelspan = @1;
+ testModuleInfo = [[SDLModuleInfo alloc] init];
+ testModuleInfo.moduleId = @"123";
+ testModuleInfo.allowMultipleAccess = @YES;
+ testModuleInfo.serviceArea = testGird;
+ testModuleInfo.location = testGird;
+ });
+
it(@"Should set and get correctly", ^ {
SDLClimateControlCapabilities* testStruct = [[SDLClimateControlCapabilities alloc] init];
testStruct.moduleName = @"Name";
+ testStruct.moduleInfo = testModuleInfo;
testStruct.fanSpeedAvailable = @YES;
testStruct.desiredTemperatureAvailable = @NO;
testStruct.acEnableAvailable = @NO;
@@ -39,6 +57,7 @@ describe(@"Getter/Setter Tests", ^ {
testStruct.climateEnableAvailable = @(NO);
expect(testStruct.moduleName).to(equal(@"Name"));
+ expect(testStruct.moduleInfo).to(equal(testModuleInfo));
expect(testStruct.fanSpeedAvailable).to(equal(@YES));
expect(testStruct.desiredTemperatureAvailable).to(equal(@NO));
expect(testStruct.acEnableAvailable).to(equal(@NO));
@@ -60,6 +79,7 @@ describe(@"Getter/Setter Tests", ^ {
it(@"Should get correctly when initialized", ^ {
NSMutableDictionary<NSString *, id> *dict = [@{SDLRPCParameterNameModuleName:@"Name",
+ SDLRPCParameterNameModuleInfo:testModuleInfo,
SDLRPCParameterNameFanSpeedAvailable:@YES,
SDLRPCParameterNameDesiredTemperatureAvailable:@NO,
SDLRPCParameterNameACEnableAvailable:@NO,
@@ -83,6 +103,7 @@ describe(@"Getter/Setter Tests", ^ {
#pragma clang diagnostic pop
expect(testStruct.moduleName).to(equal(@"Name"));
+ expect(testStruct.moduleInfo).to(equal(testModuleInfo));
expect(testStruct.fanSpeedAvailable).to(equal(@YES));
expect(testStruct.desiredTemperatureAvailable).to(equal(@NO));
expect(testStruct.acEnableAvailable).to(equal(@NO));
@@ -107,6 +128,7 @@ describe(@"Getter/Setter Tests", ^ {
SDLClimateControlCapabilities* testStruct = [[SDLClimateControlCapabilities alloc] initWithModuleName:@"Name" fanSpeedAvailable:YES desiredTemperatureAvailable:NO acEnableAvailable:NO acMaxEnableAvailable:YES circulateAirAvailable:NO autoModeEnableAvailable:NO dualModeEnableAvailable:NO defrostZoneAvailable:YES ventilationModeAvailable:YES];
expect(testStruct.moduleName).to(equal(@"Name"));
+ expect(testStruct.moduleInfo).to(beNil());
expect(testStruct.fanSpeedAvailable).to(equal(@YES));
expect(testStruct.desiredTemperatureAvailable).to(equal(@NO));
expect(testStruct.acEnableAvailable).to(equal(@NO));
@@ -128,8 +150,10 @@ describe(@"Getter/Setter Tests", ^ {
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
SDLClimateControlCapabilities* testStruct = [[SDLClimateControlCapabilities alloc] initWithModuleName:@"Name" fanSpeedAvailable:YES desiredTemperatureAvailable:NO acEnableAvailable:NO acMaxEnableAvailable:YES circulateAirAvailable:NO autoModeEnableAvailable:NO dualModeEnableAvailable:NO defrostZoneAvailable:YES ventilationModeAvailable:YES heatedSteeringWheelAvailable:YES heatedWindshieldAvailable:NO heatedRearWindowAvailable:YES heatedMirrorsAvailable:NO];
+#pragma clang diagnostic pop
expect(testStruct.moduleName).to(equal(@"Name"));
+ expect(testStruct.moduleInfo).to(beNil());
expect(testStruct.fanSpeedAvailable).to(equal(@YES));
expect(testStruct.desiredTemperatureAvailable).to(equal(@NO));
expect(testStruct.acEnableAvailable).to(equal(@NO));
@@ -170,6 +194,7 @@ describe(@"Getter/Setter Tests", ^ {
SDLClimateControlCapabilities* testStruct = [[SDLClimateControlCapabilities alloc] init];
expect(testStruct.moduleName).to(beNil());
+ expect(testStruct.moduleInfo).to(beNil());
expect(testStruct.fanSpeedAvailable).to(beNil());
expect(testStruct.desiredTemperatureAvailable).to(beNil());
expect(testStruct.acEnableAvailable).to(beNil());
diff --git a/SmartDeviceLinkTests/RPCSpecs/StructSpecs/SDLHMICapabilitiesSpec.m b/SmartDeviceLinkTests/RPCSpecs/StructSpecs/SDLHMICapabilitiesSpec.m
index 9f64d4af8..8ecd92e6c 100644
--- a/SmartDeviceLinkTests/RPCSpecs/StructSpecs/SDLHMICapabilitiesSpec.m
+++ b/SmartDeviceLinkTests/RPCSpecs/StructSpecs/SDLHMICapabilitiesSpec.m
@@ -17,6 +17,9 @@ describe(@"SDLHMICapabilities struct", ^{
__block NSNumber *somePhoneCallState = @NO;
__block NSNumber *someNavigationState = @YES;
__block NSNumber *someVideoStreamState = @NO;
+ __block NSNumber *someRemoteControlState = @YES;
+ __block NSNumber *someAppServicesState = @YES;
+
context(@"When initialized with properties", ^{
beforeEach(^{
@@ -24,18 +27,16 @@ describe(@"SDLHMICapabilities struct", ^{
testStruct.phoneCall = somePhoneCallState;
testStruct.navigation = someNavigationState;
testStruct.videoStreaming = someVideoStreamState;
+ testStruct.remoteControl = someRemoteControlState;
+ testStruct.appServices = someAppServicesState;
});
- it(@"should properly set phone call", ^{
+ it(@"should properly set properties", ^{
expect(testStruct.phoneCall).to(equal(somePhoneCallState));
- });
-
- it(@"should properly set navigation", ^{
expect(testStruct.navigation).to(equal(someNavigationState));
- });
-
- it(@"should properly set video streaming", ^{
expect(testStruct.videoStreaming).to(equal(someVideoStreamState));
+ expect(testStruct.remoteControl).to(equal(someRemoteControlState));
+ expect(testStruct.appServices).to(equal(someAppServicesState));
});
});
@@ -44,7 +45,9 @@ describe(@"SDLHMICapabilities struct", ^{
NSDictionary<NSString *, NSNumber *> *structInitDict = @{
SDLRPCParameterNameNavigation: someNavigationState,
SDLRPCParameterNamePhoneCall: somePhoneCallState,
- SDLRPCParameterNameVideoStreaming: someVideoStreamState
+ SDLRPCParameterNameVideoStreaming: someVideoStreamState,
+ SDLRPCParameterNameRemoteControl: someRemoteControlState,
+ SDLRPCParameterNameAppServices: someAppServicesState
};
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
@@ -52,16 +55,12 @@ describe(@"SDLHMICapabilities struct", ^{
#pragma clang diagnostic pop
});
- it(@"should properly set phone call", ^{
+ it(@"should properly set properties", ^{
expect(testStruct.phoneCall).to(equal(somePhoneCallState));
- });
-
- it(@"should properly set navigation", ^{
expect(testStruct.navigation).to(equal(someNavigationState));
- });
-
- it(@"should properly set video streaming", ^{
expect(testStruct.videoStreaming).to(equal(someVideoStreamState));
+ expect(testStruct.remoteControl).to(equal(someRemoteControlState));
+ expect(testStruct.appServices).to(equal(someAppServicesState));
});
});
@@ -70,16 +69,12 @@ describe(@"SDLHMICapabilities struct", ^{
testStruct = nil;
});
- it(@"phoneCall should be nil", ^{
+ it(@"properties should be nil", ^{
expect(testStruct.phoneCall).to(beNil());
- });
-
- it(@"navigation should be nil", ^{
expect(testStruct.navigation).to(beNil());
- });
-
- it(@"video streaming should be nil", ^{
expect(testStruct.videoStreaming).to(beNil());
+ expect(testStruct.remoteControl).to(beNil());
+ expect(testStruct.appServices).to(beNil());
});
});
});
diff --git a/SmartDeviceLinkTests/RPCSpecs/StructSpecs/SDLHMISettingsControlCapabilitiesSpec.m b/SmartDeviceLinkTests/RPCSpecs/StructSpecs/SDLHMISettingsControlCapabilitiesSpec.m
index 7b766f176..9906477d4 100644
--- a/SmartDeviceLinkTests/RPCSpecs/StructSpecs/SDLHMISettingsControlCapabilitiesSpec.m
+++ b/SmartDeviceLinkTests/RPCSpecs/StructSpecs/SDLHMISettingsControlCapabilitiesSpec.m
@@ -15,33 +15,83 @@
QuickSpecBegin(SDLHMISettingsControlCapabilitiesSpec)
describe(@"Getter/Setter Tests", ^ {
+ __block SDLModuleInfo *testModuleInfo = nil;
+ __block SDLGrid *testGird = nil;
+
+ beforeEach(^{
+ testGird.col = @0;
+ testGird.row = @0;
+ testGird.level = @0;
+ testGird.rowspan = @2;
+ testGird.colspan = @3;
+ testGird.levelspan = @1;
+ testModuleInfo = [[SDLModuleInfo alloc] init];
+ testModuleInfo.moduleId = @"123";
+ testModuleInfo.allowMultipleAccess = @YES;
+ testModuleInfo.serviceArea = testGird;
+ testModuleInfo.location = testGird;
+ });
+
it(@"Should set and get correctly", ^ {
SDLHMISettingsControlCapabilities* testStruct = [[SDLHMISettingsControlCapabilities alloc] init];
testStruct.moduleName = @"displayMode";
+ testStruct.moduleInfo = testModuleInfo;
testStruct.distanceUnitAvailable = @(NO);
testStruct.temperatureUnitAvailable = @(NO);
testStruct.displayModeUnitAvailable = @(YES);
expect(testStruct.moduleName).to(equal(@"displayMode"));
+ expect(testStruct.moduleInfo).to(equal(testModuleInfo));
expect(testStruct.distanceUnitAvailable).to(equal(@(NO)));
expect(testStruct.temperatureUnitAvailable).to(equal(@(NO)));
expect(testStruct.displayModeUnitAvailable).to(equal(@(YES)));
});
it(@"Should set and get correctly", ^ {
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
SDLHMISettingsControlCapabilities* testStruct = [[SDLHMISettingsControlCapabilities alloc] initWithModuleName:@"displayMode"];
+#pragma clang diagnostic pop
expect(testStruct.moduleName).to(equal(@"displayMode"));
+ expect(testStruct.moduleInfo).to(beNil());
+ expect(testStruct.distanceUnitAvailable).to(beNil());
+ expect(testStruct.temperatureUnitAvailable).to(beNil());
+ expect(testStruct.displayModeUnitAvailable).to(beNil());
+ });
+
+ it(@"Should set and get correctly", ^ {
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
+ SDLHMISettingsControlCapabilities* testStruct = [[SDLHMISettingsControlCapabilities alloc] initWithModuleName:@"displayMode" moduleInfo:testModuleInfo];
+#pragma clang diagnostic pop
+
+ expect(testStruct.moduleName).to(equal(@"displayMode"));
+ expect(testStruct.moduleInfo).to(equal(testModuleInfo));
expect(testStruct.distanceUnitAvailable).to(beNil());
expect(testStruct.temperatureUnitAvailable).to(beNil());
expect(testStruct.displayModeUnitAvailable).to(beNil());
});
it(@"Should set and get correctly", ^ {
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
SDLHMISettingsControlCapabilities* testStruct = [[SDLHMISettingsControlCapabilities alloc] initWithModuleName:@"displayMode" distanceUnitAvailable:NO temperatureUnitAvailable:YES displayModeUnitAvailable:NO];
+#pragma clang diagnostic pop
expect(testStruct.moduleName).to(equal(@"displayMode"));
+ expect(testStruct.moduleInfo).to(beNil());
+ expect(testStruct.distanceUnitAvailable).to(equal(@(NO)));
+ expect(testStruct.temperatureUnitAvailable).to(equal(@(YES)));
+ expect(testStruct.displayModeUnitAvailable).to(equal(@(NO)));
+ });
+
+ it(@"Should set and get correctly", ^ {
+ SDLHMISettingsControlCapabilities* testStruct = [[SDLHMISettingsControlCapabilities alloc] initWithModuleName:@"displayMode" moduleInfo:testModuleInfo distanceUnitAvailable:NO temperatureUnitAvailable:YES displayModeUnitAvailable:NO];
+
+ expect(testStruct.moduleName).to(equal(@"displayMode"));
+ expect(testStruct.moduleInfo).to(equal(testModuleInfo));
expect(testStruct.distanceUnitAvailable).to(equal(@(NO)));
expect(testStruct.temperatureUnitAvailable).to(equal(@(YES)));
expect(testStruct.displayModeUnitAvailable).to(equal(@(NO)));
@@ -49,6 +99,7 @@ describe(@"Getter/Setter Tests", ^ {
it(@"Should get correctly when initialized", ^ {
NSMutableDictionary* dict = [@{SDLRPCParameterNameModuleName:@"temperatureUnit",
+ SDLRPCParameterNameModuleInfo:testModuleInfo,
SDLRPCParameterNameTemperatureUnitAvailable:@(YES),
SDLRPCParameterNameDistanceUnitAvailable:@(YES),
SDLRPCParameterNameDisplayModeUnitAvailable:@(NO)
@@ -59,6 +110,7 @@ describe(@"Getter/Setter Tests", ^ {
#pragma clang diagnostic pop
expect(testStruct.moduleName).to(equal(@"temperatureUnit"));
+ expect(testStruct.moduleInfo).to(equal(testModuleInfo));
expect(testStruct.distanceUnitAvailable).to(equal(@(YES)));
expect(testStruct.temperatureUnitAvailable).to(equal(@(YES)));
expect(testStruct.displayModeUnitAvailable).to(equal(@(NO)));
@@ -69,6 +121,7 @@ describe(@"Getter/Setter Tests", ^ {
SDLHMISettingsControlCapabilities* testStruct = [[SDLHMISettingsControlCapabilities alloc] init];
expect(testStruct.moduleName).to(beNil());
+ expect(testStruct.moduleInfo).to(beNil());
expect(testStruct.distanceUnitAvailable).to(beNil());
expect(testStruct.temperatureUnitAvailable).to(beNil());
expect(testStruct.displayModeUnitAvailable).to(beNil());
diff --git a/SmartDeviceLinkTests/RPCSpecs/StructSpecs/SDLLightControlCapabilitiesSpec.m b/SmartDeviceLinkTests/RPCSpecs/StructSpecs/SDLLightControlCapabilitiesSpec.m
index 7531a4813..404dc2aeb 100644
--- a/SmartDeviceLinkTests/RPCSpecs/StructSpecs/SDLLightControlCapabilitiesSpec.m
+++ b/SmartDeviceLinkTests/RPCSpecs/StructSpecs/SDLLightControlCapabilitiesSpec.m
@@ -17,27 +17,60 @@ QuickSpecBegin( SDLLightControlCapabilitiesSpec)
SDLLightCapabilities* somelightCapabilities = [[SDLLightCapabilities alloc] init];
describe(@"Getter/Setter Tests", ^ {
+ __block SDLModuleInfo *testModuleInfo = nil;
+ __block SDLGrid *testGird = nil;
+
+ beforeEach(^{
+ testGird.col = @0;
+ testGird.row = @0;
+ testGird.level = @0;
+ testGird.rowspan = @2;
+ testGird.colspan = @3;
+ testGird.levelspan = @1;
+ testModuleInfo = [[SDLModuleInfo alloc] init];
+ testModuleInfo.moduleId = @"123";
+ testModuleInfo.allowMultipleAccess = @YES;
+ testModuleInfo.serviceArea = testGird;
+ testModuleInfo.location = testGird;
+ });
+
it(@"Should set and get correctly", ^ {
SDLLightControlCapabilities* testStruct = [[SDLLightControlCapabilities alloc] init];
testStruct.moduleName = @"moduleName";
+ testStruct.moduleInfo = testModuleInfo;
testStruct.supportedLights = [@[somelightCapabilities] copy];
expect(testStruct.moduleName).to(equal(@"moduleName"));
+ expect(testStruct.moduleInfo).to(equal(testModuleInfo));
expect(testStruct.supportedLights).to(equal([@[somelightCapabilities] copy]));
});
it(@"Should set and get correctly", ^ {
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
SDLLightControlCapabilities* testStruct = [[SDLLightControlCapabilities alloc] initWithModuleName:@"moduleName" supportedLights:[@[somelightCapabilities] copy]];
+#pragma clang diagnostic pop
expect(testStruct.moduleName).to(equal(@"moduleName"));
+ expect(testStruct.moduleInfo).to(beNil());
expect(testStruct.supportedLights).to(equal([@[somelightCapabilities] copy]));
});
+ it(@"Should set and get correctly", ^ {
+ SDLLightControlCapabilities* testStruct = [[SDLLightControlCapabilities alloc] initWithModuleName:@"moduleName" moduleInfo:testModuleInfo supportedLights:[@[somelightCapabilities] copy]];
+
+ expect(testStruct.moduleName).to(equal(@"moduleName"));
+ expect(testStruct.moduleInfo).to(equal(testModuleInfo));
+ expect(testStruct.supportedLights).to(equal([@[somelightCapabilities] copy]));
+
+ });
+
it(@"Should get correctly when initialized", ^ {
NSMutableDictionary* dict = [@{SDLRPCParameterNameModuleName:@"moduleName",
+ SDLRPCParameterNameModuleInfo:testModuleInfo,
SDLRPCParameterNameSupportedLights:[@[somelightCapabilities] copy]
} mutableCopy];
#pragma clang diagnostic push
@@ -46,6 +79,7 @@ describe(@"Getter/Setter Tests", ^ {
#pragma clang diagnostic pop
expect(testStruct.moduleName).to(equal(@"moduleName"));
+ expect(testStruct.moduleInfo).to(equal(testModuleInfo));
expect(testStruct.supportedLights).to(equal([@[somelightCapabilities] copy]));
});
@@ -53,6 +87,7 @@ describe(@"Getter/Setter Tests", ^ {
SDLLightControlCapabilities* testStruct = [[SDLLightControlCapabilities alloc] init];
expect(testStruct.moduleName).to(beNil());
+ expect(testStruct.moduleInfo).to(beNil());
expect(testStruct.supportedLights).to(beNil());
});
});
diff --git a/SmartDeviceLinkTests/RPCSpecs/StructSpecs/SDLModuleDataSpec.m b/SmartDeviceLinkTests/RPCSpecs/StructSpecs/SDLModuleDataSpec.m
index 10789bd9c..5a4ce340f 100644
--- a/SmartDeviceLinkTests/RPCSpecs/StructSpecs/SDLModuleDataSpec.m
+++ b/SmartDeviceLinkTests/RPCSpecs/StructSpecs/SDLModuleDataSpec.m
@@ -27,6 +27,7 @@ describe(@"Initialization tests", ^{
__block SDLLightControlData* someLightData = [[SDLLightControlData alloc] init];
__block SDLHMISettingsControlData* someHMISettingsData = [[SDLHMISettingsControlData alloc] init];
__block SDLSeatControlData* someSeatData = [[SDLSeatControlData alloc] init];
+ __block NSString *someModuleId = @"123";
it(@"should properly initialize init", ^{
SDLModuleData* testStruct = [[SDLModuleData alloc] init];
@@ -38,7 +39,7 @@ describe(@"Initialization tests", ^{
expect(testStruct.audioControlData).to(beNil());
expect(testStruct.hmiSettingsControlData).to(beNil());
expect(testStruct.lightControlData).to(beNil());
-
+ expect(testStruct.moduleId).to(beNil());
});
it(@"should properly initialize initWithDictionary", ^{
@@ -49,7 +50,8 @@ describe(@"Initialization tests", ^{
SDLRPCParameterNameSeatControlData:someSeatData,
SDLRPCParameterNameAudioControlData:someAudioData,
SDLRPCParameterNameLightControlData:someLightData,
- SDLRPCParameterNameHmiSettingsControlData:someHMISettingsData} mutableCopy];
+ SDLRPCParameterNameHmiSettingsControlData:someHMISettingsData,
+ SDLRPCParameterNameModuleId:someModuleId} mutableCopy];
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
SDLModuleData* testStruct = [[SDLModuleData alloc] initWithDictionary:dict];
@@ -62,7 +64,7 @@ describe(@"Initialization tests", ^{
expect(testStruct.audioControlData).to(equal(someAudioData));
expect(testStruct.hmiSettingsControlData).to(equal(someHMISettingsData));
expect(testStruct.lightControlData).to(equal(someLightData));
-
+ expect(testStruct.moduleId).to(equal(someModuleId));
});
it(@"Should set and get correctly", ^{
@@ -74,6 +76,7 @@ describe(@"Initialization tests", ^{
testStruct.audioControlData = someAudioData;
testStruct.lightControlData = someLightData;
testStruct.hmiSettingsControlData = someHMISettingsData;
+ testStruct.moduleId = someModuleId;
expect(testStruct.moduleType).to(equal(SDLModuleTypeRadio));
expect(testStruct.seatControlData).to(equal(someSeatData));
@@ -82,6 +85,7 @@ describe(@"Initialization tests", ^{
expect(testStruct.audioControlData).to(equal(someAudioData));
expect(testStruct.hmiSettingsControlData).to(equal(someHMISettingsData));
expect(testStruct.lightControlData).to(equal(someLightData));
+ expect(testStruct.moduleId).to(equal(someModuleId));
});
it(@"Should get correctly when initialized with RadioControlData", ^ {
@@ -91,6 +95,7 @@ describe(@"Initialization tests", ^{
expect(testStruct.radioControlData).to(equal(someRadioData));
expect(testStruct.climateControlData).to(beNil());
expect(testStruct.seatControlData).to(beNil());
+ expect(testStruct.moduleId).to(beNil());
});
it(@"Should get correctly when initialized with ClimateControlData", ^ {
@@ -100,6 +105,7 @@ describe(@"Initialization tests", ^{
expect(testStruct.climateControlData).to(equal(someClimateData));
expect(testStruct.radioControlData).to(beNil());
expect(testStruct.seatControlData).to(beNil());
+ expect(testStruct.moduleId).to(beNil());
});
it(@"Should get correctly when initialized with ClimateControlData", ^ {
@@ -109,6 +115,7 @@ describe(@"Initialization tests", ^{
expect(testStruct.seatControlData).to(equal(someSeatData));
expect(testStruct.radioControlData).to(beNil());
expect(testStruct.climateControlData).to(beNil());
+ expect(testStruct.moduleId).to(beNil());
});
it(@"Should get correctly when initialized with ClimateControlData", ^ {
@@ -120,6 +127,7 @@ describe(@"Initialization tests", ^{
expect(testStruct.audioControlData).to(beNil());
expect(testStruct.lightControlData).to(beNil());
expect(testStruct.hmiSettingsControlData).to(equal(someHMISettingsData));
+ expect(testStruct.moduleId).to(beNil());
});
it(@"Should get correctly when initialized with ClimateControlData", ^ {
@@ -131,6 +139,7 @@ describe(@"Initialization tests", ^{
expect(testStruct.audioControlData).to(beNil());
expect(testStruct.lightControlData).to(equal(someLightData));
expect(testStruct.hmiSettingsControlData).to(beNil());
+ expect(testStruct.moduleId).to(beNil());
});
it(@"Should get correctly when initialized with ClimateControlData", ^ {
@@ -142,6 +151,7 @@ describe(@"Initialization tests", ^{
expect(testStruct.audioControlData).to(equal(someAudioData));
expect(testStruct.lightControlData).to(beNil());
expect(testStruct.hmiSettingsControlData).to(beNil());
+ expect(testStruct.moduleId).to(beNil());
});
});
diff --git a/SmartDeviceLinkTests/RPCSpecs/StructSpecs/SDLRadioControlCapabilitiesSpec.m b/SmartDeviceLinkTests/RPCSpecs/StructSpecs/SDLRadioControlCapabilitiesSpec.m
index e68ee0af2..3ec5b48c7 100644
--- a/SmartDeviceLinkTests/RPCSpecs/StructSpecs/SDLRadioControlCapabilitiesSpec.m
+++ b/SmartDeviceLinkTests/RPCSpecs/StructSpecs/SDLRadioControlCapabilitiesSpec.m
@@ -14,11 +14,28 @@
QuickSpecBegin(SDLRadioControlCapabilitiesSpec)
describe(@"Initialization tests", ^{
+ __block SDLModuleInfo *testModuleInfo = nil;
+ __block SDLGrid *testGird = nil;
+ beforeEach(^{
+ testGird.col = @0;
+ testGird.row = @0;
+ testGird.level = @0;
+ testGird.rowspan = @2;
+ testGird.colspan = @3;
+ testGird.levelspan = @1;
+ testModuleInfo = [[SDLModuleInfo alloc] init];
+ testModuleInfo.moduleId = @"123";
+ testModuleInfo.allowMultipleAccess = @YES;
+ testModuleInfo.serviceArea = testGird;
+ testModuleInfo.location = testGird;
+ });
+
it(@"should properly initialize init", ^{
SDLRadioControlCapabilities* testStruct = [[SDLRadioControlCapabilities alloc] init];
expect(testStruct.moduleName).to(beNil());
+ expect(testStruct.moduleInfo).to(beNil());
expect(testStruct.radioEnableAvailable).to(beNil());
expect(testStruct.radioBandAvailable).to(beNil());
expect(testStruct.radioFrequencyAvailable).to(beNil());
@@ -43,6 +60,7 @@ describe(@"Initialization tests", ^{
it(@"should properly initialize initWithDictionary", ^{
NSMutableDictionary* dict = [@{SDLRPCParameterNameModuleName : @"someName",
+ SDLRPCParameterNameModuleInfo: testModuleInfo,
SDLRPCParameterNameRadioEnableAvailable : @YES,
SDLRPCParameterNameRadioBandAvailable : @YES,
SDLRPCParameterNameRadioFrequencyAvailable : @YES,
@@ -55,7 +73,7 @@ describe(@"Initialization tests", ^{
SDLRPCParameterNameSignalChangeThresholdAvailable : @NO,
SDLRPCParameterNameHDRadioEnableAvailable : @YES,
SDLRPCParameterNameSiriusXMRadioAvailable : @NO,
- SDLRPCParameterNameSISDataAvailable:@YES
+ SDLRPCParameterNameSISDataAvailable: @YES
} mutableCopy];
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
@@ -63,6 +81,7 @@ describe(@"Initialization tests", ^{
#pragma clang diagnostic pop
expect(testStruct.moduleName).to(equal(@"someName"));
+ expect(testStruct.moduleInfo).to(equal(testModuleInfo));
expect(testStruct.radioEnableAvailable).to(equal(@YES));
expect(testStruct.radioBandAvailable).to(equal(@YES));
expect(testStruct.radioFrequencyAvailable).to(equal(@YES));
@@ -88,6 +107,7 @@ describe(@"Initialization tests", ^{
SDLRadioControlCapabilities* testStruct = [[SDLRadioControlCapabilities alloc] init];
testStruct.moduleName = @"someName";
+ testStruct.moduleInfo = testModuleInfo;
testStruct.radioEnableAvailable = @YES;
testStruct.radioBandAvailable = @YES;
testStruct.radioFrequencyAvailable = @YES;
@@ -108,6 +128,7 @@ describe(@"Initialization tests", ^{
testStruct.sisDataAvailable = @YES;
expect(testStruct.moduleName).to(equal(@"someName"));
+ expect(testStruct.moduleInfo).to(equal(testModuleInfo));
expect(testStruct.radioEnableAvailable).to(equal(@YES));
expect(testStruct.radioBandAvailable).to(equal(@YES));
expect(testStruct.radioFrequencyAvailable).to(equal(@YES));
@@ -154,6 +175,7 @@ describe(@"Initialization tests", ^{
SDLRadioControlCapabilities* testStruct = [[SDLRadioControlCapabilities alloc] initWithModuleName:@"someName" radioEnableAvailable:YES radioBandAvailable:NO radioFrequencyAvailable:YES hdChannelAvailable:NO rdsDataAvailable:NO availableHDsAvailable:NO stateAvailable:YES signalStrengthAvailable:YES signalChangeThresholdAvailable:NO];
expect(testStruct.moduleName).to(equal(@"someName"));
+ expect(testStruct.moduleInfo).to(beNil());
expect(testStruct.radioEnableAvailable).to(equal(@YES));
expect(testStruct.radioBandAvailable).to(equal(@NO));
expect(testStruct.radioFrequencyAvailable).to(equal(@YES));
@@ -171,11 +193,14 @@ describe(@"Initialization tests", ^{
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
it(@"Should get correctly when initialized with Module Name and other radio control capabilite's parameters", ^ {
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
SDLRadioControlCapabilities* testStruct = [[SDLRadioControlCapabilities alloc] initWithModuleName:@"someName" radioEnableAvailable:YES radioBandAvailable:NO radioFrequencyAvailable:YES hdChannelAvailable:NO rdsDataAvailable:NO availableHDsAvailable:NO stateAvailable:YES signalStrengthAvailable:YES signalChangeThresholdAvailable:NO hdRadioEnableAvailable:YES siriusXMRadioAvailable:YES sisDataAvailable:YES];
#pragma clang diagnostic pop
expect(testStruct.moduleName).to(equal(@"someName"));
+ expect(testStruct.moduleInfo).to(beNil());
expect(testStruct.radioEnableAvailable).to(equal(@YES));
expect(testStruct.radioBandAvailable).to(equal(@NO));
expect(testStruct.radioFrequencyAvailable).to(equal(@YES));
@@ -195,6 +220,7 @@ describe(@"Initialization tests", ^{
expect(testStruct.sisDataAvailable).to(equal(@YES));
});
+
});
QuickSpecEnd
diff --git a/SmartDeviceLinkTests/RPCSpecs/StructSpecs/SDLSeatControlCapabilitiesSpec.m b/SmartDeviceLinkTests/RPCSpecs/StructSpecs/SDLSeatControlCapabilitiesSpec.m
index bb320be41..31912578d 100644
--- a/SmartDeviceLinkTests/RPCSpecs/StructSpecs/SDLSeatControlCapabilitiesSpec.m
+++ b/SmartDeviceLinkTests/RPCSpecs/StructSpecs/SDLSeatControlCapabilitiesSpec.m
@@ -16,10 +16,28 @@
QuickSpecBegin(SDLSeatControlCapabilitiesSpec)
describe(@"Getter/Setter Tests", ^ {
+ __block SDLModuleInfo *testModuleInfo = nil;
+ __block SDLGrid *testGird = nil;
+
+ beforeEach(^{
+ testGird.col = @0;
+ testGird.row = @0;
+ testGird.level = @0;
+ testGird.rowspan = @2;
+ testGird.colspan = @3;
+ testGird.levelspan = @1;
+ testModuleInfo = [[SDLModuleInfo alloc] init];
+ testModuleInfo.moduleId = @"123";
+ testModuleInfo.allowMultipleAccess = @YES;
+ testModuleInfo.serviceArea = testGird;
+ testModuleInfo.location = testGird;
+ });
+
it(@"Should set and get correctly", ^ {
SDLSeatControlCapabilities* testStruct = [[SDLSeatControlCapabilities alloc] init];
testStruct.moduleName = @"moduleName";
+ testStruct.moduleInfo = testModuleInfo;
testStruct.heatingEnabledAvailable = @YES;
testStruct.coolingEnabledAvailable = @NO;
testStruct.heatingLevelAvailable = @YES;
@@ -37,6 +55,7 @@ describe(@"Getter/Setter Tests", ^ {
testStruct.memoryAvailable = @NO;
expect(testStruct.moduleName).to(equal(@"moduleName"));
+ expect(testStruct.moduleInfo).to(equal(testModuleInfo));
expect(testStruct.heatingEnabledAvailable).to(equal(@YES));
expect(testStruct.coolingEnabledAvailable).to(equal(@NO));
expect(testStruct.heatingLevelAvailable).to(equal(@YES));
@@ -56,9 +75,13 @@ describe(@"Getter/Setter Tests", ^ {
});
it(@"Should set and get correctly", ^ {
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
SDLSeatControlCapabilities* testStruct = [[SDLSeatControlCapabilities alloc] initWithName:@"moduleName" heatingEnabledAvailable:YES coolingEnabledAvailable:NO heatingLevelAvailable:YES coolingLevelAvailable:NO horizontalPositionAvailable:NO verticalPositionAvailable:NO frontVerticalPositionAvailable:NO backVerticalPositionAvailable:NO backTiltAngleAvailable:YES headSupportHorizontalPositionAvailable:NO headSupportVerticalPositionAvailable:YES massageEnabledAvailable:NO massageModeAvailable:YES massageCushionFirmnessAvailable:NO memoryAvailable:YES];
+#pragma clang diagnostic pop
expect(testStruct.moduleName).to(equal(@"moduleName"));
+ expect(testStruct.moduleInfo).to(beNil());
expect(testStruct.heatingEnabledAvailable).to(equal(@YES));
expect(testStruct.coolingEnabledAvailable).to(equal(@NO));
expect(testStruct.heatingLevelAvailable).to(equal(@YES));
@@ -78,9 +101,13 @@ describe(@"Getter/Setter Tests", ^ {
});
it(@"Should set and get correctly", ^ {
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
SDLSeatControlCapabilities* testStruct = [[SDLSeatControlCapabilities alloc] initWithName:@"moduleName"];
+#pragma clang diagnostic pop
expect(testStruct.moduleName).to(equal(@"moduleName"));
+ expect(testStruct.moduleInfo).to(beNil());
expect(testStruct.heatingEnabledAvailable).to(beNil());
expect(testStruct.heatingEnabledAvailable).to(beNil());
expect(testStruct.heatingLevelAvailable).to(beNil());
@@ -98,9 +125,56 @@ describe(@"Getter/Setter Tests", ^ {
expect(testStruct.memoryAvailable).to(beNil());
});
+
+ it(@"Should set and get correctly", ^ {
+ SDLSeatControlCapabilities* testStruct = [[SDLSeatControlCapabilities alloc] initWithName:@"moduleName" moduleInfo:testModuleInfo];
+
+ expect(testStruct.moduleName).to(equal(@"moduleName"));
+ expect(testStruct.moduleInfo).to(equal(testModuleInfo));
+ expect(testStruct.heatingEnabledAvailable).to(beNil());
+ expect(testStruct.heatingEnabledAvailable).to(beNil());
+ expect(testStruct.heatingLevelAvailable).to(beNil());
+ expect(testStruct.coolingLevelAvailable).to(beNil());
+ expect(testStruct.horizontalPositionAvailable).to(beNil());
+ expect(testStruct.verticalPositionAvailable).to(beNil());
+ expect(testStruct.frontVerticalPositionAvailable).to(beNil());
+ expect(testStruct.backVerticalPositionAvailable).to(beNil());
+ expect(testStruct.backTiltAngleAvailable).to(beNil());
+ expect(testStruct.headSupportHorizontalPositionAvailable).to(beNil());
+ expect(testStruct.headSupportVerticalPositionAvailable).to(beNil());
+ expect(testStruct.massageEnabledAvailable).to(beNil());
+ expect(testStruct.massageModeAvailable).to(beNil());
+ expect(testStruct.massageCushionFirmnessAvailable).to(beNil());
+ expect(testStruct.memoryAvailable).to(beNil());
+
+ });
+
+ it(@"Should set and get correctly", ^ {
+ SDLSeatControlCapabilities* testStruct = [[SDLSeatControlCapabilities alloc] initWithName:@"moduleName" moduleInfo:testModuleInfo heatingEnabledAvailable:YES coolingEnabledAvailable:NO heatingLevelAvailable:YES coolingLevelAvailable:NO horizontalPositionAvailable:NO verticalPositionAvailable:NO frontVerticalPositionAvailable:NO backVerticalPositionAvailable:NO backTiltAngleAvailable:YES headSupportHorizontalPositionAvailable:NO headSupportVerticalPositionAvailable:YES massageEnabledAvailable:NO massageModeAvailable:YES massageCushionFirmnessAvailable:NO memoryAvailable:YES];
+
+ expect(testStruct.moduleName).to(equal(@"moduleName"));
+ expect(testStruct.moduleInfo).to(equal(testModuleInfo));
+ expect(testStruct.heatingEnabledAvailable).to(equal(@YES));
+ expect(testStruct.coolingEnabledAvailable).to(equal(@NO));
+ expect(testStruct.heatingLevelAvailable).to(equal(@YES));
+ expect(testStruct.coolingLevelAvailable).to(equal(@NO));
+ expect(testStruct.horizontalPositionAvailable).to(equal(@NO));
+ expect(testStruct.verticalPositionAvailable).to(equal(@NO));
+ expect(testStruct.frontVerticalPositionAvailable).to(equal(@NO));
+ expect(testStruct.backVerticalPositionAvailable).to(equal(@NO));
+ expect(testStruct.backTiltAngleAvailable).to(equal(@YES));
+ expect(testStruct.headSupportHorizontalPositionAvailable).to(equal(@NO));
+ expect(testStruct.headSupportVerticalPositionAvailable).to(equal(@YES));
+ expect(testStruct.massageEnabledAvailable).to(equal(@NO));
+ expect(testStruct.massageModeAvailable).to(equal(@YES));
+ expect(testStruct.massageCushionFirmnessAvailable).to(equal(@NO));
+ expect(testStruct.memoryAvailable).to(equal(@YES));
+
+ });
it(@"Should get correctly when initialized", ^ {
NSMutableDictionary* dict = [@{SDLRPCParameterNameModuleName:@"moduleName",
+ SDLRPCParameterNameModuleInfo:testModuleInfo,
SDLRPCParameterNameHeatingEnabledAvailable:(@YES),
SDLRPCParameterNameCoolingEnabledAvailable:@YES,
SDLRPCParameterNameHeatingLevelAvailable:@YES,
@@ -123,6 +197,7 @@ describe(@"Getter/Setter Tests", ^ {
#pragma clang diagnostic pop
expect(testStruct.moduleName).to(equal(@"moduleName"));
+ expect(testStruct.moduleInfo).to(equal(testModuleInfo));
expect(testStruct.heatingEnabledAvailable).to(equal(@YES));
expect(testStruct.coolingEnabledAvailable).to(equal(@YES));
expect(testStruct.heatingLevelAvailable).to(equal(@YES));
@@ -144,6 +219,7 @@ describe(@"Getter/Setter Tests", ^ {
SDLSeatControlCapabilities* testStruct = [[SDLSeatControlCapabilities alloc] init];
expect(testStruct.moduleName).to(beNil());
+ expect(testStruct.moduleInfo).to(beNil());
expect(testStruct.heatingEnabledAvailable).to(beNil());
expect(testStruct.heatingEnabledAvailable).to(beNil());
expect(testStruct.heatingLevelAvailable).to(beNil());
diff --git a/SmartDeviceLinkTests/RPCSpecs/StructSpecs/SDLSeatLocationCapabilitySpec.m b/SmartDeviceLinkTests/RPCSpecs/StructSpecs/SDLSeatLocationCapabilitySpec.m
new file mode 100644
index 000000000..e238c5737
--- /dev/null
+++ b/SmartDeviceLinkTests/RPCSpecs/StructSpecs/SDLSeatLocationCapabilitySpec.m
@@ -0,0 +1,88 @@
+//
+// SDLSeatLocationCapabilitySpec.m
+// SmartDeviceLinkTests
+//
+// Created by standa1 on 7/29/19.
+// Copyright © 2019 smartdevicelink. All rights reserved.
+//
+
+#import <Foundation/Foundation.h>
+
+#import <Quick/Quick.h>
+#import <Nimble/Nimble.h>
+
+#import "SDLSeatLocationCapability.h"
+#import "SDLGrid.h"
+#import "SDLRPCParameterNames.h"
+
+
+QuickSpecBegin(SDLSeatLocationCapabilitySpec)
+
+describe(@"Getter/Setter Tests", ^ {
+ __block SDLGrid *testGird = nil;
+ __block SDLSeatLocation *driverSeat = nil;
+
+ beforeEach(^{
+ testGird = [[SDLGrid alloc] init];
+ testGird.col = @0;
+ testGird.row = @0;
+ testGird.level = @0;
+ testGird.rowspan = @2;
+ testGird.colspan = @3;
+ testGird.levelspan = @1;
+ driverSeat = [[SDLSeatLocation alloc] init];
+ driverSeat.grid = testGird;
+ });
+
+ it(@"Should set and get correctly", ^ {
+ SDLSeatLocationCapability *testStruct = [[SDLSeatLocationCapability alloc] init];
+
+ testStruct.cols = @3;
+ testStruct.rows = @2;
+ testStruct.levels = @1;
+ testStruct.seats = @[driverSeat];
+
+ expect(testStruct.cols).to(equal(@3));
+ expect(testStruct.rows).to(equal(@2));
+ expect(testStruct.levels).to(equal(@1));
+ expect(testStruct.seats).to(equal(@[driverSeat]));
+ });
+
+ it(@"Should get correctly when initialized", ^ {
+ NSMutableDictionary* dict = [@{
+ SDLRPCParameterNameRows:@2,
+ SDLRPCParameterNameColumns:@3,
+ SDLRPCParameterNameLevels:@1,
+ SDLRPCParameterNameSeats:@[driverSeat]} mutableCopy];
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
+ SDLSeatLocationCapability *testStruct = [[SDLSeatLocationCapability alloc] initWithDictionary:dict];
+#pragma clang diagnostic pop
+
+ expect(testStruct.cols).to(equal(@3));
+ expect(testStruct.rows).to(equal(@2));
+ expect(testStruct.levels).to(equal(@1));
+ expect(testStruct.seats).to(equal(@[driverSeat]));
+ });
+
+ it(@"Should get correctly when initialized", ^ {
+ SDLSeatLocationCapability *testStruct = [[SDLSeatLocationCapability alloc] initWithSeats:@[driverSeat] cols:@3 rows:@2 levels:@1];
+
+ expect(testStruct.cols).to(equal(@3));
+ expect(testStruct.rows).to(equal(@2));
+ expect(testStruct.levels).to(equal(@1));
+ expect(testStruct.seats).to(equal(@[driverSeat]));
+ });
+
+
+ it(@"Should return nil if not set", ^ {
+ SDLSeatLocationCapability *testStruct = [[SDLSeatLocationCapability alloc] init];
+
+ expect(testStruct.cols).to(beNil());
+ expect(testStruct.rows).to(beNil());
+ expect(testStruct.levels).to(beNil());
+ expect(testStruct.seats).to(beNil());
+ });
+});
+
+QuickSpecEnd
diff --git a/SmartDeviceLinkTests/RPCSpecs/StructSpecs/SDLSeatLocationSpec.m b/SmartDeviceLinkTests/RPCSpecs/StructSpecs/SDLSeatLocationSpec.m
new file mode 100644
index 000000000..31234bbbe
--- /dev/null
+++ b/SmartDeviceLinkTests/RPCSpecs/StructSpecs/SDLSeatLocationSpec.m
@@ -0,0 +1,58 @@
+//
+// SDLSeatLocationSpec.m
+// SmartDeviceLinkTests
+//
+// Created by standa1 on 7/29/19.
+// Copyright © 2019 smartdevicelink. All rights reserved.
+//
+
+#import <Foundation/Foundation.h>
+
+#import <Quick/Quick.h>
+#import <Nimble/Nimble.h>
+
+#import "SDLSeatLocation.h"
+#import "SDLRPCParameterNames.h"
+
+
+QuickSpecBegin(SDLSeatLocationSpec)
+
+describe(@"Getter/Setter Tests", ^ {
+ __block SDLGrid *testGird = nil;
+
+ beforeEach(^{
+ testGird = [[SDLGrid alloc] init];
+ testGird.col = @0;
+ testGird.row = @0;
+ testGird.level = @0;
+ testGird.rowspan = @2;
+ testGird.colspan = @3;
+ testGird.levelspan = @1;
+ });
+
+ it(@"Should set and get correctly", ^ {
+ SDLSeatLocation *testStruct = [[SDLSeatLocation alloc] init];
+
+ testStruct.grid = testGird;
+
+ expect(testStruct.grid).to(equal(testGird));
+ });
+
+ it(@"Should get correctly when initialized", ^ {
+ NSMutableDictionary* dict = [@{SDLRPCParameterNameGrid:testGird} mutableCopy];
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
+ SDLSeatLocation *testStruct = [[SDLSeatLocation alloc] initWithDictionary:dict];
+#pragma clang diagnostic pop
+
+ expect(testStruct.grid).to(equal(testGird));
+ });
+
+ it(@"Should return nil if not set", ^ {
+ SDLSeatLocation *testStruct = [[SDLSeatLocation alloc] init];
+
+ expect(testStruct.grid).to(beNil());
+ });
+});
+
+QuickSpecEnd
diff --git a/SmartDeviceLinkTests/RPCSpecs/StructSpecs/SDLSystemCapabilitySpec.m b/SmartDeviceLinkTests/RPCSpecs/StructSpecs/SDLSystemCapabilitySpec.m
index 42286b97b..b937eb3e1 100755
--- a/SmartDeviceLinkTests/RPCSpecs/StructSpecs/SDLSystemCapabilitySpec.m
+++ b/SmartDeviceLinkTests/RPCSpecs/StructSpecs/SDLSystemCapabilitySpec.m
@@ -16,6 +16,7 @@
#import "SDLVideoStreamingCodec.h"
#import "SDLVideoStreamingFormat.h"
#import "SDLVideoStreamingProtocol.h"
+#import "SDLSeatLocationCapability.h"
#import "SDLRPCParameterNames.h"
@@ -27,6 +28,7 @@ describe(@"Getter/Setter Tests", ^ {
__block SDLPhoneCapability *testPhoneCapability = nil;
__block SDLRemoteControlCapabilities *testRemoteControlCapabilities = nil;
__block SDLVideoStreamingCapability *testVideoStreamingCapability = nil;
+ __block SDLSeatLocationCapability *testSeatLocationCapability = nil;
beforeEach(^{
testAppServicesCapabilities = [[SDLAppServicesCapabilities alloc] initWithAppServices:nil];
@@ -34,6 +36,7 @@ describe(@"Getter/Setter Tests", ^ {
testPhoneCapability = [[SDLPhoneCapability alloc] initWithDialNumber:YES];
testRemoteControlCapabilities = [[SDLRemoteControlCapabilities alloc] initWithClimateControlCapabilities:nil radioControlCapabilities:nil buttonCapabilities:nil seatControlCapabilities:nil audioControlCapabilities:nil hmiSettingsControlCapabilities:nil lightControlCapabilities:nil];
testVideoStreamingCapability = [[SDLVideoStreamingCapability alloc] initWithPreferredResolution:[[SDLImageResolution alloc] initWithWidth:50 height:50] maxBitrate:5 supportedFormats:@[] hapticDataSupported:false];
+ testSeatLocationCapability = [[SDLSeatLocationCapability alloc] init];
});
it(@"Should set and get correctly", ^ {
@@ -44,6 +47,7 @@ describe(@"Getter/Setter Tests", ^ {
testStruct.phoneCapability = testPhoneCapability;
testStruct.videoStreamingCapability = testVideoStreamingCapability;
testStruct.remoteControlCapability = testRemoteControlCapabilities;
+ testStruct.seatLocationCapability = testSeatLocationCapability;
expect(testStruct.systemCapabilityType).to(equal(SDLSystemCapabilityTypeNavigation));
expect(testStruct.appServicesCapabilities).to(equal(testAppServicesCapabilities));
@@ -51,6 +55,7 @@ describe(@"Getter/Setter Tests", ^ {
expect(testStruct.phoneCapability).to(equal(testPhoneCapability));
expect(testStruct.videoStreamingCapability).to(equal(testVideoStreamingCapability));
expect(testStruct.remoteControlCapability).to(equal(testRemoteControlCapabilities));
+ expect(testStruct.seatLocationCapability).to(equal(testSeatLocationCapability));
});
it(@"Should get correctly when initialized with a dictionary", ^ {
@@ -60,7 +65,8 @@ describe(@"Getter/Setter Tests", ^ {
SDLRPCParameterNameNavigationCapability:testNavigationCapability,
SDLRPCParameterNamePhoneCapability:testPhoneCapability,
SDLRPCParameterNameRemoteControlCapability:testRemoteControlCapabilities,
- SDLRPCParameterNameVideoStreamingCapability:testVideoStreamingCapability
+ SDLRPCParameterNameVideoStreamingCapability:testVideoStreamingCapability,
+ SDLRPCParameterNameSeatLocationCapability:testSeatLocationCapability
};
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
@@ -73,6 +79,7 @@ describe(@"Getter/Setter Tests", ^ {
expect(testStruct.phoneCapability).to(equal(testPhoneCapability));
expect(testStruct.remoteControlCapability).to(equal(testRemoteControlCapabilities));
expect(testStruct.videoStreamingCapability).to(equal(testVideoStreamingCapability));
+ expect(testStruct.seatLocationCapability).to(equal(testSeatLocationCapability));
});
it(@"Should return nil if not set", ^ {
@@ -84,6 +91,7 @@ describe(@"Getter/Setter Tests", ^ {
expect(testStruct.phoneCapability).to(beNil());
expect(testStruct.videoStreamingCapability).to(beNil());
expect(testStruct.remoteControlCapability).to(beNil());
+ expect(testStruct.seatLocationCapability).to(beNil());
});
it(@"should initialize correctly with initWithAppServicesCapabilities:", ^{
@@ -95,6 +103,7 @@ describe(@"Getter/Setter Tests", ^ {
expect(testStruct.phoneCapability).to(beNil());
expect(testStruct.remoteControlCapability).to(beNil());
expect(testStruct.videoStreamingCapability).to(beNil());
+ expect(testStruct.seatLocationCapability).to(beNil());
});
it(@"should initialize correctly with initWithPhoneCapability:", ^{
@@ -107,6 +116,7 @@ describe(@"Getter/Setter Tests", ^ {
expect(testStruct.phoneCapability).to(equal(testPhoneStruct));
expect(testStruct.remoteControlCapability).to(beNil());
expect(testStruct.videoStreamingCapability).to(beNil());
+ expect(testStruct.seatLocationCapability).to(beNil());
});
it(@"should initialize correctly with initWithNavigationCapability:", ^{
@@ -119,6 +129,7 @@ describe(@"Getter/Setter Tests", ^ {
expect(testStruct.phoneCapability).to(beNil());
expect(testStruct.remoteControlCapability).to(beNil());
expect(testStruct.videoStreamingCapability).to(beNil());
+ expect(testStruct.seatLocationCapability).to(beNil());
});
it(@"should initialize correctly with initWithVideoStreamingCapability:", ^{
@@ -148,6 +159,7 @@ describe(@"Getter/Setter Tests", ^ {
expect(testStruct.phoneCapability).to(beNil());
expect(testStruct.remoteControlCapability).to(beNil());
expect(testStruct.videoStreamingCapability).to(equal(testVidStruct));
+ expect(testStruct.seatLocationCapability).to(beNil());
});
it(@"should initialize correctly with initWithRemoteControlCapability:", ^{
@@ -159,6 +171,19 @@ describe(@"Getter/Setter Tests", ^ {
expect(testStruct.phoneCapability).to(beNil());
expect(testStruct.remoteControlCapability).to(equal(testRemoteControlCapabilities));
expect(testStruct.videoStreamingCapability).to(beNil());
+ expect(testStruct.seatLocationCapability).to(beNil());
+ });
+
+ it(@"should initialize correctly with initWithSeatLocationCapability:", ^{
+ SDLSystemCapability *testStruct = [[SDLSystemCapability alloc] initWithSeatLocationCapability:testSeatLocationCapability];
+
+ expect(testStruct.systemCapabilityType).to(equal(SDLSystemCapabilityTypeSeatLocation));
+ expect(testStruct.appServicesCapabilities).to(beNil());
+ expect(testStruct.navigationCapability).to(beNil());
+ expect(testStruct.phoneCapability).to(beNil());
+ expect(testStruct.remoteControlCapability).to(beNil());
+ expect(testStruct.videoStreamingCapability).to(beNil());
+ expect(testStruct.seatLocationCapability).to(equal(testSeatLocationCapability));
});
});
diff --git a/SmartDeviceLinkTests/ReferenceImages_64/SDLLockScreenViewControllerSnapshotTests/testAppAndVehicleIcons@2x.png b/SmartDeviceLinkTests/ReferenceImages_64/SDLLockScreenViewControllerSnapshotTests/testAppAndVehicleIcons@2x.png
index 935e31a1b..fc9b8bff1 100644
--- a/SmartDeviceLinkTests/ReferenceImages_64/SDLLockScreenViewControllerSnapshotTests/testAppAndVehicleIcons@2x.png
+++ b/SmartDeviceLinkTests/ReferenceImages_64/SDLLockScreenViewControllerSnapshotTests/testAppAndVehicleIcons@2x.png
Binary files differ
diff --git a/SmartDeviceLinkTests/ReferenceImages_64/SDLLockScreenViewControllerSnapshotTests/testAppAndVehicleIcons_iPhone11_4_0x0@3x.png b/SmartDeviceLinkTests/ReferenceImages_64/SDLLockScreenViewControllerSnapshotTests/testAppAndVehicleIcons_iPhone11_4_0x0@3x.png
deleted file mode 100644
index 3b7684a62..000000000
--- a/SmartDeviceLinkTests/ReferenceImages_64/SDLLockScreenViewControllerSnapshotTests/testAppAndVehicleIcons_iPhone11_4_0x0@3x.png
+++ /dev/null
Binary files differ
diff --git a/SmartDeviceLinkTests/ReferenceImages_64/SDLLockScreenViewControllerSnapshotTests/testLightBackgroundNoAppNoVehicleIcons@2x.png b/SmartDeviceLinkTests/ReferenceImages_64/SDLLockScreenViewControllerSnapshotTests/testLightBackgroundNoAppNoVehicleIcons@2x.png
index 935e31a1b..fc9b8bff1 100644
--- a/SmartDeviceLinkTests/ReferenceImages_64/SDLLockScreenViewControllerSnapshotTests/testLightBackgroundNoAppNoVehicleIcons@2x.png
+++ b/SmartDeviceLinkTests/ReferenceImages_64/SDLLockScreenViewControllerSnapshotTests/testLightBackgroundNoAppNoVehicleIcons@2x.png
Binary files differ
diff --git a/SmartDeviceLinkTests/ReferenceImages_64/SDLLockScreenViewControllerSnapshotTests/testLightBackgroundNoAppNoVehicleIcons_iPhone11_4_0x0@3x.png b/SmartDeviceLinkTests/ReferenceImages_64/SDLLockScreenViewControllerSnapshotTests/testLightBackgroundNoAppNoVehicleIcons_iPhone11_4_0x0@3x.png
deleted file mode 100644
index 3b7684a62..000000000
--- a/SmartDeviceLinkTests/ReferenceImages_64/SDLLockScreenViewControllerSnapshotTests/testLightBackgroundNoAppNoVehicleIcons_iPhone11_4_0x0@3x.png
+++ /dev/null
Binary files differ
diff --git a/SmartDeviceLinkTests/ReferenceImages_64/SDLLockScreenViewControllerSnapshotTests/testNoAppNoVehicleIcons@2x.png b/SmartDeviceLinkTests/ReferenceImages_64/SDLLockScreenViewControllerSnapshotTests/testNoAppNoVehicleIcons@2x.png
index 935e31a1b..fc9b8bff1 100644
--- a/SmartDeviceLinkTests/ReferenceImages_64/SDLLockScreenViewControllerSnapshotTests/testNoAppNoVehicleIcons@2x.png
+++ b/SmartDeviceLinkTests/ReferenceImages_64/SDLLockScreenViewControllerSnapshotTests/testNoAppNoVehicleIcons@2x.png
Binary files differ
diff --git a/SmartDeviceLinkTests/ReferenceImages_64/SDLLockScreenViewControllerSnapshotTests/testNoAppNoVehicleIcons_iPhone11_4_0x0@3x.png b/SmartDeviceLinkTests/ReferenceImages_64/SDLLockScreenViewControllerSnapshotTests/testNoAppNoVehicleIcons_iPhone11_4_0x0@3x.png
deleted file mode 100644
index 3b7684a62..000000000
--- a/SmartDeviceLinkTests/ReferenceImages_64/SDLLockScreenViewControllerSnapshotTests/testNoAppNoVehicleIcons_iPhone11_4_0x0@3x.png
+++ /dev/null
Binary files differ
diff --git a/SmartDeviceLinkTests/ReferenceImages_64/SDLLockScreenViewControllerSnapshotTests/testOnlyAppIcon@2x.png b/SmartDeviceLinkTests/ReferenceImages_64/SDLLockScreenViewControllerSnapshotTests/testOnlyAppIcon@2x.png
index 935e31a1b..fc9b8bff1 100644
--- a/SmartDeviceLinkTests/ReferenceImages_64/SDLLockScreenViewControllerSnapshotTests/testOnlyAppIcon@2x.png
+++ b/SmartDeviceLinkTests/ReferenceImages_64/SDLLockScreenViewControllerSnapshotTests/testOnlyAppIcon@2x.png
Binary files differ
diff --git a/SmartDeviceLinkTests/ReferenceImages_64/SDLLockScreenViewControllerSnapshotTests/testOnlyAppIcon_iPhone11_4_0x0@3x.png b/SmartDeviceLinkTests/ReferenceImages_64/SDLLockScreenViewControllerSnapshotTests/testOnlyAppIcon_iPhone11_4_0x0@3x.png
deleted file mode 100644
index 3b7684a62..000000000
--- a/SmartDeviceLinkTests/ReferenceImages_64/SDLLockScreenViewControllerSnapshotTests/testOnlyAppIcon_iPhone11_4_0x0@3x.png
+++ /dev/null
Binary files differ
diff --git a/SmartDeviceLinkTests/ReferenceImages_64/SDLLockScreenViewControllerSnapshotTests/testOnlyVehicleIcon@2x.png b/SmartDeviceLinkTests/ReferenceImages_64/SDLLockScreenViewControllerSnapshotTests/testOnlyVehicleIcon@2x.png
index 935e31a1b..fc9b8bff1 100644
--- a/SmartDeviceLinkTests/ReferenceImages_64/SDLLockScreenViewControllerSnapshotTests/testOnlyVehicleIcon@2x.png
+++ b/SmartDeviceLinkTests/ReferenceImages_64/SDLLockScreenViewControllerSnapshotTests/testOnlyVehicleIcon@2x.png
Binary files differ
diff --git a/SmartDeviceLinkTests/ReferenceImages_64/SDLLockScreenViewControllerSnapshotTests/testOnlyVehicleIcon_iPhone11_4_0x0@3x.png b/SmartDeviceLinkTests/ReferenceImages_64/SDLLockScreenViewControllerSnapshotTests/testOnlyVehicleIcon_iPhone11_4_0x0@3x.png
deleted file mode 100644
index 3b7684a62..000000000
--- a/SmartDeviceLinkTests/ReferenceImages_64/SDLLockScreenViewControllerSnapshotTests/testOnlyVehicleIcon_iPhone11_4_0x0@3x.png
+++ /dev/null
Binary files differ
diff --git a/SmartDeviceLinkTests/SDLAsynchronousRPCOperationSpec.m b/SmartDeviceLinkTests/SDLAsynchronousRPCOperationSpec.m
index 917756334..952efd471 100644
--- a/SmartDeviceLinkTests/SDLAsynchronousRPCOperationSpec.m
+++ b/SmartDeviceLinkTests/SDLAsynchronousRPCOperationSpec.m
@@ -80,10 +80,12 @@ describe(@"sending responses and notifications", ^{
it(@"should not send the rpc", ^{
testOperation = [[SDLAsynchronousRPCOperation alloc] initWithConnectionManager:testConnectionManager rpc:sendRPC];
+ [testOperationQueue setSuspended:YES];
[testOperationQueue addOperation:testOperation];
[testOperationQueue cancelAllOperations];
+ [testOperationQueue setSuspended:NO];
- [NSThread sleepForTimeInterval:0.1];
+ [NSThread sleepForTimeInterval:0.5];
expect(testConnectionManager.receivedRequests).toEventually(beEmpty());
});
diff --git a/SmartDeviceLinkTests/SDLRPCFunctionNamesSpec.m b/SmartDeviceLinkTests/SDLRPCFunctionNamesSpec.m
index d1022ac90..e68db2e7d 100644
--- a/SmartDeviceLinkTests/SDLRPCFunctionNamesSpec.m
+++ b/SmartDeviceLinkTests/SDLRPCFunctionNamesSpec.m
@@ -19,7 +19,9 @@ describe(@"Individual Enum Value Tests", ^ {
expect(SDLRPCFunctionNameAlert).to(equal(@"Alert"));
expect(SDLRPCFunctionNameAlertManeuver).to(equal(@"AlertManeuver"));
expect(SDLRPCFunctionNameButtonPress).to(equal(@"ButtonPress"));
+ expect(SDLRPCFunctionNameCancelInteraction).to(equal(@"CancelInteraction"));
expect(SDLRPCFunctionNameChangeRegistration).to(equal(@"ChangeRegistration"));
+ expect(SDLRPCFunctionNameCloseApplication).to(equal(@"CloseApplication"));
expect(SDLRPCFunctionNameCreateInteractionChoiceSet).to(equal(@"CreateInteractionChoiceSet"));
expect(SDLRPCFunctionNameDeleteCommand).to(equal(@"DeleteCommand"));
expect(SDLRPCFunctionNameDeleteFile).to(equal(@"DeleteFile"));
diff --git a/SmartDeviceLinkTests/SDLScreenManagerSpec.m b/SmartDeviceLinkTests/SDLScreenManagerSpec.m
index 02882be78..b3f613256 100644
--- a/SmartDeviceLinkTests/SDLScreenManagerSpec.m
+++ b/SmartDeviceLinkTests/SDLScreenManagerSpec.m
@@ -15,6 +15,7 @@
#import "SDLGlobals.h"
#import "SDLMenuCell.h"
#import "SDLMenuManager.h"
+#import "SDLSystemCapabilityManager.h"
@interface SDLSoftButtonManager()
@@ -48,6 +49,7 @@ QuickSpecBegin(SDLScreenManagerSpec)
describe(@"screen manager", ^{
__block TestConnectionManager *mockConnectionManager = nil;
__block SDLFileManager *mockFileManager = nil;
+ __block SDLSystemCapabilityManager *mockSystemCapabilityManager = nil;
__block SDLScreenManager *testScreenManager = nil;
__block NSString *testString1 = @"test1";
@@ -71,8 +73,9 @@ describe(@"screen manager", ^{
beforeEach(^{
mockConnectionManager = [[TestConnectionManager alloc] init];
mockFileManager = OCMClassMock([SDLFileManager class]);
+ mockSystemCapabilityManager = OCMClassMock([SDLSystemCapabilityManager class]);
- testScreenManager = [[SDLScreenManager alloc] initWithConnectionManager:mockConnectionManager fileManager:mockFileManager];
+ testScreenManager = [[SDLScreenManager alloc] initWithConnectionManager:mockConnectionManager fileManager:mockFileManager systemCapabilityManager:mockSystemCapabilityManager];
});
it(@"should set up the sub-managers correctly", ^{
diff --git a/SmartDeviceLinkTests/SDLSoftButtonReplaceOperationSpec.m b/SmartDeviceLinkTests/SDLSoftButtonReplaceOperationSpec.m
index 8b162d283..6a68c25be 100644
--- a/SmartDeviceLinkTests/SDLSoftButtonReplaceOperationSpec.m
+++ b/SmartDeviceLinkTests/SDLSoftButtonReplaceOperationSpec.m
@@ -6,7 +6,6 @@
#import "SDLArtwork.h"
#import "SDLConnectionManagerType.h"
-#import "SDLDisplayCapabilities+ShowManagerExtensions.h"
#import "SDLFileManager.h"
#import "SDLLogMacros.h"
#import "SDLShow.h"
diff --git a/SmartDeviceLinkTests/SDLSystemCapabilityManagerSpec.m b/SmartDeviceLinkTests/SDLSystemCapabilityManagerSpec.m
index d9f324b80..774eae9bd 100644
--- a/SmartDeviceLinkTests/SDLSystemCapabilityManagerSpec.m
+++ b/SmartDeviceLinkTests/SDLSystemCapabilityManagerSpec.m
@@ -8,15 +8,19 @@
#import "SDLAudioPassThruCapabilities.h"
#import "SDLButtonCapabilities.h"
#import "SDLDisplayCapabilities.h"
+#import "SDLDisplayCapability.h"
#import "SDLGetSystemCapability.h"
#import "SDLGetSystemCapabilityResponse.h"
#import "SDLHMICapabilities.h"
+#import "SDLImageField.h"
+#import "SDLImageResolution.h"
#import "SDLMediaServiceManifest.h"
#import "SDLNavigationCapability.h"
#import "SDLNotificationConstants.h"
#import "SDLOnHMIStatus.h"
#import "SDLOnSystemCapabilityUpdated.h"
#import "SDLPhoneCapability.h"
+#import "SDLPredefinedWindows.h"
#import "SDLPresetBankCapabilities.h"
#import "SDLRegisterAppInterfaceResponse.h"
#import "SDLRemoteControlCapabilities.h"
@@ -27,7 +31,10 @@
#import "SDLSoftButtonCapabilities.h"
#import "SDLSystemCapability.h"
#import "SDLSystemCapabilityManager.h"
+#import "SDLTextField.h"
#import "SDLVideoStreamingCapability.h"
+#import "SDLWindowCapability.h"
+#import "SDLWindowTypeCapabilities.h"
#import "TestConnectionManager.h"
#import "TestSystemCapabilityObserver.h"
@@ -45,17 +52,81 @@ describe(@"System capability manager", ^{
__block SDLSystemCapabilityManager *testSystemCapabilityManager = nil;
__block TestConnectionManager *testConnectionManager = nil;
+ __block NSArray<SDLDisplayCapability *> *testDisplayCapabilityList = nil;
+ __block SDLDisplayCapabilities *testDisplayCapabilities = nil;
+ __block NSArray<SDLSoftButtonCapabilities *> *testSoftButtonCapabilities = nil;
+ __block NSArray<SDLButtonCapabilities *> *testButtonCapabilities = nil;
+ __block SDLPresetBankCapabilities *testPresetBankCapabilities = nil;
+
beforeEach(^{
testConnectionManager = [[TestConnectionManager alloc] init];
testSystemCapabilityManager = [[SDLSystemCapabilityManager alloc] initWithConnectionManager:testConnectionManager];
+
+ testDisplayCapabilities = [[SDLDisplayCapabilities alloc] init];
+ testDisplayCapabilities.graphicSupported = @NO;
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated"
+ testDisplayCapabilities.displayType = SDLDisplayTypeGeneric;
+ testDisplayCapabilities.displayName = SDLDisplayTypeGeneric;
+#pragma clang diagnostic pop
+ SDLTextField *textField = [[SDLTextField alloc] init];
+ textField.name = SDLTextFieldNameMainField1;
+ textField.characterSet = SDLCharacterSetCID1;
+ textField.width = @(123);
+ textField.rows = @(1);
+ testDisplayCapabilities.textFields = @[textField];
+ SDLImageField *imageField = [[SDLImageField alloc] init];
+ imageField.name = SDLImageFieldNameAppIcon;
+ imageField.imageTypeSupported = @[SDLFileTypePNG];
+ imageField.imageResolution = [[SDLImageResolution alloc] initWithWidth:42 height:4711];
+ testDisplayCapabilities.imageFields = @[imageField];
+ testDisplayCapabilities.mediaClockFormats = @[];
+ testDisplayCapabilities.templatesAvailable = @[@"DEFAULT", @"MEDIA"];
+ testDisplayCapabilities.numCustomPresetsAvailable = @(8);
+
+ SDLSoftButtonCapabilities *softButtonCapability = [[SDLSoftButtonCapabilities alloc] init];
+ softButtonCapability.shortPressAvailable = @YES;
+ softButtonCapability.longPressAvailable = @NO;
+ softButtonCapability.upDownAvailable = @NO;
+ softButtonCapability.imageSupported = @YES;
+ testSoftButtonCapabilities = @[softButtonCapability];
+
+ SDLButtonCapabilities *buttonCapabilities = [[SDLButtonCapabilities alloc] init];
+ buttonCapabilities.name = SDLButtonNameOk;
+ buttonCapabilities.shortPressAvailable = @YES;
+ buttonCapabilities.longPressAvailable = @YES;
+ buttonCapabilities.upDownAvailable = @YES;
+ testButtonCapabilities = @[buttonCapabilities];
+
+ testPresetBankCapabilities = [[SDLPresetBankCapabilities alloc] init];
+ testPresetBankCapabilities.onScreenPresetsAvailable = @NO;
+
+ SDLWindowTypeCapabilities *windowTypeCapabilities = [[SDLWindowTypeCapabilities alloc] initWithType:SDLWindowTypeMain maximumNumberOfWindows:1];
+ SDLDisplayCapability *displayCapability = [[SDLDisplayCapability alloc] initWithDisplayName:testDisplayCapabilities.displayName];
+ displayCapability.windowTypeSupported = @[windowTypeCapabilities];
+ SDLWindowCapability *defaultWindowCapability = [[SDLWindowCapability alloc] init];
+ defaultWindowCapability.windowID = @(SDLPredefinedWindowsDefaultWindow);
+ defaultWindowCapability.buttonCapabilities = testButtonCapabilities.copy;
+ defaultWindowCapability.softButtonCapabilities = testSoftButtonCapabilities.copy;
+ defaultWindowCapability.templatesAvailable = testDisplayCapabilities.templatesAvailable.copy;
+ defaultWindowCapability.numCustomPresetsAvailable = testDisplayCapabilities.numCustomPresetsAvailable.copy;
+ defaultWindowCapability.textFields = testDisplayCapabilities.textFields.copy;
+ defaultWindowCapability.imageFields = testDisplayCapabilities.imageFields.copy;
+ defaultWindowCapability.imageTypeSupported = @[SDLImageTypeStatic];
+ displayCapability.windowCapabilities = @[defaultWindowCapability];
+ testDisplayCapabilityList = @[displayCapability];
});
it(@"should initialize the system capability manager properties correctly", ^{
- expect(testSystemCapabilityManager.displayCapabilities).to(beNil());
+ expect(testSystemCapabilityManager.displays).to(beNil());
expect(testSystemCapabilityManager.hmiCapabilities).to(beNil());
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated"
+ expect(testSystemCapabilityManager.displayCapabilities).to(beNil());
expect(testSystemCapabilityManager.softButtonCapabilities).to(beNil());
expect(testSystemCapabilityManager.buttonCapabilities).to(beNil());
expect(testSystemCapabilityManager.presetBankCapabilities).to(beNil());
+#pragma clang diagnostic pop
expect(testSystemCapabilityManager.hmiZoneCapabilities).to(beNil());
expect(testSystemCapabilityManager.speechCapabilities).to(beNil());
expect(testSystemCapabilityManager.prerecordedSpeechCapabilities).to(beNil());
@@ -67,15 +138,13 @@ describe(@"System capability manager", ^{
expect(testSystemCapabilityManager.videoStreamingCapability).to(beNil());
expect(testSystemCapabilityManager.remoteControlCapability).to(beNil());
expect(testSystemCapabilityManager.appServicesCapabilities).to(beNil());
+ expect(testSystemCapabilityManager.seatLocationCapability).to(beNil());
+
});
context(@"When notified of a register app interface response", ^{
__block SDLRegisterAppInterfaceResponse *testRegisterAppInterfaceResponse = nil;
- __block SDLDisplayCapabilities *testDisplayCapabilities = nil;
__block SDLHMICapabilities *testHMICapabilities = nil;
- __block NSArray<SDLSoftButtonCapabilities *> *testSoftButtonCapabilities = nil;
- __block NSArray<SDLButtonCapabilities *> *testButtonCapabilities = nil;
- __block SDLPresetBankCapabilities *testPresetBankCapabilities = nil;
__block NSArray<SDLHMIZoneCapabilities> *testHMIZoneCapabilities = nil;
__block NSArray<SDLSpeechCapabilities> *testSpeechCapabilities = nil;
__block NSArray<SDLPrerecordedSpeech> *testPrerecordedSpeechCapabilities = nil;
@@ -84,31 +153,11 @@ describe(@"System capability manager", ^{
__block SDLAudioPassThruCapabilities *testPCMStreamCapability = nil;
beforeEach(^{
- testDisplayCapabilities = [[SDLDisplayCapabilities alloc] init];
- testDisplayCapabilities.graphicSupported = @NO;
-
testHMICapabilities = [[SDLHMICapabilities alloc] init];
testHMICapabilities.navigation = @NO;
testHMICapabilities.phoneCall = @YES;
testHMICapabilities.videoStreaming = @YES;
- SDLSoftButtonCapabilities *softButtonCapability = [[SDLSoftButtonCapabilities alloc] init];
- softButtonCapability.shortPressAvailable = @YES;
- softButtonCapability.longPressAvailable = @NO;
- softButtonCapability.upDownAvailable = @NO;
- softButtonCapability.imageSupported = @YES;
- testSoftButtonCapabilities = @[softButtonCapability];
-
- SDLButtonCapabilities *buttonCapabilities = [[SDLButtonCapabilities alloc] init];
- buttonCapabilities.name = SDLButtonNameOk;
- buttonCapabilities.shortPressAvailable = @YES;
- buttonCapabilities.longPressAvailable = @YES;
- buttonCapabilities.upDownAvailable = @YES;
- testButtonCapabilities = @[buttonCapabilities];
-
- testPresetBankCapabilities = [[SDLPresetBankCapabilities alloc] init];
- testPresetBankCapabilities.onScreenPresetsAvailable = @NO;
-
testHMIZoneCapabilities = @[SDLHMIZoneCapabilitiesFront, SDLHMIZoneCapabilitiesBack];
testSpeechCapabilities = @[SDLSpeechCapabilitiesText, SDLSpeechCapabilitiesSilence];
testPrerecordedSpeechCapabilities = @[SDLPrerecordedSpeechHelp, SDLPrerecordedSpeechInitial];
@@ -146,11 +195,15 @@ describe(@"System capability manager", ^{
});
it(@"should not save any of the RAIR capabilities", ^{
- expect(testSystemCapabilityManager.displayCapabilities).to(beNil());
+ expect(testSystemCapabilityManager.displays).to(beNil());
expect(testSystemCapabilityManager.hmiCapabilities).to(beNil());
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated"
+ expect(testSystemCapabilityManager.displayCapabilities).to(beNil());
expect(testSystemCapabilityManager.softButtonCapabilities).to(beNil());
expect(testSystemCapabilityManager.buttonCapabilities).to(beNil());
expect(testSystemCapabilityManager.presetBankCapabilities).to(beNil());
+#pragma clang diagnostic pop
expect(testSystemCapabilityManager.hmiZoneCapabilities).to(beNil());
expect(testSystemCapabilityManager.speechCapabilities).to(beNil());
expect(testSystemCapabilityManager.prerecordedSpeechCapabilities).to(beNil());
@@ -168,11 +221,15 @@ describe(@"System capability manager", ^{
});
it(@"should should save the RAIR capabilities", ^{
- expect(testSystemCapabilityManager.displayCapabilities).to(equal(testDisplayCapabilities));
+ expect(testSystemCapabilityManager.displays).to(equal(testDisplayCapabilityList));
expect(testSystemCapabilityManager.hmiCapabilities).to(equal(testHMICapabilities));
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated"
+ expect(testSystemCapabilityManager.displayCapabilities).to(equal(testDisplayCapabilities));
expect(testSystemCapabilityManager.softButtonCapabilities).to(equal(testSoftButtonCapabilities));
expect(testSystemCapabilityManager.buttonCapabilities).to(equal(testButtonCapabilities));
expect(testSystemCapabilityManager.presetBankCapabilities).to(equal(testPresetBankCapabilities));
+#pragma clang diagnostic pop
expect(testSystemCapabilityManager.hmiZoneCapabilities).to(equal(testHMIZoneCapabilities));
expect(testSystemCapabilityManager.speechCapabilities).to(equal(testSpeechCapabilities));
expect(testSystemCapabilityManager.prerecordedSpeechCapabilities).to(equal(testPrerecordedSpeechCapabilities));
@@ -194,32 +251,8 @@ describe(@"System capability manager", ^{
context(@"When notified of a SetDisplayLayout Response", ^ {
__block SDLSetDisplayLayoutResponse *testSetDisplayLayoutResponse = nil;
- __block SDLDisplayCapabilities *testDisplayCapabilities = nil;
- __block NSArray<SDLSoftButtonCapabilities *> *testSoftButtonCapabilities = nil;
- __block NSArray<SDLButtonCapabilities *> *testButtonCapabilities = nil;
- __block SDLPresetBankCapabilities *testPresetBankCapabilities = nil;
beforeEach(^{
- testDisplayCapabilities = [[SDLDisplayCapabilities alloc] init];
- testDisplayCapabilities.graphicSupported = @NO;
-
- SDLSoftButtonCapabilities *softButtonCapability = [[SDLSoftButtonCapabilities alloc] init];
- softButtonCapability.shortPressAvailable = @NO;
- softButtonCapability.longPressAvailable = @NO;
- softButtonCapability.upDownAvailable = @NO;
- softButtonCapability.imageSupported = @NO;
- testSoftButtonCapabilities = @[softButtonCapability];
-
- SDLButtonCapabilities *buttonCapabilities = [[SDLButtonCapabilities alloc] init];
- buttonCapabilities.name = SDLButtonNameOk;
- buttonCapabilities.shortPressAvailable = @NO;
- buttonCapabilities.longPressAvailable = @NO;
- buttonCapabilities.upDownAvailable = @NO;
- testButtonCapabilities = @[buttonCapabilities];
-
- testPresetBankCapabilities = [[SDLPresetBankCapabilities alloc] init];
- testPresetBankCapabilities.onScreenPresetsAvailable = @NO;
-
testSetDisplayLayoutResponse = [[SDLSetDisplayLayoutResponse alloc] init];
testSetDisplayLayoutResponse.displayCapabilities = testDisplayCapabilities;
testSetDisplayLayoutResponse.buttonCapabilities = testButtonCapabilities;
@@ -235,10 +268,14 @@ describe(@"System capability manager", ^{
});
it(@"should not save any capabilities", ^{
+ expect(testSystemCapabilityManager.displays).to(beNil());
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated"
expect(testSystemCapabilityManager.displayCapabilities).to(beNil());
expect(testSystemCapabilityManager.softButtonCapabilities).to(beNil());
expect(testSystemCapabilityManager.buttonCapabilities).to(beNil());
expect(testSystemCapabilityManager.presetBankCapabilities).to(beNil());
+#pragma clang diagnostic pop
});
});
@@ -250,10 +287,14 @@ describe(@"System capability manager", ^{
});
it(@"should should save the capabilities", ^{
+ expect(testSystemCapabilityManager.displays).to(equal(testDisplayCapabilityList));
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated"
expect(testSystemCapabilityManager.displayCapabilities).to(equal(testDisplayCapabilities));
expect(testSystemCapabilityManager.softButtonCapabilities).to(equal(testSoftButtonCapabilities));
expect(testSystemCapabilityManager.buttonCapabilities).to(equal(testButtonCapabilities));
expect(testSystemCapabilityManager.presetBankCapabilities).to(equal(testPresetBankCapabilities));
+#pragma clang diagnostic pop
});
});
@@ -273,6 +314,46 @@ describe(@"System capability manager", ^{
expect(testSystemCapabilityManager.appServicesCapabilities).to(beNil());
});
});
+
+ context(@"when updating display capabilities with OnSystemCapabilityUpdated", ^{
+ it(@"should properly update display capability including conversion two times", ^{
+ // two times because capabilities are just saved in first run but merged/updated in subsequent runs
+ for (int i = 0; i < 2; i++) {
+ testDisplayCapabilities.displayName = [NSString stringWithFormat:@"Display %i", i];
+ testDisplayCapabilities.graphicSupported = i == 0 ? @(NO) : @(YES);
+ testDisplayCapabilities.templatesAvailable = @[[NSString stringWithFormat:@"Template %i", i]];
+
+ SDLWindowTypeCapabilities *windowTypeCapabilities = [[SDLWindowTypeCapabilities alloc] initWithType:SDLWindowTypeMain maximumNumberOfWindows:1];
+ SDLDisplayCapability *displayCapability = [[SDLDisplayCapability alloc] initWithDisplayName:testDisplayCapabilities.displayName];
+ displayCapability.windowTypeSupported = @[windowTypeCapabilities];
+ SDLWindowCapability *defaultWindowCapability = [[SDLWindowCapability alloc] init];
+ defaultWindowCapability.windowID = @(SDLPredefinedWindowsDefaultWindow);
+ defaultWindowCapability.buttonCapabilities = testButtonCapabilities.copy;
+ defaultWindowCapability.softButtonCapabilities = testSoftButtonCapabilities.copy;
+ defaultWindowCapability.templatesAvailable = testDisplayCapabilities.templatesAvailable.copy;
+ defaultWindowCapability.numCustomPresetsAvailable = testDisplayCapabilities.numCustomPresetsAvailable.copy;
+ defaultWindowCapability.textFields = testDisplayCapabilities.textFields.copy;
+ defaultWindowCapability.imageFields = testDisplayCapabilities.imageFields.copy;
+ defaultWindowCapability.imageTypeSupported = testDisplayCapabilities.graphicSupported.boolValue ? @[SDLImageTypeStatic, SDLImageTypeDynamic] : @[SDLImageTypeStatic];
+ displayCapability.windowCapabilities = @[defaultWindowCapability];
+ NSArray<SDLDisplayCapability *> *newDisplayCapabilityList = testDisplayCapabilityList = @[displayCapability];
+
+ SDLSystemCapability *newCapability = [[SDLSystemCapability alloc] initWithDisplayCapabilities:newDisplayCapabilityList];
+ SDLOnSystemCapabilityUpdated *testUpdateNotification = [[SDLOnSystemCapabilityUpdated alloc] initWithSystemCapability:newCapability];
+ SDLRPCNotificationNotification *notification = [[SDLRPCNotificationNotification alloc] initWithName:SDLDidReceiveSystemCapabilityUpdatedNotification object:nil rpcNotification:testUpdateNotification];
+ [[NSNotificationCenter defaultCenter] postNotification:notification];
+
+ expect(testSystemCapabilityManager.displays).to(equal(testDisplayCapabilityList));
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated"
+ expect(testSystemCapabilityManager.displayCapabilities).to(equal(testDisplayCapabilities));
+ expect(testSystemCapabilityManager.buttonCapabilities).to(equal(testButtonCapabilities));
+ expect(testSystemCapabilityManager.softButtonCapabilities).to(equal(testSoftButtonCapabilities));
+ expect(testSystemCapabilityManager.presetBankCapabilities).to(beNil());
+#pragma clang diagnostic pop
+ }
+ });
+ });
context(@"When sending a GetSystemCapability request", ^{
__block SDLGetSystemCapabilityResponse *testGetSystemCapabilityResponse = nil;
@@ -332,11 +413,15 @@ describe(@"System capability manager", ^{
afterEach(^{
// Make sure the RAIR properties and other system capabilities were not inadverdently set
- expect(testSystemCapabilityManager.displayCapabilities).to(beNil());
+ expect(testSystemCapabilityManager.displays).to(beNil());
expect(testSystemCapabilityManager.hmiCapabilities).to(beNil());
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated"
+ expect(testSystemCapabilityManager.displayCapabilities).to(beNil());
expect(testSystemCapabilityManager.softButtonCapabilities).to(beNil());
expect(testSystemCapabilityManager.buttonCapabilities).to(beNil());
expect(testSystemCapabilityManager.presetBankCapabilities).to(beNil());
+#pragma clang diagnostic pop
expect(testSystemCapabilityManager.hmiZoneCapabilities).to(beNil());
expect(testSystemCapabilityManager.speechCapabilities).to(beNil());
expect(testSystemCapabilityManager.prerecordedSpeechCapabilities).to(beNil());
@@ -549,7 +634,7 @@ describe(@"System capability manager", ^{
});
it(@"should send GetSystemCapability subscriptions for all known capabilities", ^{
- expect(testConnectionManager.receivedRequests).to(haveCount(5));
+ expect(testConnectionManager.receivedRequests).to(haveCount(7));
expect(testConnectionManager.receivedRequests.lastObject).to(beAnInstanceOf([SDLGetSystemCapability class]));
});
});
@@ -560,11 +645,15 @@ describe(@"System capability manager", ^{
});
it(@"It should reset the system capability manager properties correctly", ^{
- expect(testSystemCapabilityManager.displayCapabilities).to(beNil());
expect(testSystemCapabilityManager.hmiCapabilities).to(beNil());
+ expect(testSystemCapabilityManager.displays).to(beNil());
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated"
+ expect(testSystemCapabilityManager.displayCapabilities).to(beNil());
expect(testSystemCapabilityManager.softButtonCapabilities).to(beNil());
expect(testSystemCapabilityManager.buttonCapabilities).to(beNil());
expect(testSystemCapabilityManager.presetBankCapabilities).to(beNil());
+#pragma clang diagnostic pop
expect(testSystemCapabilityManager.hmiZoneCapabilities).to(beNil());
expect(testSystemCapabilityManager.speechCapabilities).to(beNil());
expect(testSystemCapabilityManager.prerecordedSpeechCapabilities).to(beNil());
@@ -576,6 +665,7 @@ describe(@"System capability manager", ^{
expect(testSystemCapabilityManager.videoStreamingCapability).to(beNil());
expect(testSystemCapabilityManager.remoteControlCapability).to(beNil());
expect(testSystemCapabilityManager.appServicesCapabilities).to(beNil());
+ expect(testSystemCapabilityManager.seatLocationCapability).to(beNil());
});
});
});