]> git.saurik.com Git - apple/security.git/blob - OSX/sec/SOSCircle/SecureObjectSync/SOSAccountTrust.h
Security-58286.51.6.tar.gz
[apple/security.git] / OSX / sec / SOSCircle / SecureObjectSync / SOSAccountTrust.h
1 //
2 // SOSAccountTrust_h
3 // Security
4
5 #ifndef SOSAccountTrust_h
6 #define SOSAccountTrust_h
7
8 #import <Foundation/Foundation.h>
9 #import <Security/SecureObjectSync/SOSCircle.h>
10 #import <Security/SecureObjectSync/SOSFullPeerInfo.h>
11 #import <Security/SecureObjectSync/SOSRing.h>
12
13 typedef bool (^SOSModifyCircleBlock)(SOSCircleRef circle);
14 typedef void (^SOSIteratePeerBlock)(SOSPeerInfoRef peerInfo);
15 typedef bool (^SOSModifyPeerBlock)(SOSPeerInfoRef peerInfo);
16 typedef bool (^SOSModifyPeerInfoBlock)(SOSFullPeerInfoRef fpi, CFErrorRef *error);
17 typedef SOSRingRef(^RingNameBlock)(CFStringRef name, SOSRingRef ring);
18 typedef void (^SOSModifyPeersInCircleBlock)(SOSCircleRef circle, CFMutableArrayRef appendPeersTo);
19
20 @interface SOSAccountTrust : NSObject
21 {
22 NSMutableDictionary * expansion;
23
24 SOSFullPeerInfoRef fullPeerInfo;
25 SOSPeerInfoRef peerInfo;
26 NSString* peerID;
27
28 SOSCircleRef trustedCircle;
29 NSMutableSet * retirees;
30 enum DepartureReason departureCode;
31
32 SecKeyRef _cachedOctagonSigningKey;
33 SecKeyRef _cachedOctagonEncryptionKey;
34 }
35 @property (strong, nonatomic) NSMutableDictionary * expansion;
36
37 @property (nonatomic) SOSFullPeerInfoRef fullPeerInfo;
38
39 // Convenince getters
40 @property (nonatomic, readonly) SOSPeerInfoRef peerInfo;
41 @property (nonatomic, readonly) NSString* peerID;
42
43
44 @property (nonatomic) SOSCircleRef trustedCircle;
45 @property (strong, nonatomic) NSMutableSet * retirees;
46 @property (nonatomic) enum DepartureReason departureCode;
47
48 @property (assign) SecKeyRef cachedOctagonSigningKey;
49 @property (assign) SecKeyRef cachedOctagonEncryptionKey;
50
51 +(instancetype)trust;
52
53 -(id)init;
54 -(id)initWithRetirees:(NSMutableSet*)retirees fpi:(SOSFullPeerInfoRef)identity circle:(SOSCircleRef) trusted_circle
55 departureCode:(enum DepartureReason)code peerExpansion:(NSMutableDictionary*)expansion;
56
57
58 @end
59
60 #endif /* Trust_h */