diff options
author | NicoleYarroch <nicole@livio.io> | 2019-02-22 10:32:35 -0500 |
---|---|---|
committer | NicoleYarroch <nicole@livio.io> | 2019-02-22 10:32:35 -0500 |
commit | a95af77cb541d9bc6924148646af23c8b31cf83b (patch) | |
tree | 8a340092c641703ec79ab99e471aaee0ddbc4727 | |
parent | 5d78e45b5e0519432fa17752713876d5fb23c6e4 (diff) | |
download | sdl_ios-a95af77cb541d9bc6924148646af23c8b31cf83b.tar.gz |
Added NavigationAction enum
-rw-r--r-- | SmartDeviceLink-iOS.xcodeproj/project.pbxproj | 12 | ||||
-rw-r--r-- | SmartDeviceLink/SDLDirection.h | 2 | ||||
-rw-r--r-- | SmartDeviceLink/SDLNavigationAction.h | 49 | ||||
-rw-r--r-- | SmartDeviceLink/SDLNavigationAction.m | 17 | ||||
-rw-r--r-- | SmartDeviceLink/SDLNavigationJunction.h | 2 | ||||
-rw-r--r-- | SmartDeviceLinkTests/RPCSpecs/EnumSpecs/SDLNavigationActionSpec.m | 21 |
6 files changed, 101 insertions, 2 deletions
diff --git a/SmartDeviceLink-iOS.xcodeproj/project.pbxproj b/SmartDeviceLink-iOS.xcodeproj/project.pbxproj index 086b4dc03..5b20c8ece 100644 --- a/SmartDeviceLink-iOS.xcodeproj/project.pbxproj +++ b/SmartDeviceLink-iOS.xcodeproj/project.pbxproj @@ -1315,6 +1315,9 @@ 88B58DC0222045320011B063 /* SDLNavigationJunction.h in Headers */ = {isa = PBXBuildFile; fileRef = 88B58DBE222045320011B063 /* SDLNavigationJunction.h */; }; 88B58DC1222045320011B063 /* SDLNavigationJunction.m in Sources */ = {isa = PBXBuildFile; fileRef = 88B58DBF222045320011B063 /* SDLNavigationJunction.m */; }; 88B58DC3222047F50011B063 /* SDLNavigationJunctionSpec.m in Sources */ = {isa = PBXBuildFile; fileRef = 88B58DC2222047F50011B063 /* SDLNavigationJunctionSpec.m */; }; + 88B58DC622204AF10011B063 /* SDLNavigationAction.h in Headers */ = {isa = PBXBuildFile; fileRef = 88B58DC422204AF10011B063 /* SDLNavigationAction.h */; }; + 88B58DC722204AF10011B063 /* SDLNavigationAction.m in Sources */ = {isa = PBXBuildFile; fileRef = 88B58DC522204AF10011B063 /* SDLNavigationAction.m */; }; + 88B58DC922204C9E0011B063 /* SDLNavigationActionSpec.m in Sources */ = {isa = PBXBuildFile; fileRef = 88B58DC822204C9E0011B063 /* SDLNavigationActionSpec.m */; }; 88B848C31F45E1A600DED768 /* TestResponse.m in Sources */ = {isa = PBXBuildFile; fileRef = 88B848C21F45E1A600DED768 /* TestResponse.m */; }; 88B848C91F462E3600DED768 /* TestFileProgressResponse.m in Sources */ = {isa = PBXBuildFile; fileRef = 88B848C81F462E3600DED768 /* TestFileProgressResponse.m */; }; 88C282CA220CD17200D02F90 /* SDLGetFileResponseSpec.m in Sources */ = {isa = PBXBuildFile; fileRef = 88C282C9220CD17200D02F90 /* SDLGetFileResponseSpec.m */; }; @@ -2902,6 +2905,9 @@ 88B58DBE222045320011B063 /* SDLNavigationJunction.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SDLNavigationJunction.h; sourceTree = "<group>"; }; 88B58DBF222045320011B063 /* SDLNavigationJunction.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SDLNavigationJunction.m; sourceTree = "<group>"; }; 88B58DC2222047F50011B063 /* SDLNavigationJunctionSpec.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SDLNavigationJunctionSpec.m; sourceTree = "<group>"; }; + 88B58DC422204AF10011B063 /* SDLNavigationAction.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SDLNavigationAction.h; sourceTree = "<group>"; }; + 88B58DC522204AF10011B063 /* SDLNavigationAction.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SDLNavigationAction.m; sourceTree = "<group>"; }; + 88B58DC822204C9E0011B063 /* SDLNavigationActionSpec.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SDLNavigationActionSpec.m; sourceTree = "<group>"; }; 88B848C11F45E1A600DED768 /* TestResponse.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TestResponse.h; sourceTree = "<group>"; }; 88B848C21F45E1A600DED768 /* TestResponse.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TestResponse.m; sourceTree = "<group>"; }; 88B848C71F462E3600DED768 /* TestFileProgressResponse.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TestFileProgressResponse.h; sourceTree = "<group>"; }; @@ -3181,6 +3187,7 @@ 88E6F1A9220E1720006156F9 /* SDLMediaTypeSpec.m */, 8BBEA6081F324832003EEA26 /* SDLMetadataTypeSpec.m */, 1EB59CC7202DC86A00343A61 /* SDLModuleTypeSpec.m */, + 88B58DC822204C9E0011B063 /* SDLNavigationActionSpec.m */, 88B58DC2222047F50011B063 /* SDLNavigationJunctionSpec.m */, 162E82071A9BDE8A00906325 /* SDLPermissionStatusSpec.m */, 162E82081A9BDE8A00906325 /* SDLPowerModeQualificationStatusSpec.m */, @@ -4532,6 +4539,8 @@ 1E5AD0471F1F773E0029B8AF /* SDLModuleType.m */, 8BBEA6041F324165003EEA26 /* SDLMetadataType.h */, 8BBEA6051F324165003EEA26 /* SDLMetadataType.m */, + 88B58DC422204AF10011B063 /* SDLNavigationAction.h */, + 88B58DC522204AF10011B063 /* SDLNavigationAction.m */, 88B58DBE222045320011B063 /* SDLNavigationJunction.h */, 88B58DBF222045320011B063 /* SDLNavigationJunction.m */, 5D61FB421A84238B00846EE7 /* SDLPermissionStatus.h */, @@ -6319,6 +6328,7 @@ 1E5AD0841F20B9290029B8AF /* SDLButtonPressResponse.h in Headers */, 1E5AD0681F2080B50029B8AF /* SDLRadioControlData.h in Headers */, 1E5AD0481F1F773E0029B8AF /* SDLModuleType.h in Headers */, + 88B58DC622204AF10011B063 /* SDLNavigationAction.h in Headers */, 1E5AD06C1F208BAB0029B8AF /* SDLClimateControlData.h in Headers */, 1E5AD0381F1F4E390029B8AF /* SDLClimateControlCapabilities.h in Headers */, 5D0C29FC20D93D8C008B56CD /* SDLVideoStreamingState.h in Headers */, @@ -6767,6 +6777,7 @@ 5D61FD1C1A84238C00846EE7 /* SDLOnSystemRequest.m in Sources */, 5D61FC911A84238C00846EE7 /* SDLDisplayCapabilities.m in Sources */, 88C37F642204EBF000901DC6 /* SDLAppServiceData.m in Sources */, + 88B58DC722204AF10011B063 /* SDLNavigationAction.m in Sources */, 8831FA4322022AB300B8FFB7 /* SDLAppServiceCapability.m in Sources */, 1EB59CC4202DB40400343A61 /* SDLSeatControlCapabilities.m in Sources */, 5D61FD261A84238C00846EE7 /* SDLPerformAudioPassThru.m in Sources */, @@ -7459,6 +7470,7 @@ 162E82D61A9BDE8A00906325 /* SDLComponentVolumeStatusSpec.m in Sources */, 162E835C1A9BDE8B00906325 /* SDLPutFileResponseSpec.m in Sources */, 1EE8C43E1F347F0500FDC2CF /* SDLVentilationModeSpec.m in Sources */, + 88B58DC922204C9E0011B063 /* SDLNavigationActionSpec.m in Sources */, 5DB202271F5F2D030061D189 /* SDLImageResolutionSpec.m in Sources */, DA9F7EAA1DCC061A00ACAE48 /* SDLSubscribeWaypointsResponseSpec.m in Sources */, 162E835F1A9BDE8B00906325 /* SDLResetGlobalPropertiesResponseSpec.m in Sources */, diff --git a/SmartDeviceLink/SDLDirection.h b/SmartDeviceLink/SDLDirection.h index 70a3608e3..b35f4c644 100644 --- a/SmartDeviceLink/SDLDirection.h +++ b/SmartDeviceLink/SDLDirection.h @@ -9,7 +9,7 @@ #import "SDLEnum.h" /* - * The navigation direction. + * A navigation direction. */ typedef SDLEnum SDLDirection SDL_SWIFT_ENUM; diff --git a/SmartDeviceLink/SDLNavigationAction.h b/SmartDeviceLink/SDLNavigationAction.h new file mode 100644 index 000000000..922ab404b --- /dev/null +++ b/SmartDeviceLink/SDLNavigationAction.h @@ -0,0 +1,49 @@ +// +// SDLNavigationAction.h +// SmartDeviceLink +// +// Created by Nicole on 2/22/19. +// Copyright © 2019 smartdevicelink. All rights reserved. +// + +#import "SDLEnum.h" + +/* + * A navigation action. + */ +typedef SDLEnum SDLNavigationAction SDL_SWIFT_ENUM; + +/* + * Using this action plus a supplied direction can give the type of turn. + */ +extern SDLNavigationAction const SDLNavigationActionTurn; + +/* + * A navigation action of exit. + */ +extern SDLNavigationAction const SDLNavigationActionExit; + +/* + * A navigation action of stay. + */ +extern SDLNavigationAction const SDLNavigationActionStay; + +/* + * A navigation action of merge. + */ +extern SDLNavigationAction const SDLNavigationActionMerge; + +/* + * A navigation action of ferry. + */ +extern SDLNavigationAction const SDLNavigationActionFerry; + +/* + * A navigation action of car shuttle train. + */ +extern SDLNavigationAction const SDLNavigationActionCarShuttleTrain; + +/* + * A navigation action of waypoint. + */ +extern SDLNavigationAction const SDLNavigationActionWaypoint; diff --git a/SmartDeviceLink/SDLNavigationAction.m b/SmartDeviceLink/SDLNavigationAction.m new file mode 100644 index 000000000..938acea68 --- /dev/null +++ b/SmartDeviceLink/SDLNavigationAction.m @@ -0,0 +1,17 @@ +// +// SDLNavigationAction.m +// SmartDeviceLink +// +// Created by Nicole on 2/22/19. +// Copyright © 2019 smartdevicelink. All rights reserved. +// + +#import "SDLNavigationAction.h" + +SDLNavigationAction const SDLNavigationActionTurn = @"TURN"; +SDLNavigationAction const SDLNavigationActionExit = @"EXIT"; +SDLNavigationAction const SDLNavigationActionStay = @"STAY"; +SDLNavigationAction const SDLNavigationActionMerge = @"MERGE"; +SDLNavigationAction const SDLNavigationActionFerry = @"FERRY"; +SDLNavigationAction const SDLNavigationActionCarShuttleTrain = @"CAR_SHUTTLE_TRAIN"; +SDLNavigationAction const SDLNavigationActionWaypoint = @"WAYPOINT"; diff --git a/SmartDeviceLink/SDLNavigationJunction.h b/SmartDeviceLink/SDLNavigationJunction.h index 01e6d567b..586331ca0 100644 --- a/SmartDeviceLink/SDLNavigationJunction.h +++ b/SmartDeviceLink/SDLNavigationJunction.h @@ -9,7 +9,7 @@ #import "SDLEnum.h" /* - * The navigation junction type. + * A navigation junction type. */ typedef SDLEnum SDLNavigationJunction SDL_SWIFT_ENUM; diff --git a/SmartDeviceLinkTests/RPCSpecs/EnumSpecs/SDLNavigationActionSpec.m b/SmartDeviceLinkTests/RPCSpecs/EnumSpecs/SDLNavigationActionSpec.m new file mode 100644 index 000000000..fc9952891 --- /dev/null +++ b/SmartDeviceLinkTests/RPCSpecs/EnumSpecs/SDLNavigationActionSpec.m @@ -0,0 +1,21 @@ +// +// SDLNavigationActionSpec.m +// SmartDeviceLinkTests +// +// Created by Nicole on 2/22/19. +// Copyright © 2019 smartdevicelink. All rights reserved. +// + +#import <Quick/Quick.h> +#import <Nimble/Nimble.h> + +#import "SDLNavigationAction.h" + +QuickSpecBegin(SDLNavigationActionSpec) + +describe(@"Individual Enum Value Tests", ^ { + it(@"Should match internal values", ^ { + }); +}); + +QuickSpecEnd |