OTControlProtocol.h [plain text]
#import <Foundation/Foundation.h>
#ifndef SECURITY_OT_OTCONTROLPROTOCOL_H
#define SECURITY_OT_OTCONTROLPROTOCOL_H 1
#import <Security/OTClique.h>
#import <Security/OTConstants.h>
@class SFECKeyPair;
NS_ASSUME_NONNULL_BEGIN
@class OTJoiningConfiguration;
@protocol OTControlProtocol
- (void)restore:(NSString *)contextID dsid:(NSString *)dsid secret:(NSData*)secret escrowRecordID:(NSString*)escrowRecordID reply:(void (^)(NSData* _Nullable signingKeyData, NSData* _Nullable encryptionKeyData, NSError * _Nullable error))reply;
- (void)octagonEncryptionPublicKey:(void (^)(NSData* _Nullable encryptionKey, NSError * _Nullable))reply;
- (void)octagonSigningPublicKey:(void (^)(NSData* _Nullable signingKey, NSError * _Nullable))reply;
- (void)listOfEligibleBottledPeerRecords:(void (^)(NSArray* _Nullable listOfRecords, NSError * _Nullable))reply;
- (void)signIn:(NSString*)altDSID
container:(NSString* _Nullable)container
context:(NSString*)contextID
reply:(void (^)(NSError * _Nullable error))reply;
- (void)signOut:(NSString* _Nullable)container
context:(NSString*)contextID
reply:(void (^)(NSError * _Nullable error))reply;
- (void)notifyIDMSTrustLevelChangeForContainer:(NSString* _Nullable)container
context:(NSString*)contextID
reply:(void (^)(NSError * _Nullable error))reply;
- (void)reset:(void (^)(BOOL result, NSError * _Nullable error))reply;
- (void)handleIdentityChangeForSigningKey:(SFECKeyPair*)peerSigningKey
ForEncryptionKey:(SFECKeyPair*)encryptionKey
ForPeerID:(NSString*)peerID
reply:(void (^)(BOOL result,
NSError* _Nullable error))reply;
- (void)rpcEpochWithConfiguration:(OTJoiningConfiguration*)config
reply:(void (^)(uint64_t epoch,
NSError * _Nullable error))reply;
- (void)rpcPrepareIdentityAsApplicantWithConfiguration:(OTJoiningConfiguration*)config
reply:(void (^)(NSString * _Nullable peerID,
NSData * _Nullable permanentInfo,
NSData * _Nullable permanentInfoSig,
NSData * _Nullable stableInfo,
NSData * _Nullable stableInfoSig,
NSError * _Nullable error))reply;
- (void)rpcVoucherWithConfiguration:(OTJoiningConfiguration*)config
peerID:(NSString*)peerID
permanentInfo:(NSData *)permanentInfo
permanentInfoSig:(NSData *)permanentInfoSig
stableInfo:(NSData *)stableInfo
stableInfoSig:(NSData *)stableInfoSig
reply:(void (^)(NSData* voucher, NSData* voucherSig, NSError * _Nullable error))reply;
- (void)rpcJoinWithConfiguration:(OTJoiningConfiguration*)config
vouchData:(NSData*)vouchData
vouchSig:(NSData*)vouchSig
reply:(void (^)(NSError * _Nullable error))reply;
- (void)preflightBottledPeer:(NSString*)contextID
dsid:(NSString*)dsid
reply:(void (^)(NSData* _Nullable entropy,
NSString* _Nullable bottleID,
NSData* _Nullable signingPublicKey,
NSError* _Nullable error))reply;
- (void)launchBottledPeer:(NSString*)contextID
bottleID:(NSString*)bottleID
reply:(void (^ _Nullable)(NSError* _Nullable error))reply;
- (void)scrubBottledPeer:(NSString*)contextID
bottleID:(NSString*)bottleID
reply:(void (^ _Nullable)(NSError* _Nullable error))reply;
- (void)status:(NSString* _Nullable)container
context:(NSString*)context
reply:(void (^)(NSDictionary* _Nullable result, NSError* _Nullable error))reply;
- (void)fetchEgoPeerID:(NSString* _Nullable)container
context:(NSString*)context
reply:(void (^)(NSString* _Nullable peerID, NSError* _Nullable error))reply;
- (void)fetchCliqueStatus:(NSString* _Nullable)container
context:(NSString*)context
configuration:(OTOperationConfiguration*)configuration
reply:(void (^)(CliqueStatus cliqueStatus, NSError* _Nullable error))reply;
- (void)fetchTrustStatus:(NSString* _Nullable)container
context:(NSString*)context
configuration:(OTOperationConfiguration *)configuration
reply:(void (^)(CliqueStatus status,
NSString* _Nullable peerID,
NSNumber* _Nullable numberOfPeersInOctagon,
BOOL isExcluded,
NSError* _Nullable error))reply;
- (void)startOctagonStateMachine:(NSString* _Nullable)container
context:(NSString*)context
reply:(void (^)(NSError* _Nullable error))reply;
- (void)resetAndEstablish:(NSString* _Nullable)container
context:(NSString*)context
altDSID:(NSString*)altDSID
resetReason:(CuttlefishResetReason)resetReason
reply:(void (^)(NSError* _Nullable error))reply;
- (void)establish:(NSString * _Nullable)container
context:(NSString *)context
altDSID:(NSString*)altDSID
reply:(void (^)(NSError * _Nullable))reply;
- (void)leaveClique:(NSString* _Nullable)container
context:(NSString*)context
reply:(void (^)(NSError* _Nullable error))reply;
- (void)removeFriendsInClique:(NSString* _Nullable)container
context:(NSString*)context
peerIDs:(NSArray<NSString*>*)peerIDs
reply:(void (^)(NSError* _Nullable error))reply;
- (void)peerDeviceNamesByPeerID:(NSString* _Nullable)container
context:(NSString*)context
reply:(void (^)(NSDictionary<NSString*, NSString*>* _Nullable peers, NSError* _Nullable error))reply;
- (void)fetchAllViableBottles:(NSString* _Nullable)container
context:(NSString*)context
reply:(void (^)(NSArray<NSString*>* _Nullable sortedBottleIDs, NSArray<NSString*> * _Nullable sortedPartialBottleIDs, NSError* _Nullable error))reply;
-(void)restore:(NSString* _Nullable)containerName
contextID:(NSString *)contextID
bottleSalt:(NSString *)bottleSalt
entropy:(NSData *)entropy
bottleID:(NSString *)bottleID
reply:(void (^)(NSError * _Nullable))reply;
- (void)fetchEscrowContents:(NSString* _Nullable)containerName
contextID:(NSString *)contextID
reply:(void (^)(NSData* _Nullable entropy,
NSString* _Nullable bottleID,
NSData* _Nullable signingPublicKey,
NSError* _Nullable error))reply;
- (void) createRecoveryKey:(NSString* _Nullable)containerName
contextID:(NSString *)contextID
recoveryKey:(NSString *)recoveryKey
reply:(void (^)( NSError * _Nullable))reply;
- (void) joinWithRecoveryKey:(NSString* _Nullable)containerName
contextID:(NSString *)contextID
recoveryKey:(NSString*)recoveryKey
reply:(void (^)(NSError * _Nullable))reply;
- (void)healthCheck:(NSString * _Nullable)container
context:(NSString *)context
skipRateLimitingCheck:(BOOL)skipRateLimitingCheck
reply:(void (^)(NSError *_Nullable error))reply;
- (void)waitForOctagonUpgrade:(NSString* _Nullable)container
context:(NSString*)context
reply:(void (^)(NSError* _Nullable error))reply;
- (void)postCDPFollowupResult:(BOOL)success
type:(OTCliqueCDPContextType)type
error:(NSError * _Nullable)error
containerName:(NSString* _Nullable)containerName
contextName:(NSString *)contextName
reply:(void (^)(NSError* _Nullable error))reply;
- (void)tapToRadar:(NSString *)action
description:(NSString *)description
radar:(NSString *)radar
reply:(void (^)(NSError* _Nullable error))reply;
- (void)refetchCKKSPolicy:(NSString* _Nullable)container
contextID:(NSString*)contextID
reply:(void (^)(NSError* _Nullable error))reply;
- (void)setCDPEnabled:(NSString* _Nullable)containerName
contextID:(NSString*)contextID
reply:(void (^)(NSError* _Nullable error))reply;
- (void)getCDPStatus:(NSString* _Nullable)containerName
contextID:(NSString*)contextID
reply:(void (^)(OTCDPStatus status, NSError* _Nullable error))reply;
- (void)fetchEscrowRecords:(NSString * _Nullable)container
contextID:(NSString*)contextID
forceFetch:(BOOL)forceFetch
reply:(void (^)(NSArray<NSData*>* _Nullable records,
NSError* _Nullable error))reply;
- (void)invalidateEscrowCache:(NSString * _Nullable)containerName
contextID:(NSString*)contextID
reply:(nonnull void (^)(NSError * _Nullable error))reply;
- (void)setUserControllableViewsSyncStatus:(NSString* _Nullable)containerName
contextID:(NSString*)contextID
enabled:(BOOL)enabled
reply:(void (^)(BOOL nowSyncing, NSError* _Nullable error))reply;
- (void)fetchUserControllableViewsSyncStatus:(NSString* _Nullable)containerName
contextID:(NSString*)contextID
reply:(void (^)(BOOL nowSyncing, NSError* _Nullable error))reply;
@end
NSXPCInterface* OTSetupControlProtocol(NSXPCInterface* interface);
NS_ASSUME_NONNULL_END
#endif