]> git.saurik.com Git - apple/security.git/blob - keychain/SecureObjectSync/SOSAccountTrustClassic.h
Security-59306.41.2.tar.gz
[apple/security.git] / keychain / SecureObjectSync / SOSAccountTrustClassic.h
1 //
2 // SOSAccountTrustClassic.h
3 // Security
4 //
5
6 #ifndef SOSAccountTrustClassic_h
7 #define SOSAccountTrustClassic_h
8
9 #import "keychain/SecureObjectSync/SOSAccountTransaction.h"
10 #import "keychain/SecureObjectSync/SOSAccountTrust.h"
11 #import "keychain/SecureObjectSync/SOSTypes.h"
12 #import "keychain/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) updateViewSetsWithAnalytics:(SOSAccount*)account enabled:(CFSetRef) origEnabledViews disabled:(CFSetRef) origDisabledViews parentEvent:(NSData*)parentEvent;
36
37 -(CFSetRef) copyPeerSetForView:(CFStringRef) viewName;
38
39 //DER
40 -(size_t) getDEREncodedSize:(SOSAccount*)account err:(NSError**)error;
41 -(uint8_t*) encodeToDER:(SOSAccount*)account err:(NSError**) error start:(const uint8_t*) der end:(uint8_t*)der_end;
42
43 //Syncing
44 -(CFMutableSetRef) CF_RETURNS_RETAINED syncWithPeers:(SOSAccountTransaction*) txn peerIDs:(CFSetRef) /* CFStringRef */ peerIDs err:(CFErrorRef *)error;
45 -(bool) requestSyncWithAllPeers:(SOSAccountTransaction*) txn key:(SecKeyRef)userPublic err:(CFErrorRef *)error;
46 -(SOSEngineRef) getDataSourceEngine:(SOSDataSourceFactoryRef)factory;
47
48
49 -(bool) postDebugScope:(SOSCircleStorageTransport*) circle_transport scope:(CFTypeRef) scope err:(CFErrorRef*)error;
50 -(SecKeyRef) copyDeviceKey:(CFErrorRef *)error;
51 -(void) addSyncablePeerBlock:(SOSAccountTransaction*)a dsName:(CFStringRef) ds_name change:(SOSAccountSyncablePeersBlock) changeBlock;
52 -(bool) clientPing:(SOSAccount*)account;
53 -(void) removeInvalidApplications:(SOSCircleRef) circle userPublic:(SecKeyRef)userPublic;
54
55 -(bool) addiCloudIdentity:(SOSCircleRef) circle key:(SecKeyRef) userKey err:(CFErrorRef*)error;
56 -(bool) removeIncompleteiCloudIdentities:(SOSCircleRef) circle privKey:(SecKeyRef) privKey err:(CFErrorRef *)error;
57 -(bool) upgradeiCloudIdentity:(SOSCircleRef) circle privKey:(SecKeyRef) privKey;
58 -(CFMutableSetRef) copyPreApprovedHSA2Info;
59
60 -(void) addRingDictionary;
61 -(void) resetRingDictionary;
62
63
64 @end
65 #endif /* SOSAccountTrustClassic_h */