]> git.saurik.com Git - apple/security.git/blob - Security/sec/SOSCircle/SecureObjectSync/SOSKVSKeys.h
Security-57031.1.35.tar.gz
[apple/security.git] / Security / sec / SOSCircle / SecureObjectSync / SOSKVSKeys.h
1
2
3 #ifndef SOSKVSKEYS_H
4 #define SOSKVSKEYS_H
5
6 #include "SOSCircle.h"
7 #include <SecureObjectSync/SOSTransportMessage.h>
8 #include <SecureObjectSync/SOSTransportMessageKVS.h>
9
10 //
11 // MARK: Key formation
12 //
13
14 typedef enum {
15 kCircleKey,
16 kMessageKey,
17 kParametersKey,
18 kInitialSyncKey,
19 kRetirementKey,
20 kAccountChangedKey,
21 kUnknownKey,
22 } SOSKVSKeyType;
23
24 extern const CFStringRef kSOSKVSKeyParametersKey;
25 extern const CFStringRef kSOSKVSInitialSyncKey;
26 extern const CFStringRef kSOSKVSAccountChangedKey;
27 extern const CFStringRef sCirclePrefix;
28 extern const CFStringRef sRetirementPrefix;
29
30
31 SOSKVSKeyType SOSKVSKeyGetKeyType(CFStringRef key);
32 SOSKVSKeyType SOSKVSKeyGetKeyTypeAndParse(CFStringRef key, CFStringRef *circle, CFStringRef *from, CFStringRef *to);
33
34 CFStringRef SOSCircleKeyCreateWithCircle(SOSCircleRef circle, CFErrorRef *error);
35 CFStringRef SOSCircleKeyCreateWithName(CFStringRef name, CFErrorRef *error);
36 CFStringRef SOSCircleKeyCopyCircleName(CFStringRef key, CFErrorRef *error);
37 CFStringRef SOSMessageKeyCreateWithCircleNameAndPeerNames(CFStringRef circleName, CFStringRef from_peer_name, CFStringRef to_peer_name);
38
39 CFStringRef SOSMessageKeyCopyCircleName(CFStringRef key, CFErrorRef *error);
40 CFStringRef SOSMessageKeyCopyFromPeerName(CFStringRef messageKey, CFErrorRef *error);
41 CFStringRef SOSMessageKeyCreateWithCircleAndPeerNames(SOSCircleRef circle, CFStringRef from_peer_name, CFStringRef to_peer_name);
42 CFStringRef SOSMessageKeyCreateWithCircleAndPeerInfos(SOSCircleRef circle, SOSPeerInfoRef from_peer, SOSPeerInfoRef to_peer);
43
44 CFStringRef SOSRetirementKeyCreateWithCircleNameAndPeer(CFStringRef circle_name, CFStringRef retirement_peer_name);
45 CFStringRef SOSRetirementKeyCreateWithCircleAndPeer(SOSCircleRef circle, CFStringRef retirement_peer_name);
46
47 CFStringRef SOSMessageKeyCreateFromTransportToPeer(SOSTransportMessageKVSRef transport, CFStringRef peer_name);
48 CFStringRef SOSMessageKeyCreateFromPeerToTransport(SOSTransportMessageKVSRef transport, CFStringRef peer_name);
49
50 #endif