]> git.saurik.com Git - apple/security.git/blob - keychain/ot/OTSOSAdapter.h
Security-59754.41.1.tar.gz
[apple/security.git] / keychain / ot / OTSOSAdapter.h
1 #if OCTAGON
2
3 #import "keychain/ckks/CKKSPeer.h"
4 #import "keychain/ckks/CKKSPeerProvider.h"
5 #import "keychain/ot/OTDefines.h"
6 #import "keychain/SecureObjectSync/SOSCloudCircle.h"
7
8 NS_ASSUME_NONNULL_BEGIN
9
10 @protocol OTSOSAdapter <CKKSPeerProvider>
11 @property bool sosEnabled;
12 - (SOSCCStatus)circleStatus:(NSError**)error;
13 - (id<CKKSSelfPeer> _Nullable)currentSOSSelf:(NSError**)error;
14 - (NSSet<id<CKKSRemotePeerProtocol>>* _Nullable)fetchTrustedPeers:(NSError**)error;
15 - (BOOL)updateOctagonKeySetWithAccount:(id<CKKSSelfPeer>)currentSelfPeer error:(NSError**)error;
16 - (BOOL)preloadOctagonKeySetOnAccount:(id<CKKSSelfPeer>)currentSelfPeer error:(NSError**)error;
17 - (BOOL)updateCKKS4AllStatus:(BOOL)status error:(NSError**)error;
18
19 - (BOOL)safariViewSyncingEnabled:(NSError**)error __attribute__((swift_error(nonnull_error)));
20 @end
21
22 @interface OTSOSActualAdapter : NSObject <OTSOSAdapter>
23 - (instancetype)init NS_UNAVAILABLE;
24 - (instancetype)initAsEssential:(BOOL)essential;
25
26 // Helper methods.
27 + (NSSet<NSString*>*)sosCKKSViewList;
28 @end
29
30
31 // This adapter is for a platform which does not have SOS (e.g., aTV, Watch, HomePod)
32 @interface OTSOSMissingAdapter : NSObject <OTSOSAdapter>
33 @end
34
35 // Helper code
36 @interface OTSOSAdapterHelpers : NSObject
37 + (NSArray<NSData*>* _Nullable)peerPublicSigningKeySPKIsForCircle:(id<OTSOSAdapter>)sosAdapter error:(NSError**)error;
38 @end
39
40 NS_ASSUME_NONNULL_END
41
42 #endif // OCTAGON