2 #import <Foundation/Foundation.h>
3 #import "keychain/ot/OctagonStateMachine.h"
5 NS_ASSUME_NONNULL_BEGIN
7 extern OctagonState
* const EscrowRequestStateNothingToDo
;
8 extern OctagonState
* const EscrowRequestStateTriggerCloudServices
;
9 extern OctagonState
* const EscrowRequestStateAttemptEscrowUpload
;
10 extern OctagonState
* const EscrowRequestStateWaitForUnlock
;
12 @
class CKKSLockStateTracker
;
14 @interface EscrowRequestController
: NSObject
<OctagonStateMachineEngine
>
15 @property OctagonStateMachine
* stateMachine
;
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
;
20 - (instancetype
)init NS_UNAVAILABLE
;
21 - (instancetype
)initWithLockStateTracker
:(CKKSLockStateTracker
*)lockStateTracker
;
23 - (void)triggerEscrowUpdateRPC
:(nonnull NSString
*)reason
24 reply
:(nonnull
void (^)(NSError
* _Nullable
))reply
;
26 - (void)storePrerecordsInEscrowRPC
:(void (^)(uint64_t count
, NSError
* _Nullable error
))reply
;