]> git.saurik.com Git - apple/security.git/blob - OSX/sec/SOSCircle/SecureObjectSync/SOSAccountTrustClassic.h
Security-58286.270.3.0.1.tar.gz
[apple/security.git] / OSX / sec / SOSCircle / SecureObjectSync / SOSAccountTrustClassic.h
1 //
2 // SOSAccountTrustClassic.h
3 // Security
4 //
5
6 #ifndef SOSAccountTrustClassic_h
7 #define SOSAccountTrustClassic_h
8
9 #import <Security/SecureObjectSync/SOSAccountTransaction.h>
10 #import "Security/SecureObjectSync/SOSAccountTrust.h"
11 #import "Security/SecureObjectSync/SOSTypes.h"
12 #import "Security/SecureObjectSync/SOSTransportCircleKVS.h"
13 @class SOSAccount;
14
15 @interface SOSAccountTrustClassic : SOSAccountTrust
16
17 +(instancetype)trustClassic;
18
19 //Gestalt Dictionary
20 -(bool) updateGestalt:(SOSAccount*)account newGestalt:(CFDictionaryRef) new_gestalt;
21
22 //Peers
23 -(SOSPeerInfoRef) copyPeerWithID:(CFStringRef) peerid err:(CFErrorRef *)error;
24 -(bool) isAccountIdentity:(SOSPeerInfoRef)peerInfo err:(CFErrorRef *)error;
25 -(SecKeyRef) copyPublicKeyForPeer:(CFStringRef) peer_id err:(CFErrorRef *)error;
26 -(CFSetRef) copyPeerSetMatching:(SOSModifyPeerBlock)block;
27 -(CFArrayRef) copyPeersToListenTo:(SecKeyRef)userPublic err:(CFErrorRef *)error;
28 -(bool) peerSignatureUpdate:(SecKeyRef)privKey err:(CFErrorRef *)error;
29 -(bool) updatePeerInfo:(SOSKVSCircleStorageTransport*)circleTransport description:(CFStringRef)updateDescription err:(CFErrorRef *)error update:(SOSModifyPeerInfoBlock)block;
30 -(bool) addEscrowToPeerInfo:(SOSFullPeerInfoRef) myPeer err:(CFErrorRef *)error;
31
32 //Views
33 -(SOSViewResultCode) updateView:(SOSAccount*)account name:(CFStringRef) viewname code:(SOSViewActionCode) actionCode err:(CFErrorRef *)error;
34 -(SOSViewResultCode) viewStatus:(SOSAccount*)account name:(CFStringRef) viewname err:(CFErrorRef *)error;
35 -(bool) updateViewSets:(SOSAccount*)account enabled:(CFSetRef) origEnabledViews disabled:(CFSetRef) origDisabledViews;
36 -(bool) updateViewSetsWithAnalytics:(SOSAccount*)account enabled:(CFSetRef) origEnabledViews disabled:(CFSetRef) origDisabledViews parentEvent:(NSData*)parentEvent;
37
38 -(CFSetRef) copyPeerSetForView:(CFStringRef) viewName;
39
40 //DER
41 -(size_t) getDEREncodedSize:(SOSAccount*)account err:(NSError**)error;
42 -(uint8_t*) encodeToDER:(SOSAccount*)account err:(NSError**) error start:(const uint8_t*) der end:(uint8_t*)der_end;
43
44 //Syncing
45 -(CFMutableSetRef) CF_RETURNS_RETAINED syncWithPeers:(SOSAccountTransaction*) txn peerIDs:(CFSetRef) /* CFStringRef */ peerIDs err:(CFErrorRef *)error;
46 -(bool) requestSyncWithAllPeers:(SOSAccountTransaction*) txn key:(SecKeyRef)userPublic err:(CFErrorRef *)error;
47 -(SOSEngineRef) getDataSourceEngine:(SOSDataSourceFactoryRef)factory;
48
49
50 -(bool) postDebugScope:(SOSCircleStorageTransport*) circle_transport scope:(CFTypeRef) scope err:(CFErrorRef*)error;
51 -(SecKeyRef) copyDeviceKey:(CFErrorRef *)error;
52 -(void) addSyncablePeerBlock:(SOSAccountTransaction*)a dsName:(CFStringRef) ds_name change:(SOSAccountSyncablePeersBlock) changeBlock;
53 -(bool) clientPing:(SOSAccount*)account;
54 -(void) removeInvalidApplications:(SOSCircleRef) circle userPublic:(SecKeyRef)userPublic;
55
56 -(bool) addiCloudIdentity:(SOSCircleRef) circle key:(SecKeyRef) userKey err:(CFErrorRef*)error;
57 -(bool) removeIncompleteiCloudIdentities:(SOSCircleRef) circle privKey:(SecKeyRef) privKey err:(CFErrorRef *)error;
58 -(bool) upgradeiCloudIdentity:(SOSCircleRef) circle privKey:(SecKeyRef) privKey;
59 -(CFMutableSetRef) copyPreApprovedHSA2Info;
60
61 -(void) addRingDictionary;
62
63 @end
64 #endif /* SOSAccountTrustClassic_h */