]> git.saurik.com Git - apple/security.git/blob - OSX/sec/SOSCircle/SecureObjectSync/SOSAccountTrustClassic.h
Security-58286.60.28.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
43 //DER
44 -(size_t) getDEREncodedSize:(SOSAccount*)account err:(NSError**)error;
45 -(uint8_t*) encodeToDER:(SOSAccount*)account err:(NSError**) error start:(const uint8_t*) der end:(uint8_t*)der_end;
46
47 //Syncing
48 -(CFMutableSetRef) CF_RETURNS_RETAINED syncWithPeers:(SOSAccountTransaction*) txn peerIDs:(CFSetRef) /* CFStringRef */ peerIDs err:(CFErrorRef *)error;
49 -(bool) requestSyncWithAllPeers:(SOSAccountTransaction*) txn key:(SecKeyRef)userPublic err:(CFErrorRef *)error;
50 -(SOSEngineRef) getDataSourceEngine:(SOSDataSourceFactoryRef)factory;
51
52
53 -(bool) postDebugScope:(SOSCircleStorageTransport*) circle_transport scope:(CFTypeRef) scope err:(CFErrorRef*)error;
54 -(SecKeyRef) copyDeviceKey:(CFErrorRef *)error;
55 -(void) addSyncablePeerBlock:(SOSAccountTransaction*)a dsName:(CFStringRef) ds_name change:(SOSAccountSyncablePeersBlock) changeBlock;
56 -(bool) clientPing:(SOSAccount*)account;
57 -(void) removeInvalidApplications:(SOSCircleRef) circle userPublic:(SecKeyRef)userPublic;
58
59 -(bool) addiCloudIdentity:(SOSCircleRef) circle key:(SecKeyRef) userKey err:(CFErrorRef*)error;
60 -(bool) removeIncompleteiCloudIdentities:(SOSCircleRef) circle privKey:(SecKeyRef) privKey err:(CFErrorRef *)error;
61 -(bool) upgradeiCloudIdentity:(SOSCircleRef) circle privKey:(SecKeyRef) privKey;
62 -(CFMutableSetRef) copyPreApprovedHSA2Info;
63
64 -(void) addRingDictionary;
65
66 @end
67 #endif /* SOSAccountTrustClassic_h */