]> git.saurik.com Git - apple/security.git/blob - keychain/ot/OTAuthKitAdapter.h
Security-59306.11.20.tar.gz
[apple/security.git] / keychain / ot / OTAuthKitAdapter.h
1
2 #if OCTAGON
3
4 #import <Foundation/Foundation.h>
5 #import "keychain/ot/OTDefines.h"
6 #import <AuthKit/AuthKit.h>
7 #import <AuthKit/AuthKit_Private.h>
8
9 NS_ASSUME_NONNULL_BEGIN
10
11 @protocol OTAuthKitAdapterNotifier
12 - (void)machinesAdded:(NSArray<NSString*>*)machineIDs altDSID:(NSString*)altDSID;
13 - (void)machinesRemoved:(NSArray<NSString*>*)machineIDs altDSID:(NSString*)altDSID;
14 - (void)incompleteNotificationOfMachineIDListChange;
15 @end
16
17 @protocol OTAuthKitAdapter
18
19 // Returns nil if there is no such primary account
20 - (NSString* _Nullable)primaryiCloudAccountAltDSID;
21
22 - (BOOL)accountIsHSA2ByAltDSID:(NSString*)altDSID;
23
24 - (NSString* _Nullable)machineID:(NSError**)error;
25 - (void)fetchCurrentDeviceList:(void (^)(NSSet<NSString*>* _Nullable machineIDs, NSError* _Nullable error))complete;
26 - (void)registerNotification:(id<OTAuthKitAdapterNotifier>)notifier;
27 @end
28
29 @interface OTAuthKitActualAdapter : NSObject <OTAuthKitAdapter>
30 @end
31
32 NS_ASSUME_NONNULL_END
33
34 #endif // OCTAGON
35