]> git.saurik.com Git - apple/security.git/blob - OSX/sec/SOSCircle/SecureObjectSync/SOSAccountTrustClassic.h
Security-58286.41.2.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
20 //Security Properties
21 -(SOSSecurityPropertyResultCode) UpdateSecurityProperty:(SOSAccount*)account property:(CFStringRef)property code:(SOSSecurityPropertyActionCode)actionCode err:(CFErrorRef*)error;
22 -(SOSSecurityPropertyResultCode) SecurityPropertyStatus:(CFStringRef)property err:(CFErrorRef *)error;
23
24 //Gestalt Dictionary
25 -(bool) updateGestalt:(SOSAccount*)account newGestalt:(CFDictionaryRef) new_gestalt;
26
27 //Peers
28 -(SOSPeerInfoRef) copyPeerWithID:(CFStringRef) peerid err:(CFErrorRef *)error;
29 -(bool) isAccountIdentity:(SOSPeerInfoRef)peerInfo err:(CFErrorRef *)error;
30 -(SecKeyRef) copyPublicKeyForPeer:(CFStringRef) peer_id err:(CFErrorRef *)error;
31 -(CFSetRef) copyPeerSetMatching:(SOSModifyPeerBlock)block;
32 -(CFArrayRef) copyPeersToListenTo:(SecKeyRef)userPublic err:(CFErrorRef *)error;
33 -(bool) peerSignatureUpdate:(SecKeyRef)privKey err:(CFErrorRef *)error;
34 -(bool) updatePeerInfo:(SOSKVSCircleStorageTransport*)circleTransport description:(CFStringRef)updateDescription err:(CFErrorRef *)error update:(SOSModifyPeerInfoBlock)block;
35 -(bool) addEscrowToPeerInfo:(SOSFullPeerInfoRef) myPeer err:(CFErrorRef *)error;
36
37 //Views
38 -(SOSViewResultCode) updateView:(SOSAccount*)account name:(CFStringRef) viewname code:(SOSViewActionCode) actionCode err:(CFErrorRef *)error;
39 -(SOSViewResultCode) viewStatus:(SOSAccount*)account name:(CFStringRef) viewname err:(CFErrorRef *)error;
40 -(bool) updateViewSets:(SOSAccount*)account enabled:(CFSetRef) origEnabledViews disabled:(CFSetRef) origDisabledViews;
41 -(CFSetRef) copyPeerSetForView:(CFStringRef) viewName;
42 -(void) peerGotInSync:(SOSAccountTransaction*) aTxn peerID:(CFStringRef) peerID views:(CFSetRef) views;
43
44 //DER
45 -(size_t) getDEREncodedSize:(SOSAccount*)account err:(NSError**)error;
46 -(uint8_t*) encodeToDER:(SOSAccount*)account err:(NSError**) error start:(const uint8_t*) der end:(uint8_t*)der_end;
47
48 //Syncing
49 -(CFMutableSetRef) CF_RETURNS_RETAINED syncWithPeers:(SOSAccountTransaction*) txn peerIDs:(CFSetRef) /* CFStringRef */ peerIDs err:(CFErrorRef *)error;
50 -(bool) requestSyncWithAllPeers:(SOSAccountTransaction*) txn key:(SecKeyRef)userPublic err:(CFErrorRef *)error;
51 -(SOSEngineRef) getDataSourceEngine:(SOSDataSourceFactoryRef)factory;
52
53
54 -(bool) postDebugScope:(SOSCircleStorageTransport*) circle_transport scope:(CFTypeRef) scope err:(CFErrorRef*)error;
55 -(SecKeyRef) copyDeviceKey:(CFErrorRef *)error;
56 -(void) addSyncablePeerBlock:(SOSAccountTransaction*)a dsName:(CFStringRef) ds_name change:(SOSAccountSyncablePeersBlock) changeBlock;
57 -(bool) clientPing:(SOSAccount*)account;
58 -(void) removeInvalidApplications:(SOSCircleRef) circle userPublic:(SecKeyRef)userPublic;
59
60 -(bool) addiCloudIdentity:(SOSCircleRef) circle key:(SecKeyRef) userKey err:(CFErrorRef*)error;
61 -(bool) removeIncompleteiCloudIdentities:(SOSCircleRef) circle privKey:(SecKeyRef) privKey err:(CFErrorRef *)error;
62 -(bool) upgradeiCloudIdentity:(SOSCircleRef) circle privKey:(SecKeyRef) privKey;
63 -(CFMutableSetRef) copyPreApprovedHSA2Info;
64
65 -(void) addRingDictionary;
66
67 @end
68 #endif /* SOSAccountTrustClassic_h */