summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMuller, Alexander (A.) <amulle19@ford.com>2016-11-04 11:36:58 -0700
committerMuller, Alexander (A.) <amulle19@ford.com>2016-11-04 11:36:58 -0700
commit6e55f500060456801def68fcb2e3e4f44776d80b (patch)
tree46f1de7e7f3ac023bbe7f873160b6c14c1d06af3
parentd8cd72a82bde770b4dc7385b9e6b8ef209698b54 (diff)
parentd5f4875f1629e9950a958ded46189f308579c18c (diff)
downloadsdl_ios-6e55f500060456801def68fcb2e3e4f44776d80b.tar.gz
Merge remote-tracking branch 'origin/release/4.4.0' into feature/sdl_0003_last_mile
* origin/release/4.4.0: Added more informative description for SendLocation's DateTime. Updated formatting Updated Date/Time documentation. Replaced SendLocation's CGFloat with double. Added additional initializer for SendLocation Made addressLines property more defined on usage. Added additional initializers for SDLDateTime. Added missing spec tests Merge remote-tracking branch 'origin/master' into sdl_0004_sendlocation_updates Added support for generic SDLDisplayType. Added support for Send Location updates with delivery mode, time stamp, and address updates. # Conflicts: # SmartDeviceLink-iOS.xcodeproj/project.pbxproj # SmartDeviceLink/SDLNames.h
-rw-r--r--SmartDeviceLink-iOS.podspec3
-rw-r--r--SmartDeviceLink-iOS.xcodeproj/project.pbxproj36
-rw-r--r--SmartDeviceLink/SDLDateTime.h81
-rw-r--r--SmartDeviceLink/SDLDateTime.m168
-rw-r--r--SmartDeviceLink/SDLDeliveryMode.h48
-rw-r--r--SmartDeviceLink/SDLDeliveryMode.m55
-rw-r--r--SmartDeviceLink/SDLDisplayType.h2
-rw-r--r--SmartDeviceLink/SDLDisplayType.m9
-rw-r--r--SmartDeviceLink/SDLNames.h21
-rw-r--r--SmartDeviceLink/SDLOasisAddress.h75
-rw-r--r--SmartDeviceLink/SDLOasisAddress.m141
-rw-r--r--SmartDeviceLink/SDLProtocolHeader.m2
-rw-r--r--SmartDeviceLink/SDLSendLocation.h42
-rw-r--r--SmartDeviceLink/SDLSendLocation.m79
-rw-r--r--SmartDeviceLink/SmartDeviceLink.h2
-rw-r--r--SmartDeviceLinkTests/RPCSpecs/EnumSpecs/SDLDeliveryModeSpec.m55
-rw-r--r--SmartDeviceLinkTests/RPCSpecs/EnumSpecs/SDLDisplayTypeSpec.m10
-rw-r--r--SmartDeviceLinkTests/RPCSpecs/RequestSpecs/SDLSendLocationSpec.m71
-rw-r--r--SmartDeviceLinkTests/RPCSpecs/StructSpecs/SDLDateTimeSpec.m82
-rw-r--r--SmartDeviceLinkTests/RPCSpecs/StructSpecs/SDLOasisAddressSpec.m78
20 files changed, 1028 insertions, 32 deletions
diff --git a/SmartDeviceLink-iOS.podspec b/SmartDeviceLink-iOS.podspec
index 8c9db3077..ed0b7766c 100644
--- a/SmartDeviceLink-iOS.podspec
+++ b/SmartDeviceLink-iOS.podspec
@@ -158,6 +158,7 @@ s.public_header_files = [
'SmartDeviceLink/SDLChoice.h',
'SmartDeviceLink/SDLClusterModeStatus.h',
'SmartDeviceLink/SDLDIDResult.h',
+'SmartDeviceLink/SDLDateTime.h',
'SmartDeviceLink/SDLDeviceInfo.h',
'SmartDeviceLink/SDLDeviceStatus.h',
'SmartDeviceLink/SDLDisplayCapabilities.h',
@@ -173,6 +174,7 @@ s.public_header_files = [
'SmartDeviceLink/SDLKeyboardProperties.h',
'SmartDeviceLink/SDLMenuParams.h',
'SmartDeviceLink/SDLMyKey.h',
+'SmartDeviceLink/SDLOasisAddress.h',
'SmartDeviceLink/SDLParameterPermissions.h',
'SmartDeviceLink/SDLPermissionItem.h',
'SmartDeviceLink/SDLPresetBankCapabilities.h',
@@ -205,6 +207,7 @@ s.public_header_files = [
'SmartDeviceLink/SDLCharacterSet.h',
'SmartDeviceLink/SDLCompassDirection.h',
'SmartDeviceLink/SDLComponentVolumeStatus.h',
+'SmartDeviceLink/SDLDeliveryMode.h',
'SmartDeviceLink/SDLDeviceLevelStatus.h',
'SmartDeviceLink/SDLDimension.h',
'SmartDeviceLink/SDLDisplayType.h',
diff --git a/SmartDeviceLink-iOS.xcodeproj/project.pbxproj b/SmartDeviceLink-iOS.xcodeproj/project.pbxproj
index 125cf6ba8..f6f895478 100644
--- a/SmartDeviceLink-iOS.xcodeproj/project.pbxproj
+++ b/SmartDeviceLink-iOS.xcodeproj/project.pbxproj
@@ -939,6 +939,15 @@
DA9F7EAC1DCC062400ACAE48 /* SDLUnsubscribeWaypointsResponseSpec.m in Sources */ = {isa = PBXBuildFile; fileRef = DA9F7EAB1DCC062400ACAE48 /* SDLUnsubscribeWaypointsResponseSpec.m */; };
DA9F7EAF1DCC063400ACAE48 /* SDLLocationCoordinateSpec.m in Sources */ = {isa = PBXBuildFile; fileRef = DA9F7EAD1DCC063400ACAE48 /* SDLLocationCoordinateSpec.m */; };
DA9F7EB01DCC063400ACAE48 /* SDLLocationDetailsSpec.m in Sources */ = {isa = PBXBuildFile; fileRef = DA9F7EAE1DCC063400ACAE48 /* SDLLocationDetailsSpec.m */; };
+ DA9F7E631DCBFAC800ACAE48 /* SDLDateTime.h in Headers */ = {isa = PBXBuildFile; fileRef = DA9F7E611DCBFAC800ACAE48 /* SDLDateTime.h */; settings = {ATTRIBUTES = (Public, ); }; };
+ DA9F7E641DCBFAC800ACAE48 /* SDLDateTime.m in Sources */ = {isa = PBXBuildFile; fileRef = DA9F7E621DCBFAC800ACAE48 /* SDLDateTime.m */; };
+ DA9F7E671DCBFAD400ACAE48 /* SDLOasisAddress.h in Headers */ = {isa = PBXBuildFile; fileRef = DA9F7E651DCBFAD400ACAE48 /* SDLOasisAddress.h */; settings = {ATTRIBUTES = (Public, ); }; };
+ DA9F7E681DCBFAD400ACAE48 /* SDLOasisAddress.m in Sources */ = {isa = PBXBuildFile; fileRef = DA9F7E661DCBFAD400ACAE48 /* SDLOasisAddress.m */; };
+ DA9F7E6B1DCBFB0700ACAE48 /* SDLDeliveryMode.h in Headers */ = {isa = PBXBuildFile; fileRef = DA9F7E691DCBFB0700ACAE48 /* SDLDeliveryMode.h */; settings = {ATTRIBUTES = (Public, ); }; };
+ DA9F7E6C1DCBFB0700ACAE48 /* SDLDeliveryMode.m in Sources */ = {isa = PBXBuildFile; fileRef = DA9F7E6A1DCBFB0700ACAE48 /* SDLDeliveryMode.m */; };
+ DA9F7EB21DCC084300ACAE48 /* SDLDeliveryModeSpec.m in Sources */ = {isa = PBXBuildFile; fileRef = DA9F7EB11DCC084300ACAE48 /* SDLDeliveryModeSpec.m */; };
+ DA9F7EB41DCC086400ACAE48 /* SDLDateTimeSpec.m in Sources */ = {isa = PBXBuildFile; fileRef = DA9F7EB31DCC086400ACAE48 /* SDLDateTimeSpec.m */; };
+ DA9F7EB61DCC086A00ACAE48 /* SDLOasisAddressSpec.m in Sources */ = {isa = PBXBuildFile; fileRef = DA9F7EB51DCC086A00ACAE48 /* SDLOasisAddressSpec.m */; };
DAC572571D1067270004288B /* SDLTouchManager.h in Headers */ = {isa = PBXBuildFile; fileRef = DAC572551D1067270004288B /* SDLTouchManager.h */; settings = {ATTRIBUTES = (Public, ); }; };
DAC572581D1067270004288B /* SDLTouchManager.m in Sources */ = {isa = PBXBuildFile; fileRef = DAC572561D1067270004288B /* SDLTouchManager.m */; };
DAC5725B1D10B81E0004288B /* SDLTouch.m in Sources */ = {isa = PBXBuildFile; fileRef = DAC572591D10B81E0004288B /* SDLTouch.m */; };
@@ -1969,6 +1978,15 @@
DA9F7EAB1DCC062400ACAE48 /* SDLUnsubscribeWaypointsResponseSpec.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SDLUnsubscribeWaypointsResponseSpec.m; sourceTree = "<group>"; };
DA9F7EAD1DCC063400ACAE48 /* SDLLocationCoordinateSpec.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SDLLocationCoordinateSpec.m; sourceTree = "<group>"; };
DA9F7EAE1DCC063400ACAE48 /* SDLLocationDetailsSpec.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SDLLocationDetailsSpec.m; sourceTree = "<group>"; };
+ DA9F7E611DCBFAC800ACAE48 /* SDLDateTime.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDLDateTime.h; sourceTree = "<group>"; };
+ DA9F7E621DCBFAC800ACAE48 /* SDLDateTime.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SDLDateTime.m; sourceTree = "<group>"; };
+ DA9F7E651DCBFAD400ACAE48 /* SDLOasisAddress.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDLOasisAddress.h; sourceTree = "<group>"; };
+ DA9F7E661DCBFAD400ACAE48 /* SDLOasisAddress.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SDLOasisAddress.m; sourceTree = "<group>"; };
+ DA9F7E691DCBFB0700ACAE48 /* SDLDeliveryMode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDLDeliveryMode.h; sourceTree = "<group>"; };
+ DA9F7E6A1DCBFB0700ACAE48 /* SDLDeliveryMode.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SDLDeliveryMode.m; sourceTree = "<group>"; };
+ DA9F7EB11DCC084300ACAE48 /* SDLDeliveryModeSpec.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SDLDeliveryModeSpec.m; sourceTree = "<group>"; };
+ DA9F7EB31DCC086400ACAE48 /* SDLDateTimeSpec.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SDLDateTimeSpec.m; sourceTree = "<group>"; };
+ DA9F7EB51DCC086A00ACAE48 /* SDLOasisAddressSpec.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SDLOasisAddressSpec.m; sourceTree = "<group>"; };
DAC572551D1067270004288B /* SDLTouchManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDLTouchManager.h; sourceTree = "<group>"; };
DAC572561D1067270004288B /* SDLTouchManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SDLTouchManager.m; sourceTree = "<group>"; };
DAC572591D10B81E0004288B /* SDLTouch.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SDLTouch.m; sourceTree = "<group>"; };
@@ -2058,6 +2076,7 @@
162E81EC1A9BDE8A00906325 /* SDLCharacterSetSpec.m */,
162E81ED1A9BDE8A00906325 /* SDLCompassDirectionSpec.m */,
162E81EE1A9BDE8A00906325 /* SDLComponentVolumeStatusSpec.m */,
+ DA9F7EB11DCC084300ACAE48 /* SDLDeliveryModeSpec.m */,
162E81EF1A9BDE8A00906325 /* SDLDeviceLevelStatusSpec.m */,
162E81F01A9BDE8A00906325 /* SDLDimensionSpec.m */,
162E81F11A9BDE8A00906325 /* SDLDisplayTypeSpec.m */,
@@ -2273,6 +2292,7 @@
162E82931A9BDE8A00906325 /* SDLButtonCapabilitiesSpec.m */,
162E82941A9BDE8A00906325 /* SDLChoiceSpec.m */,
162E82951A9BDE8A00906325 /* SDLClusterModeStatusSpec.m */,
+ DA9F7EB31DCC086400ACAE48 /* SDLDateTimeSpec.m */,
162E82961A9BDE8A00906325 /* SDLDeviceInfoSpec.m */,
162E82971A9BDE8A00906325 /* SDLDeviceStatusSpec.m */,
162E82981A9BDE8A00906325 /* SDLDIDResult.m */,
@@ -2290,6 +2310,7 @@
DA9F7EAE1DCC063400ACAE48 /* SDLLocationDetailsSpec.m */,
162E82A21A9BDE8A00906325 /* SDLMenuParamsSpec.m */,
162E82A31A9BDE8A00906325 /* SDLMyKeySpec.m */,
+ DA9F7EB51DCC086A00ACAE48 /* SDLOasisAddressSpec.m */,
162E82A41A9BDE8A00906325 /* SDLParameterPermissionsSpec.m */,
162E82A51A9BDE8A00906325 /* SDLPermissionItemSpec.m */,
162E82A61A9BDE8A00906325 /* SDLPresetBankCapabilitiesSpec.m */,
@@ -2825,6 +2846,8 @@
5D61FA751A84238A00846EE7 /* SDLChoice.m */,
5D61FA761A84238A00846EE7 /* SDLClusterModeStatus.h */,
5D61FA771A84238A00846EE7 /* SDLClusterModeStatus.m */,
+ DA9F7E611DCBFAC800ACAE48 /* SDLDateTime.h */,
+ DA9F7E621DCBFAC800ACAE48 /* SDLDateTime.m */,
5D61FA951A84238A00846EE7 /* SDLDeviceInfo.h */,
5D61FA961A84238A00846EE7 /* SDLDeviceInfo.m */,
5D61FA991A84238A00846EE7 /* SDLDeviceStatus.h */,
@@ -2861,6 +2884,8 @@
5D61FB0C1A84238A00846EE7 /* SDLMenuParams.m */,
5D61FB0D1A84238A00846EE7 /* SDLMyKey.h */,
5D61FB0E1A84238A00846EE7 /* SDLMyKey.m */,
+ DA9F7E651DCBFAD400ACAE48 /* SDLOasisAddress.h */,
+ DA9F7E661DCBFAD400ACAE48 /* SDLOasisAddress.m */,
5D61FB361A84238B00846EE7 /* SDLParameterPermissions.h */,
5D61FB371A84238B00846EE7 /* SDLParameterPermissions.m */,
5D61FB401A84238B00846EE7 /* SDLPermissionItem.h */,
@@ -2932,6 +2957,8 @@
5D61FA791A84238A00846EE7 /* SDLCompassDirection.m */,
5D61FA7A1A84238A00846EE7 /* SDLComponentVolumeStatus.h */,
5D61FA7B1A84238A00846EE7 /* SDLComponentVolumeStatus.m */,
+ DA9F7E691DCBFB0700ACAE48 /* SDLDeliveryMode.h */,
+ DA9F7E6A1DCBFB0700ACAE48 /* SDLDeliveryMode.m */,
5D61FA971A84238A00846EE7 /* SDLDeviceLevelStatus.h */,
5D61FA981A84238A00846EE7 /* SDLDeviceLevelStatus.m */,
5D61FAA11A84238A00846EE7 /* SDLDimension.h */,
@@ -3895,6 +3922,7 @@
5D61FCF61A84238C00846EE7 /* SDLMediaClockFormat.h in Headers */,
5D61FD831A84238C00846EE7 /* SDLSetDisplayLayout.h in Headers */,
5D61FCC91A84238C00846EE7 /* SDLIgnitionStableStatus.h in Headers */,
+ DA9F7E6B1DCBFB0700ACAE48 /* SDLDeliveryMode.h in Headers */,
E9C32B941AB20BA200F283AF /* SDLStreamDelegate.h in Headers */,
DA9F7E871DCC049900ACAE48 /* SDLSubscribeWaypoints.h in Headers */,
5D61FDBB1A84238C00846EE7 /* SDLSystemAction.h in Headers */,
@@ -3951,6 +3979,7 @@
5D61FDA91A84238C00846EE7 /* SDLSpeechCapabilities.h in Headers */,
5D61FCE01A84238C00846EE7 /* SDLKeyboardEvent.h in Headers */,
5D3E48751D6F3B330000BFEF /* SDLAsynchronousOperation.h in Headers */,
+ DA9F7E631DCBFAC800ACAE48 /* SDLDateTime.h in Headers */,
5D61FCEA1A84238C00846EE7 /* SDLLayoutMode.h in Headers */,
5D61FD7F1A84238C00846EE7 /* SDLSetAppIcon.h in Headers */,
5D61FDD11A84238C00846EE7 /* SDLTouchCoord.h in Headers */,
@@ -4040,6 +4069,7 @@
5D61FDE51A84238C00846EE7 /* SDLUnregisterAppInterfaceResponse.h in Headers */,
5D61FCF81A84238C00846EE7 /* SDLMenuParams.h in Headers */,
5D61FD651A84238C00846EE7 /* SDLResetGlobalPropertiesResponse.h in Headers */,
+ DA9F7E671DCBFAD400ACAE48 /* SDLOasisAddress.h in Headers */,
5D61FD611A84238C00846EE7 /* SDLRequestType.h in Headers */,
DA9F7E8B1DCC04B000ACAE48 /* SDLSubscribeWaypointsResponse.h in Headers */,
5D61FCEC1A84238C00846EE7 /* SDLListFiles.h in Headers */,
@@ -4542,12 +4572,14 @@
5D61FCC61A84238C00846EE7 /* SDLHMIZoneCapabilities.m in Sources */,
5D61FD161A84238C00846EE7 /* SDLOnLockScreenStatus.m in Sources */,
5D61FDAE1A84238C00846EE7 /* SDLSubscribeButton.m in Sources */,
+ DA9F7E6C1DCBFB0700ACAE48 /* SDLDeliveryMode.m in Sources */,
5D61FC581A84238C00846EE7 /* SDLButtonPressMode.m in Sources */,
5D61FDB01A84238C00846EE7 /* SDLSubscribeButtonResponse.m in Sources */,
5DCF76F61ACDBAD300BB647B /* SDLSendLocation.m in Sources */,
5D76E3251D39767000647CFA /* SDLLockScreenPresenter.m in Sources */,
5D61FC771A84238C00846EE7 /* SDLDeleteFile.m in Sources */,
5D61FC811A84238C00846EE7 /* SDLDeleteSubMenuResponse.m in Sources */,
+ DA9F7E681DCBFAD400ACAE48 /* SDLOasisAddress.m in Sources */,
5D61FC7B1A84238C00846EE7 /* SDLDeleteInteractionChoiceSet.m in Sources */,
5D61FDC01A84238C00846EE7 /* SDLSystemRequest.m in Sources */,
5D61FD021A84238C00846EE7 /* SDLOnAudioPassThru.m in Sources */,
@@ -4598,6 +4630,7 @@
5D61FC851A84238C00846EE7 /* SDLDeviceLevelStatus.m in Sources */,
5D1665AB1CF5F7D000CC4CA1 /* (null) in Sources */,
5D61FD1E1A84238C00846EE7 /* SDLOnTBTClientState.m in Sources */,
+ DA9F7E641DCBFAC800ACAE48 /* SDLDateTime.m in Sources */,
5D61FD581A84238C00846EE7 /* SDLPutFileResponse.m in Sources */,
5D61FCB21A84238C00846EE7 /* SDLGetDTCs.m in Sources */,
5D61FD441A84238C00846EE7 /* SDLProtocol.m in Sources */,
@@ -4721,6 +4754,7 @@
162E83871A9BDE8B00906325 /* SDLPermissionItemSpec.m in Sources */,
162E82E31A9BDE8B00906325 /* SDLIgnitionStatusSpec.m in Sources */,
162E83511A9BDE8B00906325 /* SDLDeleteInteractionChoiceSetResponseSpec.m in Sources */,
+ DA9F7EB41DCC086400ACAE48 /* SDLDateTimeSpec.m in Sources */,
162E830E1A9BDE8B00906325 /* SDLRPCRequestFactorySpec.m in Sources */,
162E82E41A9BDE8B00906325 /* SDLImageFieldNameSpec.m in Sources */,
162E83991A9BDE8B00906325 /* SDLEnumSpec.m in Sources */,
@@ -4788,6 +4822,7 @@
162E82F71A9BDE8B00906325 /* SDLResultSpec.m in Sources */,
1680B1141A9CD7AD00DBD79E /* SDLV1ProtocolHeaderSpec.m in Sources */,
1680B1161A9CD7AD00DBD79E /* SDLProtocolMessageSpec.m in Sources */,
+ DA9F7EB21DCC084300ACAE48 /* SDLDeliveryModeSpec.m in Sources */,
162E83771A9BDE8B00906325 /* SDLClusterModeStatusSpec.m in Sources */,
162E83981A9BDE8B00906325 /* SDLVrHelpItemSpec.m in Sources */,
162E83831A9BDE8B00906325 /* SDLKeyboardPropertiesSpec.m in Sources */,
@@ -4886,6 +4921,7 @@
162E830C1A9BDE8B00906325 /* SDLWarningLightStatusSpec.m in Sources */,
162E82E71A9BDE8B00906325 /* SDLKeyboardEventSpec.m in Sources */,
162E834E1A9BDE8B00906325 /* SDLCreateInteractionChoiceSetResponseSpec.m in Sources */,
+ DA9F7EB61DCC086A00ACAE48 /* SDLOasisAddressSpec.m in Sources */,
162E83301A9BDE8B00906325 /* SDLGetVehicleDataSpec.m in Sources */,
162E833F1A9BDE8B00906325 /* SDLSliderSpec.m in Sources */,
162E838C1A9BDE8B00906325 /* SDLSoftButtonSpec.m in Sources */,
diff --git a/SmartDeviceLink/SDLDateTime.h b/SmartDeviceLink/SDLDateTime.h
new file mode 100644
index 000000000..0f9cf6c4c
--- /dev/null
+++ b/SmartDeviceLink/SDLDateTime.h
@@ -0,0 +1,81 @@
+// SDLDateTime.h
+//
+
+#import "SDLRPCStruct.h"
+
+@interface SDLDateTime : SDLRPCStruct
+
+- (instancetype)initWithDate:(NSDate*)date;
+
+- (instancetype)initWithHour:(UInt8)hour minute:(UInt8)minute;
+
+- (instancetype)initWithHour:(UInt8)hour minute:(UInt8)minute second:(UInt8)second millisecond:(UInt16)millisecond;
+
+- (instancetype)initWithHour:(UInt8)hour minute:(UInt8)minute second:(UInt8)second millisecond:(UInt16)millisecond day:(UInt8)day month:(UInt8)month year:(UInt16)year;
+
+- (instancetype)initWithHour:(UInt8)hour minute:(UInt8)minute second:(UInt8)second millisecond:(UInt16)millisecond day:(UInt8)day month:(UInt8)month year:(UInt16)year timezoneMinuteOffset:(UInt8)timezoneMinuteOffset timezoneHourOffset:(int)timezoneHourOffset;
+
+/**
+ * @abstract Milliseconds part of time
+ *
+ * Optional, Integer 0 - 999
+ */
+@property (copy, nonatomic) NSNumber<SDLInt> *millisecond;
+
+/**
+ * @abstract Seconds part of time
+ *
+ * Optional, Integer 0 - 59
+ */
+@property (copy, nonatomic) NSNumber<SDLInt> *second;
+
+/**
+ * @abstract Minutes part of time
+ *
+ * Optional, Integer 0 - 59
+ */
+@property (copy, nonatomic) NSNumber<SDLInt> *minute;
+
+/**
+ * @abstract Hour part of time
+ *
+ * Optional, Integer 0 - 23
+ */
+@property (copy, nonatomic) NSNumber<SDLInt> *hour;
+
+/**
+ * @abstract Day of the month
+ *
+ * Optional, Integer 1 - 31
+ */
+@property (copy, nonatomic) NSNumber<SDLInt> *day;
+
+/**
+ * @abstract Month of the year
+ *
+ * Optional, Integer 1 - 12
+ */
+@property (copy, nonatomic) NSNumber<SDLInt> *month;
+
+/**
+ * @abstract The year in YYYY format
+ *
+ * Optional, Max Value 4095
+ */
+@property (copy, nonatomic) NSNumber<SDLInt> *year;
+
+/**
+ * @abstract Time zone offset in Min with regard to UTC
+ *
+ * Optional, Integer 0 - 59
+ */
+@property (copy, nonatomic) NSNumber<SDLInt> *timezoneMinuteOffset;
+
+/**
+ * @abstract Time zone offset in Hours with regard to UTC
+ *
+ * Optional, Integer -12 - 14
+ */
+@property (copy, nonatomic) NSNumber<SDLInt> *timezoneHourOffset;
+
+@end
diff --git a/SmartDeviceLink/SDLDateTime.m b/SmartDeviceLink/SDLDateTime.m
new file mode 100644
index 000000000..babed159c
--- /dev/null
+++ b/SmartDeviceLink/SDLDateTime.m
@@ -0,0 +1,168 @@
+// SDLDateTime.m
+//
+
+#import "SDLDateTime.h"
+#import "SDLNames.h"
+
+@implementation SDLDateTime
+
+- (instancetype)initWithHour:(UInt8)hour minute:(UInt8)minute {
+ self = [self init];
+ if (!self) {
+ return nil;
+ }
+
+ self.hour = @(hour);
+ self.minute = @(minute);
+
+ return self;
+}
+
+- (instancetype)initWithHour:(UInt8)hour minute:(UInt8)minute second:(UInt8)second millisecond:(UInt16)millisecond {
+ self = [self initWithHour:hour minute:minute];
+ if (!self) {
+ return nil;
+ }
+
+ self.second = @(second);
+ self.millisecond = @(millisecond);
+
+ return self;
+
+}
+
+- (instancetype)initWithHour:(UInt8)hour minute:(UInt8)minute second:(UInt8)second millisecond:(UInt16)millisecond day:(UInt8)day month:(UInt8)month year:(UInt16)year {
+ self = [self initWithHour:hour minute:minute second:second millisecond:millisecond];
+ if (!self) {
+ return nil;
+ }
+
+ self.day = @(day);
+ self.month = @(month);
+ self.year = @(year);
+
+ return self;
+}
+
+
+- (instancetype)initWithHour:(UInt8)hour minute:(UInt8)minute second:(UInt8)second millisecond:(UInt16)millisecond day:(UInt8)day month:(UInt8)month year:(UInt16)year timezoneMinuteOffset:(UInt8)timezoneMinuteOffset timezoneHourOffset:(int)timezoneHourOffset {
+ self = [self initWithHour:hour minute:minute second:second millisecond:millisecond day:day month:month year:year];
+ if (!self) {
+ return nil;
+ }
+
+ self.timezoneMinuteOffset = @(timezoneMinuteOffset);
+ self.timezoneHourOffset = @(timezoneHourOffset);
+
+ return self;
+}
+
+- (void)setMillisecond:(NSNumber<SDLInt> *)millisecond {
+ if (millisecond != nil) {
+ store[NAMES_millisecond] = millisecond;
+ } else {
+ [store removeObjectForKey:NAMES_millisecond];
+ }
+}
+
+- (NSNumber<SDLInt> *)millisecond {
+ return store[NAMES_millisecond];
+}
+
+- (void)setSecond:(NSNumber<SDLInt> *)second {
+ if (second != nil) {
+ store[NAMES_second] = second;
+ } else {
+ [store removeObjectForKey:NAMES_second];
+ }
+}
+
+- (NSNumber<SDLInt> *)second {
+ return store[NAMES_second];
+}
+
+- (void)setMinute:(NSNumber<SDLInt> *)minute {
+ if (minute != nil) {
+ store[NAMES_minute] = minute;
+ } else {
+ [store removeObjectForKey:NAMES_minute];
+ }
+}
+
+- (NSNumber<SDLInt> *)minute {
+ return store[NAMES_minute];
+}
+
+- (void)setHour:(NSNumber<SDLInt> *)hour {
+ if (hour != nil) {
+ store[NAMES_hour] = hour;
+ } else {
+ [store removeObjectForKey:NAMES_hour];
+ }
+}
+
+- (NSNumber<SDLInt> *)hour {
+ return store[NAMES_hour];
+}
+
+- (void)setDay:(NSNumber<SDLInt> *)day {
+ if (day != nil) {
+ store[NAMES_day] = day;
+ } else {
+ [store removeObjectForKey:NAMES_day];
+ }
+}
+
+- (NSNumber<SDLInt> *)day {
+ return store[NAMES_day];
+}
+
+- (void)setMonth:(NSNumber<SDLInt> *)month {
+ if (month != nil) {
+ store[NAMES_month] = month;
+ } else {
+ [store removeObjectForKey:NAMES_month];
+ }
+}
+
+- (NSNumber<SDLInt> *)month {
+ return store[NAMES_month];
+}
+
+- (void)setYear:(NSNumber<SDLInt> *)year {
+ if (year != nil) {
+ store[NAMES_year] = year;
+ } else {
+ [store removeObjectForKey:NAMES_year];
+ }
+}
+
+- (NSNumber<SDLInt> *)year {
+ return store[NAMES_year];
+}
+
+- (void)setTimezoneMinuteOffset:(NSNumber<SDLInt> *)timezoneMinuteOffset {
+ if (timezoneMinuteOffset != nil) {
+ store[NAMES_timezoneMinuteOffset] = timezoneMinuteOffset;
+ } else {
+ [store removeObjectForKey:NAMES_timezoneMinuteOffset];
+ }
+}
+
+- (NSNumber<SDLInt> *)timezoneMinuteOffset {
+ return store[NAMES_timezoneMinuteOffset];
+}
+
+- (void)setTimezoneHourOffset:(NSNumber<SDLInt> *)timezoneHourOffset {
+ if (timezoneHourOffset != nil) {
+ store[NAMES_timezoneHourOffset] = timezoneHourOffset;
+ } else {
+ [store removeObjectForKey:NAMES_timezoneHourOffset];
+ }
+}
+
+- (NSNumber<SDLInt> *)timezoneHourOffset {
+ return store[NAMES_timezoneHourOffset];
+}
+
+@end
diff --git a/SmartDeviceLink/SDLDeliveryMode.h b/SmartDeviceLink/SDLDeliveryMode.h
new file mode 100644
index 000000000..16a6cfe84
--- /dev/null
+++ b/SmartDeviceLink/SDLDeliveryMode.h
@@ -0,0 +1,48 @@
+// SDLDeliveryMode.h
+//
+
+#import "SDLEnum.h"
+
+/**
+ *Specifies the mode in which the sendLocation request is sent.
+ */
+@interface SDLDeliveryMode : SDLEnum
+
+/**
+ * @abstract Convert String to SDLDeliveryMode
+ *
+ * @param value The value of the string to get an object for
+ *
+ * @return SDLDeliveryMode
+ */
++ (SDLDeliveryMode *)valueOf:(NSString *)value;
+
+/**
+ * @abstract Store the enumeration of all possible SDLDeliveryMode
+ *
+ * @return an array that store all possible SDLDeliveryMode
+ */
++ (NSArray *)values;
+
+/**
+ * @abstract User is prompted on HMI
+ *
+ * @return a SDLDeliveryMode with value of *PROMPT*
+ */
++ (SDLDeliveryMode *)PROMPT;
+
+/**
+ * @abstract Set the location as destination without prompting the user
+ *
+ * @return a SDLDeliveryMode with value of *DESTINATION*
+ */
++ (SDLDeliveryMode *)DESTINATION;
+
+/**
+ * @abstract Adds the current location to navigation queue
+ *
+ * @return a SDLDeliveryMode with value of *QUEUE*
+ */
++ (SDLDeliveryMode *)QUEUE;
+
+@end
diff --git a/SmartDeviceLink/SDLDeliveryMode.m b/SmartDeviceLink/SDLDeliveryMode.m
new file mode 100644
index 000000000..f008987a5
--- /dev/null
+++ b/SmartDeviceLink/SDLDeliveryMode.m
@@ -0,0 +1,55 @@
+// SDLDeliveryMode.h
+//
+
+#import "SDLDeliveryMode.h"
+
+SDLDeliveryMode *SDLDeliveryMode_PROMPT = nil;
+SDLDeliveryMode *SDLDeliveryMode_DESTINATION = nil;
+SDLDeliveryMode *SDLDeliveryMode_QUEUE = nil;
+
+NSArray *SDLDeliveryMode_values = nil;
+
+@implementation SDLDeliveryMode
+
++ (SDLDeliveryMode *)valueOf:(NSString *)value {
+ for (SDLDeliveryMode *item in SDLDeliveryMode.values) {
+ if ([item.value isEqualToString:value]) {
+ return item;
+ }
+ }
+ return nil;
+}
+
++ (NSArray *)values {
+ if (SDLDeliveryMode_values == nil) {
+ SDLDeliveryMode_values = @[
+ SDLDeliveryMode.PROMPT,
+ SDLDeliveryMode.DESTINATION,
+ SDLDeliveryMode.QUEUE,
+ ];
+ }
+ return SDLDeliveryMode_values;
+}
+
++ (SDLDeliveryMode *)PROMPT {
+ if (SDLDeliveryMode_PROMPT == nil) {
+ SDLDeliveryMode_PROMPT = [[SDLDeliveryMode alloc] initWithValue:@"PROMPT"];
+ }
+ return SDLDeliveryMode_PROMPT;
+}
+
++ (SDLDeliveryMode *)DESTINATION {
+ if (SDLDeliveryMode_DESTINATION == nil) {
+ SDLDeliveryMode_DESTINATION = [[SDLDeliveryMode alloc] initWithValue:@"DESTINATION"];
+ }
+ return SDLDeliveryMode_DESTINATION;
+}
+
++ (SDLDeliveryMode *)QUEUE {
+ if (SDLDeliveryMode_QUEUE == nil) {
+ SDLDeliveryMode_QUEUE = [[SDLDeliveryMode alloc] initWithValue:@"QUEUE"];
+ }
+ return SDLDeliveryMode_QUEUE;
+}
+
+@end
diff --git a/SmartDeviceLink/SDLDisplayType.h b/SmartDeviceLink/SDLDisplayType.h
index 3bb2f2b9a..a25590ecb 100644
--- a/SmartDeviceLink/SDLDisplayType.h
+++ b/SmartDeviceLink/SDLDisplayType.h
@@ -58,4 +58,6 @@
+ (SDLDisplayType *)GEN3_8_INCH;
++ (SDLDisplayType *)GENERIC;
+
@end
diff --git a/SmartDeviceLink/SDLDisplayType.m b/SmartDeviceLink/SDLDisplayType.m
index 8059aa54b..0c44413c0 100644
--- a/SmartDeviceLink/SDLDisplayType.m
+++ b/SmartDeviceLink/SDLDisplayType.m
@@ -14,6 +14,7 @@ SDLDisplayType *SDLDisplayType_MFD3 = nil;
SDLDisplayType *SDLDisplayType_MFD4 = nil;
SDLDisplayType *SDLDisplayType_MFD5 = nil;
SDLDisplayType *SDLDisplayType_GEN3_8_INCH = nil;
+SDLDisplayType *SDLDisplayType_GENERIC = nil;
NSArray *SDLDisplayType_values = nil;
@@ -41,6 +42,7 @@ NSArray *SDLDisplayType_values = nil;
SDLDisplayType.MFD4,
SDLDisplayType.MFD5,
SDLDisplayType.GEN3_8_INCH,
+ SDLDisplayType.GENERIC
];
}
return SDLDisplayType_values;
@@ -116,4 +118,11 @@ NSArray *SDLDisplayType_values = nil;
return SDLDisplayType_GEN3_8_INCH;
}
++ (SDLDisplayType *)GENERIC {
+ if (SDLDisplayType_GENERIC == nil) {
+ SDLDisplayType_GENERIC = [[SDLDisplayType alloc] initWithValue:@"SDL_GENERIC"];
+ }
+ return SDLDisplayType_GENERIC;
+}
+
@end
diff --git a/SmartDeviceLink/SDLNames.h b/SmartDeviceLink/SDLNames.h
index 9dcd11a44..ffc8f19ba 100644
--- a/SmartDeviceLink/SDLNames.h
+++ b/SmartDeviceLink/SDLNames.h
@@ -5,8 +5,10 @@
#define NAMES_accPedalPosition @"accPedalPosition"
#define NAMES_actual @"actual"
#define NAMES_AddCommand @"AddCommand"
+#define NAMES_address @"address"
#define NAMES_addressLines @"addressLines"
#define NAMES_AddSubMenu @"AddSubMenu"
+#define NAMES_administrativeArea @"administrativeArea"
#define NAMES_airbagStatus @"airbagStatus"
#define NAMES_Alert @"Alert"
#define NAMES_AlertManeuver @"AlertManeuver"
@@ -57,15 +59,19 @@
#define NAMES_compassDirection @"compassDirection"
#define NAMES_correlationID @"correlationID"
#define NAMES_CreateInteractionChoiceSet @"CreateInteractionChoiceSet"
+#define NAMES_countryCode @"countryCode"
+#define NAMES_countryName @"countryName"
#define NAMES_customButtonID @"customButtonID"
#define NAMES_customPresets @"customPresets"
#define NAMES_data @"data"
#define NAMES_dataResult @"dataResult"
#define NAMES_dataType @"dataType"
+#define NAMES_day @"day"
#define NAMES_DeleteCommand @"DeleteCommand"
#define NAMES_DeleteFile @"DeleteFile"
#define NAMES_DeleteInteractionChoiceSet @"DeleteInteractionChoiceSet"
#define NAMES_DeleteSubMenu @"DeleteSubMenu"
+#define NAMES_deliveryMode @"deliveryMode"
#define NAMES_deviceInfo @"deviceInfo"
#define NAMES_deviceStatus @"deviceStatus"
#define NAMES_DiagnosticMessage @"DiagnosticMessage"
@@ -134,6 +140,7 @@
#define NAMES_hmiPermissions @"hmiPermissions"
#define NAMES_hmiCapabilities @"hmiCapabilities"
#define NAMES_hmiZoneCapabilities @"hmiZoneCapabilities"
+#define NAMES_hour @"hour"
#define NAMES_hours @"hours"
#define NAMES_id @"id"
#define NAMES_ignitionStableStatus @"ignitionStableStatus"
@@ -170,6 +177,7 @@
#define NAMES_length @"length"
#define NAMES_limitedCharacterList @"limitedCharacterList"
#define NAMES_ListFiles @"ListFiles"
+#define NAMES_locality @"locality"
#define NAMES_locationCoordinate @"coordinate"
#define NAMES_locationDescription @"locationDescription"
#define NAMES_locationImage @"locationImage"
@@ -204,11 +212,14 @@
#define NAMES_middleRow1BuckleBelted @"middleRow1BuckleBelted"
#define NAMES_middleRow2BuckleBelted @"middleRow2BuckleBelted"
#define NAMES_middleRow3BuckleBelted @"middleRow3BuckleBelted"
+#define NAMES_millisecond @"millisecond"
#define NAMES_minorVersion @"minorVersion"
+#define NAMES_minute @"minute"
#define NAMES_minutes @"minutes"
#define NAMES_model @"model"
#define NAMES_modelYear @"modelYear"
#define NAMES_monoAudioOutputMuted @"monoAudioOutputMuted"
+#define NAMES_month @"month"
#define NAMES_multipleEvents @"multipleEvents"
#define NAMES_multiTouchAvailable @"multiTouchAvailable"
#define NAMES_muteAudio @"muteAudio"
@@ -270,6 +281,7 @@
#define NAMES_phoneRoaming @"phoneRoaming"
#define NAMES_playTone @"playTone"
#define NAMES_position @"position"
+#define NAMES_postalCode @"postalCode"
#define NAMES_powerModeActive @"powerModeActive"
#define NAMES_powerModeQualificationStatus @"powerModeQualificationStatus"
#define NAMES_powerModeStatus @"powerModeStatus"
@@ -316,6 +328,7 @@
#define NAMES_secondaryGraphic @"secondaryGraphic"
#define NAMES_secondaryImage @"secondaryImage"
#define NAMES_secondaryText @"secondaryText"
+#define NAMES_second @"second"
#define NAMES_seconds @"seconds"
#define NAMES_SendLocation @"SendLocation"
#define NAMES_SetAppIcon @"SetAppIcon"
@@ -345,10 +358,13 @@
#define NAMES_statusBar @"statusBar"
#define NAMES_steeringWheelAngle @"steeringWheelAngle"
#define NAMES_stereoAudioOutputMuted @"stereoAudioOutputMuted"
+#define NAMES_subAdministrativeArea @"subAdministrativeArea"
+#define NAMES_subLocality @"subLocality"
#define NAMES_Subscribe @"Subscribe"
#define NAMES_SubscribeButton @"SubscribeButton"
#define NAMES_SubscribeVehicleData @"SubscribeVehicleData"
#define NAMES_SubscribeWaypoints @"SubscribeWayPoints"
+#define NAMES_subThoroughfare @"subThoroughfare"
#define NAMES_success @"success"
#define NAMES_supportedDiagModes @"supportedDiagModes"
#define NAMES_syncFileName @"syncFileName"
@@ -366,10 +382,14 @@
#define NAMES_text @"text"
#define NAMES_textFields @"textFields"
#define NAMES_textMsgAvailable @"textMsgAvailable"
+#define NAMES_thoroughfare @"thoroughfare"
#define NAMES_timeout @"timeout"
#define NAMES_Timeout @"Timeout"
#define NAMES_timeoutPrompt @"timeoutPrompt"
+#define NAMES_timeStamp @"timeStamp"
#define NAMES_timeToDestination @"timeToDestination"
+#define NAMES_timezoneHourOffset @"tz_hour"
+#define NAMES_timezoneMinuteOffset @"tz_minute"
#define NAMES_tirePressure @"tirePressure"
#define NAMES_totalDistance @"totalDistance"
#define NAMES_touchEventAvailable @"touchEventAvailable"
@@ -415,3 +435,4 @@
#define NAMES_wiperStatus @"wiperStatus"
#define NAMES_x @"x"
#define NAMES_y @"y"
+#define NAMES_year @"year"
diff --git a/SmartDeviceLink/SDLOasisAddress.h b/SmartDeviceLink/SDLOasisAddress.h
new file mode 100644
index 000000000..acc219ceb
--- /dev/null
+++ b/SmartDeviceLink/SDLOasisAddress.h
@@ -0,0 +1,75 @@
+// SDLOasisAddress.h
+//
+
+#import "SDLRPCStruct.h"
+
+@interface SDLOasisAddress : SDLRPCStruct
+
+- (instancetype)initWithSubThoroughfare:(NSString*)subThoroughfare thoroughfare:(NSString*)thoroughfare locality:(NSString*)locality administrativeArea:(NSString*)administrativeArea postalCode:(NSString*)postalCode countryCode:(NSString*)countryCode;
+
+- (instancetype)initWithSubThoroughfare:(NSString*)subThoroughfare thoroughfare:(NSString*)thoroughfare locality:(NSString*)locality administrativeArea:(NSString*)administrativeArea postalCode:(NSString*)postalCode countryCode:(NSString*)countryCode countryName:(NSString*)countryName subAdministrativeArea:(NSString*)subAdministrativeArea subLocality:(NSString*)subLocality;
+
+/**
+ * @abstract Name of the country (localized)
+ *
+ * Optional, max length = 200
+ */
+@property (copy, nonatomic) NSString *countryName;
+
+/**
+ * @abstract countryCode of the country(ISO 3166-2)
+ *
+ * Optional, max length = 200
+ */
+@property (copy, nonatomic) NSString *countryCode;
+
+/**
+ * @abstract postalCode of location (PLZ, ZIP, PIN, CAP etc.)
+ *
+ * Optional, max length = 200
+ */
+@property (copy, nonatomic) NSString *postalCode;
+
+/**
+ * @abstract Portion of country (e.g. state)
+ *
+ * Optional, max length = 200
+ */
+@property (copy, nonatomic) NSString *administrativeArea;
+
+/**
+ * @abstract Portion of administrativeArea (e.g. county)
+ *
+ * Optional, max length = 200
+ */
+@property (copy, nonatomic) NSString *subAdministrativeArea;
+
+/**
+ * @abstract Hypernym for city/village
+ *
+ * Optional, max length = 200
+ */
+@property (copy, nonatomic) NSString *locality;
+
+/**
+ * @abstract Hypernym for district
+ *
+ * Optional, max length = 200
+ */
+@property (copy, nonatomic) NSString *subLocality;
+
+/**
+ * @abstract Hypernym for street, road etc.
+ *
+ * Optional, max length = 200
+ */
+@property (copy, nonatomic) NSString *thoroughfare;
+
+/**
+ * @abstract Portion of thoroughfare (e.g. house number)
+ *
+ * Optional, max length = 200
+ */
+@property (copy, nonatomic) NSString *subThoroughfare;
+
+@end
diff --git a/SmartDeviceLink/SDLOasisAddress.m b/SmartDeviceLink/SDLOasisAddress.m
new file mode 100644
index 000000000..f674fef86
--- /dev/null
+++ b/SmartDeviceLink/SDLOasisAddress.m
@@ -0,0 +1,141 @@
+// SDLOasisAddress.m
+//
+
+#import "SDLOasisAddress.h"
+#import "SDLNames.h"
+
+@implementation SDLOasisAddress
+
+- (instancetype)initWithSubThoroughfare:(NSString*)subThoroughfare thoroughfare:(NSString*)thoroughfare locality:(NSString*)locality administrativeArea:(NSString*)administrativeArea postalCode:(NSString*)postalCode countryCode:(NSString*)countryCode {
+ return [self initWithSubThoroughfare:subThoroughfare thoroughfare:thoroughfare locality:locality administrativeArea:administrativeArea postalCode:postalCode countryCode:countryCode countryName:nil subAdministrativeArea:nil subLocality:nil];
+}
+
+- (instancetype)initWithSubThoroughfare:(NSString*)subThoroughfare thoroughfare:(NSString*)thoroughfare locality:(NSString*)locality administrativeArea:(NSString*)administrativeArea postalCode:(NSString*)postalCode countryCode:(NSString*)countryCode countryName:(NSString*)countryName subAdministrativeArea:(NSString*)subAdministrativeArea subLocality:(NSString*)subLocality {
+ self = [self init];
+ if (!self) {
+ return nil;
+ }
+
+ self.subThoroughfare = subThoroughfare;
+ self.thoroughfare = thoroughfare;
+ self.locality = locality;
+ self.administrativeArea = administrativeArea;
+ self.postalCode = postalCode;
+ self.countryCode = countryCode;
+ self.countryName = countryName;
+ self.subAdministrativeArea = subAdministrativeArea;
+ self.subLocality = subLocality;
+
+ return self;
+}
+
+
+- (void)setCountryName:(NSString *)countryName {
+ if (countryName != nil) {
+ store[NAMES_countryName] = countryName;
+ } else {
+ [store removeObjectForKey:NAMES_countryName];
+ }
+}
+
+- (NSString *)countryName {
+ return store[NAMES_countryName];
+}
+
+- (void)setCountryCode:(NSString *)countryCode {
+ if (countryCode != nil) {
+ store[NAMES_countryCode] = countryCode;
+ } else {
+ [store removeObjectForKey:NAMES_countryCode];
+ }
+}
+
+- (NSString *)countryCode {
+ return store[NAMES_countryCode];
+}
+
+- (void)setPostalCode:(NSString *)postalCode {
+ if (postalCode != nil) {
+ store[NAMES_postalCode] = postalCode;
+ } else {
+ [store removeObjectForKey:NAMES_postalCode];
+ }
+}
+
+- (NSString *)postalCode {
+ return store[NAMES_postalCode];
+}
+
+- (void)setAdministrativeArea:(NSString *)administrativeArea {
+ if (administrativeArea != nil) {
+ store[NAMES_administrativeArea] = administrativeArea;
+ } else {
+ [store removeObjectForKey:NAMES_administrativeArea];
+ }
+}
+
+- (NSString *)administrativeArea {
+ return store[NAMES_administrativeArea];
+}
+
+- (void)setSubAdministrativeArea:(NSString *)subAdministrativeArea {
+ if (subAdministrativeArea != nil) {
+ store[NAMES_subAdministrativeArea] = subAdministrativeArea;
+ } else {
+ [store removeObjectForKey:NAMES_subAdministrativeArea];
+ }
+}
+
+- (NSString *)subAdministrativeArea {
+ return store[NAMES_subAdministrativeArea];
+}
+
+- (void)setLocality:(NSString *)locality {
+ if (locality != nil) {
+ store[NAMES_locality] = locality;
+ } else {
+ [store removeObjectForKey:NAMES_locality];
+ }
+}
+
+- (NSString *)locality {
+ return store[NAMES_locality];
+}
+
+- (void)setSubLocality:(NSString *)subLocality {
+ if (subLocality != nil) {
+ store[NAMES_subLocality] = subLocality;
+ } else {
+ [store removeObjectForKey:NAMES_subLocality];
+ }
+}
+
+- (NSString *)subLocality {
+ return store[NAMES_subLocality];
+}
+
+- (void)setThoroughfare:(NSString *)thoroughfare {
+ if (thoroughfare != nil) {
+ store[NAMES_thoroughfare] = thoroughfare;
+ } else {
+ [store removeObjectForKey:NAMES_thoroughfare];
+ }
+}
+
+- (NSString *)thoroughfare {
+ return store[NAMES_thoroughfare];
+}
+
+- (void)setSubThoroughfare:(NSString *)subThoroughfare {
+ if (subThoroughfare != nil) {
+ store[NAMES_subThoroughfare] = subThoroughfare;
+ } else {
+ [store removeObjectForKey:NAMES_subThoroughfare];
+ }
+}
+
+- (NSString *)subThoroughfare {
+ return store[NAMES_subThoroughfare];
+}
+
+@end
diff --git a/SmartDeviceLink/SDLProtocolHeader.m b/SmartDeviceLink/SDLProtocolHeader.m
index f0293f420..65e025c61 100644
--- a/SmartDeviceLink/SDLProtocolHeader.m
+++ b/SmartDeviceLink/SDLProtocolHeader.m
@@ -65,4 +65,4 @@
}
}
-@end \ No newline at end of file
+@end
diff --git a/SmartDeviceLink/SDLSendLocation.h b/SmartDeviceLink/SDLSendLocation.h
index 0b7a77a19..0cdb492fd 100644
--- a/SmartDeviceLink/SDLSendLocation.h
+++ b/SmartDeviceLink/SDLSendLocation.h
@@ -2,33 +2,34 @@
// SDLSendLocation.h
// SmartDeviceLink
+#import "SDLRPCRequest.h"
+
#import <CoreGraphics/CGBase.h>
-#import <Foundation/Foundation.h>
+#import "SDLDateTime.h"
+#import "SDLDeliveryMode.h"
#import "SDLImage.h"
-#import "SDLRPCRequest.h"
-
+#import "SDLOasisAddress.h"
@interface SDLSendLocation : SDLRPCRequest
-- (instancetype)init;
-- (instancetype)initWithDictionary:(NSMutableDictionary *)dict;
+- (instancetype)initWithLongitude:(double)longitude latitude:(double)latitude locationName:(NSString *)locationName locationDescription:(NSString *)locationDescription address:(NSArray<NSString *> *)address phoneNumber:(NSString *)phoneNumber image:(SDLImage *)image;
-- (instancetype)initWithLongitude:(CGFloat)longitude latitude:(CGFloat)latitude locationName:(NSString *)locationName locationDescription:(NSString *)locationDescription address:(NSArray<NSString *> *)address phoneNumber:(NSString *)phoneNumber image:(SDLImage *)image;
+- (instancetype)initWithLongitude:(double)longitude latitude:(double)latitude locationName:(NSString *)locationName locationDescription:(NSString *)locationDescription displayAddressLines:(NSArray<NSString *> *)displayAddressLines phoneNumber:(NSString *)phoneNumber image:(SDLImage *)image deliveryMode:(SDLDeliveryMode *)deliveryMode timeStamp:(SDLDateTime *)timeStamp address:(SDLOasisAddress*)address;
/**
* The longitudinal coordinate of the location.
*
* Float, Required, -180.0 - 180.0
*/
-@property (copy, nonatomic) NSNumber *longitudeDegrees;
+@property (copy, nonatomic) NSNumber<SDLFloat> *longitudeDegrees;
/**
* The latitudinal coordinate of the location.
*
* Float, Required, -90.0 - 90.0
*/
-@property (copy, nonatomic) NSNumber *latitudeDegrees;
+@property (copy, nonatomic) NSNumber<SDLFloat> *latitudeDegrees;
/**
* Name / title of intended location
@@ -45,11 +46,11 @@
@property (copy, nonatomic) NSString *locationDescription;
/**
- * Array of lines for the location address
+ * Location address for display purposes only
*
* Contains String, Optional, Max Array Length = 4, Max String Length = 500
*/
-@property (copy, nonatomic) NSArray *addressLines;
+@property (copy, nonatomic) NSArray<NSString *> *addressLines;
/**
* Phone number of intended location / establishment
@@ -65,4 +66,25 @@
*/
@property (strong, nonatomic) SDLImage *locationImage;
+/**
+ * Mode in which the sendLocation request is sent
+ *
+ * Optional
+ */
+@property (strong, nonatomic) SDLDeliveryMode *deliveryMode;
+
+/**
+ * Arrival time of Location. If multiple SendLocations are sent, this will be used for sorting as well.
+ *
+ * Optional
+ */
+@property (strong, nonatomic) SDLDateTime *timeStamp;
+
+/**
+ * Address to be used for setting destination
+ *
+ * Optional
+ */
+@property (strong, nonatomic) SDLOasisAddress *address;
+
@end
diff --git a/SmartDeviceLink/SDLSendLocation.m b/SmartDeviceLink/SDLSendLocation.m
index 83a420ccc..6cd5787bb 100644
--- a/SmartDeviceLink/SDLSendLocation.m
+++ b/SmartDeviceLink/SDLSendLocation.m
@@ -18,33 +18,31 @@
return self;
}
-- (instancetype)initWithDictionary:(NSMutableDictionary *)dict {
- self = [super initWithDictionary:dict];
- if (!self) {
- return nil;
- }
-
- return self;
+- (instancetype)initWithLongitude:(double)longitude latitude:(double)latitude locationName:(NSString *)locationName locationDescription:(NSString *)locationDescription address:(NSArray<NSString *> *)address phoneNumber:(NSString *)phoneNumber image:(SDLImage *)image {
+ return [self initWithLongitude:longitude latitude:latitude locationName:locationName locationDescription:locationDescription displayAddressLines:address phoneNumber:phoneNumber image:image deliveryMode:nil timeStamp:nil address:nil];
}
-- (instancetype)initWithLongitude:(CGFloat)longitude latitude:(CGFloat)latitude locationName:(NSString *)locationName locationDescription:(NSString *)locationDescription address:(NSArray *)address phoneNumber:(NSString *)phoneNumber image:(SDLImage *)image {
+- (instancetype)initWithLongitude:(double)longitude latitude:(double)latitude locationName:(NSString *)locationName locationDescription:(NSString *)locationDescription displayAddressLines:(NSArray<NSString *> *)displayAddressLines phoneNumber:(NSString *)phoneNumber image:(SDLImage *)image deliveryMode:(SDLDeliveryMode *)deliveryMode timeStamp:(SDLDateTime *)timeStamp address:(SDLOasisAddress*)address {
self = [self init];
if (!self) {
return nil;
}
-
+
self.longitudeDegrees = @(longitude);
self.latitudeDegrees = @(latitude);
self.locationName = locationName;
self.locationDescription = locationDescription;
- self.addressLines = address;
+ self.addressLines = displayAddressLines;
self.phoneNumber = phoneNumber;
self.locationImage = image;
-
+ self.deliveryMode = deliveryMode;
+ self.timeStamp = timeStamp;
+ self.address = address;
+
return self;
}
-- (void)setLongitudeDegrees:(NSNumber *)longitudeDegrees {
+- (void)setLongitudeDegrees:(NSNumber<SDLFloat> *)longitudeDegrees {
if (longitudeDegrees != nil) {
parameters[NAMES_longitudeDegrees] = longitudeDegrees;
} else {
@@ -52,11 +50,11 @@
}
}
-- (NSNumber *)longitudeDegrees {
+- (NSNumber<SDLFloat> *)longitudeDegrees {
return parameters[NAMES_longitudeDegrees];
}
-- (void)setLatitudeDegrees:(NSNumber *)latitudeDegrees {
+- (void)setLatitudeDegrees:(NSNumber<SDLFloat> *)latitudeDegrees {
if (latitudeDegrees != nil) {
parameters[NAMES_latitudeDegrees] = latitudeDegrees;
} else {
@@ -64,7 +62,7 @@
}
}
-- (NSNumber *)latitudeDegrees {
+- (NSNumber<SDLFloat> *)latitudeDegrees {
return parameters[NAMES_latitudeDegrees];
}
@@ -133,4 +131,55 @@
}
}
+- (void)setDeliveryMode:(SDLDeliveryMode *)deliveryMode {
+ if (deliveryMode != nil) {
+ parameters[NAMES_deliveryMode] = deliveryMode;
+ } else {
+ [parameters removeObjectForKey:NAMES_deliveryMode];
+ }
+}
+
+- (SDLDeliveryMode *)deliveryMode {
+ NSObject *obj = [parameters objectForKey:NAMES_deliveryMode];
+ if (obj == nil || [obj isKindOfClass:SDLDeliveryMode.class]) {
+ return (SDLDeliveryMode *)obj;
+ } else {
+ return [SDLDeliveryMode valueOf:(NSString *)obj];
+ }
+}
+
+- (void)setTimeStamp:(SDLDateTime *)timeStamp {
+ if (timeStamp != nil) {
+ parameters[NAMES_timeStamp] = timeStamp;
+ } else {
+ [parameters removeObjectForKey:NAMES_timeStamp];
+ }
+}
+
+- (SDLDateTime *)timeStamp {
+ id obj = parameters[NAMES_timeStamp];
+ if (obj == nil || [obj isKindOfClass:[SDLDateTime class]]) {
+ return (SDLDateTime *)obj;
+ } else {
+ return [[SDLDateTime alloc] initWithDictionary:obj];
+ }
+}
+
+- (void)setAddress:(SDLOasisAddress *)address {
+ if (address != nil) {
+ parameters[NAMES_address] = address;
+ } else {
+ [parameters removeObjectForKey:NAMES_address];
+ }
+}
+
+- (SDLOasisAddress *)address {
+ id obj = [parameters objectForKey:NAMES_address];
+ if (obj == nil || [obj isKindOfClass:[SDLOasisAddress class]]) {
+ return (SDLOasisAddress *)obj;
+ } else {
+ return [[SDLOasisAddress alloc] initWithDictionary:obj];
+ }
+}
+
@end
diff --git a/SmartDeviceLink/SmartDeviceLink.h b/SmartDeviceLink/SmartDeviceLink.h
index f2a6613cb..d3bab7209 100644
--- a/SmartDeviceLink/SmartDeviceLink.h
+++ b/SmartDeviceLink/SmartDeviceLink.h
@@ -179,6 +179,7 @@ FOUNDATION_EXPORT const unsigned char SmartDeviceLinkVersionString[];
#import "SDLButtonCapabilities.h"
#import "SDLChoice.h"
#import "SDLClusterModeStatus.h"
+#import "SDLDateTime.h"
#import "SDLDIDResult.h"
#import "SDLDeviceInfo.h"
#import "SDLDeviceStatus.h"
@@ -231,6 +232,7 @@ FOUNDATION_EXPORT const unsigned char SmartDeviceLinkVersionString[];
#import "SDLCharacterSet.h"
#import "SDLCompassDirection.h"
#import "SDLComponentVolumeStatus.h"
+#import "SDLDeliveryMode.h"
#import "SDLDeviceLevelStatus.h"
#import "SDLDimension.h"
#import "SDLDisplayType.h"
diff --git a/SmartDeviceLinkTests/RPCSpecs/EnumSpecs/SDLDeliveryModeSpec.m b/SmartDeviceLinkTests/RPCSpecs/EnumSpecs/SDLDeliveryModeSpec.m
new file mode 100644
index 000000000..c569c5ff5
--- /dev/null
+++ b/SmartDeviceLinkTests/RPCSpecs/EnumSpecs/SDLDeliveryModeSpec.m
@@ -0,0 +1,55 @@
+// SDLDeliverModeSpec.m
+//
+
+#import <Foundation/Foundation.h>
+
+#import <Quick/Quick.h>
+#import <Nimble/Nimble.h>
+
+#import "SDLDeliveryMode.h"
+
+QuickSpecBegin(SDLDeliveryModeSpec)
+
+describe(@"Individual Enum Value Tests", ^ {
+ it(@"Should match internal values", ^ {
+ expect([SDLDeliveryMode PROMPT].value).to(equal(@"PROMPT"));
+ expect([SDLDeliveryMode DESTINATION].value).to(equal(@"DESTINATION"));
+ expect([SDLDeliveryMode QUEUE].value).to(equal(@"QUEUE"));
+ });
+});
+describe(@"ValueOf Tests", ^ {
+ it(@"Should return correct values when valid", ^ {
+ expect([SDLDeliveryMode valueOf:@"PROMPT"]).to(equal([SDLDeliveryMode PROMPT]));
+ expect([SDLDeliveryMode valueOf:@"DESTINATION"]).to(equal([SDLDeliveryMode DESTINATION]));
+ expect([SDLDeliveryMode valueOf:@"QUEUE"]).to(equal([SDLDeliveryMode QUEUE]));
+ });
+
+ it(@"Should return nil when invalid", ^ {
+ expect([SDLDeliveryMode valueOf:nil]).to(beNil());
+ expect([SDLDeliveryMode valueOf:@"JKUYTFHYTHJGFRFGYTR"]).to(beNil());
+ });
+});
+describe(@"Value List Tests", ^ {
+ NSArray* storedValues = [SDLDeliveryMode values];
+ __block NSArray* definedValues;
+ beforeSuite(^ {
+ definedValues = [@[[SDLDeliveryMode PROMPT],
+ [SDLDeliveryMode DESTINATION],
+ [SDLDeliveryMode QUEUE],
+ ] copy];
+ });
+
+ it(@"Should contain all defined enum values", ^ {
+ for (int i = 0; i < definedValues.count; i++) {
+ expect(storedValues).to(contain(definedValues[i]));
+ }
+ });
+
+ it(@"Should contain only defined enum values", ^ {
+ for (int i = 0; i < storedValues.count; i++) {
+ expect(definedValues).to(contain(storedValues[i]));
+ }
+ });
+});
+
+QuickSpecEnd
diff --git a/SmartDeviceLinkTests/RPCSpecs/EnumSpecs/SDLDisplayTypeSpec.m b/SmartDeviceLinkTests/RPCSpecs/EnumSpecs/SDLDisplayTypeSpec.m
index 964736fbc..eaa44c2d3 100644
--- a/SmartDeviceLinkTests/RPCSpecs/EnumSpecs/SDLDisplayTypeSpec.m
+++ b/SmartDeviceLinkTests/RPCSpecs/EnumSpecs/SDLDisplayTypeSpec.m
@@ -23,8 +23,8 @@ describe(@"Individual Enum Value Tests", ^ {
expect([SDLDisplayType MFD3].value).to(equal(@"MFD3"));
expect([SDLDisplayType MFD4].value).to(equal(@"MFD4"));
expect([SDLDisplayType MFD5].value).to(equal(@"MFD5"));
- //NOT DEFINED IN SPEC
expect([SDLDisplayType GEN3_8_INCH].value).to(equal(@"GEN3_8-INCH"));
+ expect([SDLDisplayType GENERIC].value).to(equal(@"SDL_GENERIC"));
});
});
describe(@"ValueOf Tests", ^ {
@@ -38,8 +38,8 @@ describe(@"ValueOf Tests", ^ {
expect([SDLDisplayType valueOf:@"MFD3"]).to(equal([SDLDisplayType MFD3]));
expect([SDLDisplayType valueOf:@"MFD4"]).to(equal([SDLDisplayType MFD4]));
expect([SDLDisplayType valueOf:@"MFD5"]).to(equal([SDLDisplayType MFD5]));
- //NOT DEFINED IN SPEC
expect([SDLDisplayType valueOf:@"GEN3_8-INCH"]).to(equal([SDLDisplayType GEN3_8_INCH]));
+ expect([SDLDisplayType valueOf:@"SDL_GENERIC"]).to(equal([SDLDisplayType GENERIC]));
});
it(@"Should return nil when invalid", ^ {
@@ -60,8 +60,8 @@ describe(@"Value List Tests", ^ {
[SDLDisplayType MFD3],
[SDLDisplayType MFD4],
[SDLDisplayType MFD5],
- //NOT DEFINED IN SPEC
- [SDLDisplayType GEN3_8_INCH]] copy];
+ [SDLDisplayType GEN3_8_INCH],
+ [SDLDisplayType GENERIC]] copy];
});
it(@"Should contain all defined enum values", ^ {
@@ -77,4 +77,4 @@ describe(@"Value List Tests", ^ {
});
});
-QuickSpecEnd \ No newline at end of file
+QuickSpecEnd
diff --git a/SmartDeviceLinkTests/RPCSpecs/RequestSpecs/SDLSendLocationSpec.m b/SmartDeviceLinkTests/RPCSpecs/RequestSpecs/SDLSendLocationSpec.m
index ccd4bafdb..65b068843 100644
--- a/SmartDeviceLinkTests/RPCSpecs/RequestSpecs/SDLSendLocationSpec.m
+++ b/SmartDeviceLinkTests/RPCSpecs/RequestSpecs/SDLSendLocationSpec.m
@@ -20,6 +20,9 @@ describe(@"Send Location RPC", ^{
__block NSArray *someAddressLines = nil;
__block NSString *somePhoneNumber = nil;
__block SDLImage *someImage = nil;
+ __block SDLDeliveryMode *someDeliveryMode = nil;
+ __block SDLDateTime* someTime = nil;
+ __block SDLOasisAddress* someAddress = nil;
describe(@"when initialized with init", ^{
beforeEach(^{
@@ -35,6 +38,9 @@ describe(@"Send Location RPC", ^{
someAddressLines = @[@"3136 Hilton Rd", @"Ferndale, MI", @"48220"];
somePhoneNumber = @"248-591-0333";
someImage = [[SDLImage alloc] init];
+ someDeliveryMode = [SDLDeliveryMode PROMPT];
+ someTime = [[SDLDateTime alloc] init];
+ someAddress = [[SDLOasisAddress alloc] init];
testRequest.longitudeDegrees = someLongitude;
testRequest.latitudeDegrees = someLatitude;
@@ -43,6 +49,9 @@ describe(@"Send Location RPC", ^{
testRequest.addressLines = someAddressLines;
testRequest.phoneNumber = somePhoneNumber;
testRequest.locationImage = someImage;
+ testRequest.deliveryMode = someDeliveryMode;
+ testRequest.timeStamp = someTime;
+ testRequest.address = someAddress;
});
// Since all the properties are immutable, a copy should be executed as a retain, which means they should be identical
@@ -80,6 +89,21 @@ describe(@"Send Location RPC", ^{
expect(testRequest.locationImage).to(equal(someImage));
expect(testRequest.locationImage).to(beIdenticalTo(someImage));
});
+
+ it(@"should get delivery mode correctly", ^{
+ expect(testRequest.deliveryMode).to(equal(someDeliveryMode));
+ expect(testRequest.deliveryMode).to(beIdenticalTo(someDeliveryMode));
+ });
+
+ it(@"should get timestamp correctly", ^{
+ expect(testRequest.timeStamp).to(equal(someTime));
+ expect(testRequest.timeStamp).to(beIdenticalTo(someTime));
+ });
+
+ it(@"should get address correctly", ^{
+ expect(testRequest.address).to(equal(someAddress));
+ expect(testRequest.address).to(beIdenticalTo(someAddress));
+ });
});
context(@"when parameters are not set", ^{
@@ -110,6 +134,18 @@ describe(@"Send Location RPC", ^{
it(@"should return nil for image", ^{
expect(testRequest.locationImage).to(beNil());
});
+
+ it(@"should return nil for delivery mode", ^{
+ expect(testRequest.deliveryMode).to(beNil());
+ });
+
+ it(@"should return nil for timeStamp", ^{
+ expect(testRequest.timeStamp).to(beNil());
+ });
+
+ it(@"should return nil for address", ^{
+ expect(testRequest.address).to(beNil());
+ });
});
});
@@ -123,6 +159,9 @@ describe(@"Send Location RPC", ^{
someAddressLines = @[@"3136 Hilton Rd", @"Ferndale, MI", @"48220"];
somePhoneNumber = @"248-591-0333";
someImage = [[SDLImage alloc] init];
+ someDeliveryMode = [SDLDeliveryMode PROMPT];
+ someTime = [[SDLDateTime alloc] init];
+ someAddress = [[SDLOasisAddress alloc] init];
NSDictionary *initDict = @{
NAMES_request: @{
NAMES_parameters: @{
@@ -132,7 +171,10 @@ describe(@"Send Location RPC", ^{
NAMES_locationDescription: someLocationDescription,
NAMES_addressLines: someAddressLines,
NAMES_phoneNumber: somePhoneNumber,
- NAMES_locationImage: someImage
+ NAMES_locationImage: someImage,
+ NAMES_deliveryMode: someDeliveryMode,
+ NAMES_timeStamp: someTime,
+ NAMES_address: someAddress
}
}
};
@@ -175,6 +217,21 @@ describe(@"Send Location RPC", ^{
expect(testRequest.locationImage).to(equal(someImage));
expect(testRequest.locationImage).to(beIdenticalTo(someImage));
});
+
+ it(@"should get delivery mode correctly", ^{
+ expect(testRequest.deliveryMode).to(equal(someDeliveryMode));
+ expect(testRequest.deliveryMode).to(beIdenticalTo(someDeliveryMode));
+ });
+
+ it(@"should get timestamp correctly", ^{
+ expect(testRequest.timeStamp).to(equal(someTime));
+ expect(testRequest.timeStamp).to(beIdenticalTo(someTime));
+ });
+
+ it(@"should get address correctly", ^{
+ expect(testRequest.address).to(equal(someAddress));
+ expect(testRequest.address).to(beIdenticalTo(someAddress));
+ });
});
context(@"when parameters are not set", ^{
@@ -215,6 +272,18 @@ describe(@"Send Location RPC", ^{
it(@"should return nil for image", ^{
expect(testRequest.locationImage).to(beNil());
});
+
+ it(@"should return nil for delivery mode", ^{
+ expect(testRequest.deliveryMode).to(beNil());
+ });
+
+ it(@"should return nil for timeStamp", ^{
+ expect(testRequest.timeStamp).to(beNil());
+ });
+
+ it(@"should return nil for address", ^{
+ expect(testRequest.address).to(beNil());
+ });
});
});
});
diff --git a/SmartDeviceLinkTests/RPCSpecs/StructSpecs/SDLDateTimeSpec.m b/SmartDeviceLinkTests/RPCSpecs/StructSpecs/SDLDateTimeSpec.m
new file mode 100644
index 000000000..3aee83e11
--- /dev/null
+++ b/SmartDeviceLinkTests/RPCSpecs/StructSpecs/SDLDateTimeSpec.m
@@ -0,0 +1,82 @@
+//
+// SDLDateTimeSpec.m
+// SmartDeviceLink-iOS
+//
+// Created by Muller, Alexander (A.) on 11/1/16.
+// Copyright © 2016 smartdevicelink. All rights reserved.
+//
+
+#import <Foundation/Foundation.h>
+
+#import <Quick/Quick.h>
+#import <Nimble/Nimble.h>
+
+#import "SDLDateTime.h"
+#import "SDLNames.h"
+
+QuickSpecBegin(SDLDateTimeSpec)
+
+describe(@"Getter/Setter Tests", ^ {
+ it(@"Should set and get correctly", ^ {
+ SDLDateTime* testStruct = [[SDLDateTime alloc] init];
+
+ testStruct.millisecond = @100;
+ testStruct.second = @4;
+ testStruct.minute = @12;
+ testStruct.hour = @20;
+ testStruct.day = @30;
+ testStruct.month = @1;
+ testStruct.year = @4000;
+ testStruct.timezoneMinuteOffset = @0;
+ testStruct.timezoneHourOffset = @1000;
+
+ expect(testStruct.millisecond).to(equal(@100));
+ expect(testStruct.second).to(equal(@4));
+ expect(testStruct.minute).to(equal(@12));
+ expect(testStruct.hour).to(equal(@20));
+ expect(testStruct.day).to(equal(@30));
+ expect(testStruct.month).to(equal(@1));
+ expect(testStruct.year).to(equal(@4000));
+ expect(testStruct.timezoneMinuteOffset).to(equal(@0));
+ expect(testStruct.timezoneHourOffset).to(equal(@1000));
+ });
+
+ it(@"Should get correctly when initialized with dictionary", ^{
+ NSMutableDictionary* dict = [@{NAMES_millisecond:@100,
+ NAMES_second:@4,
+ NAMES_minute:@12,
+ NAMES_hour:@20,
+ NAMES_day:@30,
+ NAMES_month:@1,
+ NAMES_year:@4000,
+ NAMES_timezoneMinuteOffset:@0,
+ NAMES_timezoneHourOffset:@1000} mutableCopy];
+ SDLDateTime* testStruct = [[SDLDateTime alloc] initWithDictionary:dict];
+
+ expect(testStruct.millisecond).to(equal(@100));
+ expect(testStruct.second).to(equal(@4));
+ expect(testStruct.minute).to(equal(@12));
+ expect(testStruct.hour).to(equal(@20));
+ expect(testStruct.day).to(equal(@30));
+ expect(testStruct.month).to(equal(@1));
+ expect(testStruct.year).to(equal(@4000));
+ expect(testStruct.timezoneMinuteOffset).to(equal(@0));
+ expect(testStruct.timezoneHourOffset).to(equal(@1000));
+ });
+
+ it(@"Should return nil if not set", ^ {
+ SDLDateTime* testStruct = [[SDLDateTime alloc] init];
+
+ expect(testStruct.millisecond).to(beNil());
+ expect(testStruct.second).to(beNil());
+ expect(testStruct.minute).to(beNil());
+ expect(testStruct.hour).to(beNil());
+ expect(testStruct.day).to(beNil());
+ expect(testStruct.month).to(beNil());
+ expect(testStruct.year).to(beNil());
+ expect(testStruct.timezoneMinuteOffset).to(beNil());
+ expect(testStruct.timezoneHourOffset).to(beNil());
+ });
+});
+
+QuickSpecEnd
diff --git a/SmartDeviceLinkTests/RPCSpecs/StructSpecs/SDLOasisAddressSpec.m b/SmartDeviceLinkTests/RPCSpecs/StructSpecs/SDLOasisAddressSpec.m
new file mode 100644
index 000000000..a1de08e68
--- /dev/null
+++ b/SmartDeviceLinkTests/RPCSpecs/StructSpecs/SDLOasisAddressSpec.m
@@ -0,0 +1,78 @@
+// SDLOasisAddressSpec.m
+//
+
+#import <Foundation/Foundation.h>
+
+#import <Quick/Quick.h>
+#import <Nimble/Nimble.h>
+
+#import "SDLOasisAddress.h"
+#import "SDLNames.h"
+
+QuickSpecBegin(SDLOasisAddressSpec)
+
+describe(@"Getter/Setter Tests", ^ {
+ it(@"Should set and get correctly", ^ {
+ SDLOasisAddress* testStruct = [[SDLOasisAddress alloc] init];
+
+ testStruct.countryName = @"United States";
+ testStruct.countryCode = @"US";
+ testStruct.postalCode = @"123456";
+ testStruct.administrativeArea = @"CA";
+ testStruct.subAdministrativeArea = @"Santa Clara";
+ testStruct.locality = @"Palo Alto";
+ testStruct.subLocality = @"18";
+ testStruct.thoroughfare = @"Candy Lane";
+ testStruct.subThoroughfare = @"123";
+
+ expect(testStruct.countryName).to(equal(@"United States"));
+ expect(testStruct.countryCode).to(equal(@"US"));
+ expect(testStruct.postalCode).to(equal(@"123456"));
+ expect(testStruct.administrativeArea).to(equal(@"CA"));
+ expect(testStruct.subAdministrativeArea).to(equal(@"Santa Clara"));
+ expect(testStruct.locality).to(equal(@"Palo Alto"));
+ expect(testStruct.subLocality).to(equal(@"18"));
+ expect(testStruct.thoroughfare).to(equal(@"Candy Lane"));
+ expect(testStruct.subThoroughfare).to(equal(@"123"));
+
+ });
+
+ it(@"Should get correctly when initialized", ^ {
+ NSMutableDictionary* dict = [@{NAMES_countryName:@"United States",
+ NAMES_countryCode:@"US",
+ NAMES_postalCode:@"123456",
+ NAMES_administrativeArea:@"CA",
+ NAMES_subAdministrativeArea:@"Santa Clara",
+ NAMES_locality:@"Palo Alto",
+ NAMES_subLocality:@"18",
+ NAMES_thoroughfare:@"Candy Lane",
+ NAMES_subThoroughfare:@"123"} mutableCopy];
+ SDLOasisAddress* testStruct = [[SDLOasisAddress alloc] initWithDictionary:dict];
+
+ expect(testStruct.countryName).to(equal(@"United States"));
+ expect(testStruct.countryCode).to(equal(@"US"));
+ expect(testStruct.postalCode).to(equal(@"123456"));
+ expect(testStruct.administrativeArea).to(equal(@"CA"));
+ expect(testStruct.subAdministrativeArea).to(equal(@"Santa Clara"));
+ expect(testStruct.locality).to(equal(@"Palo Alto"));
+ expect(testStruct.subLocality).to(equal(@"18"));
+ expect(testStruct.thoroughfare).to(equal(@"Candy Lane"));
+ expect(testStruct.subThoroughfare).to(equal(@"123"));
+ });
+
+ it(@"Should return nil if not set", ^ {
+ SDLOasisAddress* testStruct = [[SDLOasisAddress alloc] init];
+
+ expect(testStruct.countryName).to(beNil());
+ expect(testStruct.countryCode).to(beNil());
+ expect(testStruct.postalCode).to(beNil());
+ expect(testStruct.administrativeArea).to(beNil());
+ expect(testStruct.subAdministrativeArea).to(beNil());
+ expect(testStruct.locality).to(beNil());
+ expect(testStruct.subLocality).to(beNil());
+ expect(testStruct.thoroughfare).to(beNil());
+ expect(testStruct.subThoroughfare).to(beNil());
+ });
+});
+
+QuickSpecEnd