summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicoleYarroch <nicole@livio.io>2019-03-05 11:24:38 -0500
committerNicoleYarroch <nicole@livio.io>2019-03-05 11:24:38 -0500
commit2ce9675e4bdb70dd55a00cb85519f7230dc9d592 (patch)
tree89d72e709d3da483a85295fa41382c88b956b048
parent45aef813acd87e5a8968409281e420060152e625 (diff)
downloadsdl_ios-2ce9675e4bdb70dd55a00cb85519f7230dc9d592.tar.gz
Added support for `SystemRequest` request handling
-rw-r--r--SmartDeviceLink-iOS.xcodeproj/project.pbxproj8
-rw-r--r--SmartDeviceLink/SDLNotificationConstants.h1
-rw-r--r--SmartDeviceLink/SDLNotificationConstants.m1
-rw-r--r--SmartDeviceLink/SDLNotificationDispatcher.m4
-rw-r--r--SmartDeviceLink/SDLProxyListener.h8
-rw-r--r--SmartDeviceLinkTests/Notifications/SDLNotificationDispatcherSpec.m1
6 files changed, 23 insertions, 0 deletions
diff --git a/SmartDeviceLink-iOS.xcodeproj/project.pbxproj b/SmartDeviceLink-iOS.xcodeproj/project.pbxproj
index c97ebe75a..8f3bfd7fc 100644
--- a/SmartDeviceLink-iOS.xcodeproj/project.pbxproj
+++ b/SmartDeviceLink-iOS.xcodeproj/project.pbxproj
@@ -1247,6 +1247,8 @@
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 */; };
+ 883C22C8222ED84D00939C4C /* SDLRPCFunctionNames.h in Headers */ = {isa = PBXBuildFile; fileRef = 883C22C6222ED84D00939C4C /* SDLRPCFunctionNames.h */; };
+ 883C22C9222ED84D00939C4C /* SDLRPCFunctionNames.m in Sources */ = {isa = PBXBuildFile; fileRef = 883C22C7222ED84D00939C4C /* SDLRPCFunctionNames.m */; };
884554AC222453A800BAFB6C /* SDLNavigationServiceManifest.h in Headers */ = {isa = PBXBuildFile; fileRef = 884554AA222453A800BAFB6C /* SDLNavigationServiceManifest.h */; settings = {ATTRIBUTES = (Public, ); }; };
884554AD222453A800BAFB6C /* SDLNavigationServiceManifest.m in Sources */ = {isa = PBXBuildFile; fileRef = 884554AB222453A800BAFB6C /* SDLNavigationServiceManifest.m */; };
884554AF2224554300BAFB6C /* SDLNavigationServiceManifestSpec.m in Sources */ = {isa = PBXBuildFile; fileRef = 884554AE2224554300BAFB6C /* SDLNavigationServiceManifestSpec.m */; };
@@ -2853,6 +2855,8 @@
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>"; };
+ 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>"; };
884554AA222453A800BAFB6C /* SDLNavigationServiceManifest.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SDLNavigationServiceManifest.h; sourceTree = "<group>"; };
884554AB222453A800BAFB6C /* SDLNavigationServiceManifest.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SDLNavigationServiceManifest.m; sourceTree = "<group>"; };
884554AE2224554300BAFB6C /* SDLNavigationServiceManifestSpec.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SDLNavigationServiceManifestSpec.m; sourceTree = "<group>"; };
@@ -4704,6 +4708,8 @@
5D535DC31B72473800CF7760 /* SDLGlobals.h */,
5D535DC41B72473800CF7760 /* SDLGlobals.m */,
DA0C46AE1DCD41E30001F2A8 /* SDLMacros.h */,
+ 883C22C6222ED84D00939C4C /* SDLRPCFunctionNames.h */,
+ 883C22C7222ED84D00939C4C /* SDLRPCFunctionNames.m */,
);
name = Utilities;
sourceTree = "<group>";
@@ -6311,6 +6317,7 @@
5D61FCA91A84238C00846EE7 /* SDLFileType.h in Headers */,
8877F5EE1F34A72200DC128A /* SDLSendHapticDataResponse.h in Headers */,
DA8966F21E56973700413EAB /* SDLStreamingMediaManagerConstants.h in Headers */,
+ 883C22C8222ED84D00939C4C /* SDLRPCFunctionNames.h in Headers */,
5DD67CB81E661C4A009CD394 /* SDLLogTargetFile.h in Headers */,
5D61FD591A84238C00846EE7 /* SDLReadDID.h in Headers */,
5D82041A1BCD80BA00D0A41B /* SDLLockScreenConfiguration.h in Headers */,
@@ -7003,6 +7010,7 @@
5DBF062E1E64A93A00A5CF03 /* SDLLogFilter.m in Sources */,
5D61FDFA1A84238C00846EE7 /* SDLV2ProtocolHeader.m in Sources */,
5D61FDD01A84238C00846EE7 /* SDLTireStatus.m in Sources */,
+ 883C22C9222ED84D00939C4C /* SDLRPCFunctionNames.m in Sources */,
88FF4E772215FB8200A71361 /* SDLRPCRequestNotification.m in Sources */,
5D92935F20B33FF700FCC775 /* SDLChoiceSet.m in Sources */,
8855F9E4220CB04000A5C897 /* SDLOnAppServiceData.m in Sources */,
diff --git a/SmartDeviceLink/SDLNotificationConstants.h b/SmartDeviceLink/SDLNotificationConstants.h
index a59c909ab..22ef88aa4 100644
--- a/SmartDeviceLink/SDLNotificationConstants.h
+++ b/SmartDeviceLink/SDLNotificationConstants.h
@@ -221,6 +221,7 @@ extern SDLNotificationName const SDLDidReceiveSubscribeButtonRequest;
extern SDLNotificationName const SDLDidReceiveSubscribeVehicleDataRequest;
extern SDLNotificationName const SDLDidReceiveSubscribeWayPointsRequest;
extern SDLNotificationName const SDLDidReceiveSyncPDataRequest;
+extern SDLNotificationName const SDLDidReceiveSystemRequestRequest;
extern SDLNotificationName const SDLDidReceiveUnregisterAppInterfaceRequest;
extern SDLNotificationName const SDLDidReceiveUnsubscribeButtonRequest;
extern SDLNotificationName const SDLDidReceiveUnsubscribeVehicleDataRequest;
diff --git a/SmartDeviceLink/SDLNotificationConstants.m b/SmartDeviceLink/SDLNotificationConstants.m
index 205c8a724..fceead9a2 100644
--- a/SmartDeviceLink/SDLNotificationConstants.m
+++ b/SmartDeviceLink/SDLNotificationConstants.m
@@ -126,6 +126,7 @@ SDLNotificationName const SDLDidReceiveSubscribeButtonRequest = @"com.sdl.reques
SDLNotificationName const SDLDidReceiveSubscribeVehicleDataRequest = @"com.sdl.request.subscribeVehicleData";
SDLNotificationName const SDLDidReceiveSubscribeWayPointsRequest = @"com.sdl.request.subscribeWayPoints";
SDLNotificationName const SDLDidReceiveSyncPDataRequest = @"com.sdl.request.syncPData";
+SDLNotificationName const SDLDidReceiveSystemRequestRequest = @"com.sdl.request.systemRequest";
SDLNotificationName const SDLDidReceiveUnregisterAppInterfaceRequest = @"com.sdl.request.unregisterAppInterface";
SDLNotificationName const SDLDidReceiveUnsubscribeButtonRequest = @"com.sdl.request.unsubscribeButton";
SDLNotificationName const SDLDidReceiveUnsubscribeVehicleDataRequest = @"com.sdl.request.unsubscribeVehicleData";
diff --git a/SmartDeviceLink/SDLNotificationDispatcher.m b/SmartDeviceLink/SDLNotificationDispatcher.m
index 27aaec2a0..1de318ca7 100644
--- a/SmartDeviceLink/SDLNotificationDispatcher.m
+++ b/SmartDeviceLink/SDLNotificationDispatcher.m
@@ -497,6 +497,10 @@ NS_ASSUME_NONNULL_BEGIN
[self postRPCRequestNotification:SDLDidReceiveSyncPDataRequest request:request];
}
+-(void)onSystemRequest:(SDLSystemRequest *)request {
+ [self postRPCRequestNotification:SDLDidReceiveSystemRequestRequest request:request];
+}
+
- (void)onUnregisterAppInterface:(SDLUnregisterAppInterface *)request {
[self postRPCRequestNotification:SDLDidReceiveUnregisterAppInterfaceRequest request:request];
}
diff --git a/SmartDeviceLink/SDLProxyListener.h b/SmartDeviceLink/SDLProxyListener.h
index ec32b1876..c04fe8648 100644
--- a/SmartDeviceLink/SDLProxyListener.h
+++ b/SmartDeviceLink/SDLProxyListener.h
@@ -121,6 +121,7 @@
@class SDLSubscribeWayPointsResponse;
@class SDLSyncPData;
@class SDLSyncPDataResponse;
+@class SDLSystemRequest;
@class SDLUnregisterAppInterface;
@class SDLUnregisterAppInterfaceResponse;
@class SDLUnsubscribeButton;
@@ -873,6 +874,13 @@ NS_ASSUME_NONNULL_BEGIN
- (void)onSyncPData:(SDLSyncPData *)request;
/**
+ * Called when a `SystemRequest` request is received from Core
+ *
+ * @param request A SDLSystemRequest object
+ */
+- (void)onSystemRequest:(SDLSystemRequest *)request;
+
+/**
* Called when a `UnregisterAppInterface` request is received from Core
*
* @param request A SDLUnregisterAppInterface object
diff --git a/SmartDeviceLinkTests/Notifications/SDLNotificationDispatcherSpec.m b/SmartDeviceLinkTests/Notifications/SDLNotificationDispatcherSpec.m
index bec13fbd4..5b3f87212 100644
--- a/SmartDeviceLinkTests/Notifications/SDLNotificationDispatcherSpec.m
+++ b/SmartDeviceLinkTests/Notifications/SDLNotificationDispatcherSpec.m
@@ -129,6 +129,7 @@ describe(@"a notification dispatcher", ^{
expect(@([testDispatcher respondsToSelector:@selector(onSubscribeVehicleData:)])).to(beTruthy());
expect(@([testDispatcher respondsToSelector:@selector(onSubscribeWayPoints:)])).to(beTruthy());
expect(@([testDispatcher respondsToSelector:@selector(onSyncPData:)])).to(beTruthy());
+ expect(@([testDispatcher respondsToSelector:@selector(onSystemRequest:)])).to(beTruthy());
expect(@([testDispatcher respondsToSelector:@selector(onUnregisterAppInterface:)])).to(beTruthy());
expect(@([testDispatcher respondsToSelector:@selector(onUnsubscribeButton:)])).to(beTruthy());
expect(@([testDispatcher respondsToSelector:@selector(onUnsubscribeVehicleData:)])).to(beTruthy());