summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoel Fischer <joeljfischer@gmail.com>2020-08-25 10:03:27 -0400
committerGitHub <noreply@github.com>2020-08-25 10:03:27 -0400
commite5975a4c8f0b9109b42e3192cd5ac3d576ae0f6c (patch)
tree3b7d4b66d5eb646f9c4c12ecf4b5284643beaac0
parent2cb26cbf102bdb309a67880182041393b5ae2559 (diff)
parent5c98982858f0a4e88ede97d014ff5f11a6fca065 (diff)
downloadsdl_ios-e5975a4c8f0b9109b42e3192cd5ac3d576ae0f6c.tar.gz
Merge pull request #1740 from smartdevicelink/feature/issue-1520-main-menu-updating-and-pagination
Implement SDL-0268 Main Menu Updating and Pagination
-rw-r--r--SmartDeviceLink-iOS.podspec3
-rw-r--r--SmartDeviceLink-iOS.xcodeproj/project.pbxproj36
-rw-r--r--SmartDeviceLink.podspec3
-rw-r--r--SmartDeviceLink/SDLAddSubMenu.m4
-rw-r--r--SmartDeviceLink/SDLDeleteSubMenu.m4
-rw-r--r--SmartDeviceLink/SDLDynamicUpdateCapabilities.h63
-rw-r--r--SmartDeviceLink/SDLDynamicUpdateCapabilities.m71
-rw-r--r--SmartDeviceLink/SDLFunctionID.m2
-rw-r--r--SmartDeviceLink/SDLGetFile.m4
-rw-r--r--SmartDeviceLink/SDLImageFieldName.h68
-rw-r--r--SmartDeviceLink/SDLImageFieldName.m62
-rw-r--r--SmartDeviceLink/SDLLifecycleProtocolHandler.m5
-rw-r--r--SmartDeviceLink/SDLNotificationConstants.h7
-rw-r--r--SmartDeviceLink/SDLNotificationConstants.m2
-rw-r--r--SmartDeviceLink/SDLOnUpdateFile.h58
-rw-r--r--SmartDeviceLink/SDLOnUpdateFile.m74
-rw-r--r--SmartDeviceLink/SDLOnUpdateSubMenu.h70
-rw-r--r--SmartDeviceLink/SDLOnUpdateSubMenu.m91
-rw-r--r--SmartDeviceLink/SDLRPCFunctionNames.h6
-rw-r--r--SmartDeviceLink/SDLRPCFunctionNames.m2
-rw-r--r--SmartDeviceLink/SDLRPCParameterNames.h8
-rw-r--r--SmartDeviceLink/SDLRPCParameterNames.m10
-rw-r--r--SmartDeviceLink/SDLShowAppMenu.m4
-rw-r--r--SmartDeviceLink/SDLSystemRequest.m4
-rw-r--r--SmartDeviceLink/SDLWindowCapability.h66
-rw-r--r--SmartDeviceLink/SDLWindowCapability.m67
-rw-r--r--SmartDeviceLink/SmartDeviceLink.h47
-rw-r--r--SmartDeviceLinkTests/ProtocolSpecs/SDLFunctionIDSpec.m2
-rw-r--r--SmartDeviceLinkTests/RPCSpecs/EnumSpecs/SDLImageFieldNameSpec.m1
-rw-r--r--SmartDeviceLinkTests/RPCSpecs/NotificationSpecs/SDLOnUpdateFileSpec.m74
-rw-r--r--SmartDeviceLinkTests/RPCSpecs/NotificationSpecs/SDLOnUpdateSubMenuSpec.m88
-rw-r--r--SmartDeviceLinkTests/RPCSpecs/RequestSpecs/SDLAddSubMenuSpec.m2
-rwxr-xr-xSmartDeviceLinkTests/RPCSpecs/RequestSpecs/SDLDeleteSubMenuSpec.m2
-rw-r--r--SmartDeviceLinkTests/RPCSpecs/RequestSpecs/SDLGetFileSpec.m2
-rw-r--r--SmartDeviceLinkTests/RPCSpecs/RequestSpecs/SDLShowAppMenuSpec.m2
-rw-r--r--SmartDeviceLinkTests/RPCSpecs/RequestSpecs/SDLSystemRequestSpec.m2
-rw-r--r--SmartDeviceLinkTests/RPCSpecs/StructSpecs/SDLDynamicUpdateCapabilitiesSpec.m75
-rw-r--r--SmartDeviceLinkTests/RPCSpecs/StructSpecs/SDLWindowCapabilitySpec.m84
38 files changed, 1040 insertions, 135 deletions
diff --git a/SmartDeviceLink-iOS.podspec b/SmartDeviceLink-iOS.podspec
index e0bdbb739..8309e52d5 100644
--- a/SmartDeviceLink-iOS.podspec
+++ b/SmartDeviceLink-iOS.podspec
@@ -110,6 +110,7 @@ s.public_header_files = [
'SmartDeviceLink/SDLDistanceUnit.h',
'SmartDeviceLink/SDLDriverDistractionCapability.h',
'SmartDeviceLink/SDLDriverDistractionState.h',
+'SmartDeviceLink/SDLDynamicUpdateCapabilities.h',
'SmartDeviceLink/SDLECallConfirmationStatus.h',
'SmartDeviceLink/SDLECallInfo.h',
'SmartDeviceLink/SDLElectronicParkBrakeStatus.h',
@@ -258,6 +259,8 @@ s.public_header_files = [
'SmartDeviceLink/SDLOnSystemRequest.h',
'SmartDeviceLink/SDLOnTBTClientState.h',
'SmartDeviceLink/SDLOnTouchEvent.h',
+'SmartDeviceLink/SDLOnUpdateFile.h',
+'SmartDeviceLink/SDLOnUpdateSubMenu.h',
'SmartDeviceLink/SDLOnVehicleData.h',
'SmartDeviceLink/SDLOnWayPointChange.h',
'SmartDeviceLink/SDLParameterPermissions.h',
diff --git a/SmartDeviceLink-iOS.xcodeproj/project.pbxproj b/SmartDeviceLink-iOS.xcodeproj/project.pbxproj
index 1f0b54c12..12ce7b388 100644
--- a/SmartDeviceLink-iOS.xcodeproj/project.pbxproj
+++ b/SmartDeviceLink-iOS.xcodeproj/project.pbxproj
@@ -441,12 +441,21 @@
4A457DD924A5137100386CBA /* SDLLifecycleProtocolHandlerSpec.m in Sources */ = {isa = PBXBuildFile; fileRef = 4A457DD824A5137100386CBA /* SDLLifecycleProtocolHandlerSpec.m */; };
4A4AD8A424894260008FC414 /* TestOldConfigurationUpdateManagerDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 4A4AD8A324894260008FC414 /* TestOldConfigurationUpdateManagerDelegate.m */; };
4A4AD8A724894270008FC414 /* TestNewConfigurationUpdateManagerDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 4A4AD8A624894270008FC414 /* TestNewConfigurationUpdateManagerDelegate.m */; };
+ 4A899D3624D31FEE007BDD9F /* SDLOnUpdateFile.h in Headers */ = {isa = PBXBuildFile; fileRef = 4A899D3424D31FEE007BDD9F /* SDLOnUpdateFile.h */; settings = {ATTRIBUTES = (Public, ); }; };
+ 4A899D3724D31FEE007BDD9F /* SDLOnUpdateFile.m in Sources */ = {isa = PBXBuildFile; fileRef = 4A899D3524D31FEE007BDD9F /* SDLOnUpdateFile.m */; };
+ 4A899D3A24D32273007BDD9F /* SDLOnUpdateSubMenu.h in Headers */ = {isa = PBXBuildFile; fileRef = 4A899D3824D32273007BDD9F /* SDLOnUpdateSubMenu.h */; settings = {ATTRIBUTES = (Public, ); }; };
+ 4A899D3B24D32273007BDD9F /* SDLOnUpdateSubMenu.m in Sources */ = {isa = PBXBuildFile; fileRef = 4A899D3924D32273007BDD9F /* SDLOnUpdateSubMenu.m */; };
+ 4A899D3E24D335F8007BDD9F /* SDLDynamicUpdateCapabilities.h in Headers */ = {isa = PBXBuildFile; fileRef = 4A899D3C24D335F8007BDD9F /* SDLDynamicUpdateCapabilities.h */; settings = {ATTRIBUTES = (Public, ); }; };
+ 4A899D3F24D335F8007BDD9F /* SDLDynamicUpdateCapabilities.m in Sources */ = {isa = PBXBuildFile; fileRef = 4A899D3D24D335F8007BDD9F /* SDLDynamicUpdateCapabilities.m */; };
4A99D00E247576B7009B43E6 /* SDLTextField+ScreenManagerExtensions.h in Headers */ = {isa = PBXBuildFile; fileRef = 4A99D00C247576B7009B43E6 /* SDLTextField+ScreenManagerExtensions.h */; };
4A99D00F247576B7009B43E6 /* SDLTextField+ScreenManagerExtensions.m in Sources */ = {isa = PBXBuildFile; fileRef = 4A99D00D247576B7009B43E6 /* SDLTextField+ScreenManagerExtensions.m */; };
4A99D0122475773C009B43E6 /* SDLImageField+ScreenManagerExtensions.h in Headers */ = {isa = PBXBuildFile; fileRef = 4A99D0102475773C009B43E6 /* SDLImageField+ScreenManagerExtensions.h */; };
4A99D0132475773C009B43E6 /* SDLImageField+ScreenManagerExtensions.m in Sources */ = {isa = PBXBuildFile; fileRef = 4A99D0112475773C009B43E6 /* SDLImageField+ScreenManagerExtensions.m */; };
4A9D02BE2497EED400FBE99B /* SDLLifecycleRPCAdapter.h in Headers */ = {isa = PBXBuildFile; fileRef = 4A9D02BC2497EED400FBE99B /* SDLLifecycleRPCAdapter.h */; };
4A9D02BF2497EED400FBE99B /* SDLLifecycleRPCAdapter.m in Sources */ = {isa = PBXBuildFile; fileRef = 4A9D02BD2497EED400FBE99B /* SDLLifecycleRPCAdapter.m */; };
+ 4AC68FBA24D33B7A0073FF67 /* SDLOnUpdateFileSpec.m in Sources */ = {isa = PBXBuildFile; fileRef = 4AC68FB924D33B7A0073FF67 /* SDLOnUpdateFileSpec.m */; };
+ 4AC68FBC24D33E5D0073FF67 /* SDLOnUpdateSubMenuSpec.m in Sources */ = {isa = PBXBuildFile; fileRef = 4AC68FBB24D33E5D0073FF67 /* SDLOnUpdateSubMenuSpec.m */; };
+ 4AC68FBE24D340400073FF67 /* SDLDynamicUpdateCapabilitiesSpec.m in Sources */ = {isa = PBXBuildFile; fileRef = 4AC68FBD24D340400073FF67 /* SDLDynamicUpdateCapabilitiesSpec.m */; };
5D00AC671F140F0A004000D9 /* SDLSystemCapabilityType.h in Headers */ = {isa = PBXBuildFile; fileRef = 5D00AC651F140F0A004000D9 /* SDLSystemCapabilityType.h */; settings = {ATTRIBUTES = (Public, ); }; };
5D00AC681F140F0A004000D9 /* SDLSystemCapabilityType.m in Sources */ = {isa = PBXBuildFile; fileRef = 5D00AC661F140F0A004000D9 /* SDLSystemCapabilityType.m */; };
5D00AC6B1F141339004000D9 /* SDLSystemCapability.h in Headers */ = {isa = PBXBuildFile; fileRef = 5D00AC691F141339004000D9 /* SDLSystemCapability.h */; settings = {ATTRIBUTES = (Public, ); }; };
@@ -2207,12 +2216,21 @@
4A4AD8A324894260008FC414 /* TestOldConfigurationUpdateManagerDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = TestOldConfigurationUpdateManagerDelegate.m; path = DevAPISpecs/TestOldConfigurationUpdateManagerDelegate.m; sourceTree = "<group>"; };
4A4AD8A524894270008FC414 /* TestNewConfigurationUpdateManagerDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TestNewConfigurationUpdateManagerDelegate.h; sourceTree = "<group>"; };
4A4AD8A624894270008FC414 /* TestNewConfigurationUpdateManagerDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = TestNewConfigurationUpdateManagerDelegate.m; sourceTree = "<group>"; };
+ 4A899D3424D31FEE007BDD9F /* SDLOnUpdateFile.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SDLOnUpdateFile.h; sourceTree = "<group>"; };
+ 4A899D3524D31FEE007BDD9F /* SDLOnUpdateFile.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SDLOnUpdateFile.m; sourceTree = "<group>"; };
+ 4A899D3824D32273007BDD9F /* SDLOnUpdateSubMenu.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SDLOnUpdateSubMenu.h; sourceTree = "<group>"; };
+ 4A899D3924D32273007BDD9F /* SDLOnUpdateSubMenu.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SDLOnUpdateSubMenu.m; sourceTree = "<group>"; };
+ 4A899D3C24D335F8007BDD9F /* SDLDynamicUpdateCapabilities.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SDLDynamicUpdateCapabilities.h; sourceTree = "<group>"; };
+ 4A899D3D24D335F8007BDD9F /* SDLDynamicUpdateCapabilities.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SDLDynamicUpdateCapabilities.m; sourceTree = "<group>"; };
4A99D00C247576B7009B43E6 /* SDLTextField+ScreenManagerExtensions.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "SDLTextField+ScreenManagerExtensions.h"; sourceTree = "<group>"; };
4A99D00D247576B7009B43E6 /* SDLTextField+ScreenManagerExtensions.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "SDLTextField+ScreenManagerExtensions.m"; sourceTree = "<group>"; };
4A99D0102475773C009B43E6 /* SDLImageField+ScreenManagerExtensions.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "SDLImageField+ScreenManagerExtensions.h"; sourceTree = "<group>"; };
4A99D0112475773C009B43E6 /* SDLImageField+ScreenManagerExtensions.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "SDLImageField+ScreenManagerExtensions.m"; sourceTree = "<group>"; };
4A9D02BC2497EED400FBE99B /* SDLLifecycleRPCAdapter.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SDLLifecycleRPCAdapter.h; sourceTree = "<group>"; };
4A9D02BD2497EED400FBE99B /* SDLLifecycleRPCAdapter.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SDLLifecycleRPCAdapter.m; sourceTree = "<group>"; };
+ 4AC68FB924D33B7A0073FF67 /* SDLOnUpdateFileSpec.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SDLOnUpdateFileSpec.m; sourceTree = "<group>"; };
+ 4AC68FBB24D33E5D0073FF67 /* SDLOnUpdateSubMenuSpec.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SDLOnUpdateSubMenuSpec.m; sourceTree = "<group>"; };
+ 4AC68FBD24D340400073FF67 /* SDLDynamicUpdateCapabilitiesSpec.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SDLDynamicUpdateCapabilitiesSpec.m; sourceTree = "<group>"; };
5D00AC651F140F0A004000D9 /* SDLSystemCapabilityType.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDLSystemCapabilityType.h; sourceTree = "<group>"; };
5D00AC661F140F0A004000D9 /* SDLSystemCapabilityType.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SDLSystemCapabilityType.m; sourceTree = "<group>"; };
5D00AC691F141339004000D9 /* SDLSystemCapability.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDLSystemCapability.h; sourceTree = "<group>"; };
@@ -3767,6 +3785,8 @@
162E82391A9BDE8A00906325 /* SDLOnTouchEventSpec.m */,
162E823A1A9BDE8A00906325 /* SDLOnVehicleDataSpec.m */,
DA9F7E9F1DCC05D200ACAE48 /* SDLOnWaypointChangeSpec.m */,
+ 4AC68FB924D33B7A0073FF67 /* SDLOnUpdateFileSpec.m */,
+ 4AC68FBB24D33E5D0073FF67 /* SDLOnUpdateSubMenuSpec.m */,
);
path = NotificationSpecs;
sourceTree = "<group>";
@@ -3951,6 +3971,7 @@
9FA0D00522DF06D3009CF344 /* SDLDisplayCapabilitySpec.m */,
162E82991A9BDE8A00906325 /* SDLDisplayCapabilitiesSpec.m */,
4A1B036E24CF484E008C6B13 /* SDLDriverDistractionCapabilitySpec.m */,
+ 4AC68FBD24D340400073FF67 /* SDLDynamicUpdateCapabilitiesSpec.m */,
162E829A1A9BDE8A00906325 /* SDLECallInfoSpec.m */,
162E829B1A9BDE8A00906325 /* SDLEmergencyEventSpec.m */,
88B3BFA120DA911E00943565 /* SDLFuelRangeSpec.m */,
@@ -4936,6 +4957,8 @@
5D61FAA41A84238A00846EE7 /* SDLDisplayCapabilities.m */,
4A1B036B24CF43CD008C6B13 /* SDLDriverDistractionCapability.h */,
4A1B036A24CF43CD008C6B13 /* SDLDriverDistractionCapability.m */,
+ 4A899D3C24D335F8007BDD9F /* SDLDynamicUpdateCapabilities.h */,
+ 4A899D3D24D335F8007BDD9F /* SDLDynamicUpdateCapabilities.m */,
5D61FAAB1A84238A00846EE7 /* SDLECallInfo.h */,
5D61FAAC1A84238A00846EE7 /* SDLECallInfo.m */,
5D61FAAD1A84238A00846EE7 /* SDLEmergencyEvent.h */,
@@ -5419,6 +5442,10 @@
5D61FB311A84238B00846EE7 /* SDLOnTBTClientState.m */,
5D61FB321A84238B00846EE7 /* SDLOnTouchEvent.h */,
5D61FB331A84238B00846EE7 /* SDLOnTouchEvent.m */,
+ 4A899D3424D31FEE007BDD9F /* SDLOnUpdateFile.h */,
+ 4A899D3524D31FEE007BDD9F /* SDLOnUpdateFile.m */,
+ 4A899D3824D32273007BDD9F /* SDLOnUpdateSubMenu.h */,
+ 4A899D3924D32273007BDD9F /* SDLOnUpdateSubMenu.m */,
5D61FB341A84238B00846EE7 /* SDLOnVehicleData.h */,
5D61FB351A84238B00846EE7 /* SDLOnVehicleData.m */,
DA9F7E7D1DCC028B00ACAE48 /* SDLOnWayPointChange.h */,
@@ -6828,6 +6855,7 @@
8BBEA6061F324165003EEA26 /* SDLMetadataType.h in Headers */,
E4139D1D1F6017770005B6EA /* SDLLifecycleConfigurationUpdate.h in Headers */,
5DA3F35A1BC448480026F2D0 /* SDLError.h in Headers */,
+ 4A899D3A24D32273007BDD9F /* SDLOnUpdateSubMenu.h in Headers */,
5DA3F35F1BC448590026F2D0 /* SDLNotificationConstants.h in Headers */,
5DE5ABB71B0E38C90067BB02 /* SDLSystemRequest.h in Headers */,
5DA3F3701BC4489A0026F2D0 /* SDLManager.h in Headers */,
@@ -6977,6 +7005,7 @@
005DF3CA22C62E00006E01A9 /* SDLEncryptionManagerConstants.h in Headers */,
5D61FCAF1A84238C00846EE7 /* SDLGenericResponse.h in Headers */,
885468352225C1F800994D8D /* SDLCloudAppProperties.h in Headers */,
+ 4A899D3624D31FEE007BDD9F /* SDLOnUpdateFile.h in Headers */,
5D61FC4F1A84238C00846EE7 /* SDLBodyInformation.h in Headers */,
5D61FDAB1A84238C00846EE7 /* SDLStartTime.h in Headers */,
5D61FD071A84238C00846EE7 /* SDLOnCommand.h in Headers */,
@@ -7211,6 +7240,7 @@
88B58DC622204AF10011B063 /* SDLNavigationAction.h in Headers */,
1E5AD06C1F208BAB0029B8AF /* SDLClimateControlData.h in Headers */,
1E5AD0381F1F4E390029B8AF /* SDLClimateControlCapabilities.h in Headers */,
+ 4A899D3E24D335F8007BDD9F /* SDLDynamicUpdateCapabilities.h in Headers */,
5D0C29FC20D93D8C008B56CD /* SDLVideoStreamingState.h in Headers */,
1E5AD0501F1F7BF10029B8AF /* SDLRadioBand.h in Headers */,
1E5AD0401F1F58480029B8AF /* SDLVentilationMode.h in Headers */,
@@ -7625,6 +7655,7 @@
5D61FC441A84238C00846EE7 /* SDLAppInterfaceUnregisteredReason.m in Sources */,
5D0A7387203F24060001595D /* SDLSoftButtonState.m in Sources */,
5D61FDCA1A84238C00846EE7 /* SDLTextField.m in Sources */,
+ 4A899D3B24D32273007BDD9F /* SDLOnUpdateSubMenu.m in Sources */,
DAA41D561DF66B2000BC7337 /* SDLH264VideoEncoder.m in Sources */,
5D61FC9D1A84238C00846EE7 /* SDLEmergencyEventType.m in Sources */,
5D61FCAC1A84238C00846EE7 /* SDLFuelCutoffStatus.m in Sources */,
@@ -7674,6 +7705,7 @@
5DD67CB11E65DDB7009CD394 /* SDLLogTargetAppleSystemLog.m in Sources */,
5D92935420B2F76500FCC775 /* SDLTemplateColorScheme.m in Sources */,
88D5EB38220CD95000EC3782 /* SDLWeatherServiceData.m in Sources */,
+ 4A899D3F24D335F8007BDD9F /* SDLDynamicUpdateCapabilities.m in Sources */,
5D019277214994AC003500F6 /* NSMutableArray+Safe.m in Sources */,
5D61FD1C1A84238C00846EE7 /* SDLOnSystemRequest.m in Sources */,
5D61FC911A84238C00846EE7 /* SDLDisplayCapabilities.m in Sources */,
@@ -8053,6 +8085,7 @@
DA318C201DD0F06C00C035AC /* NSMutableDictionary+Store.m in Sources */,
9F425ACF22DD97DE00BE3245 /* SDLTemplateConfiguration.m in Sources */,
5D7F87EC1CE3C1A1002DD7C4 /* SDLDeleteFileOperation.m in Sources */,
+ 4A899D3724D31FEE007BDD9F /* SDLOnUpdateFile.m in Sources */,
1EB59CBC202DA1B400343A61 /* SDLSupportedSeat.m in Sources */,
97E26DED1E807AD70074A3C7 /* SDLMutableDataQueue.m in Sources */,
5D61FD641A84238C00846EE7 /* SDLResetGlobalProperties.m in Sources */,
@@ -8462,7 +8495,9 @@
1EE8C4401F348D3200FDC2CF /* SDLClimateControlCapabilitiesSpec.m in Sources */,
5DE35E5420CB1C590034BE5A /* SDLPresentChoiceSetOperationSpec.m in Sources */,
162E838F1A9BDE8B00906325 /* SDLTextFieldSpec.m in Sources */,
+ 4AC68FBC24D33E5D0073FF67 /* SDLOnUpdateSubMenuSpec.m in Sources */,
8818ADDD2100FE0C007D6F19 /* SDLTurnSignalSpec.m in Sources */,
+ 4AC68FBE24D340400073FF67 /* SDLDynamicUpdateCapabilitiesSpec.m in Sources */,
162E82CA1A9BDE8A00906325 /* SDLAmbientLightStatusSpec.m in Sources */,
4A4AD8A724894270008FC414 /* TestNewConfigurationUpdateManagerDelegate.m in Sources */,
162E83091A9BDE8B00906325 /* SDLVehicleDataStatusSpec.m in Sources */,
@@ -8545,6 +8580,7 @@
5D43466B1E6F3B4C00B639C6 /* SDLLogFilterSpec.m in Sources */,
88D2AAE41F682BB20078D5B2 /* SDLLogConstantsSpec.m in Sources */,
162E836B1A9BDE8B00906325 /* SDLSyncPDataResponseSpec.m in Sources */,
+ 4AC68FBA24D33B7A0073FF67 /* SDLOnUpdateFileSpec.m in Sources */,
8B7B31AF1F2FBA0200BDC38D /* SDLVideoStreamingCapabilitySpec.m in Sources */,
8B05F88922DD011300666CD8 /* SDLUnpublishAppServiceSpec.m in Sources */,
162E839B1A9BDE8B00906325 /* SDLRPCNotificationSpec.m in Sources */,
diff --git a/SmartDeviceLink.podspec b/SmartDeviceLink.podspec
index 238ee5bae..d04994eb8 100644
--- a/SmartDeviceLink.podspec
+++ b/SmartDeviceLink.podspec
@@ -114,6 +114,7 @@ sdefault.public_header_files = [
'SmartDeviceLink/SDLDistanceUnit.h',
'SmartDeviceLink/SDLDriverDistractionCapability.h',
'SmartDeviceLink/SDLDriverDistractionState.h',
+'SmartDeviceLink/SDLDynamicUpdateCapabilities.h',
'SmartDeviceLink/SDLECallConfirmationStatus.h',
'SmartDeviceLink/SDLECallInfo.h',
'SmartDeviceLink/SDLElectronicParkBrakeStatus.h',
@@ -262,6 +263,8 @@ sdefault.public_header_files = [
'SmartDeviceLink/SDLOnSystemRequest.h',
'SmartDeviceLink/SDLOnTBTClientState.h',
'SmartDeviceLink/SDLOnTouchEvent.h',
+'SmartDeviceLink/SDLOnUpdateFile.h',
+'SmartDeviceLink/SDLOnUpdateSubMenu.h',
'SmartDeviceLink/SDLOnVehicleData.h',
'SmartDeviceLink/SDLOnWayPointChange.h',
'SmartDeviceLink/SDLParameterPermissions.h',
diff --git a/SmartDeviceLink/SDLAddSubMenu.m b/SmartDeviceLink/SDLAddSubMenu.m
index 91dbc11ba..3e0b0bdd0 100644
--- a/SmartDeviceLink/SDLAddSubMenu.m
+++ b/SmartDeviceLink/SDLAddSubMenu.m
@@ -104,12 +104,12 @@ NS_ASSUME_NONNULL_BEGIN
}
- (void)setMenuID:(NSNumber<SDLInt> *)menuID {
- [self.parameters sdl_setObject:menuID forName:SDLRPCParameterNameMenuId];
+ [self.parameters sdl_setObject:menuID forName:SDLRPCParameterNameMenuID];
}
- (NSNumber<SDLInt> *)menuID {
NSError *error = nil;
- return [self.parameters sdl_objectForName:SDLRPCParameterNameMenuId ofClass:NSNumber.class error:&error];
+ return [self.parameters sdl_objectForName:SDLRPCParameterNameMenuID ofClass:NSNumber.class error:&error];
}
- (void)setPosition:(nullable NSNumber<SDLInt> *)position {
diff --git a/SmartDeviceLink/SDLDeleteSubMenu.m b/SmartDeviceLink/SDLDeleteSubMenu.m
index 2fd29100e..dedcff616 100644
--- a/SmartDeviceLink/SDLDeleteSubMenu.m
+++ b/SmartDeviceLink/SDLDeleteSubMenu.m
@@ -33,12 +33,12 @@ NS_ASSUME_NONNULL_BEGIN
}
- (void)setMenuID:(NSNumber<SDLInt> *)menuID {
- [self.parameters sdl_setObject:menuID forName:SDLRPCParameterNameMenuId];
+ [self.parameters sdl_setObject:menuID forName:SDLRPCParameterNameMenuID];
}
- (NSNumber<SDLInt> *)menuID {
NSError *error = nil;
- return [self.parameters sdl_objectForName:SDLRPCParameterNameMenuId ofClass:NSNumber.class error:&error];
+ return [self.parameters sdl_objectForName:SDLRPCParameterNameMenuID ofClass:NSNumber.class error:&error];
}
@end
diff --git a/SmartDeviceLink/SDLDynamicUpdateCapabilities.h b/SmartDeviceLink/SDLDynamicUpdateCapabilities.h
new file mode 100644
index 000000000..35a7f4d0d
--- /dev/null
+++ b/SmartDeviceLink/SDLDynamicUpdateCapabilities.h
@@ -0,0 +1,63 @@
+/*
+ * Copyright (c) 2020, SmartDeviceLink Consortium, Inc.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following
+ * disclaimer in the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * Neither the name of the SmartDeviceLink Consortium Inc. nor the names of
+ * its contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#import "SDLRPCStruct.h"
+#import "SDLImageFieldName.h"
+
+NS_ASSUME_NONNULL_BEGIN
+
+/**
+ * @since SDL 7.0
+ */
+@interface SDLDynamicUpdateCapabilities : SDLRPCStruct
+
+/**
+ * @param supportedDynamicImageFieldNames - supportedDynamicImageFieldNames
+ * @param supportsDynamicSubMenus - supportsDynamicSubMenus
+ * @return A SDLDynamicUpdateCapabilities object
+ */
+- (instancetype)initWithSupportedDynamicImageFieldNames:(nullable NSArray<SDLImageFieldName> *)supportedDynamicImageFieldNames supportsDynamicSubMenus:(nullable NSNumber<SDLBool> *)supportsDynamicSubMenus;
+
+/**
+ * An array of ImageFieldName values for which the system supports sending OnFileUpdate notifications. If you send an Image struct for that image field with a name without having uploaded the image data using PutFile that matches that name, the system will request that you upload the data with PutFile at a later point when the HMI needs it. The HMI will then display the image in the appropriate field. If not sent, assume false.
+ * {"array_min_size": 1, "array_max_size": null}
+ */
+@property (nullable, strong, nonatomic) NSArray<SDLImageFieldName> *supportedDynamicImageFieldNames;
+
+/**
+ * If true, the head unit supports dynamic sub-menus by sending OnUpdateSubMenu notifications. If true, you should not send AddCommands that attach to a parentID for an AddSubMenu until OnUpdateSubMenu is received with the menuID. At that point, you should send all AddCommands with a parentID that match the menuID. If not set, assume false.
+ */
+@property (nullable, strong, nonatomic) NSNumber<SDLBool> *supportsDynamicSubMenus;
+
+@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLDynamicUpdateCapabilities.m b/SmartDeviceLink/SDLDynamicUpdateCapabilities.m
new file mode 100644
index 000000000..c24267fc5
--- /dev/null
+++ b/SmartDeviceLink/SDLDynamicUpdateCapabilities.m
@@ -0,0 +1,71 @@
+/*
+ * Copyright (c) 2020, SmartDeviceLink Consortium, Inc.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following
+ * disclaimer in the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * Neither the name of the SmartDeviceLink Consortium Inc. nor the names of
+ * its contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#import "SDLDynamicUpdateCapabilities.h"
+
+#import "NSMutableDictionary+Store.h"
+#import "SDLImageFieldName.h"
+#import "SDLRPCParameterNames.h"
+
+NS_ASSUME_NONNULL_BEGIN
+
+@implementation SDLDynamicUpdateCapabilities
+
+- (instancetype)initWithSupportedDynamicImageFieldNames:(nullable NSArray<SDLImageFieldName> *)supportedDynamicImageFieldNames supportsDynamicSubMenus:(nullable NSNumber<SDLBool> *)supportsDynamicSubMenus {
+ self = [super init];
+ if (!self) {
+ return nil;
+ }
+ self.supportedDynamicImageFieldNames = supportedDynamicImageFieldNames;
+ self.supportsDynamicSubMenus = supportsDynamicSubMenus;
+ return self;
+}
+
+- (void)setSupportedDynamicImageFieldNames:(nullable NSArray<SDLImageFieldName> *)supportedDynamicImageFieldNames {
+ [self.store sdl_setObject:supportedDynamicImageFieldNames forName:SDLRPCParameterNameSupportedDynamicImageFieldNames];
+}
+
+- (nullable NSArray<SDLImageFieldName> *)supportedDynamicImageFieldNames {
+ return [self.store sdl_enumsForName:SDLRPCParameterNameSupportedDynamicImageFieldNames error:nil];
+}
+
+- (void)setSupportsDynamicSubMenus:(nullable NSNumber<SDLBool> *)supportsDynamicSubMenus {
+ [self.store sdl_setObject:supportsDynamicSubMenus forName:SDLRPCParameterNameSupportsDynamicSubMenus];
+}
+
+- (nullable NSNumber<SDLBool> *)supportsDynamicSubMenus {
+ return [self.store sdl_objectForName:SDLRPCParameterNameSupportsDynamicSubMenus ofClass:NSNumber.class error:nil];
+}
+
+@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLFunctionID.m b/SmartDeviceLink/SDLFunctionID.m
index 54be8ec07..aa649a40a 100644
--- a/SmartDeviceLink/SDLFunctionID.m
+++ b/SmartDeviceLink/SDLFunctionID.m
@@ -118,6 +118,8 @@ NS_ASSUME_NONNULL_BEGIN
@32786: SDLRPCFunctionNameOnAppServiceData,
@32787: SDLRPCFunctionNameOnSystemCapabilityUpdated,
@32788: SDLRPCFunctionNameOnSubtleAlertPressed,
+ @32789: SDLRPCFunctionNameOnUpdateFile,
+ @32790: SDLRPCFunctionNameOnUpdateSubMenu,
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
@65536: SDLRPCFunctionNameEncodedSyncPData,
diff --git a/SmartDeviceLink/SDLGetFile.m b/SmartDeviceLink/SDLGetFile.m
index 239a034ba..b39dce9ac 100644
--- a/SmartDeviceLink/SDLGetFile.m
+++ b/SmartDeviceLink/SDLGetFile.m
@@ -62,12 +62,12 @@ NS_ASSUME_NONNULL_BEGIN
}
- (void)setFileName:(NSString *)fileName {
- [self.parameters sdl_setObject:fileName forName:SDLRPCParameterNameFilename];
+ [self.parameters sdl_setObject:fileName forName:SDLRPCParameterNameFileName];
}
- (NSString *)fileName {
NSError *error = nil;
- return [self.parameters sdl_objectForName:SDLRPCParameterNameFilename ofClass:NSString.class error:&error];
+ return [self.parameters sdl_objectForName:SDLRPCParameterNameFileName ofClass:NSString.class error:&error];
}
- (void)setAppServiceId:(nullable NSString *)appServiceId {
diff --git a/SmartDeviceLink/SDLImageFieldName.h b/SmartDeviceLink/SDLImageFieldName.h
index bffe33fa1..c50e17b04 100644
--- a/SmartDeviceLink/SDLImageFieldName.h
+++ b/SmartDeviceLink/SDLImageFieldName.h
@@ -1,34 +1,35 @@
/*
- * Copyright (c) 2020, SmartDeviceLink Consortium, Inc.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the SmartDeviceLink Consortium Inc. nor the names of
- * its contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
+* Copyright (c) 2020, SmartDeviceLink Consortium, Inc.
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* Redistributions of source code must retain the above copyright notice, this
+* list of conditions and the following disclaimer.
+*
+* Redistributions in binary form must reproduce the above copyright notice,
+* this list of conditions and the following
+* disclaimer in the documentation and/or other materials provided with the
+* distribution.
+*
+* Neither the name of the SmartDeviceLink Consortium Inc. nor the names of
+* its contributors may be used to endorse or promote products derived
+* from this software without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+*/
+
#import "SDLEnum.h"
@@ -112,6 +113,13 @@ extern SDLImageFieldName const SDLImageFieldNameShowConstantTBTNextTurnIcon;
extern SDLImageFieldName const SDLImageFieldNameLocationImage;
/**
+ * The image field for AddSubMenu.menuIcon
+ *
+ * @since SDL 7.0
+ */
+extern SDLImageFieldName const SDLImageFieldNameSubMenuIcon;
+
+/**
* The image of the subtle alert; applies to `SubtleAlert` `alertImage`
*
* @since SDL 7.0
diff --git a/SmartDeviceLink/SDLImageFieldName.m b/SmartDeviceLink/SDLImageFieldName.m
index b6932f4cb..dd195ce82 100644
--- a/SmartDeviceLink/SDLImageFieldName.m
+++ b/SmartDeviceLink/SDLImageFieldName.m
@@ -1,34 +1,35 @@
/*
- * Copyright (c) 2020, SmartDeviceLink Consortium, Inc.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the SmartDeviceLink Consortium Inc. nor the names of
- * its contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
+* Copyright (c) 2020, SmartDeviceLink Consortium, Inc.
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* Redistributions of source code must retain the above copyright notice, this
+* list of conditions and the following disclaimer.
+*
+* Redistributions in binary form must reproduce the above copyright notice,
+* this list of conditions and the following
+* disclaimer in the documentation and/or other materials provided with the
+* distribution.
+*
+* Neither the name of the SmartDeviceLink Consortium Inc. nor the names of
+* its contributors may be used to endorse or promote products derived
+* from this software without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+*/
+
#import "SDLImageFieldName.h"
@@ -46,4 +47,5 @@ SDLImageFieldName const SDLImageFieldNameSecondaryGraphic = @"secondaryGraphic";
SDLImageFieldName const SDLImageFieldNameShowConstantTBTIcon = @"showConstantTBTIcon";
SDLImageFieldName const SDLImageFieldNameShowConstantTBTNextTurnIcon = @"showConstantTBTNextTurnIcon";
SDLImageFieldName const SDLImageFieldNameLocationImage = @"locationImage";
+SDLImageFieldName const SDLImageFieldNameSubMenuIcon = @"subMenuIcon";
SDLImageFieldName const SDLImageFieldNameSubtleAlertIcon = @"subtleAlertIcon";
diff --git a/SmartDeviceLink/SDLLifecycleProtocolHandler.m b/SmartDeviceLink/SDLLifecycleProtocolHandler.m
index 49a789637..858b0bdaf 100644
--- a/SmartDeviceLink/SDLLifecycleProtocolHandler.m
+++ b/SmartDeviceLink/SDLLifecycleProtocolHandler.m
@@ -158,7 +158,10 @@ NS_ASSUME_NONNULL_BEGIN
SDLRPCMessage *newMessage = [[NSClassFromString(functionClassName) alloc] initWithDictionary:rpcMessageAsDictionary];
// If we were unable to create the message, it's an unknown type; discard it
- if (newMessage == nil) { return; }
+ if (newMessage == nil) {
+ SDLLogE(@"Unable to create message for RPC: %@", rpcMessageAsDictionary);
+ return;
+ }
// Adapt the incoming message then call the callback
NSArray<SDLRPCMessage *> *adaptedMessages = [SDLLifecycleRPCAdapter adaptRPC:newMessage direction:SDLRPCDirectionIncoming];
diff --git a/SmartDeviceLink/SDLNotificationConstants.h b/SmartDeviceLink/SDLNotificationConstants.h
index 7cb20dca1..ce2b32392 100644
--- a/SmartDeviceLink/SDLNotificationConstants.h
+++ b/SmartDeviceLink/SDLNotificationConstants.h
@@ -610,12 +610,19 @@ extern SDLNotificationName const SDLDidChangeTurnByTurnStateNotification;
/// Name for a TouchEvent notification RPC
extern SDLNotificationName const SDLDidReceiveTouchEventNotification;
+/// Name for an OnUpdateFile notification RPC
+extern SDLNotificationName const SDLDidReceiveUpdateFileNotification;
+
+/// Name for an OnUpdateSubMenu notification RPC
+extern SDLNotificationName const SDLDidReceiveUpdateSubMenuNotification;
+
/// Name for a VehicleData notification RPC
extern SDLNotificationName const SDLDidReceiveVehicleDataNotification;
/// Name for a Waypoint notification RPC
extern SDLNotificationName const SDLDidReceiveWaypointNotification;
+
/// This class defines methods for getting groups of notifications
@interface SDLNotificationConstants : NSObject
diff --git a/SmartDeviceLink/SDLNotificationConstants.m b/SmartDeviceLink/SDLNotificationConstants.m
index 14cba1c6f..c0b0577ed 100644
--- a/SmartDeviceLink/SDLNotificationConstants.m
+++ b/SmartDeviceLink/SDLNotificationConstants.m
@@ -182,6 +182,8 @@ SDLNotificationName const SDLDidReceiveSystemCapabilityUpdatedNotification = @"c
SDLNotificationName const SDLDidReceiveSystemRequestNotification = @"com.sdl.notification.OnSystemRequest";
SDLNotificationName const SDLDidChangeTurnByTurnStateNotification = @"com.sdl.notification.OnTBTClientState";
SDLNotificationName const SDLDidReceiveTouchEventNotification = @"com.sdl.notification.OnTouchEvent";
+SDLNotificationName const SDLDidReceiveUpdateFileNotification = @"com.sdl.notification.OnUpdateFile";
+SDLNotificationName const SDLDidReceiveUpdateSubMenuNotification = @"com.sdl.notification.OnUpdateSubMenu";
SDLNotificationName const SDLDidReceiveVehicleDataNotification = @"com.sdl.notification.OnVehicleData";
SDLNotificationName const SDLDidReceiveWaypointNotification = @"com.sdl.notification.OnWayPointChange";
diff --git a/SmartDeviceLink/SDLOnUpdateFile.h b/SmartDeviceLink/SDLOnUpdateFile.h
new file mode 100644
index 000000000..95929bd7b
--- /dev/null
+++ b/SmartDeviceLink/SDLOnUpdateFile.h
@@ -0,0 +1,58 @@
+/*
+ * Copyright (c) 2020, SmartDeviceLink Consortium, Inc.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following
+ * disclaimer in the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * Neither the name of the SmartDeviceLink Consortium Inc. nor the names of
+ * its contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#import "SDLRPCNotification.h"
+
+NS_ASSUME_NONNULL_BEGIN
+
+/**
+ * This notification tells an app to upload and update a file with a given name.
+ *
+ * @since SDL 7.0.0
+ */
+@interface SDLOnUpdateFile : SDLRPCNotification
+
+/**
+ * @param fileName - fileName
+ * @return A SDLOnUpdateFile object
+ */
+- (instancetype)initWithFileName:(NSString *)fileName;
+
+/**
+ * File reference name.
+ * {"default_value": null, "max_length": 255, "min_length": 1}
+ */
+@property (strong, nonatomic) NSString *fileName;
+
+@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLOnUpdateFile.m b/SmartDeviceLink/SDLOnUpdateFile.m
new file mode 100644
index 000000000..4ed8843a6
--- /dev/null
+++ b/SmartDeviceLink/SDLOnUpdateFile.m
@@ -0,0 +1,74 @@
+/*
+* Copyright (c) 2020, SmartDeviceLink Consortium, Inc.
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* Redistributions of source code must retain the above copyright notice, this
+* list of conditions and the following disclaimer.
+*
+* Redistributions in binary form must reproduce the above copyright notice,
+* this list of conditions and the following
+* disclaimer in the documentation and/or other materials provided with the
+* distribution.
+*
+* Neither the name of the SmartDeviceLink Consortium Inc. nor the names of
+* its contributors may be used to endorse or promote products derived
+* from this software without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+*/
+
+#import "SDLOnUpdateFile.h"
+
+#import "NSMutableDictionary+Store.h"
+#import "SDLRPCFunctionNames.h"
+#import "SDLRPCParameterNames.h"
+
+NS_ASSUME_NONNULL_BEGIN
+
+@implementation SDLOnUpdateFile
+
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
+- (instancetype)init {
+ self = [super initWithName:SDLRPCFunctionNameOnUpdateFile];
+ if (!self) {
+ return nil;
+ }
+ return self;
+}
+#pragma clang diagnostic pop
+
+- (instancetype)initWithFileName:(NSString *)fileName {
+ self = [self init];
+ if (!self) {
+ return nil;
+ }
+ self.fileName = fileName;
+ return self;
+}
+
+- (void)setFileName:(NSString *)fileName {
+ [self.parameters sdl_setObject:fileName forName:SDLRPCParameterNameFileName];
+}
+
+- (NSString *)fileName {
+ NSError *error = nil;
+ return [self.parameters sdl_objectForName:SDLRPCParameterNameFileName ofClass:NSString.class error:&error];
+}
+
+@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLOnUpdateSubMenu.h b/SmartDeviceLink/SDLOnUpdateSubMenu.h
new file mode 100644
index 000000000..285110cf0
--- /dev/null
+++ b/SmartDeviceLink/SDLOnUpdateSubMenu.h
@@ -0,0 +1,70 @@
+/*
+ * Copyright (c) 2020, SmartDeviceLink Consortium, Inc.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following
+ * disclaimer in the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * Neither the name of the SmartDeviceLink Consortium Inc. nor the names of
+ * its contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#import "SDLRPCNotification.h"
+
+NS_ASSUME_NONNULL_BEGIN
+
+/**
+ * This notification tells an app to update the AddSubMenu or its 'sub' AddCommand and AddSubMenus with the requested data
+ *
+ * @since SDL 7.0
+ */
+@interface SDLOnUpdateSubMenu : SDLRPCNotification
+
+/**
+ * @param menuID - @(menuID)
+ * @return A SDLOnUpdateSubMenu object
+ */
+- (instancetype)initWithMenuID:(UInt32)menuID;
+
+/**
+ * @param menuID - @(menuID)
+ * @param updateSubCells - updateSubCells
+ * @return A SDLOnUpdateSubMenu object
+ */
+- (instancetype)initWithMenuID:(UInt32)menuID updateSubCells:(nullable NSNumber<SDLBool> *)updateSubCells;
+
+/**
+ * This menuID must match a menuID in the current menu structure
+ * {"num_min_value": 0, "num_max_value": 2000000000}
+ */
+@property (strong, nonatomic) NSNumber<SDLUInt> *menuID;
+
+/**
+ * If not set, assume false. If true, the app should send AddCommands with parentIDs matching the menuID. These AddCommands will then be attached to the submenu and displayed if the submenu is selected.
+ */
+@property (nullable, strong, nonatomic) NSNumber<SDLBool> *updateSubCells;
+
+@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLOnUpdateSubMenu.m b/SmartDeviceLink/SDLOnUpdateSubMenu.m
new file mode 100644
index 000000000..55e53773f
--- /dev/null
+++ b/SmartDeviceLink/SDLOnUpdateSubMenu.m
@@ -0,0 +1,91 @@
+/*
+ * Copyright (c) 2020, SmartDeviceLink Consortium, Inc.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following
+ * disclaimer in the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * Neither the name of the SmartDeviceLink Consortium Inc. nor the names of
+ * its contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#import "SDLOnUpdateSubMenu.h"
+
+#import "NSMutableDictionary+Store.h"
+#import "SDLRPCFunctionNames.h"
+#import "SDLRPCParameterNames.h"
+
+NS_ASSUME_NONNULL_BEGIN
+
+@implementation SDLOnUpdateSubMenu
+
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
+- (instancetype)init {
+ self = [super initWithName:SDLRPCFunctionNameOnUpdateSubMenu];
+ if (!self) {
+ return nil;
+ }
+ return self;
+}
+#pragma clang diagnostic pop
+
+- (instancetype)initWithMenuID:(UInt32)menuID {
+ self = [self init];
+ if (!self) {
+ return nil;
+ }
+ self.menuID = @(menuID);
+ return self;
+}
+
+- (instancetype)initWithMenuID:(UInt32)menuID updateSubCells:(nullable NSNumber<SDLBool> *)updateSubCells {
+ self = [self initWithMenuID:menuID];
+ if (!self) {
+ return nil;
+ }
+ self.updateSubCells = updateSubCells;
+ return self;
+}
+
+- (void)setMenuID:(NSNumber<SDLUInt> *)menuID {
+ [self.parameters sdl_setObject:menuID forName:SDLRPCParameterNameMenuID];
+}
+
+- (NSNumber<SDLUInt> *)menuID {
+ NSError *error = nil;
+ return [self.parameters sdl_objectForName:SDLRPCParameterNameMenuID ofClass:NSNumber.class error:&error];
+}
+
+- (void)setUpdateSubCells:(nullable NSNumber<SDLBool> *)updateSubCells {
+ [self.parameters sdl_setObject:updateSubCells forName:SDLRPCParameterNameUpdateSubCells];
+}
+
+- (nullable NSNumber<SDLBool> *)updateSubCells {
+ return [self.parameters sdl_objectForName:SDLRPCParameterNameUpdateSubCells ofClass:NSNumber.class error:nil];
+}
+
+@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLRPCFunctionNames.h b/SmartDeviceLink/SDLRPCFunctionNames.h
index a7c985c6c..180b69ad8 100644
--- a/SmartDeviceLink/SDLRPCFunctionNames.h
+++ b/SmartDeviceLink/SDLRPCFunctionNames.h
@@ -163,6 +163,12 @@ extern SDLRPCFunctionName const SDLRPCFunctionNameOnTBTClientState;
/// Function name for an OnTouchEvent notification RPC
extern SDLRPCFunctionName const SDLRPCFunctionNameOnTouchEvent;
+/// Function name for an OnUpdateFile notification RPC
+extern SDLRPCFunctionName const SDLRPCFunctionNameOnUpdateFile;
+
+/// Function name for an OnUpdateSubMenu notification RPC
+extern SDLRPCFunctionName const SDLRPCFunctionNameOnUpdateSubMenu;
+
/// Function name for an OnVehicleData notification RPC
extern SDLRPCFunctionName const SDLRPCFunctionNameOnVehicleData;
diff --git a/SmartDeviceLink/SDLRPCFunctionNames.m b/SmartDeviceLink/SDLRPCFunctionNames.m
index f4d115210..a0a0c4754 100644
--- a/SmartDeviceLink/SDLRPCFunctionNames.m
+++ b/SmartDeviceLink/SDLRPCFunctionNames.m
@@ -58,6 +58,8 @@ SDLRPCFunctionName const SDLRPCFunctionNameOnSystemCapabilityUpdated = @"OnSyste
SDLRPCFunctionName const SDLRPCFunctionNameOnSystemRequest = @"OnSystemRequest";
SDLRPCFunctionName const SDLRPCFunctionNameOnTBTClientState = @"OnTBTClientState";
SDLRPCFunctionName const SDLRPCFunctionNameOnTouchEvent = @"OnTouchEvent";
+SDLRPCFunctionName const SDLRPCFunctionNameOnUpdateFile = @"OnUpdateFile";
+SDLRPCFunctionName const SDLRPCFunctionNameOnUpdateSubMenu = @"OnUpdateSubMenu";
SDLRPCFunctionName const SDLRPCFunctionNameOnVehicleData = @"OnVehicleData";
SDLRPCFunctionName const SDLRPCFunctionNameOnWayPointChange = @"OnWayPointChange";
SDLRPCFunctionName const SDLRPCFunctionNamePerformAppServiceInteraction = @"PerformAppServiceInteraction";
diff --git a/SmartDeviceLink/SDLRPCParameterNames.h b/SmartDeviceLink/SDLRPCParameterNames.h
index 6bec6d954..d65c9eeb1 100644
--- a/SmartDeviceLink/SDLRPCParameterNames.h
+++ b/SmartDeviceLink/SDLRPCParameterNames.h
@@ -215,6 +215,7 @@ extern SDLRPCParameterName const SDLRPCParameterNameDualModeEnable;
extern SDLRPCParameterName const SDLRPCParameterNameDualModeEnableAvailable;
extern SDLRPCParameterName const SDLRPCParameterNameDuration;
extern SDLRPCParameterName const SDLRPCParameterNameDuplicateUpdatesFromWindowID;
+extern SDLRPCParameterName const SDLRPCParameterNameDynamicUpdateCapabilities;
extern SDLRPCParameterName const SDLRPCParameterNameE911Override;
extern SDLRPCParameterName const SDLRPCParameterNameECallConfirmationStatus;
extern SDLRPCParameterName const SDLRPCParameterNameECallEventActive;
@@ -240,7 +241,7 @@ extern SDLRPCParameterName const SDLRPCParameterNameExternalTemperature;
extern SDLRPCParameterName const SDLRPCParameterNameFanSpeed;
extern SDLRPCParameterName const SDLRPCParameterNameFanSpeedAvailable;
extern SDLRPCParameterName const SDLRPCParameterNameFCCFacilityId;
-extern SDLRPCParameterName const SDLRPCParameterNameFilename;
+extern SDLRPCParameterName const SDLRPCParameterNameFileName;
extern SDLRPCParameterName const SDLRPCParameterNameFilenames;
extern SDLRPCParameterName const SDLRPCParameterNameFileType;
extern SDLRPCParameterName const SDLRPCParameterNameFirmness;
@@ -416,7 +417,7 @@ extern SDLRPCParameterName const SDLRPCParameterNameMediaType;
extern SDLRPCParameterName const SDLRPCParameterNameMemory;
extern SDLRPCParameterName const SDLRPCParameterNameMemoryAvailable;
extern SDLRPCParameterName const SDLRPCParameterNameMenuIcon;
-extern SDLRPCParameterName const SDLRPCParameterNameMenuId;
+extern SDLRPCParameterName const SDLRPCParameterNameMenuID;
extern SDLRPCParameterName const SDLRPCParameterNameMenuLayout;
extern SDLRPCParameterName const SDLRPCParameterNameMenuLayoutsAvailable;
extern SDLRPCParameterName const SDLRPCParameterNameMenuLength;
@@ -653,6 +654,8 @@ extern SDLRPCParameterName const SDLRPCParameterNameSubThoroughfare;
extern SDLRPCParameterName const SDLRPCParameterNameSuccess;
extern SDLRPCParameterName const SDLRPCParameterNameSummary;
extern SDLRPCParameterName const SDLRPCParameterNameSupportedDiagnosticModes;
+extern SDLRPCParameterName const SDLRPCParameterNameSupportedDynamicImageFieldNames;
+extern SDLRPCParameterName const SDLRPCParameterNameSupportsDynamicSubMenus;
extern SDLRPCParameterName const SDLRPCParameterNameSupportedFormats;
extern SDLRPCParameterName const SDLRPCParameterNameSupportedLights;
extern SDLRPCParameterName const SDLRPCParameterNameSyncFileName;
@@ -712,6 +715,7 @@ extern SDLRPCParameterName const SDLRPCParameterNameUnsubscribe;
extern SDLRPCParameterName const SDLRPCParameterNameUpdatedAppServiceRecord;
extern SDLRPCParameterName const SDLRPCParameterNameUpdateMode;
extern SDLRPCParameterName const SDLRPCParameterNameUpdateReason;
+extern SDLRPCParameterName const SDLRPCParameterNameUpdateSubCells;
extern SDLRPCParameterName const SDLRPCParameterNameUpDownAvailable;
extern SDLRPCParameterName const SDLRPCParameterNameURL;
extern SDLRPCParameterName const SDLRPCParameterNameURLUppercase;
diff --git a/SmartDeviceLink/SDLRPCParameterNames.m b/SmartDeviceLink/SDLRPCParameterNames.m
index 2a8d3a93b..dc6915683 100644
--- a/SmartDeviceLink/SDLRPCParameterNames.m
+++ b/SmartDeviceLink/SDLRPCParameterNames.m
@@ -186,6 +186,7 @@ SDLRPCParameterName const SDLRPCParameterNameDisplayCapabilities = @"displayCapa
SDLRPCParameterName const SDLRPCParameterNameDisplayLayout = @"displayLayout";
SDLRPCParameterName const SDLRPCParameterNameDisplayMode = @"displayMode";
SDLRPCParameterName const SDLRPCParameterNameDisplayModeUnitAvailable = @"displayModeUnitAvailable";
+SDLRPCParameterName const SDLRPCParameterNameDisplayName = @"displayName";
SDLRPCParameterName const SDLRPCParameterNameDisplayType = @"displayType";
SDLRPCParameterName const SDLRPCParameterNameDistanceToEmpty = @"distanceToEmpty";
SDLRPCParameterName const SDLRPCParameterNameDistanceToManeuver = @"distanceToManeuver";
@@ -211,6 +212,7 @@ SDLRPCParameterName const SDLRPCParameterNameDualModeEnable = @"dualModeEnable";
SDLRPCParameterName const SDLRPCParameterNameDualModeEnableAvailable = @"dualModeEnableAvailable";
SDLRPCParameterName const SDLRPCParameterNameDuration = @"duration";
SDLRPCParameterName const SDLRPCParameterNameDuplicateUpdatesFromWindowID = @"duplicateUpdatesFromWindowID";
+SDLRPCParameterName const SDLRPCParameterNameDynamicUpdateCapabilities = @"dynamicUpdateCapabilities";
SDLRPCParameterName const SDLRPCParameterNameE911Override = @"e911Override";
SDLRPCParameterName const SDLRPCParameterNameECallConfirmationStatus = @"eCallConfirmationStatus";
SDLRPCParameterName const SDLRPCParameterNameECallEventActive = @"eCallEventActive";
@@ -236,7 +238,7 @@ SDLRPCParameterName const SDLRPCParameterNameExternalTemperature = @"externalTem
SDLRPCParameterName const SDLRPCParameterNameFanSpeed = @"fanSpeed";
SDLRPCParameterName const SDLRPCParameterNameFanSpeedAvailable = @"fanSpeedAvailable";
SDLRPCParameterName const SDLRPCParameterNameFCCFacilityId = @"fccFacilityId";
-SDLRPCParameterName const SDLRPCParameterNameFilename = @"fileName";
+SDLRPCParameterName const SDLRPCParameterNameFileName = @"fileName";
SDLRPCParameterName const SDLRPCParameterNameFilenames = @"filenames";
SDLRPCParameterName const SDLRPCParameterNameFileType = @"fileType";
SDLRPCParameterName const SDLRPCParameterNameFirmness = @"firmness";
@@ -409,7 +411,7 @@ SDLRPCParameterName const SDLRPCParameterNameMediaType = @"mediaType";
SDLRPCParameterName const SDLRPCParameterNameMemory = @"memory";
SDLRPCParameterName const SDLRPCParameterNameMemoryAvailable = @"memoryAvailable";
SDLRPCParameterName const SDLRPCParameterNameMenuIcon = @"menuIcon";
-SDLRPCParameterName const SDLRPCParameterNameMenuId = @"menuID";
+SDLRPCParameterName const SDLRPCParameterNameMenuID = @"menuID";
SDLRPCParameterName const SDLRPCParameterNameMenuLayout = @"menuLayout";
SDLRPCParameterName const SDLRPCParameterNameMenuLayoutsAvailable = @"menuLayoutsAvailable";
SDLRPCParameterName const SDLRPCParameterNameMenuLength = @"menuLength";
@@ -601,7 +603,6 @@ SDLRPCParameterName const SDLRPCParameterNameServicePublished = @"servicePublish
SDLRPCParameterName const SDLRPCParameterNameServiceSpecificResult = @"serviceSpecificResult";
SDLRPCParameterName const SDLRPCParameterNameServiceType = @"serviceType";
SDLRPCParameterName const SDLRPCParameterNameServiceUri = @"serviceUri";
-SDLRPCParameterName const SDLRPCParameterNameDisplayName = @"displayName";
SDLRPCParameterName const SDLRPCParameterNameSeverity = @"severity";
SDLRPCParameterName const SDLRPCParameterNameShifted = @"shifted";
SDLRPCParameterName const SDLRPCParameterNameShortPress = @"shortPress";
@@ -648,6 +649,8 @@ SDLRPCParameterName const SDLRPCParameterNameSubThoroughfare = @"subThoroughfare
SDLRPCParameterName const SDLRPCParameterNameSuccess = @"success";
SDLRPCParameterName const SDLRPCParameterNameSummary = @"summary";
SDLRPCParameterName const SDLRPCParameterNameSupportedDiagnosticModes = @"supportedDiagModes";
+SDLRPCParameterName const SDLRPCParameterNameSupportedDynamicImageFieldNames = @"supportedDynamicImageFieldNames";
+SDLRPCParameterName const SDLRPCParameterNameSupportsDynamicSubMenus = @"supportsDynamicSubMenus";
SDLRPCParameterName const SDLRPCParameterNameSupportedFormats = @"supportedFormats";
SDLRPCParameterName const SDLRPCParameterNameSupportedLights = @"supportedLights";
SDLRPCParameterName const SDLRPCParameterNameSyncFileName = @"syncFileName";
@@ -707,6 +710,7 @@ SDLRPCParameterName const SDLRPCParameterNameUnsubscribe = @"Unsubscribe";
SDLRPCParameterName const SDLRPCParameterNameUpdatedAppServiceRecord = @"updatedAppServiceRecord";
SDLRPCParameterName const SDLRPCParameterNameUpdateMode = @"updateMode";
SDLRPCParameterName const SDLRPCParameterNameUpdateReason= @"updateReason";
+SDLRPCParameterName const SDLRPCParameterNameUpdateSubCells = @"updateSubCells";
SDLRPCParameterName const SDLRPCParameterNameUpDownAvailable = @"upDownAvailable";
SDLRPCParameterName const SDLRPCParameterNameURL = @"url";
SDLRPCParameterName const SDLRPCParameterNameURLUppercase = @"URL";
diff --git a/SmartDeviceLink/SDLShowAppMenu.m b/SmartDeviceLink/SDLShowAppMenu.m
index d93b8480d..7d7a5fc23 100644
--- a/SmartDeviceLink/SDLShowAppMenu.m
+++ b/SmartDeviceLink/SDLShowAppMenu.m
@@ -35,12 +35,12 @@ NS_ASSUME_NONNULL_BEGIN
}
- (void)setMenuID:(nullable NSNumber<SDLInt> *)menuID {
- [self.parameters sdl_setObject:menuID forName:SDLRPCParameterNameMenuId];
+ [self.parameters sdl_setObject:menuID forName:SDLRPCParameterNameMenuID];
}
- (nullable NSNumber<SDLInt> *)menuID {
NSError *error = nil;
- return [self.parameters sdl_objectForName:SDLRPCParameterNameMenuId ofClass:NSNumber.class error:&error];
+ return [self.parameters sdl_objectForName:SDLRPCParameterNameMenuID ofClass:NSNumber.class error:&error];
}
@end
diff --git a/SmartDeviceLink/SDLSystemRequest.m b/SmartDeviceLink/SDLSystemRequest.m
index 6999a5bca..e16968be0 100644
--- a/SmartDeviceLink/SDLSystemRequest.m
+++ b/SmartDeviceLink/SDLSystemRequest.m
@@ -62,11 +62,11 @@ NS_ASSUME_NONNULL_BEGIN
}
- (void)setFileName:(nullable NSString *)fileName {
- [self.parameters sdl_setObject:fileName forName:SDLRPCParameterNameFilename];
+ [self.parameters sdl_setObject:fileName forName:SDLRPCParameterNameFileName];
}
- (nullable NSString *)fileName {
- return [self.parameters sdl_objectForName:SDLRPCParameterNameFilename ofClass:NSString.class error:nil];
+ return [self.parameters sdl_objectForName:SDLRPCParameterNameFileName ofClass:NSString.class error:nil];
}
@end
diff --git a/SmartDeviceLink/SDLWindowCapability.h b/SmartDeviceLink/SDLWindowCapability.h
index 8360416b2..4795e667b 100644
--- a/SmartDeviceLink/SDLWindowCapability.h
+++ b/SmartDeviceLink/SDLWindowCapability.h
@@ -1,15 +1,45 @@
-//
-// SDLWindowCapability.h
-// SmartDeviceLink
+/*
+* Copyright (c) 2020, SmartDeviceLink Consortium, Inc.
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* Redistributions of source code must retain the above copyright notice, this
+* list of conditions and the following disclaimer.
+*
+* Redistributions in binary form must reproduce the above copyright notice,
+* this list of conditions and the following
+* disclaimer in the documentation and/or other materials provided with the
+* distribution.
+*
+* Neither the name of the SmartDeviceLink Consortium Inc. nor the names of
+* its contributors may be used to endorse or promote products derived
+* from this software without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+*/
#import "SDLRPCStruct.h"
+
#import "SDLImageType.h"
#import "SDLMenuLayout.h"
-@class SDLTextField;
-@class SDLImageField;
@class SDLButtonCapabilities;
+@class SDLDynamicUpdateCapabilities;
+@class SDLImageField;
@class SDLSoftButtonCapabilities;
+@class SDLTextField;
NS_ASSUME_NONNULL_BEGIN
@@ -22,6 +52,21 @@ NS_ASSUME_NONNULL_BEGIN
@interface SDLWindowCapability : SDLRPCStruct
/**
+ * @param windowID - windowID
+ * @param textFields - textFields
+ * @param imageFields - imageFields
+ * @param imageTypeSupported - imageTypeSupported
+ * @param templatesAvailable - templatesAvailable
+ * @param numCustomPresetsAvailable - numCustomPresetsAvailable
+ * @param buttonCapabilities - buttonCapabilities
+ * @param softButtonCapabilities - softButtonCapabilities
+ * @param menuLayoutsAvailable - menuLayoutsAvailable
+ * @param dynamicUpdateCapabilities - dynamicUpdateCapabilities
+ * @return A SDLWindowCapability object
+ */
+- (instancetype)initWithWindowID:(nullable NSNumber<SDLInt> *)windowID textFields:(nullable NSArray<SDLTextField *> *)textFields imageFields:(nullable NSArray<SDLImageField *> *)imageFields imageTypeSupported:(nullable NSArray<SDLImageType> *)imageTypeSupported templatesAvailable:(nullable NSArray<NSString *> *)templatesAvailable numCustomPresetsAvailable:(nullable NSNumber<SDLUInt> *)numCustomPresetsAvailable buttonCapabilities:(nullable NSArray<SDLButtonCapabilities *> *)buttonCapabilities softButtonCapabilities:(nullable NSArray<SDLSoftButtonCapabilities *> *)softButtonCapabilities menuLayoutsAvailable:(nullable NSArray<SDLMenuLayout> *)menuLayoutsAvailable dynamicUpdateCapabilities:(nullable SDLDynamicUpdateCapabilities *)dynamicUpdateCapabilities;
+
+/**
The specified ID of the window. Can be set to a predefined window, or omitted for the main window on the main display.
Size: min 1 max 100
@@ -47,14 +92,14 @@ NS_ASSUME_NONNULL_BEGIN
Size: min 0 max 1000
*/
-@property (nullable, strong, nonatomic) NSArray<SDLImageType> *imageTypeSupported;
+@property (nullable, strong, nonatomic) NSArray<SDLImageType> *imageTypeSupported;
/**
A set of all window templates available on the head unit.
Size: min 0 max 100
*/
-@property (nullable, strong, nonatomic) NSArray<NSString *> *templatesAvailable;
+@property (nullable, strong, nonatomic) NSArray<NSString *> *templatesAvailable;
/**
The number of on-window custom presets available (if any); otherwise omitted.
@@ -84,6 +129,13 @@ NS_ASSUME_NONNULL_BEGIN
*/
@property (nullable, strong, nonatomic) NSArray<SDLMenuLayout> *menuLayoutsAvailable;
+/**
+ * Contains the head unit's capabilities for dynamic updating features declaring if the module will send dynamic update RPCs.
+ *
+ * @since SDL 7.0.0
+ */
+@property (nullable, strong, nonatomic) SDLDynamicUpdateCapabilities *dynamicUpdateCapabilities;
+
@end
NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLWindowCapability.m b/SmartDeviceLink/SDLWindowCapability.m
index 509e2aa96..9c3ebe7e2 100644
--- a/SmartDeviceLink/SDLWindowCapability.m
+++ b/SmartDeviceLink/SDLWindowCapability.m
@@ -1,18 +1,65 @@
-//
-// SDLWindowCapability.m
-// SmartDeviceLink
+/*
+* Copyright (c) 2020, SmartDeviceLink Consortium, Inc.
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* Redistributions of source code must retain the above copyright notice, this
+* list of conditions and the following disclaimer.
+*
+* Redistributions in binary form must reproduce the above copyright notice,
+* this list of conditions and the following
+* disclaimer in the documentation and/or other materials provided with the
+* distribution.
+*
+* Neither the name of the SmartDeviceLink Consortium Inc. nor the names of
+* its contributors may be used to endorse or promote products derived
+* from this software without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+*/
#import "SDLWindowCapability.h"
#import "NSMutableDictionary+Store.h"
-#import "SDLRPCParameterNames.h"
-#import "SDLTextField.h"
-#import "SDLImageField.h"
#import "SDLButtonCapabilities.h"
+#import "SDLDynamicUpdateCapabilities.h"
+#import "SDLImageField.h"
+#import "SDLRPCParameterNames.h"
#import "SDLSoftButtonCapabilities.h"
+#import "SDLTextField.h"
@implementation SDLWindowCapability
+- (instancetype)initWithWindowID:(nullable NSNumber<SDLInt> *)windowID textFields:(nullable NSArray<SDLTextField *> *)textFields imageFields:(nullable NSArray<SDLImageField *> *)imageFields imageTypeSupported:(nullable NSArray<SDLImageType> *)imageTypeSupported templatesAvailable:(nullable NSArray<NSString *> *)templatesAvailable numCustomPresetsAvailable:(nullable NSNumber<SDLUInt> *)numCustomPresetsAvailable buttonCapabilities:(nullable NSArray<SDLButtonCapabilities *> *)buttonCapabilities softButtonCapabilities:(nullable NSArray<SDLSoftButtonCapabilities *> *)softButtonCapabilities menuLayoutsAvailable:(nullable NSArray<SDLMenuLayout> *)menuLayoutsAvailable dynamicUpdateCapabilities:(nullable SDLDynamicUpdateCapabilities *)dynamicUpdateCapabilities {
+ self = [super init];
+ if (!self) {
+ return nil;
+ }
+ self.windowID = windowID;
+ self.textFields = textFields;
+ self.imageFields = imageFields;
+ self.imageTypeSupported = imageTypeSupported;
+ self.templatesAvailable = templatesAvailable;
+ self.numCustomPresetsAvailable = numCustomPresetsAvailable;
+ self.buttonCapabilities = buttonCapabilities;
+ self.softButtonCapabilities = softButtonCapabilities;
+ self.menuLayoutsAvailable = menuLayoutsAvailable;
+ self.dynamicUpdateCapabilities = dynamicUpdateCapabilities;
+ return self;
+}
+
- (void)setWindowID:(nullable NSNumber<SDLUInt> *)windowID {
[self.store sdl_setObject:windowID forName:SDLRPCParameterNameWindowId];
}
@@ -86,4 +133,12 @@
return [self.store sdl_enumsForName:SDLRPCParameterNameMenuLayoutsAvailable error:nil];
}
+- (void)setDynamicUpdateCapabilities:(nullable SDLDynamicUpdateCapabilities *)dynamicUpdateCapabilities {
+ [self.store sdl_setObject:dynamicUpdateCapabilities forName:SDLRPCParameterNameDynamicUpdateCapabilities];
+}
+
+- (nullable SDLDynamicUpdateCapabilities *)dynamicUpdateCapabilities {
+ return [self.store sdl_objectForName:SDLRPCParameterNameDynamicUpdateCapabilities ofClass:SDLDynamicUpdateCapabilities.class error:nil];
+}
+
@end
diff --git a/SmartDeviceLink/SmartDeviceLink.h b/SmartDeviceLink/SmartDeviceLink.h
index be8e1e08f..45ee193cd 100644
--- a/SmartDeviceLink/SmartDeviceLink.h
+++ b/SmartDeviceLink/SmartDeviceLink.h
@@ -9,8 +9,8 @@ FOUNDATION_EXPORT double SmartDeviceLinkVersionNumber;
/// Project version string for SmartDeviceLink.
FOUNDATION_EXPORT const unsigned char SmartDeviceLinkVersionString[];
-/***** RPCs *****/
-// Superclasses
+#pragma mark - RPCs
+#pragma mark Superclasses
#import "SDLEnum.h"
#import "SDLRPCMessage.h"
#import "SDLRPCNotification.h"
@@ -18,7 +18,7 @@ FOUNDATION_EXPORT const unsigned char SmartDeviceLinkVersionString[];
#import "SDLRPCResponse.h"
#import "SDLRPCStruct.h"
-// Requests
+#pragma mark Requests
#import "SDLAddCommand.h"
#import "SDLAddSubMenu.h"
#import "SDLAlert.h"
@@ -84,7 +84,7 @@ FOUNDATION_EXPORT const unsigned char SmartDeviceLinkVersionString[];
#import "SDLUnsubscribeWayPoints.h"
#import "SDLUpdateTurnList.h"
-// Responses
+#pragma mark Responses
#import "SDLAddCommandResponse.h"
#import "SDLAddSubMenuResponse.h"
#import "SDLAlertManeuverResponse.h"
@@ -150,7 +150,7 @@ FOUNDATION_EXPORT const unsigned char SmartDeviceLinkVersionString[];
#import "SDLUnsubscribeWayPointsResponse.h"
#import "SDLUpdateTurnListResponse.h"
-// Notifications
+#pragma mark Notifications
#import "SDLOnAppInterfaceUnregistered.h"
#import "SDLOnAppServiceData.h"
#import "SDLOnAudioPassThru.h"
@@ -173,10 +173,12 @@ FOUNDATION_EXPORT const unsigned char SmartDeviceLinkVersionString[];
#import "SDLOnSystemRequest.h"
#import "SDLOnTBTClientState.h"
#import "SDLOnTouchEvent.h"
+#import "SDLOnUpdateFile.h"
+#import "SDLOnUpdateSubMenu.h"
#import "SDLOnVehicleData.h"
#import "SDLOnWayPointChange.h"
-// Structs
+#pragma mark Structs
#import "SDLAirbagStatus.h"
#import "SDLAppInfo.h"
#import "SDLAppServiceCapability.h"
@@ -201,6 +203,7 @@ FOUNDATION_EXPORT const unsigned char SmartDeviceLinkVersionString[];
#import "SDLDeviceStatus.h"
#import "SDLDisplayCapabilities.h"
#import "SDLDisplayCapability.h"
+#import "SDLDynamicUpdateCapabilities.h"
#import "SDLDriverDistractionCapability.h"
#import "SDLECallInfo.h"
#import "SDLEmergencyEvent.h"
@@ -287,7 +290,7 @@ FOUNDATION_EXPORT const unsigned char SmartDeviceLinkVersionString[];
#import "SDLWindowCapability.h"
#import "SDLWindowTypeCapabilities.h"
-// Enums
+#pragma mark Enums
#import "SDLAmbientLightStatus.h"
#import "SDLAppHMIType.h"
#import "SDLAppInterfaceUnregisteredReason.h"
@@ -396,8 +399,8 @@ FOUNDATION_EXPORT const unsigned char SmartDeviceLinkVersionString[];
#import "SDLWindowType.h"
#import "SDLWiperStatus.h"
-// Developer API
-// Configurations
+#pragma mark - Developer API
+#pragma mark Configurations
#import "SDLConfiguration.h"
#import "SDLEncryptionConfiguration.h"
#import "SDLFileManagerConfiguration.h"
@@ -406,11 +409,11 @@ FOUNDATION_EXPORT const unsigned char SmartDeviceLinkVersionString[];
#import "SDLLockScreenConfiguration.h"
#import "SDLStreamingMediaConfiguration.h"
-// Encryption
+#pragma mark Encryption
#import "SDLProtocolConstants.h"
#import "SDLServiceEncryptionDelegate.h"
-// Streaming
+#pragma mark Streaming
#import "SDLAudioFile.h"
#import "SDLAudioStreamManager.h"
#import "SDLAudioStreamManagerDelegate.h"
@@ -423,29 +426,29 @@ FOUNDATION_EXPORT const unsigned char SmartDeviceLinkVersionString[];
#import "SDLStreamingMediaManagerDataSource.h"
#import "SDLStreamingVideoScaleManager.h"
-// Files
+#pragma mark Files
#import "SDLArtwork.h"
#import "SDLFile.h"
#import "SDLFileManager.h"
#import "SDLFileManagerConstants.h"
-// Lockscreen
+#pragma mark Lockscreen
#import "SDLLockScreenViewController.h"
-// Lifecycle
+#pragma mark Lifecycle
#import "SDLManager.h"
#import "SDLManagerDelegate.h"
-// System Capabilities
+#pragma mark System Capabilities
#import "SDLSystemCapabilityManager.h"
-// Permissions
+#pragma mark Permissions
#import "SDLPermissionConstants.h"
#import "SDLPermissionElement.h"
#import "SDLRPCPermissionStatus.h"
#import "SDLPermissionManager.h"
-// Screen
+#pragma mark Screen
#import "SDLScreenManager.h"
#import "SDLSoftButtonObject.h"
#import "SDLSoftButtonState.h"
@@ -459,11 +462,11 @@ FOUNDATION_EXPORT const unsigned char SmartDeviceLinkVersionString[];
#import "SDLChoiceSetDelegate.h"
#import "SDLKeyboardDelegate.h"
-// Touches
+#pragma mark Touches
#import "SDLPinchGesture.h"
#import "SDLTouch.h"
-// Utilities
+#pragma mark - Utilities
#import "NSNumber+NumberType.h"
#import "SDLErrorConstants.h"
#import "SDLFunctionID.h"
@@ -472,12 +475,12 @@ FOUNDATION_EXPORT const unsigned char SmartDeviceLinkVersionString[];
#import "SDLStreamingMediaManagerConstants.h"
#import "SDLVersion.h"
-// Notifications
+#pragma mark Notifications
#import "SDLRPCNotificationNotification.h"
#import "SDLRPCResponseNotification.h"
#import "SDLRPCRequestNotification.h"
-// Logger
+#pragma mark Logger
#import "SDLLogConstants.h"
#import "SDLLogConfiguration.h"
#import "SDLLogFileModule.h"
@@ -489,5 +492,5 @@ FOUNDATION_EXPORT const unsigned char SmartDeviceLinkVersionString[];
#import "SDLLogTargetFile.h"
#import "SDLLogTargetOSLog.h"
-// Macros
+#pragma mark Macros
#import "SDLMacros.h"
diff --git a/SmartDeviceLinkTests/ProtocolSpecs/SDLFunctionIDSpec.m b/SmartDeviceLinkTests/ProtocolSpecs/SDLFunctionIDSpec.m
index 32599856d..b47292f55 100644
--- a/SmartDeviceLinkTests/ProtocolSpecs/SDLFunctionIDSpec.m
+++ b/SmartDeviceLinkTests/ProtocolSpecs/SDLFunctionIDSpec.m
@@ -89,6 +89,8 @@ describe(@"GetFunctionName Tests", ^ {
expect([functionID functionNameForId:32785]).to(equal(SDLRPCFunctionNameOnRCStatus));
expect([functionID functionNameForId:32786]).to(equal(SDLRPCFunctionNameOnAppServiceData));
expect([functionID functionNameForId:32787]).to(equal(SDLRPCFunctionNameOnSystemCapabilityUpdated));
+ expect([functionID functionNameForId:32789]).to(equal(SDLRPCFunctionNameOnUpdateFile));
+ expect([functionID functionNameForId:32790]).to(equal(SDLRPCFunctionNameOnUpdateSubMenu));
//Not listed in Spec
#pragma clang diagnostic push
diff --git a/SmartDeviceLinkTests/RPCSpecs/EnumSpecs/SDLImageFieldNameSpec.m b/SmartDeviceLinkTests/RPCSpecs/EnumSpecs/SDLImageFieldNameSpec.m
index 8b0406140..6363714eb 100644
--- a/SmartDeviceLinkTests/RPCSpecs/EnumSpecs/SDLImageFieldNameSpec.m
+++ b/SmartDeviceLinkTests/RPCSpecs/EnumSpecs/SDLImageFieldNameSpec.m
@@ -27,6 +27,7 @@ describe(@"Individual Enum Value Tests", ^ {
expect(SDLImageFieldNameShowConstantTBTIcon).to(equal(@"showConstantTBTIcon"));
expect(SDLImageFieldNameShowConstantTBTNextTurnIcon).to(equal(@"showConstantTBTNextTurnIcon"));
expect(SDLImageFieldNameLocationImage).to(equal(@"locationImage"));
+ expect(SDLImageFieldNameSubMenuIcon).to(equal(@"subMenuIcon"));
expect(SDLImageFieldNameSubtleAlertIcon).to(equal(@"subtleAlertIcon"));
});
});
diff --git a/SmartDeviceLinkTests/RPCSpecs/NotificationSpecs/SDLOnUpdateFileSpec.m b/SmartDeviceLinkTests/RPCSpecs/NotificationSpecs/SDLOnUpdateFileSpec.m
new file mode 100644
index 000000000..c39c671b5
--- /dev/null
+++ b/SmartDeviceLinkTests/RPCSpecs/NotificationSpecs/SDLOnUpdateFileSpec.m
@@ -0,0 +1,74 @@
+//
+// SDLOnUpdateFileSpec.m
+// SmartDeviceLinkTests
+//
+// Created by Joel Fischer on 7/30/20.
+// Copyright © 2020 smartdevicelink. All rights reserved.
+//
+
+#import <Foundation/Foundation.h>
+
+#import <Quick/Quick.h>
+#import <Nimble/Nimble.h>
+
+#import "SDLRPCParameterNames.h"
+#import "SDLOnUpdateFile.h"
+
+QuickSpecBegin(SDLOnUpdateFileSpec)
+
+__block SDLOnUpdateFile *testRPC = nil;
+__block NSString *testFileName = nil;
+
+beforeEach(^{
+ testFileName = @"test file name";
+});
+
+describe(@"when initializing with init", ^{
+ beforeEach(^{
+ testRPC = [[SDLOnUpdateFile alloc] init];
+ });
+
+ it(@"should have no data", ^{
+ expect(testRPC.fileName).to(beNil());
+ });
+
+ describe(@"when getting/setting parameters", ^{
+ beforeEach(^{
+ testRPC.fileName = testFileName;
+ });
+
+ it(@"should properly get/set the data", ^{
+ expect(testRPC.fileName).to(equal(testFileName));
+ });
+ });
+});
+
+describe(@"when initializing with a dictionary", ^{
+ beforeEach(^{
+ NSDictionary *testDict = @{
+ SDLRPCParameterNameNotification: @{
+ SDLRPCParameterNameParameters: @{
+ SDLRPCParameterNameFileName: testFileName
+ }
+ }
+ };
+
+ testRPC = [[SDLOnUpdateFile alloc] initWithDictionary:testDict];
+ });
+
+ it(@"should properly get/set the data", ^{
+ expect(testRPC.fileName).to(equal(testFileName));
+ });
+});
+
+describe(@"when initializing with initWithFileName:", ^{
+ beforeEach(^{
+ testRPC = [[SDLOnUpdateFile alloc] initWithFileName:testFileName];
+ });
+
+ it(@"should properly get/set the data", ^{
+ expect(testRPC.fileName).to(equal(testFileName));
+ });
+});
+
+QuickSpecEnd
diff --git a/SmartDeviceLinkTests/RPCSpecs/NotificationSpecs/SDLOnUpdateSubMenuSpec.m b/SmartDeviceLinkTests/RPCSpecs/NotificationSpecs/SDLOnUpdateSubMenuSpec.m
new file mode 100644
index 000000000..fd845f0a0
--- /dev/null
+++ b/SmartDeviceLinkTests/RPCSpecs/NotificationSpecs/SDLOnUpdateSubMenuSpec.m
@@ -0,0 +1,88 @@
+//
+// SDLOnUpdateSubMenuSpec.m
+// SmartDeviceLinkTests
+//
+// Created by Joel Fischer on 7/30/20.
+// Copyright © 2020 smartdevicelink. All rights reserved.
+//
+
+#import <Foundation/Foundation.h>
+
+#import <Quick/Quick.h>
+#import <Nimble/Nimble.h>
+
+#import "SDLRPCParameterNames.h"
+#import "SDLOnUpdateSubMenu.h"
+
+QuickSpecBegin(SDLOnUpdateSubMenuSpec)
+
+__block SDLOnUpdateSubMenu *testRPC = nil;
+__block UInt32 testMenuID = 32;
+__block NSNumber<SDLBool> *testUpdateSubCells = @YES;
+
+describe(@"when initializing with init", ^{
+ beforeEach(^{
+ testRPC = [[SDLOnUpdateSubMenu alloc] init];
+ });
+
+ it(@"should have no data", ^{
+ expect(testRPC.menuID).to(beFalsy());
+ expect(testRPC.updateSubCells).to(beFalsy());
+ });
+
+ describe(@"when getting/setting parameters", ^{
+ beforeEach(^{
+ testRPC.menuID = @(testMenuID);
+ testRPC.updateSubCells = testUpdateSubCells;
+ });
+
+ it(@"should properly get/set the data", ^{
+ expect(testRPC.menuID).to(equal(@(testMenuID)));
+ expect(testRPC.updateSubCells).to(equal(testUpdateSubCells));
+ });
+ });
+});
+
+describe(@"when initializing with a dictionary", ^{
+ beforeEach(^{
+ NSDictionary *testDict = @{
+ SDLRPCParameterNameNotification: @{
+ SDLRPCParameterNameParameters: @{
+ SDLRPCParameterNameMenuID: @(testMenuID),
+ SDLRPCParameterNameUpdateSubCells: testUpdateSubCells
+ }
+ }
+ };
+
+ testRPC = [[SDLOnUpdateSubMenu alloc] initWithDictionary:testDict];
+ });
+
+ it(@"should properly get/set the data", ^{
+ expect(testRPC.menuID).to(equal(@(testMenuID)));
+ expect(testRPC.updateSubCells).to(equal(testUpdateSubCells));
+ });
+});
+
+describe(@"when initializing with initWithMenuID:", ^{
+ beforeEach(^{
+ testRPC = [[SDLOnUpdateSubMenu alloc] initWithMenuID:testMenuID];
+ });
+
+ it(@"should properly get/set the data", ^{
+ expect(testRPC.menuID).to(equal(@(testMenuID)));
+ expect(testRPC.updateSubCells).to(beNil());
+ });
+});
+
+describe(@"when initializing with initWithMenuID:updateSubCells:", ^{
+ beforeEach(^{
+ testRPC = [[SDLOnUpdateSubMenu alloc] initWithMenuID:testMenuID updateSubCells:testUpdateSubCells];
+ });
+
+ it(@"should properly get/set the data", ^{
+ expect(testRPC.menuID).to(equal(@(testMenuID)));
+ expect(testRPC.updateSubCells).to(equal(testUpdateSubCells));
+ });
+});
+
+QuickSpecEnd
diff --git a/SmartDeviceLinkTests/RPCSpecs/RequestSpecs/SDLAddSubMenuSpec.m b/SmartDeviceLinkTests/RPCSpecs/RequestSpecs/SDLAddSubMenuSpec.m
index ca0ab6f28..17ce72c6c 100644
--- a/SmartDeviceLinkTests/RPCSpecs/RequestSpecs/SDLAddSubMenuSpec.m
+++ b/SmartDeviceLinkTests/RPCSpecs/RequestSpecs/SDLAddSubMenuSpec.m
@@ -120,7 +120,7 @@ describe(@"Getter/Setter Tests", ^ {
it(@"Should get correctly when initialized", ^ {
NSMutableDictionary<NSString *, id> *dict = [@{SDLRPCParameterNameRequest:
@{SDLRPCParameterNameParameters:
- @{SDLRPCParameterNameMenuId: @(menuId),
+ @{SDLRPCParameterNameMenuID: @(menuId),
SDLRPCParameterNamePosition: @(position),
SDLRPCParameterNameMenuName: menuName,
SDLRPCParameterNameMenuIcon: @{
diff --git a/SmartDeviceLinkTests/RPCSpecs/RequestSpecs/SDLDeleteSubMenuSpec.m b/SmartDeviceLinkTests/RPCSpecs/RequestSpecs/SDLDeleteSubMenuSpec.m
index 1a71c63f8..494988a7b 100755
--- a/SmartDeviceLinkTests/RPCSpecs/RequestSpecs/SDLDeleteSubMenuSpec.m
+++ b/SmartDeviceLinkTests/RPCSpecs/RequestSpecs/SDLDeleteSubMenuSpec.m
@@ -26,7 +26,7 @@ describe(@"Getter/Setter Tests", ^ {
it(@"Should get correctly when initialized", ^ {
NSMutableDictionary<NSString *, id> *dict = [@{SDLRPCParameterNameRequest:
@{SDLRPCParameterNameParameters:
- @{SDLRPCParameterNameMenuId:@25614},
+ @{SDLRPCParameterNameMenuID:@25614},
SDLRPCParameterNameOperationName:SDLRPCFunctionNameDeleteSubMenu}} mutableCopy];
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
diff --git a/SmartDeviceLinkTests/RPCSpecs/RequestSpecs/SDLGetFileSpec.m b/SmartDeviceLinkTests/RPCSpecs/RequestSpecs/SDLGetFileSpec.m
index ba594e259..9f795546c 100644
--- a/SmartDeviceLinkTests/RPCSpecs/RequestSpecs/SDLGetFileSpec.m
+++ b/SmartDeviceLinkTests/RPCSpecs/RequestSpecs/SDLGetFileSpec.m
@@ -47,7 +47,7 @@ describe(@"Getter/Setter Tests", ^{
it(@"Should initialize correctly with a dictionary", ^{
NSDictionary *dict = @{SDLRPCParameterNameRequest:@{
SDLRPCParameterNameParameters:@{
- SDLRPCParameterNameFilename:testFileName,
+ SDLRPCParameterNameFileName:testFileName,
SDLRPCParameterNameAppServiceId:testAppServiceId,
SDLRPCParameterNameFileType:testFileType,
SDLRPCParameterNameOffset:@(testOffset),
diff --git a/SmartDeviceLinkTests/RPCSpecs/RequestSpecs/SDLShowAppMenuSpec.m b/SmartDeviceLinkTests/RPCSpecs/RequestSpecs/SDLShowAppMenuSpec.m
index 4557c014a..d88e335a9 100644
--- a/SmartDeviceLinkTests/RPCSpecs/RequestSpecs/SDLShowAppMenuSpec.m
+++ b/SmartDeviceLinkTests/RPCSpecs/RequestSpecs/SDLShowAppMenuSpec.m
@@ -30,7 +30,7 @@ describe(@"Getter/Setter Tests", ^ {
it(@"Should get correctly when initialized with dictonary", ^ {
NSDictionary<NSString *, id> *dict = [@{SDLRPCParameterNameRequest:
@{SDLRPCParameterNameParameters:
- @{SDLRPCParameterNameMenuId:@4345645,
+ @{SDLRPCParameterNameMenuID:@4345645,
},
SDLRPCParameterNameOperationName:SDLRPCFunctionNameShowAppMenu}} mutableCopy];
#pragma clang diagnostic push
diff --git a/SmartDeviceLinkTests/RPCSpecs/RequestSpecs/SDLSystemRequestSpec.m b/SmartDeviceLinkTests/RPCSpecs/RequestSpecs/SDLSystemRequestSpec.m
index 19954c463..ea86ebb89 100644
--- a/SmartDeviceLinkTests/RPCSpecs/RequestSpecs/SDLSystemRequestSpec.m
+++ b/SmartDeviceLinkTests/RPCSpecs/RequestSpecs/SDLSystemRequestSpec.m
@@ -26,7 +26,7 @@ describe(@"Getter/Setter Tests", ^ {
@{SDLRPCParameterNameParameters:
@{SDLRPCParameterNameRequestType:SDLRequestTypeAuthenticationRequest,
SDLRPCParameterNameRequestSubType: testSubType,
- SDLRPCParameterNameFilename:testFileName},
+ SDLRPCParameterNameFileName:testFileName},
SDLRPCParameterNameOperationName:SDLRPCFunctionNameSystemRequest}} mutableCopy];
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
diff --git a/SmartDeviceLinkTests/RPCSpecs/StructSpecs/SDLDynamicUpdateCapabilitiesSpec.m b/SmartDeviceLinkTests/RPCSpecs/StructSpecs/SDLDynamicUpdateCapabilitiesSpec.m
new file mode 100644
index 000000000..7d2f5eb99
--- /dev/null
+++ b/SmartDeviceLinkTests/RPCSpecs/StructSpecs/SDLDynamicUpdateCapabilitiesSpec.m
@@ -0,0 +1,75 @@
+//
+// SDLDynamicUpdateCapabilitiesSpec.m
+// SmartDeviceLinkTests
+//
+// Created by Joel Fischer on 7/30/20.
+// Copyright © 2020 smartdevicelink. All rights reserved.
+//
+
+#import <Foundation/Foundation.h>
+
+#import <Quick/Quick.h>
+#import <Nimble/Nimble.h>
+
+#import "SDLDynamicUpdateCapabilities.h"
+
+#import "SDLImageFieldName.h"
+#import "SDLRPCParameterNames.h"
+
+QuickSpecBegin(SDLDynamicUpdateCapabilitiesSpec)
+
+__block SDLDynamicUpdateCapabilities *testStruct = nil;
+__block NSArray<SDLImageFieldName> *testImageFields = @[SDLImageFieldNameCommandIcon, SDLImageFieldNameSubMenuIcon];
+__block NSNumber<SDLBool> *testSupportsDynamicSubmenus = @YES;
+
+describe(@"when initializing with init", ^{
+ beforeEach(^{
+ testStruct = [[SDLDynamicUpdateCapabilities alloc] init];
+ });
+
+ it(@"should have no data", ^{
+ expect(testStruct.supportedDynamicImageFieldNames).to(beNil());
+ expect(testStruct.supportsDynamicSubMenus).to(beNil());
+ });
+
+ describe(@"when getting/setting parameters", ^{
+ beforeEach(^{
+ testStruct.supportedDynamicImageFieldNames = @[SDLImageFieldNameCommandIcon, SDLImageFieldNameSubMenuIcon];
+ testStruct.supportsDynamicSubMenus = testSupportsDynamicSubmenus;
+ });
+
+ it(@"should properly get/set the data", ^{
+ expect(testStruct.supportedDynamicImageFieldNames).to(equal(testImageFields));
+ expect(testStruct.supportsDynamicSubMenus).to(equal(testSupportsDynamicSubmenus));
+ });
+ });
+});
+
+describe(@"when initializing with a dictionary", ^{
+ beforeEach(^{
+ NSDictionary *testDict = @{
+ SDLRPCParameterNameSupportedDynamicImageFieldNames: testImageFields,
+ SDLRPCParameterNameSupportsDynamicSubMenus: testSupportsDynamicSubmenus
+ };
+
+ testStruct = [[SDLDynamicUpdateCapabilities alloc] initWithDictionary:testDict];
+ });
+
+ it(@"should properly get/set the data", ^{
+ expect(testStruct.supportedDynamicImageFieldNames).to(equal(testImageFields));
+ expect(testStruct.supportsDynamicSubMenus).to(equal(testSupportsDynamicSubmenus));
+ });
+});
+
+describe(@"when initializing with initWithSupportedDynamicImageFieldNames:supportsDynamicSubMenus:", ^{
+ beforeEach(^{
+ testStruct = [[SDLDynamicUpdateCapabilities alloc] initWithSupportedDynamicImageFieldNames:testImageFields supportsDynamicSubMenus:testSupportsDynamicSubmenus];
+ });
+
+ it(@"should properly get/set the data", ^{
+ expect(testStruct.supportedDynamicImageFieldNames).to(equal(testImageFields));
+ expect(testStruct.supportsDynamicSubMenus).to(equal(testSupportsDynamicSubmenus));
+ });
+});
+
+QuickSpecEnd
diff --git a/SmartDeviceLinkTests/RPCSpecs/StructSpecs/SDLWindowCapabilitySpec.m b/SmartDeviceLinkTests/RPCSpecs/StructSpecs/SDLWindowCapabilitySpec.m
index 94eecde90..e8c2514b4 100644
--- a/SmartDeviceLinkTests/RPCSpecs/StructSpecs/SDLWindowCapabilitySpec.m
+++ b/SmartDeviceLinkTests/RPCSpecs/StructSpecs/SDLWindowCapabilitySpec.m
@@ -6,25 +6,32 @@
#import <Nimble/Nimble.h>
#import "SDLWindowCapability.h"
-#import "SDLRPCParameterNames.h"
-#import "SDLTextField.h"
-#import "SDLTextFieldName.h"
+
+#import "SDLButtonCapabilities.h"
+#import "SDLDynamicUpdateCapabilities.h"
#import "SDLImageField.h"
#import "SDLImageType.h"
-#import "SDLButtonCapabilities.h"
+#import "SDLRPCParameterNames.h"
#import "SDLSoftButtonCapabilities.h"
+#import "SDLTextField.h"
+#import "SDLTextFieldName.h"
QuickSpecBegin(SDLWindowCapabilitySpec)
+__block SDLWindowCapability *testStruct = nil;
+
+__block SDLTextField* testTextField = nil;
+__block SDLImageField *testImageField = nil;
+__block SDLButtonCapabilities *testButtonCapabilities = nil;
+__block SDLSoftButtonCapabilities *testSoftButtonsCapabilities = nil;
+__block SDLImageType testImageType = nil;
+__block NSString *testTextName = nil;
+__block NSString *testImageName = nil;
+__block NSString *testTemplateAvailable = nil;
+__block SDLMenuLayout testMenuLayout = SDLMenuLayoutTiles;
+__block SDLDynamicUpdateCapabilities *testDynamicUpdates = nil;
+
describe(@"Getter/Setter Tests", ^ {
- __block SDLTextField* testTextField = nil;
- __block SDLImageField *testImageField = nil;
- __block SDLButtonCapabilities *testButtonCapabilities = nil;
- __block SDLSoftButtonCapabilities *testSoftButtonscapabilities = nil;
- __block SDLImageType testImageType = nil;
- __block NSString *testTextName = nil;
- __block NSString *testImageName = nil;
-
beforeEach(^{
testImageType = SDLImageTypeDynamic;
testTextName = @"test Text field";
@@ -41,20 +48,25 @@ describe(@"Getter/Setter Tests", ^ {
testButtonCapabilities.longPressAvailable = @YES;
testButtonCapabilities.upDownAvailable = @YES;
- testSoftButtonscapabilities = [[SDLSoftButtonCapabilities alloc] init];
- testSoftButtonscapabilities.imageSupported = @YES;
+ testSoftButtonsCapabilities = [[SDLSoftButtonCapabilities alloc] init];
+ testSoftButtonsCapabilities.imageSupported = @YES;
+
+ testTemplateAvailable = @"myTemplate";
+ testDynamicUpdates = [[SDLDynamicUpdateCapabilities alloc] initWithSupportedDynamicImageFieldNames:@[SDLImageFieldNameSubMenuIcon] supportsDynamicSubMenus:@YES];
});
it(@"Should set and get correctly", ^ {
- SDLWindowCapability* testStruct = testStruct = [[SDLWindowCapability alloc] init];
+ testStruct = [[SDLWindowCapability alloc] init];
testStruct.windowID = @444;
testStruct.numCustomPresetsAvailable = @10;
testStruct.textFields = @[testTextField];
testStruct.imageFields = @[testImageField];
testStruct.imageTypeSupported = @[testImageType];
testStruct.buttonCapabilities = @[testButtonCapabilities];
- testStruct.softButtonCapabilities = @[testSoftButtonscapabilities];
- testStruct.menuLayoutsAvailable = @[SDLMenuLayoutTiles];
+ testStruct.softButtonCapabilities = @[testSoftButtonsCapabilities];
+ testStruct.menuLayoutsAvailable = @[testMenuLayout];
+ testStruct.templatesAvailable = @[testTemplateAvailable];
+ testStruct.dynamicUpdateCapabilities = testDynamicUpdates;
expect(testStruct.windowID).to(equal(@444));
expect(testStruct.textFields.firstObject.name).to(equal(SDLTextFieldNameTertiaryText));
@@ -65,9 +77,43 @@ describe(@"Getter/Setter Tests", ^ {
expect(testStruct.buttonCapabilities.firstObject.longPressAvailable).to(equal(@YES));
expect(testStruct.buttonCapabilities.firstObject.name).to(equal(SDLButtonNameOk));
expect(testStruct.softButtonCapabilities.firstObject.imageSupported).to(equal(@YES));
- expect(testStruct.menuLayoutsAvailable).to(equal(@[SDLMenuLayoutTiles]));
+ expect(testStruct.menuLayoutsAvailable).to(equal(@[testMenuLayout]));
+ expect(testStruct.templatesAvailable).to(equal(@[testTemplateAvailable]));
+ expect(testStruct.dynamicUpdateCapabilities).to(equal(testDynamicUpdates));
+ });
+});
+
+describe(@"initializing with ", ^{
+ beforeEach(^{
+ testStruct = [[SDLWindowCapability alloc] initWithWindowID:@444 textFields:@[testTextField] imageFields:@[testImageField] imageTypeSupported:@[testImageType] templatesAvailable:@[testTemplateAvailable] numCustomPresetsAvailable:@10 buttonCapabilities:@[testButtonCapabilities] softButtonCapabilities:@[testSoftButtonsCapabilities] menuLayoutsAvailable:@[testMenuLayout] dynamicUpdateCapabilities:testDynamicUpdates];
+ });
+
+ it(@"Should set and get correctly", ^ {
+ testStruct = [[SDLWindowCapability alloc] init];
+ testStruct.windowID = @444;
+ testStruct.numCustomPresetsAvailable = @10;
+ testStruct.textFields = @[testTextField];
+ testStruct.imageFields = @[testImageField];
+ testStruct.imageTypeSupported = @[testImageType];
+ testStruct.buttonCapabilities = @[testButtonCapabilities];
+ testStruct.softButtonCapabilities = @[testSoftButtonsCapabilities];
+ testStruct.menuLayoutsAvailable = @[testMenuLayout];
+ testStruct.templatesAvailable = @[testTemplateAvailable];
+ testStruct.dynamicUpdateCapabilities = testDynamicUpdates;
+
+ expect(testStruct.windowID).to(equal(@444));
+ expect(testStruct.textFields.firstObject.name).to(equal(SDLTextFieldNameTertiaryText));
+ expect(testStruct.imageFields.firstObject.name).to(equal(testImageName));
+ expect(testStruct.numCustomPresetsAvailable).to(equal(@10));
+ expect(testStruct.buttonCapabilities.firstObject.name).to(equal(SDLButtonNameOk));
+ expect(testStruct.buttonCapabilities.firstObject.shortPressAvailable).to(equal(@YES));
+ expect(testStruct.buttonCapabilities.firstObject.longPressAvailable).to(equal(@YES));
+ expect(testStruct.buttonCapabilities.firstObject.name).to(equal(SDLButtonNameOk));
+ expect(testStruct.softButtonCapabilities.firstObject.imageSupported).to(equal(@YES));
+ expect(testStruct.menuLayoutsAvailable).to(equal(@[testMenuLayout]));
+ expect(testStruct.templatesAvailable).to(equal(@[testTemplateAvailable]));
+ expect(testStruct.dynamicUpdateCapabilities).to(equal(testDynamicUpdates));
});
-
});
QuickSpecEnd