]> git.saurik.com Git - apple/security.git/blob - keychain/escrowrequest/EscrowRequestController.h
Security-59306.11.20.tar.gz
[apple/security.git] / keychain / escrowrequest / EscrowRequestController.h
1
2 #import <Foundation/Foundation.h>
3 #import "keychain/ot/OctagonStateMachine.h"
4
5 NS_ASSUME_NONNULL_BEGIN
6
7 extern OctagonState* const EscrowRequestStateNothingToDo;
8 extern OctagonState* const EscrowRequestStateTriggerCloudServices;
9 extern OctagonState* const EscrowRequestStateAttemptEscrowUpload;
10 extern OctagonState* const EscrowRequestStateWaitForUnlock;
11
12 @class CKKSLockStateTracker;
13
14 @interface EscrowRequestController : NSObject <OctagonStateMachineEngine>
15 @property OctagonStateMachine* stateMachine;
16
17 // Use this for testing: if set to true, we will always attempt to trigger CloudServices if needed, even if we've done it recently
18 @property bool forceIgnoreCloudServicesRateLimiting;
19
20 - (instancetype)init NS_UNAVAILABLE;
21 - (instancetype)initWithLockStateTracker:(CKKSLockStateTracker*)lockStateTracker;
22
23 - (void)triggerEscrowUpdateRPC:(nonnull NSString *)reason
24 reply:(nonnull void (^)(NSError * _Nullable))reply;
25
26 - (void)storePrerecordsInEscrowRPC:(void (^)(uint64_t count, NSError* _Nullable error))reply;
27 @end
28
29 NS_ASSUME_NONNULL_END