summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMuller, Alexander (A.) <amulle19@ford.com>2016-11-04 09:48:44 -0700
committerMuller, Alexander (A.) <amulle19@ford.com>2016-11-04 09:48:44 -0700
commitff9847e17a9ccb62264c4723b9d3871279ae4866 (patch)
tree5decd4db8966758b0425c2fab2c59e9a9c8f53e2
parentc46ffa7e3108df1f001149d4b4f81f5d3011fb6b (diff)
downloadsdl_ios-ff9847e17a9ccb62264c4723b9d3871279ae4866.tar.gz
Added additional initializer for SendLocation
-rw-r--r--SmartDeviceLink/SDLSendLocation.h2
-rw-r--r--SmartDeviceLink/SDLSendLocation.m13
2 files changed, 12 insertions, 3 deletions
diff --git a/SmartDeviceLink/SDLSendLocation.h b/SmartDeviceLink/SDLSendLocation.h
index d88f97189..33baeb50c 100644
--- a/SmartDeviceLink/SDLSendLocation.h
+++ b/SmartDeviceLink/SDLSendLocation.h
@@ -15,6 +15,8 @@
- (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:(CGFloat)longitude latitude:(CGFloat)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.
*
diff --git a/SmartDeviceLink/SDLSendLocation.m b/SmartDeviceLink/SDLSendLocation.m
index 07b04bb53..258e6eec2 100644
--- a/SmartDeviceLink/SDLSendLocation.m
+++ b/SmartDeviceLink/SDLSendLocation.m
@@ -19,19 +19,26 @@
}
- (instancetype)initWithLongitude:(CGFloat)longitude latitude:(CGFloat)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 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;
}