]> git.saurik.com Git - apple/security.git/blob - keychain/ot/OTAuthKitAdapter.h
Security-59306.101.1.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:(NSError **)error;
21
22 - (BOOL)accountIsHSA2ByAltDSID:(NSString*)altDSID;
23 - (BOOL)accountIsDemoAccount:(NSError**)error NS_SWIFT_NOTHROW;
24
25 - (NSString* _Nullable)machineID:(NSError**)error;
26 - (void)fetchCurrentDeviceList:(void (^)(NSSet<NSString*>* _Nullable machineIDs, NSError* _Nullable error))complete;
27 - (void)registerNotification:(id<OTAuthKitAdapterNotifier>)notifier;
28 @end
29
30 @interface OTAuthKitActualAdapter : NSObject <OTAuthKitAdapter>
31 @end
32
33 NS_ASSUME_NONNULL_END
34
35 #endif // OCTAGON
36