5 #ifndef SOSAccountTrust_h
6 #define SOSAccountTrust_h
8 #import <Foundation/Foundation.h>
9 #import "keychain/SecureObjectSync/SOSCircle.h"
10 #import "keychain/SecureObjectSync/SOSFullPeerInfo.h"
11 #import "keychain/SecureObjectSync/SOSRing.h"
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
);
20 @interface SOSAccountTrust
: NSObject
22 NSMutableDictionary
* expansion
;
24 SOSFullPeerInfoRef fullPeerInfo
;
25 SOSPeerInfoRef peerInfo
;
28 SOSCircleRef trustedCircle
;
29 NSMutableSet
* retirees
;
30 enum DepartureReason departureCode
;
32 SecKeyRef _cachedOctagonSigningKey
;
33 SecKeyRef _cachedOctagonEncryptionKey
;
35 @
property (strong
, nonatomic
) NSMutableDictionary
* expansion
;
37 @
property (nonatomic
) SOSFullPeerInfoRef fullPeerInfo
;
40 @
property (nonatomic
, readonly
) SOSPeerInfoRef peerInfo
;
41 @
property (nonatomic
, readonly
) NSString
* peerID
;
44 @
property (nonatomic
) SOSCircleRef trustedCircle
;
45 @
property (strong
, nonatomic
) NSMutableSet
* retirees
;
46 @
property (nonatomic
) enum DepartureReason departureCode
;
48 @
property (assign
) SecKeyRef cachedOctagonSigningKey
;
49 @
property (assign
) SecKeyRef cachedOctagonEncryptionKey
;
54 -(id
)initWithRetirees
:(NSMutableSet
*)retirees fpi
:(SOSFullPeerInfoRef
)identity circle
:(SOSCircleRef
) trusted_circle
55 departureCode
:(enum DepartureReason
)code peerExpansion
:(NSMutableDictionary
*)expansion
;