]> git.saurik.com Git - apple/security.git/blob - keychain/Trieste/OctagonTestHarnessXPCService/OctagonTestHarnessXPCServiceDelegate.m
Security-59306.11.20.tar.gz
[apple/security.git] / keychain / Trieste / OctagonTestHarnessXPCService / OctagonTestHarnessXPCServiceDelegate.m
1 //
2 // OctagonTestHarnessXPCService.h
3 // Security
4 //
5 // Copyright (c) 2018 Apple Inc. All rights reserved.
6 //
7
8 #import <Foundation/Foundation.h>
9 #import "OctagonTestHarnessXPCService.h"
10 #import "OctagonTestHarnessXPCServiceDelegate.h"
11 #import "OctagonTestHarnessXPCServiceProtocol.h"
12
13 @implementation OctagonTestHarnessXPCServiceDelegate
14
15 - (BOOL)listener:(__unused NSXPCListener *)listener shouldAcceptNewConnection:(NSXPCConnection *)newConnection
16 {
17 #if OCTAGON
18 newConnection.exportedInterface = [NSXPCInterface interfaceWithProtocol:@protocol(OctagonTestHarnessXPCServiceProtocol)];
19 newConnection.exportedObject = [OctagonTestHarnessXPCService new];
20
21 [newConnection resume];
22
23 return YES;
24 #else // OCTAGON
25 return NO;
26 #endif // OCTAGON
27 }
28
29 @end