diff options
author | NicoleYarroch <nicole@livio.io> | 2019-07-09 16:19:47 -0400 |
---|---|---|
committer | NicoleYarroch <nicole@livio.io> | 2019-07-09 16:19:47 -0400 |
commit | 7d44a7480fcc82cbc86239e7d08a8cbd7f002fe6 (patch) | |
tree | 5882a17a59c6570fe627245927682b869831b491 | |
parent | ac015605a354a0bdcb608146395cc1256c22c428 (diff) | |
download | sdl_ios-7d44a7480fcc82cbc86239e7d08a8cbd7f002fe6.tar.gz |
Added CloseApplication response
-rw-r--r-- | SmartDeviceLink-iOS.podspec | 1 | ||||
-rw-r--r-- | SmartDeviceLink-iOS.xcodeproj/project.pbxproj | 8 | ||||
-rw-r--r-- | SmartDeviceLink.podspec | 1 | ||||
-rw-r--r-- | SmartDeviceLink/SDLCloseApplicationResponse.h | 30 | ||||
-rw-r--r-- | SmartDeviceLink/SDLCloseApplicationResponse.m | 17 | ||||
-rw-r--r-- | SmartDeviceLink/SDLNotificationConstants.h | 2 | ||||
-rw-r--r-- | SmartDeviceLink/SDLNotificationConstants.m | 3 | ||||
-rw-r--r-- | SmartDeviceLink/SDLNotificationDispatcher.m | 8 | ||||
-rw-r--r-- | SmartDeviceLink/SDLProxyListener.h | 16 | ||||
-rw-r--r-- | SmartDeviceLink/SmartDeviceLink.h | 2 |
10 files changed, 88 insertions, 0 deletions
diff --git a/SmartDeviceLink-iOS.podspec b/SmartDeviceLink-iOS.podspec index 92fb7b60a..18cb88576 100644 --- a/SmartDeviceLink-iOS.podspec +++ b/SmartDeviceLink-iOS.podspec @@ -70,6 +70,7 @@ ss.public_header_files = [ '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 23489917a..4dcdb741f 100644 --- a/SmartDeviceLink-iOS.xcodeproj/project.pbxproj +++ b/SmartDeviceLink-iOS.xcodeproj/project.pbxproj @@ -1339,6 +1339,8 @@ 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 */; }; @@ -2987,6 +2989,8 @@ 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>"; }; @@ -4262,6 +4266,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 */, @@ -6696,6 +6702,7 @@ 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 */, @@ -7028,6 +7035,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 */, diff --git a/SmartDeviceLink.podspec b/SmartDeviceLink.podspec index 2d5eee9c9..97fe847b5 100644 --- a/SmartDeviceLink.podspec +++ b/SmartDeviceLink.podspec @@ -71,6 +71,7 @@ sdefault.public_header_files = [ '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/SDLCloseApplicationResponse.h b/SmartDeviceLink/SDLCloseApplicationResponse.h new file mode 100644 index 000000000..051bbbdc5 --- /dev/null +++ b/SmartDeviceLink/SDLCloseApplicationResponse.h @@ -0,0 +1,30 @@ +// +// SDLCloseApplicationResponse.h +// SmartDeviceLink +// +// Created by Nicole on 7/9/19. +// Copyright © 2019 smartdevicelink. All rights reserved. +// + +#import "SDLRPCResponse.h" +#import "SDLRPCFunctionNames.h" + +NS_ASSUME_NONNULL_BEGIN + +/** + * Response to the request to close this app on the module + */ +@interface SDLCloseApplicationResponse : SDLRPCResponse + +#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.m b/SmartDeviceLink/SDLCloseApplicationResponse.m new file mode 100644 index 000000000..10e429d51 --- /dev/null +++ b/SmartDeviceLink/SDLCloseApplicationResponse.m @@ -0,0 +1,17 @@ +// +// SDLCloseApplicationResponse.m +// SmartDeviceLink +// +// Created by Nicole on 7/9/19. +// Copyright © 2019 smartdevicelink. All rights reserved. +// + +#import "SDLCloseApplicationResponse.h" + +NS_ASSUME_NONNULL_BEGIN + +@implementation SDLCloseApplicationResponse + +@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..476e7bb20 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 Close Application 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/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" |