diff options
author | Joel Fischer <joeljfischer@gmail.com> | 2017-08-23 15:41:26 -0400 |
---|---|---|
committer | Joel Fischer <joeljfischer@gmail.com> | 2017-08-23 15:41:26 -0400 |
commit | fb22009e08ddc3b2af91319c94b4ffc32bc64289 (patch) | |
tree | a630c449408e792d0f2222bbe36c54ba0eba2674 | |
parent | 3f14672e8c090037dfa7e3a98ae400610a304450 (diff) | |
download | sdl_ios-fb22009e08ddc3b2af91319c94b4ffc32bc64289.tar.gz |
Fixes #705 * Update haptic data proposal to newest accepted revisionsfeature/SDL_0075_OEM_specific_HID_support_5.0
-rw-r--r-- | SmartDeviceLink-iOS.podspec | 3 | ||||
-rw-r--r-- | SmartDeviceLink-iOS.xcodeproj/project.pbxproj | 36 | ||||
-rw-r--r-- | SmartDeviceLink.podspec | 2 | ||||
-rw-r--r-- | SmartDeviceLink/SDLHapticRect.h | 34 | ||||
-rw-r--r-- | SmartDeviceLink/SDLHapticRect.m | 48 | ||||
-rw-r--r-- | SmartDeviceLink/SDLNames.h | 3 | ||||
-rw-r--r-- | SmartDeviceLink/SDLNames.m | 3 | ||||
-rw-r--r-- | SmartDeviceLink/SDLRectangle.h (renamed from SmartDeviceLink/SDLSpatialStruct.h) | 34 | ||||
-rw-r--r-- | SmartDeviceLink/SDLRectangle.m (renamed from SmartDeviceLink/SDLSpatialStruct.m) | 42 | ||||
-rw-r--r-- | SmartDeviceLink/SDLSendHapticData.h | 10 | ||||
-rw-r--r-- | SmartDeviceLink/SDLSendHapticData.m | 12 | ||||
-rw-r--r-- | SmartDeviceLink/SmartDeviceLink.h | 3 | ||||
-rw-r--r-- | SmartDeviceLinkTests/RPCSpecs/RequestSpecs/SDLSendHapticDataSpec.m | 21 | ||||
-rw-r--r-- | SmartDeviceLinkTests/RPCSpecs/StructSpecs/SDLHapticRectSpec.m | 69 | ||||
-rw-r--r-- | SmartDeviceLinkTests/RPCSpecs/StructSpecs/SDLRectangleSpec.m (renamed from SmartDeviceLinkTests/RPCSpecs/StructSpecs/SDLSpatialStructSpec.m) | 38 | ||||
-rw-r--r-- | SmartDeviceLink_Example/Classes/ProxyManager.m | 7 |
16 files changed, 251 insertions, 114 deletions
diff --git a/SmartDeviceLink-iOS.podspec b/SmartDeviceLink-iOS.podspec index e9021321c..98a358b92 100644 --- a/SmartDeviceLink-iOS.podspec +++ b/SmartDeviceLink-iOS.podspec @@ -104,6 +104,7 @@ ss.public_header_files = [ 'SmartDeviceLink/SDLGetWaypointsResponse.h', 'SmartDeviceLink/SDLGlobalProperty.h', 'SmartDeviceLink/SDLGPSData.h', +'SmartDeviceLink/SDLHapticRect.h', 'SmartDeviceLink/SDLHeadLampStatus.h', 'SmartDeviceLink/SDLHMICapabilities.h', 'SmartDeviceLink/SDLHMILevel.h', @@ -222,6 +223,8 @@ ss.public_header_files = [ 'SmartDeviceLink/SDLScrollableMessage.h', 'SmartDeviceLink/SDLScrollableMessageResponse.h', 'SmartDeviceLink/SDLSecurityType.h', +'SmartDeviceLink/SDLSendHapticData.h', +'SmartDeviceLink/SDLSendHapticDataResponse.h', 'SmartDeviceLink/SDLSendLocation.h', 'SmartDeviceLink/SDLSendLocationResponse.h', 'SmartDeviceLink/SDLSetAppIcon.h', diff --git a/SmartDeviceLink-iOS.xcodeproj/project.pbxproj b/SmartDeviceLink-iOS.xcodeproj/project.pbxproj index 0111f79c7..6d3ced899 100644 --- a/SmartDeviceLink-iOS.xcodeproj/project.pbxproj +++ b/SmartDeviceLink-iOS.xcodeproj/project.pbxproj @@ -875,6 +875,9 @@ 5DA49CE61F1EA83300E65FC5 /* SDLControlFramePayloadRPCStartService.m in Sources */ = {isa = PBXBuildFile; fileRef = 5DA49CE41F1EA83300E65FC5 /* SDLControlFramePayloadRPCStartService.m */; }; 5DA8A0E91E955F710039C50D /* SDLStreamingMediaManagerConstants.m in Sources */ = {isa = PBXBuildFile; fileRef = DA8966F31E56977C00413EAB /* SDLStreamingMediaManagerConstants.m */; }; 5DA8A0EA1E955FE00039C50D /* SDLLogModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 5DBF06301E64A9C600A5CF03 /* SDLLogModel.m */; }; + 5DADA7751F4DFED60084D17D /* SDLRectangle.h in Headers */ = {isa = PBXBuildFile; fileRef = 5DADA7731F4DFED60084D17D /* SDLRectangle.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 5DADA7761F4DFED60084D17D /* SDLRectangle.m in Sources */ = {isa = PBXBuildFile; fileRef = 5DADA7741F4DFED60084D17D /* SDLRectangle.m */; }; + 5DADA7781F4E059E0084D17D /* SDLRectangleSpec.m in Sources */ = {isa = PBXBuildFile; fileRef = 5DADA7771F4E059E0084D17D /* SDLRectangleSpec.m */; }; 5DAE06731BDEC6C000F9B498 /* SDLFileSpec.m in Sources */ = {isa = PBXBuildFile; fileRef = 5DAE06721BDEC6C000F9B498 /* SDLFileSpec.m */; }; 5DAE06751BDEC6D600F9B498 /* SDLArtworkSpec.m in Sources */ = {isa = PBXBuildFile; fileRef = 5DAE06741BDEC6D600F9B498 /* SDLArtworkSpec.m */; }; 5DB1BCD31D243A8E002FFC37 /* SDLDeleteFileOperationSpec.m in Sources */ = {isa = PBXBuildFile; fileRef = 5DB1BCD01D243A8E002FFC37 /* SDLDeleteFileOperationSpec.m */; }; @@ -943,9 +946,9 @@ 8877F5EE1F34A72200DC128A /* SDLSendHapticDataResponse.h in Headers */ = {isa = PBXBuildFile; fileRef = 8877F5EC1F34A72200DC128A /* SDLSendHapticDataResponse.h */; settings = {ATTRIBUTES = (Public, ); }; }; 8877F5EF1F34A72200DC128A /* SDLSendHapticDataResponse.m in Sources */ = {isa = PBXBuildFile; fileRef = 8877F5ED1F34A72200DC128A /* SDLSendHapticDataResponse.m */; }; 8877F5F11F34AA2D00DC128A /* SDLSendHapticDataResponseSpec.m in Sources */ = {isa = PBXBuildFile; fileRef = 8877F5F01F34AA2D00DC128A /* SDLSendHapticDataResponseSpec.m */; }; - 88EED8381F33AE1700E6C42E /* SDLSpatialStruct.h in Headers */ = {isa = PBXBuildFile; fileRef = 88EED8361F33AE1700E6C42E /* SDLSpatialStruct.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 88EED8391F33AE1700E6C42E /* SDLSpatialStruct.m in Sources */ = {isa = PBXBuildFile; fileRef = 88EED8371F33AE1700E6C42E /* SDLSpatialStruct.m */; }; - 88EED83B1F33BECB00E6C42E /* SDLSpatialStructSpec.m in Sources */ = {isa = PBXBuildFile; fileRef = 88EED83A1F33BECB00E6C42E /* SDLSpatialStructSpec.m */; }; + 88EED8381F33AE1700E6C42E /* SDLHapticRect.h in Headers */ = {isa = PBXBuildFile; fileRef = 88EED8361F33AE1700E6C42E /* SDLHapticRect.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 88EED8391F33AE1700E6C42E /* SDLHapticRect.m in Sources */ = {isa = PBXBuildFile; fileRef = 88EED8371F33AE1700E6C42E /* SDLHapticRect.m */; }; + 88EED83B1F33BECB00E6C42E /* SDLHapticRectSpec.m in Sources */ = {isa = PBXBuildFile; fileRef = 88EED83A1F33BECB00E6C42E /* SDLHapticRectSpec.m */; }; 88EED83E1F33C5A400E6C42E /* SDLSendHapticData.h in Headers */ = {isa = PBXBuildFile; fileRef = 88EED83C1F33C5A400E6C42E /* SDLSendHapticData.h */; settings = {ATTRIBUTES = (Public, ); }; }; 88EED83F1F33C5A400E6C42E /* SDLSendHapticData.m in Sources */ = {isa = PBXBuildFile; fileRef = 88EED83D1F33C5A400E6C42E /* SDLSendHapticData.m */; }; 8B7B319A1F2F7B5700BDC38D /* SDLVideoStreamingCodec.h in Headers */ = {isa = PBXBuildFile; fileRef = 8B7B31981F2F7B5700BDC38D /* SDLVideoStreamingCodec.h */; settings = {ATTRIBUTES = (Public, ); }; }; @@ -2003,6 +2006,9 @@ 5DA3F36F1BC4489A0026F2D0 /* SDLManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SDLManager.m; sourceTree = "<group>"; }; 5DA49CE31F1EA83300E65FC5 /* SDLControlFramePayloadRPCStartService.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDLControlFramePayloadRPCStartService.h; sourceTree = "<group>"; }; 5DA49CE41F1EA83300E65FC5 /* SDLControlFramePayloadRPCStartService.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SDLControlFramePayloadRPCStartService.m; sourceTree = "<group>"; }; + 5DADA7731F4DFED60084D17D /* SDLRectangle.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDLRectangle.h; sourceTree = "<group>"; }; + 5DADA7741F4DFED60084D17D /* SDLRectangle.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SDLRectangle.m; sourceTree = "<group>"; }; + 5DADA7771F4E059E0084D17D /* SDLRectangleSpec.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SDLRectangleSpec.m; sourceTree = "<group>"; }; 5DAE06721BDEC6C000F9B498 /* SDLFileSpec.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = SDLFileSpec.m; path = DevAPISpecs/SDLFileSpec.m; sourceTree = "<group>"; }; 5DAE06741BDEC6D600F9B498 /* SDLArtworkSpec.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = SDLArtworkSpec.m; path = DevAPISpecs/SDLArtworkSpec.m; sourceTree = "<group>"; }; 5DB1BCD01D243A8E002FFC37 /* SDLDeleteFileOperationSpec.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = SDLDeleteFileOperationSpec.m; path = DevAPISpecs/SDLDeleteFileOperationSpec.m; sourceTree = "<group>"; }; @@ -2075,9 +2081,9 @@ 8877F5EC1F34A72200DC128A /* SDLSendHapticDataResponse.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDLSendHapticDataResponse.h; sourceTree = "<group>"; }; 8877F5ED1F34A72200DC128A /* SDLSendHapticDataResponse.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SDLSendHapticDataResponse.m; sourceTree = "<group>"; }; 8877F5F01F34AA2D00DC128A /* SDLSendHapticDataResponseSpec.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SDLSendHapticDataResponseSpec.m; sourceTree = "<group>"; }; - 88EED8361F33AE1700E6C42E /* SDLSpatialStruct.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDLSpatialStruct.h; sourceTree = "<group>"; }; - 88EED8371F33AE1700E6C42E /* SDLSpatialStruct.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SDLSpatialStruct.m; sourceTree = "<group>"; }; - 88EED83A1F33BECB00E6C42E /* SDLSpatialStructSpec.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SDLSpatialStructSpec.m; sourceTree = "<group>"; }; + 88EED8361F33AE1700E6C42E /* SDLHapticRect.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDLHapticRect.h; sourceTree = "<group>"; }; + 88EED8371F33AE1700E6C42E /* SDLHapticRect.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SDLHapticRect.m; sourceTree = "<group>"; }; + 88EED83A1F33BECB00E6C42E /* SDLHapticRectSpec.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SDLHapticRectSpec.m; sourceTree = "<group>"; }; 88EED83C1F33C5A400E6C42E /* SDLSendHapticData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDLSendHapticData.h; sourceTree = "<group>"; }; 88EED83D1F33C5A400E6C42E /* SDLSendHapticData.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SDLSendHapticData.m; sourceTree = "<group>"; }; 8B7B31981F2F7B5700BDC38D /* SDLVideoStreamingCodec.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDLVideoStreamingCodec.h; sourceTree = "<group>"; }; @@ -2478,6 +2484,7 @@ 162E829A1A9BDE8A00906325 /* SDLECallInfoSpec.m */, 162E829B1A9BDE8A00906325 /* SDLEmergencyEventSpec.m */, 162E829C1A9BDE8A00906325 /* SDLGPSDataSpec.m */, + 88EED83A1F33BECB00E6C42E /* SDLHapticRectSpec.m */, 162E829D1A9BDE8A00906325 /* SDLHeadLampStatusSpec.m */, 5DE372A31ACB336600849FAA /* SDLHMICapabilitiesSpec.m */, 162E829E1A9BDE8A00906325 /* SDLHMIPermissionsSpec.m */, @@ -2495,11 +2502,11 @@ 162E82A51A9BDE8A00906325 /* SDLPermissionItemSpec.m */, 5D0A9F941F15585B00CC80DD /* SDLPhoneCapabilitySpec.m */, 162E82A61A9BDE8A00906325 /* SDLPresetBankCapabilitiesSpec.m */, + 5DADA7771F4E059E0084D17D /* SDLRectangleSpec.m */, 162E82A71A9BDE8A00906325 /* SDLScreenParamsSpec.m */, 162E82A81A9BDE8A00906325 /* SDLSingleTireStatusSpec.m */, 162E82A91A9BDE8A00906325 /* SDLSoftButtonCapabilitiesSpec.m */, 162E82AA1A9BDE8A00906325 /* SDLSoftButtonSpec.m */, - 88EED83A1F33BECB00E6C42E /* SDLSpatialStructSpec.m */, 162E82AB1A9BDE8A00906325 /* SDLStartTimeSpec.m */, 162E82AC1A9BDE8A00906325 /* SDLSyncMsgVersionSpec.m */, 5D0A9F961F1559EC00CC80DD /* SDLSystemCapabilitySpec.m */, @@ -3116,6 +3123,8 @@ 5D61FAAE1A84238A00846EE7 /* SDLEmergencyEvent.m */, 5D61FACE1A84238A00846EE7 /* SDLGPSData.h */, 5D61FACF1A84238A00846EE7 /* SDLGPSData.m */, + 88EED8361F33AE1700E6C42E /* SDLHapticRect.h */, + 88EED8371F33AE1700E6C42E /* SDLHapticRect.m */, 5D61FAD01A84238A00846EE7 /* SDLHeadLampStatus.h */, 5D61FAD11A84238A00846EE7 /* SDLHeadLampStatus.m */, 5DE3729F1ACB2ED300849FAA /* SDLHMICapabilities.h */, @@ -3152,6 +3161,8 @@ 5D00AC7A1F15287E004000D9 /* SDLPhoneCapability.m */, 5D61FB4E1A84238B00846EE7 /* SDLPresetBankCapabilities.h */, 5D61FB4F1A84238B00846EE7 /* SDLPresetBankCapabilities.m */, + 5DADA7731F4DFED60084D17D /* SDLRectangle.h */, + 5DADA7741F4DFED60084D17D /* SDLRectangle.m */, 5D61FB8C1A84238B00846EE7 /* SDLScreenParams.h */, 5D61FB8D1A84238B00846EE7 /* SDLScreenParams.m */, 5D61FBAA1A84238B00846EE7 /* SDLSingleTireStatus.h */, @@ -3160,8 +3171,6 @@ 5D61FBB31A84238B00846EE7 /* SDLSoftButton.m */, 5D61FBB41A84238B00846EE7 /* SDLSoftButtonCapabilities.h */, 5D61FBB51A84238B00846EE7 /* SDLSoftButtonCapabilities.m */, - 88EED8361F33AE1700E6C42E /* SDLSpatialStruct.h */, - 88EED8371F33AE1700E6C42E /* SDLSpatialStruct.m */, 5D61FBBE1A84238B00846EE7 /* SDLStartTime.h */, 5D61FBBF1A84238B00846EE7 /* SDLStartTime.m */, 5D61FBC81A84238B00846EE7 /* SDLSyncMsgVersion.h */, @@ -4334,6 +4343,7 @@ 5D61FD811A84238C00846EE7 /* SDLSetAppIconResponse.h in Headers */, 5D61FC551A84238C00846EE7 /* SDLButtonName.h in Headers */, 5D616B531D59044400553F6B /* SDLErrorConstants.h in Headers */, + 5DADA7751F4DFED60084D17D /* SDLRectangle.h in Headers */, 5D61FD9F1A84238C00846EE7 /* SDLSoftButton.h in Headers */, 5DD67CBC1E661C84009CD394 /* SDLLogTargetOSLog.h in Headers */, 5D61FD551A84238C00846EE7 /* SDLPutFile.h in Headers */, @@ -4381,7 +4391,7 @@ 5D61FC761A84238C00846EE7 /* SDLDeleteFile.h in Headers */, 5D61FD211A84238C00846EE7 /* SDLOnVehicleData.h in Headers */, DA9F7E731DCC004C00ACAE48 /* SDLGetWaypointsResponse.h in Headers */, - 88EED8381F33AE1700E6C42E /* SDLSpatialStruct.h in Headers */, + 88EED8381F33AE1700E6C42E /* SDLHapticRect.h in Headers */, 5DD67CC31E68AE82009CD394 /* SDLLogFileModuleMap.h in Headers */, 5D61FD7D1A84238C00846EE7 /* SDLScrollableMessageResponse.h in Headers */, 5D61FD431A84238C00846EE7 /* SDLProtocol.h in Headers */, @@ -5060,6 +5070,7 @@ 5D1665C91CF8CA3D00CC4CA1 /* SDLPermissionFilter.m in Sources */, 5D61FDBA1A84238C00846EE7 /* SDLSyncPDataResponse.m in Sources */, 5D61FDDC1A84238C00846EE7 /* SDLTriggerSource.m in Sources */, + 5DADA7761F4DFED60084D17D /* SDLRectangle.m in Sources */, 88EED83F1F33C5A400E6C42E /* SDLSendHapticData.m in Sources */, 5D16545B1D3E7A1600554D93 /* SDLLifecycleManager.m in Sources */, E9C32B971AB20BA200F283AF /* SDLTimer.m in Sources */, @@ -5112,7 +5123,7 @@ 5DA3F3551BC448060026F2D0 /* NSMapTable+Subscripting.m in Sources */, 5D61FCD61A84238C00846EE7 /* SDLImageType.m in Sources */, 5D4D67AD1D2ED37A00468B4A /* SDLNotificationDispatcher.m in Sources */, - 88EED8391F33AE1700E6C42E /* SDLSpatialStruct.m in Sources */, + 88EED8391F33AE1700E6C42E /* SDLHapticRect.m in Sources */, DA9F7E9C1DCC052C00ACAE48 /* SDLLocationDetails.m in Sources */, 5D61FD7A1A84238C00846EE7 /* SDLScreenParams.m in Sources */, 5D61FC831A84238C00846EE7 /* SDLDeviceInfo.m in Sources */, @@ -5200,7 +5211,7 @@ 162E837D1A9BDE8B00906325 /* SDLEmergencyEventSpec.m in Sources */, 162E82D31A9BDE8A00906325 /* SDLCarModeStatusSpec.m in Sources */, 8B7B31A91F2FB8BC00BDC38D /* SDLVideoStreamingProtocolSpec.m in Sources */, - 88EED83B1F33BECB00E6C42E /* SDLSpatialStructSpec.m in Sources */, + 88EED83B1F33BECB00E6C42E /* SDLHapticRectSpec.m in Sources */, 162E82EA1A9BDE8B00906325 /* SDLLanguageSpec.m in Sources */, 5D76E3291D3D0A8800647CFA /* SDLFakeViewControllerPresenter.m in Sources */, 162E83331A9BDE8B00906325 /* SDLPerformInteractionSpec.m in Sources */, @@ -5399,6 +5410,7 @@ 162E838C1A9BDE8B00906325 /* SDLSoftButtonSpec.m in Sources */, 5DA23FF81F2FAF2D009C0313 /* SDLControlFramePayloadRPCStartServiceAckSpec.m in Sources */, 162E83191A9BDE8B00906325 /* SDLOnLanguageChangeSpec.m in Sources */, + 5DADA7781F4E059E0084D17D /* SDLRectangleSpec.m in Sources */, 5DB1BCDD1D243DC3002FFC37 /* SDLLifecycleConfigurationSpec.m in Sources */, 162E83611A9BDE8B00906325 /* SDLSetAppIconResponseSpec.m in Sources */, 162E83471A9BDE8B00906325 /* SDLUnsubscribeVehicleDataSpec.m in Sources */, diff --git a/SmartDeviceLink.podspec b/SmartDeviceLink.podspec index ed181d5a8..b14c8785f 100644 --- a/SmartDeviceLink.podspec +++ b/SmartDeviceLink.podspec @@ -104,6 +104,7 @@ ss.public_header_files = [ 'SmartDeviceLink/SDLGetWaypointsResponse.h', 'SmartDeviceLink/SDLGlobalProperty.h', 'SmartDeviceLink/SDLGPSData.h', +'SmartDeviceLink/SDLHapticRect.h', 'SmartDeviceLink/SDLHeadLampStatus.h', 'SmartDeviceLink/SDLHMICapabilities.h', 'SmartDeviceLink/SDLHMILevel.h', @@ -244,7 +245,6 @@ ss.public_header_files = [ 'SmartDeviceLink/SDLSoftButton.h', 'SmartDeviceLink/SDLSoftButtonCapabilities.h', 'SmartDeviceLink/SDLSoftButtonType.h', -'SmartDeviceLink/SDLSpatialStruct.h', 'SmartDeviceLink/SDLSpeak.h', 'SmartDeviceLink/SDLSpeakResponse.h', 'SmartDeviceLink/SDLSpeechCapabilities.h', diff --git a/SmartDeviceLink/SDLHapticRect.h b/SmartDeviceLink/SDLHapticRect.h new file mode 100644 index 000000000..295ea55af --- /dev/null +++ b/SmartDeviceLink/SDLHapticRect.h @@ -0,0 +1,34 @@ +// +// SDLHapticRect.h +// SmartDeviceLink-iOS +// +// Created by Nicole on 8/3/17. +// Copyright © 2017 smartdevicelink. All rights reserved. +// + +#import <UIKit/UIKit.h> + +#import "SDLRPCStruct.h" + +@class SDLRectangle; + +NS_ASSUME_NONNULL_BEGIN + +/** + * Defines spatial for each user control object for video streaming application + */ +@interface SDLHapticRect : SDLRPCStruct + +- (instancetype)initWithId:(UInt32)id rect:(SDLRectangle *)rect; + +/** + * A user control spatial identifier + * Required, Integer, 0 - 2,000,000,000 + */ +@property (strong, nonatomic) NSNumber<SDLUInt> *id; + +@property (strong, nonatomic) SDLRectangle *rect; + +@end + +NS_ASSUME_NONNULL_END diff --git a/SmartDeviceLink/SDLHapticRect.m b/SmartDeviceLink/SDLHapticRect.m new file mode 100644 index 000000000..330756d4c --- /dev/null +++ b/SmartDeviceLink/SDLHapticRect.m @@ -0,0 +1,48 @@ +// +// SDLHapticRect.m +// SmartDeviceLink-iOS +// +// Created by Nicole on 8/3/17. +// Copyright © 2017 smartdevicelink. All rights reserved. +// + +#import "NSMutableDictionary+Store.h" +#import "SDLHapticRect.h" +#import "SDLNames.h" +#import "SDLRectangle.h" + +NS_ASSUME_NONNULL_BEGIN + +@implementation SDLHapticRect + +- (instancetype)initWithId:(UInt32)id rect:(nonnull SDLRectangle *)rect { + self = [self init]; + if (!self) { + return nil; + } + + self.id = @(id); + self.rect = rect; + + return self; +} + +- (void)setId:(NSNumber<SDLInt> *)id { + [store sdl_setObject:id forName:SDLNameId]; +} + +- (NSNumber<SDLInt> *)id { + return [store sdl_objectForName:SDLNameId]; +} + +- (void)setRect:(SDLRectangle *)rect { + [store sdl_setObject:rect forName:SDLNameRect]; +} + +- (SDLRectangle *)rect { + return [store sdl_objectForName:SDLNameRect ofClass:SDLRectangle.class]; +} + +@end + +NS_ASSUME_NONNULL_END diff --git a/SmartDeviceLink/SDLNames.h b/SmartDeviceLink/SDLNames.h index e611743b6..1a3cd54bb 100644 --- a/SmartDeviceLink/SDLNames.h +++ b/SmartDeviceLink/SDLNames.h @@ -138,7 +138,7 @@ extern SDLName const SDLNameGetWaypointsEnabled; extern SDLName const SDLNameGPS; extern SDLName const SDLNameGraphic; extern SDLName const SDLNameGraphicSupported; -extern SDLName const SDLNameHapticSpatialData; +extern SDLName const SDLNameHapticRectData; extern SDLName const SDLNameHapticSpatialDataSupported; extern SDLName const SDLNameHardware; extern SDLName const SDLNameHashId; @@ -325,6 +325,7 @@ extern SDLName const SDLNameReadDID; extern SDLName const SDLNameRearLeftDoorAjar; extern SDLName const SDLNameRearRightDoorAjar; extern SDLName const SDLNameReason; +extern SDLName const SDLNameRect; extern SDLName const SDLNameRegisterAppInterface; extern SDLName const SDLNameRequest; extern SDLName const SDLNameRequestType; diff --git a/SmartDeviceLink/SDLNames.m b/SmartDeviceLink/SDLNames.m index da2e24d08..264bac81a 100644 --- a/SmartDeviceLink/SDLNames.m +++ b/SmartDeviceLink/SDLNames.m @@ -135,7 +135,7 @@ SDLName const SDLNameGetWaypointsEnabled = @"getWayPointsEnabled"; SDLName const SDLNameGPS = @"gps"; SDLName const SDLNameGraphic = @"graphic"; SDLName const SDLNameGraphicSupported = @"graphicSupported"; -SDLName const SDLNameHapticSpatialData = @"hapticSpatialData"; +SDLName const SDLNameHapticRectData = @"hapticRectData"; SDLName const SDLNameHapticSpatialDataSupported = @"hapticSpatialDataSupported"; SDLName const SDLNameHardware = @"hardware"; SDLName const SDLNameHashId = @"hashID"; @@ -319,6 +319,7 @@ SDLName const SDLNameReadDID = @"ReadDID"; SDLName const SDLNameRearLeftDoorAjar = @"rearLeftDoorAjar"; SDLName const SDLNameRearRightDoorAjar = @"rearRightDoorAjar"; SDLName const SDLNameReason = @"reason"; +SDLName const SDLNameRect = @"rect"; SDLName const SDLNameRegisterAppInterface = @"RegisterAppInterface"; SDLName const SDLNameRequest = @"request"; SDLName const SDLNameRequestType = @"requestType"; diff --git a/SmartDeviceLink/SDLSpatialStruct.h b/SmartDeviceLink/SDLRectangle.h index 00886276d..5395f6315 100644 --- a/SmartDeviceLink/SDLSpatialStruct.h +++ b/SmartDeviceLink/SDLRectangle.h @@ -1,31 +1,33 @@ // -// SDLSpatialStruct.h +// SDLRectangle.h // SmartDeviceLink-iOS // -// Created by Nicole on 8/3/17. +// Created by Joel Fischer on 8/23/17. // Copyright © 2017 smartdevicelink. All rights reserved. // -#import <UIKit/UIKit.h> +#import <SmartDeviceLink/SmartDeviceLink.h> -#import "SDLRPCStruct.h" - -NS_ASSUME_NONNULL_BEGIN +@interface SDLRectangle : SDLRPCStruct /** - * Defines spatial for each user control object for video streaming application - */ -@interface SDLSpatialStruct : SDLRPCStruct - -- (instancetype)initWithId:(UInt32)id x:(float)x y:(float)y width:(float)width height:(float)height; + Create a Rectangle -- (instancetype)initWithId:(NSNumber *)id CGRect:(CGRect)rect; + @param x The top-left x value + @param y The top-left y value + @param width The width + @param height The height + @return An new SDLRectangle object + */ +- (instancetype)initWithX:(float)x y:(float)y width:(float)width height:(float)height; /** - * A user control spatial identifier - * Required, Integer, 0 - 2,000,000,000 + Create a Rectangle from a CGRect + + @param rect The rectangle to use + @return An new SDLRectangle object */ -@property (strong, nonatomic) NSNumber<SDLUInt> *id; +- (instancetype)initWithCGRect:(CGRect)rect; /** * The X-coordinate of the user control @@ -52,5 +54,3 @@ NS_ASSUME_NONNULL_BEGIN @property (strong, nonatomic) NSNumber<SDLFloat> *height; @end - -NS_ASSUME_NONNULL_END diff --git a/SmartDeviceLink/SDLSpatialStruct.m b/SmartDeviceLink/SDLRectangle.m index b92a40aaf..6a82312b9 100644 --- a/SmartDeviceLink/SDLSpatialStruct.m +++ b/SmartDeviceLink/SDLRectangle.m @@ -1,26 +1,21 @@ // -// SDLSpatialStruct.m +// SDLRectangle.m // SmartDeviceLink-iOS // -// Created by Nicole on 8/3/17. +// Created by Joel Fischer on 8/23/17. // Copyright © 2017 smartdevicelink. All rights reserved. // #import "NSMutableDictionary+Store.h" -#import "SDLSpatialStruct.h" +#import "SDLRectangle.h" #import "SDLNames.h" -NS_ASSUME_NONNULL_BEGIN +@implementation SDLRectangle -@implementation SDLSpatialStruct - -- (instancetype)initWithId:(UInt32)id x:(float)x y:(float)y width:(float)width height:(float)height { +- (instancetype)initWithX:(float)x y:(float)y width:(float)width height:(float)height { self = [self init]; - if (!self) { - return nil; - } + if (!self) { return nil; } - self.id = @(id); self.x = @(x); self.y = @(y); self.width = @(width); @@ -29,27 +24,8 @@ NS_ASSUME_NONNULL_BEGIN return self; } -- (instancetype)initWithId:(NSNumber *)id CGRect:(CGRect)rect { - self = [self init]; - if (!self) { - return nil; - } - - self.id = id; - self.x = @((float)rect.origin.x); - self.y = @((float)rect.origin.y); - self.width = @((float)rect.size.width); - self.height = @((float)rect.size.height); - - return self; -} - -- (void)setId:(NSNumber<SDLInt> *)id { - [store sdl_setObject:id forName:SDLNameId]; -} - -- (NSNumber<SDLInt> *)id { - return [store sdl_objectForName:SDLNameId]; +- (instancetype)initWithCGRect:(CGRect)rect { + return [self initWithX:rect.origin.x y:rect.origin.y width:rect.size.width height:rect.size.height]; } - (void)setX:(NSNumber<SDLFloat> *)x { @@ -85,5 +61,3 @@ NS_ASSUME_NONNULL_BEGIN } @end - -NS_ASSUME_NONNULL_END diff --git a/SmartDeviceLink/SDLSendHapticData.h b/SmartDeviceLink/SDLSendHapticData.h index 5c6b9ec6c..c4c0f237c 100644 --- a/SmartDeviceLink/SDLSendHapticData.h +++ b/SmartDeviceLink/SDLSendHapticData.h @@ -9,7 +9,7 @@ #import <Foundation/Foundation.h> #import "SDLRPCRequest.h" -@class SDLSpatialStruct; +@class SDLHapticRect; NS_ASSUME_NONNULL_BEGIN @@ -21,16 +21,16 @@ NS_ASSUME_NONNULL_BEGIN /** * Constructs a new SDLSendHapticData object indicated by the hapticSpatialData parameter * - * @param hapticSpatialData Array of spatial data structures + * @param hapticRectData Array of spatial data structures */ -- (instancetype)initWithHapticSpatialData:(NSArray<SDLSpatialStruct *> *)hapticSpatialData; +- (instancetype)initWithHapticRectData:(NSArray<SDLHapticRect *> *)hapticRectData; /** * Array of spatial data structures that represent the locations of all user controls present on the HMI. This data should be updated if/when the application presents a new screen. When a request is sent, if successful, it will replace all spatial data previously sent through RPC. If an empty array is sent, the existing spatial data will be cleared * - * Optional, Array of SDLSpatialStruct, Array size 0 - 1,000 + * Optional, Array of SDLHapticRect, Array size 0 - 1,000 */ -@property (strong, nonatomic, nullable) NSArray<SDLSpatialStruct *> *hapticSpatialData; +@property (strong, nonatomic, nullable) NSArray<SDLHapticRect *> *hapticRectData; @end diff --git a/SmartDeviceLink/SDLSendHapticData.m b/SmartDeviceLink/SDLSendHapticData.m index 48d5b897a..d1f85988a 100644 --- a/SmartDeviceLink/SDLSendHapticData.m +++ b/SmartDeviceLink/SDLSendHapticData.m @@ -20,23 +20,23 @@ NS_ASSUME_NONNULL_BEGIN return self; } -- (instancetype)initWithHapticSpatialData:(NSArray<SDLSpatialStruct *> *)hapticSpatialData { +- (instancetype)initWithHapticRectData:(NSArray<SDLHapticRect *> *)hapticRectData { self = [self init]; if (!self) { return nil; } - self.hapticSpatialData = [hapticSpatialData mutableCopy]; + self.hapticRectData = [hapticRectData mutableCopy]; return self; } -- (void)setHapticSpatialData:(nullable NSArray<SDLSpatialStruct *> *)hapticSpatialData { - [parameters sdl_setObject:hapticSpatialData forName:SDLNameHapticSpatialData]; +- (void)setHapticRectData:(nullable NSArray<SDLHapticRect *> *)hapticRectData { + [parameters sdl_setObject:hapticRectData forName:SDLNameHapticRectData]; } -- (nullable NSArray<SDLSpatialStruct *> *)hapticSpatialData { - return [parameters sdl_objectForName:SDLNameHapticSpatialData]; +- (nullable NSArray<SDLHapticRect *> *)hapticRectData { + return [parameters sdl_objectForName:SDLNameHapticRectData]; } @end diff --git a/SmartDeviceLink/SmartDeviceLink.h b/SmartDeviceLink/SmartDeviceLink.h index bc87a7e92..62824df42 100644 --- a/SmartDeviceLink/SmartDeviceLink.h +++ b/SmartDeviceLink/SmartDeviceLink.h @@ -178,6 +178,7 @@ FOUNDATION_EXPORT const unsigned char SmartDeviceLinkVersionString[]; #import "SDLECallInfo.h" #import "SDLEmergencyEvent.h" #import "SDLGPSData.h" +#import "SDLHapticRect.h" #import "SDLHMICapabilities.h" #import "SDLHMIPermissions.h" #import "SDLHeadLampStatus.h" @@ -196,11 +197,11 @@ FOUNDATION_EXPORT const unsigned char SmartDeviceLinkVersionString[]; #import "SDLPermissionItem.h" #import "SDLPhoneCapability.h" #import "SDLPresetBankCapabilities.h" +#import "SDLRectangle.h" #import "SDLScreenParams.h" #import "SDLSingleTireStatus.h" #import "SDLSoftButton.h" #import "SDLSoftButtonCapabilities.h" -#import "SDLSpatialStruct.h" #import "SDLStartTime.h" #import "SDLSyncMsgVersion.h" #import "SDLSystemCapability.h" diff --git a/SmartDeviceLinkTests/RPCSpecs/RequestSpecs/SDLSendHapticDataSpec.m b/SmartDeviceLinkTests/RPCSpecs/RequestSpecs/SDLSendHapticDataSpec.m index 8073b103d..24bf7ddb2 100644 --- a/SmartDeviceLinkTests/RPCSpecs/RequestSpecs/SDLSendHapticDataSpec.m +++ b/SmartDeviceLinkTests/RPCSpecs/RequestSpecs/SDLSendHapticDataSpec.m @@ -12,24 +12,25 @@ #import <Nimble/Nimble.h> #import "SDLNames.h" +#import "SDLHapticRect.h" +#import "SDLRectangle.h" #import "SDLSendHapticData.h" -#import "SDLSpatialStruct.h" QuickSpecBegin(SDLSendHapticDataSpec) describe(@"Initialization Tests", ^ { - __block SDLSpatialStruct *testStruct = nil; + __block SDLHapticRect *testStruct = nil; beforeEach(^{ - testStruct = [[SDLSpatialStruct alloc] initWithId:1 x:@20 y:@30 width:@100 height:@200]; + testStruct = [[SDLHapticRect alloc] initWithId:123 rect:[[SDLRectangle alloc] initWithX:23.1 y:45.6 width:69.0 height:69]]; }); context(@"Getter/Setter Tests", ^ { it(@"Should set and get correctly", ^ { SDLSendHapticData *testRequest = [[SDLSendHapticData alloc] init]; - testRequest.hapticSpatialData = [@[testStruct] mutableCopy]; + testRequest.hapticRectData = [@[testStruct] mutableCopy]; - expect(testRequest.hapticSpatialData).to(equal(@[testStruct])); + expect(testRequest.hapticRectData).to(equal(@[testStruct])); }); }); @@ -37,23 +38,23 @@ describe(@"Initialization Tests", ^ { it(@"Should get correctly when initialized with a dictionary", ^ { NSMutableDictionary* dict = [@{SDLNameRequest: @{SDLNameParameters: - @{SDLNameHapticSpatialData:@[testStruct]}, + @{SDLNameHapticRectData:@[testStruct]}, SDLNameOperationName:SDLNameSendHapticData}} mutableCopy]; SDLSendHapticData *testRequest = [[SDLSendHapticData alloc] initWithDictionary:dict]; - expect(testRequest.hapticSpatialData).to(equal(@[testStruct])); + expect(testRequest.hapticRectData).to(equal(@[testStruct])); }); it(@"Should initialize correctly with initWithType:", ^{ - SDLSendHapticData *testRequest = [[SDLSendHapticData alloc] initWithHapticSpatialData:[NSMutableArray arrayWithArray:@[testStruct]]]; + SDLSendHapticData *testRequest = [[SDLSendHapticData alloc] initWithHapticRectData:@[testStruct]]; - expect(testRequest.hapticSpatialData).to(equal(@[testStruct])); + expect(testRequest.hapticRectData).to(equal(@[testStruct])); }); it(@"Should return nil if not set", ^ { SDLSendHapticData *testRequest = [[SDLSendHapticData alloc] init]; - expect(testRequest.hapticSpatialData).to(beNil()); + expect(testRequest.hapticRectData).to(beNil()); }); }); }); diff --git a/SmartDeviceLinkTests/RPCSpecs/StructSpecs/SDLHapticRectSpec.m b/SmartDeviceLinkTests/RPCSpecs/StructSpecs/SDLHapticRectSpec.m new file mode 100644 index 000000000..6235ea62f --- /dev/null +++ b/SmartDeviceLinkTests/RPCSpecs/StructSpecs/SDLHapticRectSpec.m @@ -0,0 +1,69 @@ +// +// SDLHapticRectSpec.m +// SmartDeviceLink-iOS +// +// Created by Nicole on 8/3/17. +// Copyright © 2017 smartdevicelink. All rights reserved. +// + +#import <Foundation/Foundation.h> + +#import <Quick/Quick.h> +#import <Nimble/Nimble.h> + +#import "SDLNames.h" +#import "SDLHapticRect.h" +#import "SDLRectangle.h" + +QuickSpecBegin(SDLHapticRectSpec) + +describe(@"Getter/Setter Tests", ^{ + __block SDLRectangle *testRect = nil; + beforeEach(^{ + testRect = [[SDLRectangle alloc] initWithX:1.2 y:42.3 width:78.9 height:69]; + }); + + it(@"Should set and get correctly", ^{ + SDLHapticRect *testStruct = [[SDLHapticRect alloc] init]; + + testStruct.id = @1; + testStruct.rect = testRect; + + expect(testStruct.id).to(equal(@1)); + expect(testStruct.rect).to(equal(testRect)); + }); + + it(@"Should get correctly when initialized with parameters", ^{ + SDLHapticRect *testStruct = [[SDLHapticRect alloc] initWithId:23 rect:testRect]; + + expect(testStruct.id).to(equal(@23)); + expect(testStruct.rect).to(equal(testRect)); + }); + + it(@"Should get correctly when initialized with a dict", ^{ + NSMutableDictionary *dict = [@{SDLNameId:@2, + SDLNameRect: @{ + SDLNameX:@20, + SDLNameY:@200, + SDLNameWidth:@2000, + SDLNameHeight:@3000 + } + } mutableCopy]; + SDLHapticRect *testStruct = [[SDLHapticRect alloc] initWithDictionary:dict]; + + expect(testStruct.id).to(equal(@2)); + expect(testStruct.rect.x).to(equal(@20)); + expect(testStruct.rect.y).to(equal(@200)); + expect(testStruct.rect.width).to(equal(@2000)); + expect(testStruct.rect.height).to(equal(@3000)); + }); + + it(@"Should return nil if not set", ^{ + SDLHapticRect *testStruct = [[SDLHapticRect alloc] init]; + + expect(testStruct.id).to(beNil()); + expect(testStruct.rect).to(beNil()); + }); +}); + +QuickSpecEnd diff --git a/SmartDeviceLinkTests/RPCSpecs/StructSpecs/SDLSpatialStructSpec.m b/SmartDeviceLinkTests/RPCSpecs/StructSpecs/SDLRectangleSpec.m index 614f2a0fc..59749135d 100644 --- a/SmartDeviceLinkTests/RPCSpecs/StructSpecs/SDLSpatialStructSpec.m +++ b/SmartDeviceLinkTests/RPCSpecs/StructSpecs/SDLRectangleSpec.m @@ -1,32 +1,22 @@ -// -// SDLSpatialStructSpec.m -// SmartDeviceLink-iOS -// -// Created by Nicole on 8/3/17. -// Copyright © 2017 smartdevicelink. All rights reserved. -// - #import <Foundation/Foundation.h> #import <Quick/Quick.h> #import <Nimble/Nimble.h> #import "SDLNames.h" -#import "SDLSpatialStruct.h" +#import "SDLRectangle.h" -QuickSpecBegin(SDLSpatialStructSpec) +QuickSpecBegin(SDLRectangleSpec) describe(@"Getter/Setter Tests", ^{ it(@"Should set and get correctly", ^{ - SDLSpatialStruct *testStruct = [[SDLSpatialStruct alloc] init]; + SDLRectangle *testStruct = [[SDLRectangle alloc] init]; - testStruct.id = @1; testStruct.x = @10; testStruct.y = @100; testStruct.width = @1000; testStruct.height = @2000; - expect(testStruct.id).to(equal(@1)); expect(testStruct.x).to(equal(@10)); expect(testStruct.y).to(equal(@100)); expect(testStruct.width).to(equal(@1000)); @@ -34,24 +24,21 @@ describe(@"Getter/Setter Tests", ^{ }); it(@"Should get correctly when initialized with parameters", ^{ - SDLSpatialStruct *testStruct = [[SDLSpatialStruct alloc] initWithId:5 x:@50.0 y:@60.0 width:@500.0 height:@600.0]; + SDLRectangle *testStruct = [[SDLRectangle alloc] initWithX:50.5 y:60.2 width:500 height:600]; - expect(testStruct.id).to(equal(@5)); - expect(testStruct.x).to(equal(@50.0)); - expect(testStruct.y).to(equal(@60.0)); + expect(testStruct.x).to(beCloseTo(@50.5)); + expect(testStruct.y).to(beCloseTo(@60.2)); expect(testStruct.width).to(equal(@500.0)); expect(testStruct.height).to(equal(@600.0)); }); it(@"Should get correctly when initialized with a dict", ^{ - NSMutableDictionary *dict = [@{SDLNameId:@2, - SDLNameX:@20, - SDLNameY:@200, - SDLNameWidth:@2000, - SDLNameHeight:@3000} mutableCopy]; - SDLSpatialStruct *testStruct = [[SDLSpatialStruct alloc] initWithDictionary:dict]; + NSDictionary *dict = @{SDLNameX:@20, + SDLNameY:@200, + SDLNameWidth:@2000, + SDLNameHeight:@3000}; + SDLRectangle *testStruct = [[SDLRectangle alloc] initWithDictionary:dict]; - expect(testStruct.id).to(equal(@2)); expect(testStruct.x).to(equal(@20)); expect(testStruct.y).to(equal(@200)); expect(testStruct.width).to(equal(@2000)); @@ -59,9 +46,8 @@ describe(@"Getter/Setter Tests", ^{ }); it(@"Should return nil if not set", ^{ - SDLSpatialStruct *testStruct = [[SDLSpatialStruct alloc] init]; + SDLRectangle *testStruct = [[SDLRectangle alloc] init]; - expect(testStruct.id).to(beNil()); expect(testStruct.x).to(beNil()); expect(testStruct.y).to(beNil()); expect(testStruct.width).to(beNil()); diff --git a/SmartDeviceLink_Example/Classes/ProxyManager.m b/SmartDeviceLink_Example/Classes/ProxyManager.m index 0da979b4b..a992a043d 100644 --- a/SmartDeviceLink_Example/Classes/ProxyManager.m +++ b/SmartDeviceLink_Example/Classes/ProxyManager.m @@ -136,6 +136,13 @@ NS_ASSUME_NONNULL_BEGIN show.graphic = [self.class sdlex_mainGraphicImage]; [self.sdlManager sendRequest:show]; + + SDLHapticRect *hapticRect = [[SDLHapticRect alloc] initWithId:1 rect:[[SDLRectangle alloc] initWithX:12.34 y:42.3 width:69 height:69]]; + SDLSendHapticData *sendHaptic = [[SDLSendHapticData alloc] initWithHapticRectData:@[hapticRect]]; + + [self.sdlManager sendRequest:sendHaptic withResponseHandler:^(__kindof SDLRPCRequest * _Nullable request, __kindof SDLRPCResponse * _Nullable response, NSError * _Nullable error) { + NSLog(@"STOP"); + }]; } - (void)sdlex_setupPermissionsCallbacks { |