5 #import "Security/SecureObjectSync/SOSAccountPriv.h"
6 #import "Security/SecureObjectSync/SOSAccountTrust.h"
8 @implementation SOSAccountTrust
12 return [[SOSAccountTrust alloc]init];
20 self.retirees = [NSMutableSet set];
21 self.fullPeerInfo = NULL;
22 self.trustedCircle = NULL;
23 self.departureCode = kSOSDepartureReasonError;
24 self.expansion = [NSMutableDictionary dictionary];
29 -(id)initWithRetirees:(NSMutableSet*)r fpi:(SOSFullPeerInfoRef)fpi circle:(SOSCircleRef) trusted_circle
30 departureCode:(enum DepartureReason)code peerExpansion:(NSMutableDictionary*)e
37 self.fullPeerInfo = fpi;
38 self.trustedCircle = trusted_circle;
39 self.departureCode = code;
45 - (SOSPeerInfoRef) peerInfo {
46 return SOSFullPeerInfoGetPeerInfo(self.fullPeerInfo);
49 - (NSString*) peerID {
50 return (__bridge_transfer NSString*) CFRetainSafe(SOSPeerInfoGetPeerID(self.peerInfo));
53 @synthesize trustedCircle = trustedCircle;
55 - (void) setTrustedCircle:(SOSCircleRef) circle {
56 CFRetainAssign(self->trustedCircle, circle);
59 @synthesize retirees = retirees;
61 -(void) setRetirees:(NSSet *)newRetirees
63 self->retirees = newRetirees.mutableCopy;
66 @synthesize fullPeerInfo = fullPeerInfo;
68 - (void) setFullPeerInfo:(SOSFullPeerInfoRef) newIdentity {
69 CFRetainAssign(self->fullPeerInfo, newIdentity);
72 @synthesize expansion = expansion;
74 -(void)setExpansion:(NSDictionary*) newExpansion
76 self->expansion = newExpansion.mutableCopy;
79 @synthesize departureCode = departureCode;
81 -(void)setDepartureCode:(enum DepartureReason)newDepartureCode
83 self->departureCode = newDepartureCode;