summaryrefslogtreecommitdiff
path: root/SmartDeviceLink
diff options
context:
space:
mode:
authorMauricio Juarez <mjuarez44@ford.com>2019-07-12 09:08:51 +0200
committerMauricio Juarez <mjuarez44@ford.com>2019-07-12 09:08:51 +0200
commitc5acbbd8ac5fc4dcbcfa726854412cf645bc8bc3 (patch)
treecc0aeaeb0d4c2516cd3cbcc4c7ebe09cece13be2 /SmartDeviceLink
parent2f39597134f5bce8b2eda2870b1ccef53e9e85d4 (diff)
parent2e76407a10b76455b294d6a60db5f89647fbe6bf (diff)
downloadsdl_ios-c5acbbd8ac5fc4dcbcfa726854412cf645bc8bc3.tar.gz
Merge branch 'develop' into feature/issue_0216_widget_support
Diffstat (limited to 'SmartDeviceLink')
-rw-r--r--SmartDeviceLink/SDLCloseApplication.h20
-rw-r--r--SmartDeviceLink/SDLCloseApplication.m27
-rw-r--r--SmartDeviceLink/SDLCloseApplicationResponse.h20
-rw-r--r--SmartDeviceLink/SDLCloseApplicationResponse.m27
-rw-r--r--SmartDeviceLink/SDLFunctionID.m1
-rw-r--r--SmartDeviceLink/SDLGPSData.h9
-rw-r--r--SmartDeviceLink/SDLGPSData.m8
-rw-r--r--SmartDeviceLink/SDLNotificationConstants.h2
-rw-r--r--SmartDeviceLink/SDLNotificationConstants.m3
-rw-r--r--SmartDeviceLink/SDLNotificationDispatcher.m8
-rw-r--r--SmartDeviceLink/SDLProxyListener.h16
-rw-r--r--SmartDeviceLink/SDLRPCFunctionNames.h1
-rw-r--r--SmartDeviceLink/SDLRPCFunctionNames.m1
-rw-r--r--SmartDeviceLink/SDLRPCParameterNames.h1
-rw-r--r--SmartDeviceLink/SDLRPCParameterNames.m1
-rw-r--r--SmartDeviceLink/SmartDeviceLink.h2
16 files changed, 147 insertions, 0 deletions
diff --git a/SmartDeviceLink/SDLCloseApplication.h b/SmartDeviceLink/SDLCloseApplication.h
new file mode 100644
index 000000000..38418e9b0
--- /dev/null
+++ b/SmartDeviceLink/SDLCloseApplication.h
@@ -0,0 +1,20 @@
+//
+// SDLCloseApplication.h
+// SmartDeviceLink
+//
+// Created by Nicole on 7/9/19.
+// Copyright © 2019 smartdevicelink. All rights reserved.
+//
+
+#import "SDLRPCRequest.h"
+
+NS_ASSUME_NONNULL_BEGIN
+
+/**
+ * Used by an app to set itself to a `HMILevel` of `NONE`. The app will close but will still be registered. If the app is a navigation app it will no longer be used as the preferred mobile-navigation application by the module.
+ */
+@interface SDLCloseApplication : SDLRPCRequest
+
+@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLCloseApplication.m b/SmartDeviceLink/SDLCloseApplication.m
new file mode 100644
index 000000000..743a70781
--- /dev/null
+++ b/SmartDeviceLink/SDLCloseApplication.m
@@ -0,0 +1,27 @@
+//
+// SDLCloseApplication.m
+// SmartDeviceLink
+//
+// Created by Nicole on 7/9/19.
+// Copyright © 2019 smartdevicelink. All rights reserved.
+//
+
+#import "SDLCloseApplication.h"
+#import "SDLRPCFunctionNames.h"
+
+NS_ASSUME_NONNULL_BEGIN
+
+@implementation SDLCloseApplication
+
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
+- (instancetype)init {
+ if (self = [super initWithName:SDLRPCFunctionNameCloseApplication]) {
+ }
+ return self;
+}
+#pragma clang diagnostic pop
+
+@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLCloseApplicationResponse.h b/SmartDeviceLink/SDLCloseApplicationResponse.h
new file mode 100644
index 000000000..a7892930a
--- /dev/null
+++ b/SmartDeviceLink/SDLCloseApplicationResponse.h
@@ -0,0 +1,20 @@
+//
+// SDLCloseApplicationResponse.h
+// SmartDeviceLink
+//
+// Created by Nicole on 7/9/19.
+// Copyright © 2019 smartdevicelink. All rights reserved.
+//
+
+#import "SDLRPCResponse.h"
+
+NS_ASSUME_NONNULL_BEGIN
+
+/**
+ * Response to the request to close this app on the module.
+ */
+@interface SDLCloseApplicationResponse : SDLRPCResponse
+
+@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLCloseApplicationResponse.m b/SmartDeviceLink/SDLCloseApplicationResponse.m
new file mode 100644
index 000000000..3c7743177
--- /dev/null
+++ b/SmartDeviceLink/SDLCloseApplicationResponse.m
@@ -0,0 +1,27 @@
+//
+// SDLCloseApplicationResponse.m
+// SmartDeviceLink
+//
+// Created by Nicole on 7/9/19.
+// Copyright © 2019 smartdevicelink. All rights reserved.
+//
+
+#import "SDLCloseApplicationResponse.h"
+#import "SDLRPCFunctionNames.h"
+
+NS_ASSUME_NONNULL_BEGIN
+
+@implementation SDLCloseApplicationResponse
+
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
+- (instancetype)init {
+ if (self = [super initWithName:SDLRPCFunctionNameCloseApplication]) {
+ }
+ return self;
+}
+#pragma clang diagnostic pop
+
+@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLFunctionID.m b/SmartDeviceLink/SDLFunctionID.m
index d90390132..e8e86991a 100644
--- a/SmartDeviceLink/SDLFunctionID.m
+++ b/SmartDeviceLink/SDLFunctionID.m
@@ -88,6 +88,7 @@ NS_ASSUME_NONNULL_BEGIN
@53: SDLRPCFunctionNameGetAppServiceData,
@54: SDLRPCFunctionNameGetFile,
@55: SDLRPCFunctionNamePerformAppServiceInteraction,
+ @58: SDLRPCFunctionNameCloseApplication,
@32768: SDLRPCFunctionNameOnHMIStatus,
@32769: SDLRPCFunctionNameOnAppInterfaceUnregistered,
@32770: SDLRPCFunctionNameOnButtonEvent,
diff --git a/SmartDeviceLink/SDLGPSData.h b/SmartDeviceLink/SDLGPSData.h
index f0bead9f7..417a99ac3 100644
--- a/SmartDeviceLink/SDLGPSData.h
+++ b/SmartDeviceLink/SDLGPSData.h
@@ -151,6 +151,15 @@ NS_ASSUME_NONNULL_BEGIN
*/
@property (nullable, strong, nonatomic) NSNumber<SDLFloat> *speed;
+/**
+ * True, if GPS lat/long, time, and altitude have been purposefully shifted (requires a proprietary algorithm to unshift).
+ * False, if the GPS data is raw and un-shifted.
+ * If not provided, then value is assumed False.
+ *
+ * Optional, BOOL
+ */
+@property (nullable, strong, nonatomic) NSNumber<SDLBool> *shifted;
+
@end
NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLGPSData.m b/SmartDeviceLink/SDLGPSData.m
index e6e68d8e3..e70c6ff32 100644
--- a/SmartDeviceLink/SDLGPSData.m
+++ b/SmartDeviceLink/SDLGPSData.m
@@ -156,6 +156,14 @@ NS_ASSUME_NONNULL_BEGIN
return [self.store sdl_objectForName:SDLRPCParameterNameSpeed ofClass:NSNumber.class error:nil];
}
+- (void)setShifted:(nullable NSNumber<SDLBool> *)shifted {
+ [self.store sdl_setObject:shifted forName:SDLRPCParameterNameShifted];
+}
+
+- (nullable NSNumber<SDLBool> *)shifted {
+ return [self.store sdl_objectForName:SDLRPCParameterNameShifted ofClass:NSNumber.class error:nil];
+}
+
@end
NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLNotificationConstants.h b/SmartDeviceLink/SDLNotificationConstants.h
index e75437551..2430e1473 100644
--- a/SmartDeviceLink/SDLNotificationConstants.h
+++ b/SmartDeviceLink/SDLNotificationConstants.h
@@ -122,6 +122,7 @@ extern SDLNotificationName const SDLDidReceiveAlertResponse;
extern SDLNotificationName const SDLDidReceiveAlertManeuverResponse;
extern SDLNotificationName const SDLDidReceiveButtonPressResponse;
extern SDLNotificationName const SDLDidReceiveChangeRegistrationResponse;
+extern SDLNotificationName const SDLDidReceiveCloseApplicationResponse;
extern SDLNotificationName const SDLDidReceiveCreateInteractionChoiceSetResponse;
extern SDLNotificationName const SDLDidReceiveDeleteCommandResponse;
extern SDLNotificationName const SDLDidReceiveDeleteFileResponse;
@@ -182,6 +183,7 @@ extern SDLNotificationName const SDLDidReceiveAlertRequest;
extern SDLNotificationName const SDLDidReceiveAlertManeuverRequest;
extern SDLNotificationName const SDLDidReceiveButtonPressRequest;
extern SDLNotificationName const SDLDidReceiveChangeRegistrationRequest;
+extern SDLNotificationName const SDLDidReceiveCloseApplicationRequest;
extern SDLNotificationName const SDLDidReceiveCreateInteractionChoiceSetRequest;
extern SDLNotificationName const SDLDidReceiveDeleteCommandRequest;
extern SDLNotificationName const SDLDidReceiveDeleteFileRequest;
diff --git a/SmartDeviceLink/SDLNotificationConstants.m b/SmartDeviceLink/SDLNotificationConstants.m
index 2f88aeed8..9519555a4 100644
--- a/SmartDeviceLink/SDLNotificationConstants.m
+++ b/SmartDeviceLink/SDLNotificationConstants.m
@@ -30,6 +30,7 @@ SDLNotificationName const SDLDidReceiveAlertResponse = @"com.sdl.response.alert"
SDLNotificationName const SDLDidReceiveAlertManeuverResponse = @"com.sdl.response.alertManeuver";
SDLNotificationName const SDLDidReceiveButtonPressResponse = @"com.sdl.response.buttonPress";
SDLNotificationName const SDLDidReceiveChangeRegistrationResponse = @"com.sdl.response.changeRegistration";
+SDLNotificationName const SDLDidReceiveCloseApplicationResponse = @"com.sdl.response.closeApplication";
SDLNotificationName const SDLDidReceiveCreateInteractionChoiceSetResponse = @"com.sdl.response.createInteractionChoiceSet";
SDLNotificationName const SDLDidReceiveDeleteCommandResponse = @"com.sdl.response.deleteCommand";
SDLNotificationName const SDLDidReceiveDeleteFileResponse = @"com.sdl.response.deleteFile";
@@ -87,6 +88,7 @@ SDLNotificationName const SDLDidReceiveAlertRequest = @"com.sdl.request.alert";
SDLNotificationName const SDLDidReceiveAlertManeuverRequest = @"com.sdl.request.alertManeuver";
SDLNotificationName const SDLDidReceiveButtonPressRequest = @"com.sdl.request.buttonPress";
SDLNotificationName const SDLDidReceiveChangeRegistrationRequest = @"com.sdl.request.changeRegistration";
+SDLNotificationName const SDLDidReceiveCloseApplicationRequest = @"com.sdl.request.closeApplication";
SDLNotificationName const SDLDidReceiveCreateInteractionChoiceSetRequest = @"com.sdl.request.createInteractionChoiceSet";
SDLNotificationName const SDLDidReceiveDeleteCommandRequest = @"com.sdl.request.deleteCommand";
SDLNotificationName const SDLDidReceiveDeleteFileRequest = @"com.sdl.request.deleteFile";
@@ -171,6 +173,7 @@ SDLNotificationName const SDLDidReceiveWaypointNotification = @"com.sdl.notifica
SDLDidReceiveAlertManeuverResponse,
SDLDidReceiveButtonPressResponse,
SDLDidReceiveChangeRegistrationResponse,
+ SDLDidReceiveCloseApplicationResponse,
SDLDidReceiveCreateInteractionChoiceSetResponse,
SDLDidReceiveDeleteCommandResponse,
SDLDidReceiveDeleteFileResponse,
diff --git a/SmartDeviceLink/SDLNotificationDispatcher.m b/SmartDeviceLink/SDLNotificationDispatcher.m
index 809f3170f..f5232a194 100644
--- a/SmartDeviceLink/SDLNotificationDispatcher.m
+++ b/SmartDeviceLink/SDLNotificationDispatcher.m
@@ -119,6 +119,10 @@ NS_ASSUME_NONNULL_BEGIN
[self postRPCResponseNotification:SDLDidReceiveChangeRegistrationResponse response:response];
}
+- (void)onCloseApplicationResponse:(SDLCloseApplicationResponse *)response {
+ [self postRPCResponseNotification:SDLDidReceiveCloseApplicationResponse response:response];
+}
+
- (void)onCreateInteractionChoiceSetResponse:(SDLCreateInteractionChoiceSetResponse *)response {
[self postRPCResponseNotification:SDLDidReceiveCreateInteractionChoiceSetResponse response:response];
}
@@ -341,6 +345,10 @@ NS_ASSUME_NONNULL_BEGIN
[self postRPCRequestNotification:SDLDidReceiveChangeRegistrationRequest request:request];
}
+- (void)onCloseApplication:(SDLCloseApplication *)request {
+ [self postRPCRequestNotification:SDLDidReceiveCloseApplicationRequest request:request];
+}
+
- (void)onCreateInteractionChoiceSet:(SDLCreateInteractionChoiceSet *)request {
[self postRPCRequestNotification:SDLDidReceiveCreateInteractionChoiceSetRequest request:request];
}
diff --git a/SmartDeviceLink/SDLProxyListener.h b/SmartDeviceLink/SDLProxyListener.h
index 7625d46a2..ea19fde07 100644
--- a/SmartDeviceLink/SDLProxyListener.h
+++ b/SmartDeviceLink/SDLProxyListener.h
@@ -15,6 +15,8 @@
@class SDLButtonPressResponse;
@class SDLChangeRegistration;
@class SDLChangeRegistrationResponse;
+@class SDLCloseApplication;
+@class SDLCloseApplicationResponse;
@class SDLCreateInteractionChoiceSet;
@class SDLCreateInteractionChoiceSetResponse;
@class SDLDeleteCommand;
@@ -212,6 +214,13 @@ NS_ASSUME_NONNULL_BEGIN
- (void)onChangeRegistrationResponse:(SDLChangeRegistrationResponse *)response;
/**
+ * Called when a `CloseApplication` response is received from Core
+ *
+ * @param response A SDLCloseApplicationResponse object
+ */
+- (void)onCloseApplicationResponse:(SDLCloseApplicationResponse *)response;
+
+/**
* Called when a Create Interaction Choice Set Response is received from Core
*
* @param response A SDLCreateInteractionChoiceSetResponse object
@@ -606,6 +615,13 @@ NS_ASSUME_NONNULL_BEGIN
- (void)onChangeRegistration:(SDLChangeRegistration *)request;
/**
+ * Called when a `CloseApplication` request is received from Core
+ *
+ * @param request A SDLCloseApplication object
+ */
+- (void)onCloseApplication:(SDLCloseApplication *)request;
+
+/**
* Called when a `CreateInteractionChoiceSet` request is received from Core
*
* @param request A SDLCreateInteractionChoiceSet object
diff --git a/SmartDeviceLink/SDLRPCFunctionNames.h b/SmartDeviceLink/SDLRPCFunctionNames.h
index 52318c3bd..1693d773c 100644
--- a/SmartDeviceLink/SDLRPCFunctionNames.h
+++ b/SmartDeviceLink/SDLRPCFunctionNames.h
@@ -19,6 +19,7 @@ extern SDLRPCFunctionName const SDLRPCFunctionNameAlert;
extern SDLRPCFunctionName const SDLRPCFunctionNameAlertManeuver;
extern SDLRPCFunctionName const SDLRPCFunctionNameButtonPress;
extern SDLRPCFunctionName const SDLRPCFunctionNameChangeRegistration;
+extern SDLRPCFunctionName const SDLRPCFunctionNameCloseApplication;
extern SDLRPCFunctionName const SDLRPCFunctionNameCreateInteractionChoiceSet;
extern SDLRPCFunctionName const SDLRPCFunctionNameDeleteCommand;
extern SDLRPCFunctionName const SDLRPCFunctionNameDeleteFile;
diff --git a/SmartDeviceLink/SDLRPCFunctionNames.m b/SmartDeviceLink/SDLRPCFunctionNames.m
index c51e98be0..879ae943b 100644
--- a/SmartDeviceLink/SDLRPCFunctionNames.m
+++ b/SmartDeviceLink/SDLRPCFunctionNames.m
@@ -14,6 +14,7 @@ SDLRPCFunctionName const SDLRPCFunctionNameAlert = @"Alert";
SDLRPCFunctionName const SDLRPCFunctionNameAlertManeuver = @"AlertManeuver";
SDLRPCFunctionName const SDLRPCFunctionNameButtonPress = @"ButtonPress";
SDLRPCFunctionName const SDLRPCFunctionNameChangeRegistration = @"ChangeRegistration";
+SDLRPCFunctionName const SDLRPCFunctionNameCloseApplication = @"CloseApplication";
SDLRPCFunctionName const SDLRPCFunctionNameCreateInteractionChoiceSet = @"CreateInteractionChoiceSet";
SDLRPCFunctionName const SDLRPCFunctionNameDeleteCommand = @"DeleteCommand";
SDLRPCFunctionName const SDLRPCFunctionNameDeleteFile = @"DeleteFile";
diff --git a/SmartDeviceLink/SDLRPCParameterNames.h b/SmartDeviceLink/SDLRPCParameterNames.h
index 6e346e357..e967bb274 100644
--- a/SmartDeviceLink/SDLRPCParameterNames.h
+++ b/SmartDeviceLink/SDLRPCParameterNames.h
@@ -529,6 +529,7 @@ extern SDLRPCParameterName const SDLRPCParameterNameServiceSpecificResult;
extern SDLRPCParameterName const SDLRPCParameterNameServiceType;
extern SDLRPCParameterName const SDLRPCParameterNameServiceUri;
extern SDLRPCParameterName const SDLRPCParameterNameSeverity;
+extern SDLRPCParameterName const SDLRPCParameterNameShifted;
extern SDLRPCParameterName const SDLRPCParameterNameShortPress;
extern SDLRPCParameterName const SDLRPCParameterNameShortPressAvailable;
extern SDLRPCParameterName const SDLRPCParameterNameSignalLevelStatus;
diff --git a/SmartDeviceLink/SDLRPCParameterNames.m b/SmartDeviceLink/SDLRPCParameterNames.m
index 0aae8440d..eabba3300 100644
--- a/SmartDeviceLink/SDLRPCParameterNames.m
+++ b/SmartDeviceLink/SDLRPCParameterNames.m
@@ -524,6 +524,7 @@ SDLRPCParameterName const SDLRPCParameterNameServiceType = @"serviceType";
SDLRPCParameterName const SDLRPCParameterNameServiceUri = @"serviceUri";
SDLRPCParameterName const SDLRPCParameterNameDisplayName = @"displayName";
SDLRPCParameterName const SDLRPCParameterNameSeverity = @"severity";
+SDLRPCParameterName const SDLRPCParameterNameShifted = @"shifted";
SDLRPCParameterName const SDLRPCParameterNameShortPress = @"shortPress";
SDLRPCParameterName const SDLRPCParameterNameShortPressAvailable = @"shortPressAvailable";
SDLRPCParameterName const SDLRPCParameterNameSignalLevelStatus = @"signalLevelStatus";
diff --git a/SmartDeviceLink/SmartDeviceLink.h b/SmartDeviceLink/SmartDeviceLink.h
index 59b4763c1..3b884804f 100644
--- a/SmartDeviceLink/SmartDeviceLink.h
+++ b/SmartDeviceLink/SmartDeviceLink.h
@@ -25,6 +25,7 @@ FOUNDATION_EXPORT const unsigned char SmartDeviceLinkVersionString[];
#import "SDLAlertManeuver.h"
#import "SDLButtonPress.h"
#import "SDLChangeRegistration.h"
+#import "SDLCloseApplication.h"
#import "SDLCreateInteractionChoiceSet.h"
#import "SDLDeleteCommand.h"
#import "SDLDeleteFile.h"
@@ -82,6 +83,7 @@ FOUNDATION_EXPORT const unsigned char SmartDeviceLinkVersionString[];
#import "SDLAlertResponse.h"
#import "SDLButtonPressResponse.h"
#import "SDLChangeRegistrationResponse.h"
+#import "SDLCloseApplicationResponse.h"
#import "SDLCreateInteractionChoiceSetResponse.h"
#import "SDLDeleteCommandResponse.h"
#import "SDLDeleteFileResponse.h"