summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoel Fischer <joeljfischer@gmail.com>2019-07-11 13:15:03 -0400
committerGitHub <noreply@github.com>2019-07-11 13:15:03 -0400
commitc819c439e04590f58398db7cf051156603f98e1b (patch)
tree490892abbb6800113415c491a7f4597863dd6a61
parent36cc001a2e65af025cecb7d58ac96ace0f02d288 (diff)
parent97b4b871729cc344805a45c066214b997832dd14 (diff)
downloadsdl_ios-c819c439e04590f58398db7cf051156603f98e1b.tar.gz
Merge pull request #1337 from smartdevicelink/feature/issue_801_close_application_RPC
New RPC CloseApplication
-rw-r--r--SmartDeviceLink-iOS.podspec2
-rw-r--r--SmartDeviceLink-iOS.xcodeproj/project.pbxproj24
-rw-r--r--SmartDeviceLink.podspec2
-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/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/SmartDeviceLink.h2
-rw-r--r--SmartDeviceLinkTests/RPCSpecs/RequestSpecs/SDLCloseApplicationSpec.m39
-rw-r--r--SmartDeviceLinkTests/RPCSpecs/ResponseSpecs/SDLCloseApplicationResponseSpec.m38
17 files changed, 233 insertions, 0 deletions
diff --git a/SmartDeviceLink-iOS.podspec b/SmartDeviceLink-iOS.podspec
index 0b91c7649..18cb88576 100644
--- a/SmartDeviceLink-iOS.podspec
+++ b/SmartDeviceLink-iOS.podspec
@@ -69,6 +69,8 @@ ss.public_header_files = [
'SmartDeviceLink/SDLChoiceSetDelegate.h',
'SmartDeviceLink/SDLClimateControlCapabilities.h',
'SmartDeviceLink/SDLClimateControlData.h',
+'SmartDeviceLink/SDLCloseApplication.h',
+'SmartDeviceLink/SDLCloseApplicationResponse.h',
'SmartDeviceLink/SDLCloudAppProperties.h',
'SmartDeviceLink/SDLClusterModeStatus.h',
'SmartDeviceLink/SDLCompassDirection.h',
diff --git a/SmartDeviceLink-iOS.xcodeproj/project.pbxproj b/SmartDeviceLink-iOS.xcodeproj/project.pbxproj
index 6c7379d26..077bc10b7 100644
--- a/SmartDeviceLink-iOS.xcodeproj/project.pbxproj
+++ b/SmartDeviceLink-iOS.xcodeproj/project.pbxproj
@@ -1272,6 +1272,7 @@
8831FA48220235B000B8FFB7 /* SDLAppServicesCapabilities.h in Headers */ = {isa = PBXBuildFile; fileRef = 8831FA46220235B000B8FFB7 /* SDLAppServicesCapabilities.h */; settings = {ATTRIBUTES = (Public, ); }; };
8831FA49220235B000B8FFB7 /* SDLAppServicesCapabilities.m in Sources */ = {isa = PBXBuildFile; fileRef = 8831FA47220235B000B8FFB7 /* SDLAppServicesCapabilities.m */; };
8831FA4B2202402B00B8FFB7 /* SDLAppServicesCapabilitiesSpec.m in Sources */ = {isa = PBXBuildFile; fileRef = 8831FA4A2202402B00B8FFB7 /* SDLAppServicesCapabilitiesSpec.m */; };
+ 883581B022D659BE00405C42 /* SDLCloseApplicationResponseSpec.m in Sources */ = {isa = PBXBuildFile; fileRef = 883581AF22D659BE00405C42 /* SDLCloseApplicationResponseSpec.m */; };
883C22C8222ED84D00939C4C /* SDLRPCFunctionNames.h in Headers */ = {isa = PBXBuildFile; fileRef = 883C22C6222ED84D00939C4C /* SDLRPCFunctionNames.h */; settings = {ATTRIBUTES = (Public, ); }; };
883C22C9222ED84D00939C4C /* SDLRPCFunctionNames.m in Sources */ = {isa = PBXBuildFile; fileRef = 883C22C7222ED84D00939C4C /* SDLRPCFunctionNames.m */; };
883C22CB222EEF0900939C4C /* SDLRPCFunctionNamesSpec.m in Sources */ = {isa = PBXBuildFile; fileRef = 883C22CA222EEF0900939C4C /* SDLRPCFunctionNamesSpec.m */; };
@@ -1305,6 +1306,7 @@
8855F9E9220CBA9200A5C897 /* SDLGetFile.h in Headers */ = {isa = PBXBuildFile; fileRef = 8855F9E7220CBA9200A5C897 /* SDLGetFile.h */; settings = {ATTRIBUTES = (Public, ); }; };
8855F9EA220CBA9200A5C897 /* SDLGetFile.m in Sources */ = {isa = PBXBuildFile; fileRef = 8855F9E8220CBA9200A5C897 /* SDLGetFile.m */; };
8855F9EC220CBFB700A5C897 /* SDLGetFileSpec.m in Sources */ = {isa = PBXBuildFile; fileRef = 8855F9EB220CBFB700A5C897 /* SDLGetFileSpec.m */; };
+ 8863747E22D650DE00D2671F /* SDLCloseApplicationSpec.m in Sources */ = {isa = PBXBuildFile; fileRef = 8863747D22D650DE00D2671F /* SDLCloseApplicationSpec.m */; };
88665B69220B771A00D9DA77 /* SDLPerformAppServiceInteractionResponse.h in Headers */ = {isa = PBXBuildFile; fileRef = 88665B67220B771A00D9DA77 /* SDLPerformAppServiceInteractionResponse.h */; settings = {ATTRIBUTES = (Public, ); }; };
88665B6A220B771A00D9DA77 /* SDLPerformAppServiceInteractionResponse.m in Sources */ = {isa = PBXBuildFile; fileRef = 88665B68220B771A00D9DA77 /* SDLPerformAppServiceInteractionResponse.m */; };
88665B6C220B796A00D9DA77 /* SDLPerformAppServiceInteractionResponseSpec.m in Sources */ = {isa = PBXBuildFile; fileRef = 88665B6B220B796A00D9DA77 /* SDLPerformAppServiceInteractionResponseSpec.m */; };
@@ -1337,6 +1339,10 @@
8881AFBF2225E9BB00EA870B /* SDLGetCloudAppPropertiesResponse.m in Sources */ = {isa = PBXBuildFile; fileRef = 8881AFBD2225E9BB00EA870B /* SDLGetCloudAppPropertiesResponse.m */; };
8881AFC12225EB9300EA870B /* SDLGetCloudAppPropertiesResponseSpec.m in Sources */ = {isa = PBXBuildFile; fileRef = 8881AFC02225EB9300EA870B /* SDLGetCloudAppPropertiesResponseSpec.m */; };
8886EB982111F4FA008294A5 /* SDLFileManagerConfigurationSpec.m in Sources */ = {isa = PBXBuildFile; fileRef = 8886EB972111F4FA008294A5 /* SDLFileManagerConfigurationSpec.m */; };
+ 888DBAEB22D52431002A0AE2 /* SDLCloseApplication.h in Headers */ = {isa = PBXBuildFile; fileRef = 888DBAE922D52431002A0AE2 /* SDLCloseApplication.h */; settings = {ATTRIBUTES = (Public, ); }; };
+ 888DBAEC22D52431002A0AE2 /* SDLCloseApplication.m in Sources */ = {isa = PBXBuildFile; fileRef = 888DBAEA22D52431002A0AE2 /* SDLCloseApplication.m */; };
+ 888DBAEF22D528DE002A0AE2 /* SDLCloseApplicationResponse.h in Headers */ = {isa = PBXBuildFile; fileRef = 888DBAED22D528DE002A0AE2 /* SDLCloseApplicationResponse.h */; settings = {ATTRIBUTES = (Public, ); }; };
+ 888DBAF022D528DE002A0AE2 /* SDLCloseApplicationResponse.m in Sources */ = {isa = PBXBuildFile; fileRef = 888DBAEE22D528DE002A0AE2 /* SDLCloseApplicationResponse.m */; };
888F86FE221DEE200052FE4C /* SDLAsynchronousRPCOperation.m in Sources */ = {isa = PBXBuildFile; fileRef = 888F86FD221DEE1F0052FE4C /* SDLAsynchronousRPCOperation.m */; };
888F8700221DF4880052FE4C /* SDLAsynchronousRPCOperationSpec.m in Sources */ = {isa = PBXBuildFile; fileRef = 888F86FF221DF4880052FE4C /* SDLAsynchronousRPCOperationSpec.m */; };
88A1CF1E21669AC7001ACC75 /* SDLLifecycleConfigurationUpdateSpec.m in Sources */ = {isa = PBXBuildFile; fileRef = 88A1CF1D21669AC7001ACC75 /* SDLLifecycleConfigurationUpdateSpec.m */; };
@@ -2923,6 +2929,7 @@
8831FA46220235B000B8FFB7 /* SDLAppServicesCapabilities.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SDLAppServicesCapabilities.h; sourceTree = "<group>"; };
8831FA47220235B000B8FFB7 /* SDLAppServicesCapabilities.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SDLAppServicesCapabilities.m; sourceTree = "<group>"; };
8831FA4A2202402B00B8FFB7 /* SDLAppServicesCapabilitiesSpec.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SDLAppServicesCapabilitiesSpec.m; sourceTree = "<group>"; };
+ 883581AF22D659BE00405C42 /* SDLCloseApplicationResponseSpec.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SDLCloseApplicationResponseSpec.m; sourceTree = "<group>"; };
883C22C6222ED84D00939C4C /* SDLRPCFunctionNames.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SDLRPCFunctionNames.h; sourceTree = "<group>"; };
883C22C7222ED84D00939C4C /* SDLRPCFunctionNames.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SDLRPCFunctionNames.m; sourceTree = "<group>"; };
883C22CA222EEF0900939C4C /* SDLRPCFunctionNamesSpec.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SDLRPCFunctionNamesSpec.m; sourceTree = "<group>"; };
@@ -2957,6 +2964,7 @@
8855F9E7220CBA9200A5C897 /* SDLGetFile.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SDLGetFile.h; sourceTree = "<group>"; };
8855F9E8220CBA9200A5C897 /* SDLGetFile.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SDLGetFile.m; sourceTree = "<group>"; };
8855F9EB220CBFB700A5C897 /* SDLGetFileSpec.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SDLGetFileSpec.m; sourceTree = "<group>"; };
+ 8863747D22D650DE00D2671F /* SDLCloseApplicationSpec.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SDLCloseApplicationSpec.m; sourceTree = "<group>"; };
88665B67220B771A00D9DA77 /* SDLPerformAppServiceInteractionResponse.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SDLPerformAppServiceInteractionResponse.h; sourceTree = "<group>"; };
88665B68220B771A00D9DA77 /* SDLPerformAppServiceInteractionResponse.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SDLPerformAppServiceInteractionResponse.m; sourceTree = "<group>"; };
88665B6B220B796A00D9DA77 /* SDLPerformAppServiceInteractionResponseSpec.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SDLPerformAppServiceInteractionResponseSpec.m; sourceTree = "<group>"; };
@@ -2983,6 +2991,10 @@
8881AFBD2225E9BB00EA870B /* SDLGetCloudAppPropertiesResponse.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SDLGetCloudAppPropertiesResponse.m; sourceTree = "<group>"; };
8881AFC02225EB9300EA870B /* SDLGetCloudAppPropertiesResponseSpec.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SDLGetCloudAppPropertiesResponseSpec.m; sourceTree = "<group>"; };
8886EB972111F4FA008294A5 /* SDLFileManagerConfigurationSpec.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SDLFileManagerConfigurationSpec.m; sourceTree = "<group>"; };
+ 888DBAE922D52431002A0AE2 /* SDLCloseApplication.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SDLCloseApplication.h; sourceTree = "<group>"; };
+ 888DBAEA22D52431002A0AE2 /* SDLCloseApplication.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SDLCloseApplication.m; sourceTree = "<group>"; };
+ 888DBAED22D528DE002A0AE2 /* SDLCloseApplicationResponse.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SDLCloseApplicationResponse.h; sourceTree = "<group>"; };
+ 888DBAEE22D528DE002A0AE2 /* SDLCloseApplicationResponse.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SDLCloseApplicationResponse.m; sourceTree = "<group>"; };
888F86FD221DEE1F0052FE4C /* SDLAsynchronousRPCOperation.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SDLAsynchronousRPCOperation.m; sourceTree = "<group>"; };
888F86FF221DF4880052FE4C /* SDLAsynchronousRPCOperationSpec.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SDLAsynchronousRPCOperationSpec.m; sourceTree = "<group>"; };
88A1CF1D21669AC7001ACC75 /* SDLLifecycleConfigurationUpdateSpec.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SDLLifecycleConfigurationUpdateSpec.m; sourceTree = "<group>"; };
@@ -3404,6 +3416,7 @@
162E82411A9BDE8A00906325 /* SDLAlertSpec.m */,
1EE8C4551F38788A00FDC2CF /* SDLButtonPressSpec.m */,
162E82421A9BDE8A00906325 /* SDLChangeRegistrationSpec.m */,
+ 8863747D22D650DE00D2671F /* SDLCloseApplicationSpec.m */,
162E82431A9BDE8A00906325 /* SDLCreateInteractionChoiceSetSpec.m */,
162E82441A9BDE8A00906325 /* SDLDeleteCommandSpec.m */,
162E82451A9BDE8A00906325 /* SDLDeleteFileSpec.m */,
@@ -3467,6 +3480,7 @@
162E82691A9BDE8A00906325 /* SDLAlertResponseSpec.m */,
1EE8C4571F387ABD00FDC2CF /* SDLButtonPressResponseSpec.m */,
162E826A1A9BDE8A00906325 /* SDLChangeRegistrationResponseSpec.m */,
+ 883581AF22D659BE00405C42 /* SDLCloseApplicationResponseSpec.m */,
162E826B1A9BDE8A00906325 /* SDLCreateInteractionChoiceSetResponseSpec.m */,
162E826C1A9BDE8A00906325 /* SDLDeleteCommandResponseSpec.m */,
162E826D1A9BDE8A00906325 /* SDLDeleteFileResponseSpec.m */,
@@ -4139,6 +4153,8 @@
1E5AD07F1F20B73E0029B8AF /* SDLButtonPress.m */,
5D61FA6E1A84238A00846EE7 /* SDLChangeRegistration.h */,
5D61FA6F1A84238A00846EE7 /* SDLChangeRegistration.m */,
+ 888DBAE922D52431002A0AE2 /* SDLCloseApplication.h */,
+ 888DBAEA22D52431002A0AE2 /* SDLCloseApplication.m */,
5D61FA7E1A84238A00846EE7 /* SDLCreateInteractionChoiceSet.h */,
5D61FA7F1A84238A00846EE7 /* SDLCreateInteractionChoiceSet.m */,
5D61FA851A84238A00846EE7 /* SDLDeleteCommand.h */,
@@ -4256,6 +4272,8 @@
1E5AD0831F20B9290029B8AF /* SDLButtonPressResponse.m */,
5D61FA701A84238A00846EE7 /* SDLChangeRegistrationResponse.h */,
5D61FA711A84238A00846EE7 /* SDLChangeRegistrationResponse.m */,
+ 888DBAED22D528DE002A0AE2 /* SDLCloseApplicationResponse.h */,
+ 888DBAEE22D528DE002A0AE2 /* SDLCloseApplicationResponse.m */,
5D61FA801A84238A00846EE7 /* SDLCreateInteractionChoiceSetResponse.h */,
5D61FA811A84238A00846EE7 /* SDLCreateInteractionChoiceSetResponse.m */,
5D61FA871A84238A00846EE7 /* SDLDeleteCommandResponse.h */,
@@ -6690,11 +6708,13 @@
5D61FCFC1A84238C00846EE7 /* SDLRPCParameterNames.h in Headers */,
DA9F7E8F1DCC04C000ACAE48 /* SDLUnsubscribeWayPointsResponse.h in Headers */,
5D61FCFD1A84238C00846EE7 /* SDLObjectWithPriority.h in Headers */,
+ 888DBAEF22D528DE002A0AE2 /* SDLCloseApplicationResponse.h in Headers */,
DAC5726C1D11B4840004288B /* SDLTouchManagerDelegate.h in Headers */,
5D61FD3F1A84238C00846EE7 /* SDLPrioritizedObjectCollection.h in Headers */,
5D9FC29E1FD8813900ACA5C2 /* SDLAudioStreamManager.h in Headers */,
5DD67CB01E65DDB7009CD394 /* SDLLogTargetAppleSystemLog.h in Headers */,
5D61FCBF1A84238C00846EE7 /* SDLHexUtility.h in Headers */,
+ 888DBAEB22D52431002A0AE2 /* SDLCloseApplication.h in Headers */,
5D00AC6B1F141339004000D9 /* SDLSystemCapability.h in Headers */,
5DCD7AE01FCCA8D200A0FC7F /* SDLCarWindow.h in Headers */,
88F89103221DE29A00E056AD /* SDLAsynchronousRPCOperation.h in Headers */,
@@ -7021,6 +7041,7 @@
5D92935B20B33D4F00FCC775 /* SDLChoiceCell.m in Sources */,
E4139D1E1F6017770005B6EA /* SDLLifecycleConfigurationUpdate.m in Sources */,
5D61FC6E1A84238C00846EE7 /* SDLCreateInteractionChoiceSetResponse.m in Sources */,
+ 888DBAF022D528DE002A0AE2 /* SDLCloseApplicationResponse.m in Sources */,
5D61FD061A84238C00846EE7 /* SDLOnButtonPress.m in Sources */,
5D61FD5E1A84238C00846EE7 /* SDLRegisterAppInterface.m in Sources */,
5D61FCE11A84238C00846EE7 /* SDLKeyboardEvent.m in Sources */,
@@ -7094,6 +7115,7 @@
884E702821FBAC5B008D53BA /* SDLServiceUpdateReason.m in Sources */,
5D61FD781A84238C00846EE7 /* SDLSamplingRate.m in Sources */,
1EAA472A2034388D000FE74B /* SDLAudioControlData.m in Sources */,
+ 888DBAEC22D52431002A0AE2 /* SDLCloseApplication.m in Sources */,
5D61FC681A84238C00846EE7 /* SDLComponentVolumeStatus.m in Sources */,
5D61FDB61A84238C00846EE7 /* SDLSyncMsgVersion.m in Sources */,
5D61FC501A84238C00846EE7 /* SDLBodyInformation.m in Sources */,
@@ -7711,6 +7733,7 @@
162E82FE1A9BDE8B00906325 /* SDLTBTStateSpec.m in Sources */,
5D5DBF0B1D48E5E600D4F914 /* SDLLockScreenViewControllerSnapshotTests.m in Sources */,
5DB1BCD41D243A8E002FFC37 /* SDLListFilesOperationSpec.m in Sources */,
+ 8863747E22D650DE00D2671F /* SDLCloseApplicationSpec.m in Sources */,
162E834B1A9BDE8B00906325 /* SDLAlertManeuverResponseSpec.m in Sources */,
162E833E1A9BDE8B00906325 /* SDLShowSpec.m in Sources */,
5D6035D8202CF5C900A429C9 /* TestRequestProgressResponse.m in Sources */,
@@ -7883,6 +7906,7 @@
1EE8C4501F38629200FDC2CF /* SDLRemoteControlCapabilitiesSpec.m in Sources */,
1EAA47662035B8D3000FE74B /* SDLLightControlDataSpec.m in Sources */,
162E82CF1A9BDE8A00906325 /* SDLBitsPerSampleSpec.m in Sources */,
+ 883581B022D659BE00405C42 /* SDLCloseApplicationResponseSpec.m in Sources */,
162E831E1A9BDE8B00906325 /* SDLOnTBTClientStateSpec.m in Sources */,
162E83351A9BDE8B00906325 /* SDLReadDIDSpec.m in Sources */,
5DF40B28208FDA9700DD6FDA /* SDLVoiceCommandManagerSpec.m in Sources */,
diff --git a/SmartDeviceLink.podspec b/SmartDeviceLink.podspec
index 17fa2cfc8..97fe847b5 100644
--- a/SmartDeviceLink.podspec
+++ b/SmartDeviceLink.podspec
@@ -70,6 +70,8 @@ sdefault.public_header_files = [
'SmartDeviceLink/SDLChoiceSetDelegate.h',
'SmartDeviceLink/SDLClimateControlCapabilities.h',
'SmartDeviceLink/SDLClimateControlData.h',
+'SmartDeviceLink/SDLCloseApplication.h',
+'SmartDeviceLink/SDLCloseApplicationResponse.h',
'SmartDeviceLink/SDLCloudAppProperties.h',
'SmartDeviceLink/SDLClusterModeStatus.h',
'SmartDeviceLink/SDLCompassDirection.h',
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/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/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"
diff --git a/SmartDeviceLinkTests/RPCSpecs/RequestSpecs/SDLCloseApplicationSpec.m b/SmartDeviceLinkTests/RPCSpecs/RequestSpecs/SDLCloseApplicationSpec.m
new file mode 100644
index 000000000..122adcee4
--- /dev/null
+++ b/SmartDeviceLinkTests/RPCSpecs/RequestSpecs/SDLCloseApplicationSpec.m
@@ -0,0 +1,39 @@
+//
+// SDLCloseApplicationSpec.m
+// SmartDeviceLinkTests
+//
+// Created by Nicole on 7/10/19.
+// Copyright © 2019 smartdevicelink. All rights reserved.
+//
+
+#import "SDLCloseApplication.h"
+#import "SDLRPCFunctionNames.h"
+#import "SDLRPCParameterNames.h"
+
+#import <Quick/Quick.h>
+#import <Nimble/Nimble.h>
+
+QuickSpecBegin(SDLCloseApplicationSpec)
+
+describe(@"Getter/Setter Tests", ^{
+ it(@"Should initialize correctly", ^{
+ SDLCloseApplication *testRequest = [[SDLCloseApplication alloc] init];
+ expect(testRequest.name).to(equal(SDLRPCFunctionNameCloseApplication));
+ });
+
+ it(@"Should initialize correctly with a dictionary", ^{
+ NSDictionary *dict = @{SDLRPCParameterNameRequest:@{
+ SDLRPCParameterNameParameters:@{},
+ SDLRPCParameterNameOperationName:SDLRPCFunctionNameCloseApplication}};
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
+ SDLCloseApplication *testRequest = [[SDLCloseApplication alloc] initWithDictionary:dict];
+#pragma clang diagnostic pop
+
+ expect(testRequest.name).to(equal(SDLRPCFunctionNameCloseApplication));
+ expect(testRequest.parameters).to(beEmpty());
+ });
+});
+
+QuickSpecEnd
+
diff --git a/SmartDeviceLinkTests/RPCSpecs/ResponseSpecs/SDLCloseApplicationResponseSpec.m b/SmartDeviceLinkTests/RPCSpecs/ResponseSpecs/SDLCloseApplicationResponseSpec.m
new file mode 100644
index 000000000..71b239b0d
--- /dev/null
+++ b/SmartDeviceLinkTests/RPCSpecs/ResponseSpecs/SDLCloseApplicationResponseSpec.m
@@ -0,0 +1,38 @@
+//
+// SDLCloseApplicationResponseSpec.m
+// SmartDeviceLinkTests
+//
+// Created by Nicole on 7/10/19.
+// Copyright © 2019 smartdevicelink. All rights reserved.
+//
+
+#import <Quick/Quick.h>
+#import <Nimble/Nimble.h>
+
+#import "SDLCloseApplicationResponse.h"
+#import "SDLRPCParameterNames.h"
+#import "SDLRPCFunctionNames.h"
+
+QuickSpecBegin(SDLCloseApplicationResponseSpec)
+
+describe(@"Getter/Setter Tests", ^{
+ it(@"Should initialize correctly", ^{
+ SDLCloseApplicationResponse *testResponse = [[SDLCloseApplicationResponse alloc] init];
+ expect(testResponse.name).to(equal(SDLRPCFunctionNameCloseApplication));
+ });
+
+ it(@"Should initialize correctly with a dictionary", ^{
+ NSDictionary *dict = @{SDLRPCParameterNameRequest:@{
+ SDLRPCParameterNameParameters:@{},
+ SDLRPCParameterNameOperationName:SDLRPCFunctionNameCloseApplication}};
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
+ SDLCloseApplicationResponse *testResponse = [[SDLCloseApplicationResponse alloc] initWithDictionary:dict];
+#pragma clang diagnostic pop
+
+ expect(testResponse.name).to(equal(SDLRPCFunctionNameCloseApplication));
+ expect(testResponse.parameters).to(beEmpty());
+ });
+});
+
+QuickSpecEnd