]> git.saurik.com Git - apple/security.git/blob - OSX/sec/SOSCircle/SecureObjectSync/SOSAccountTrust.h
Security-58286.41.2.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 @property (strong, nonatomic) NSMutableDictionary * expansion;
33
34 @property (nonatomic) SOSFullPeerInfoRef fullPeerInfo;
35
36 // Convenince getters
37 @property (nonatomic, readonly) SOSPeerInfoRef peerInfo;
38 @property (nonatomic, readonly) NSString* peerID;
39
40
41 @property (nonatomic) SOSCircleRef trustedCircle;
42 @property (strong, nonatomic) NSMutableSet * retirees;
43 @property (nonatomic) enum DepartureReason departureCode;
44
45 +(instancetype)trust;
46
47 -(id)init;
48 -(id)initWithRetirees:(NSMutableSet*)retirees fpi:(SOSFullPeerInfoRef)identity circle:(SOSCircleRef) trusted_circle
49 departureCode:(enum DepartureReason)code peerExpansion:(NSMutableDictionary*)expansion;
50
51
52 @end
53
54 #endif /* Trust_h */