]> git.saurik.com Git - apple/security.git/blob - OSX/sec/SOSCircle/SecureObjectSync/SOSKVSKeys.h
Security-57337.50.23.tar.gz
[apple/security.git] / OSX / sec / SOSCircle / SecureObjectSync / SOSKVSKeys.h
1
2
3 #ifndef SOSKVSKEYS_H
4 #define SOSKVSKEYS_H
5
6 #include "SOSCircle.h"
7 #include <Security/SecureObjectSync/SOSTransportMessage.h>
8 #include <Security/SecureObjectSync/SOSTransportMessageKVS.h>
9
10 //
11 // MARK: Key formation
12 //
13
14 typedef enum {
15 kCircleKey = 0,
16 kMessageKey,
17 kParametersKey,
18 kInitialSyncKey,
19 kRetirementKey,
20 kAccountChangedKey,
21 kDebugInfoKey,
22 kRingKey,
23 kPeerInfoKey,
24 kLastCircleKey,
25 kLastKeyParameterKey,
26 kUnknownKey,
27 } SOSKVSKeyType;
28
29 extern const CFStringRef kSOSKVSKeyParametersKey;
30 extern const CFStringRef kSOSKVSInitialSyncKey;
31 extern const CFStringRef kSOSKVSAccountChangedKey;
32 extern const CFStringRef kSOSKVSRequiredKey;
33 extern const CFStringRef kSOSKVSOfficialDSIDKey;
34
35 //extern const CFStringRef kSOSKVSDebugInfo;
36
37 extern const CFStringRef sCirclePrefix;
38 extern const CFStringRef sRetirementPrefix;
39 extern const CFStringRef sLastCirclePushedPrefix;
40 extern const CFStringRef sLastKeyParametersPushedPrefix;
41 extern const CFStringRef sDebugInfoPrefix;
42
43 SOSKVSKeyType SOSKVSKeyGetKeyType(CFStringRef key);
44 SOSKVSKeyType SOSKVSKeyGetKeyTypeAndParse(CFStringRef key, CFStringRef *circle, CFStringRef *peerInfo, CFStringRef *ring, CFStringRef *backupName, CFStringRef *from, CFStringRef *to);
45
46 CFStringRef SOSCircleKeyCreateWithCircle(SOSCircleRef circle, CFErrorRef *error);
47 CFStringRef SOSPeerInfoKeyCreateWithName(CFStringRef peer_info_name, CFErrorRef *error);
48 CFStringRef SOSRingKeyCreateWithName(CFStringRef ring_name, CFErrorRef *error);
49
50
51 CFStringRef SOSCircleKeyCreateWithName(CFStringRef name, CFErrorRef *error);
52 CFStringRef SOSCircleKeyCopyCircleName(CFStringRef key, CFErrorRef *error);
53 CFStringRef SOSMessageKeyCreateWithCircleNameAndPeerNames(CFStringRef circleName, CFStringRef from_peer_name, CFStringRef to_peer_name);
54
55 CFStringRef SOSMessageKeyCopyCircleName(CFStringRef key, CFErrorRef *error);
56 CFStringRef SOSMessageKeyCopyFromPeerName(CFStringRef messageKey, CFErrorRef *error);
57 CFStringRef SOSMessageKeyCreateWithCircleAndPeerNames(SOSCircleRef circle, CFStringRef from_peer_name, CFStringRef to_peer_name);
58 CFStringRef SOSMessageKeyCreateWithCircleAndPeerInfos(SOSCircleRef circle, SOSPeerInfoRef from_peer, SOSPeerInfoRef to_peer);
59
60 CFStringRef SOSRetirementKeyCreateWithCircleNameAndPeer(CFStringRef circle_name, CFStringRef retirement_peer_name);
61 CFStringRef SOSRetirementKeyCreateWithCircleAndPeer(SOSCircleRef circle, CFStringRef retirement_peer_name);
62
63 CFStringRef SOSMessageKeyCreateFromTransportToPeer(SOSTransportMessageKVSRef transport, CFStringRef peer_name);
64 CFStringRef SOSMessageKeyCreateFromPeerToTransport(SOSTransportMessageKVSRef transport, CFStringRef peer_name);
65 CFStringRef SOSMessageKeyCreateWithCircleNameAndTransportType(CFStringRef circleName, CFStringRef transportType);
66
67 CFStringRef SOSPeerInfoV2KeyCreateWithPeerName(CFStringRef peer_name);
68 CFStringRef SOSRingKeyCreateWithRingName(CFStringRef ring_name);
69 CFStringRef SOSLastCirclePushedKeyCreateWithCircleNameAndPeerID(CFStringRef circleName, CFStringRef peerID);
70 CFStringRef SOSLastCirclePushedKeyCreateWithAccountGestalt(SOSAccountRef account);
71 CFStringRef SOSLastKeyParametersPushedKeyCreateWithPeerID(CFStringRef peerID);
72 CFStringRef SOSLastKeyParametersPushedKeyCreateWithAccountGestalt(SOSAccountRef account);
73 CFStringRef SOSDebugInfoKeyCreateWithTypeName(CFStringRef type_name);
74
75 #endif