2 #import <Foundation/Foundation.h>
3 #import <objc/runtime.h>
4 #import <Security/SecXPCHelper.h>
6 #import "keychain/escrowrequest/EscrowRequestXPCProtocol.h"
7 #import "utilities/debugging.h"
9 NSXPCInterface* SecEscrowRequestSetupControlProtocol(NSXPCInterface* interface) {
10 NSSet<Class>* errClasses = [SecXPCHelper safeErrorClasses];
13 [interface setClasses:errClasses forSelector:@selector(triggerEscrowUpdate:reply:) argumentIndex:0 ofReply:YES];
14 [interface setClasses:errClasses forSelector:@selector(cachePrerecord:serializedPrerecord:reply:) argumentIndex:0 ofReply:YES];
15 [interface setClasses:errClasses forSelector:@selector(fetchPrerecord:reply:) argumentIndex:1 ofReply:YES];
16 [interface setClasses:errClasses forSelector:@selector(fetchRequestWaitingOnPasscode:) argumentIndex:1 ofReply:YES];
17 [interface setClasses:errClasses forSelector:@selector(fetchRequestStatuses:) argumentIndex:1 ofReply:YES];
18 [interface setClasses:errClasses forSelector:@selector(resetAllRequests:) argumentIndex:0 ofReply:YES];
19 [interface setClasses:errClasses forSelector:@selector(storePrerecordsInEscrow:) argumentIndex:1 ofReply:YES];
22 @catch(NSException* e) {
23 secerror("SecEscrowRequestSetupControlProtocol failed, continuing, but you might crash later: %@", e);