]> git.saurik.com Git - apple/security.git/blame - OSX/sec/SOSCircle/SecureObjectSync/SOSPeerInfoV2.h
Security-57740.20.22.tar.gz
[apple/security.git] / OSX / sec / SOSCircle / SecureObjectSync / SOSPeerInfoV2.h
CommitLineData
5c19dc3a
A
1//
2// SOSPeerInfoV2.h
3// sec
4//
5// Created by Richard Murphy on 1/26/15.
6//
7//
8
9#ifndef _sec_SOSPeerInfoV2_
10#define _sec_SOSPeerInfoV2_
11
12#include <CoreFoundation/CFRuntime.h>
13#include <CoreFoundation/CoreFoundation.h>
14#include <Security/SecureObjectSync/SOSPeerInfo.h>
15#include <Security/SecureObjectSync/SOSPeerInfoPriv.h>
16#include <Security/SecureObjectSync/SOSViews.h>
17#include <Security/SecureObjectSync/SOSPeerInfoSecurityProperties.h>
18
19// Description Dictionary Entries Added for V2
20extern CFStringRef sV2DictionaryKey; // CFData wrapper for V2 extensions
21extern CFStringRef sViewsKey; // Set of Views
22extern CFStringRef sSerialNumberKey; // Device Serial Number
23extern CFStringRef sSecurityPropertiesKey; // Set of Security Properties
24extern CFStringRef kSOSHsaCrKeyDictionary; // HSA Challenge-Response area
25extern CFStringRef sPreferIDS; // Whether or not a peer requires to speak over IDS or KVS
fa7225c8
A
26extern CFStringRef sPreferIDSFragmentation; // Whether or not a peer requires to speak over fragmented IDS or not
27
5c19dc3a
A
28extern CFStringRef sTransportType; // Dictates the transport type
29extern CFStringRef sDeviceID; // The IDS device id
30extern CFStringRef sRingState; // Dictionary of Ring Membership States
31extern CFStringRef sBackupKeyKey;
e0e0d90e 32extern CFStringRef sEscrowRecord;
5c19dc3a
A
33
34bool SOSPeerInfoUpdateToV2(SOSPeerInfoRef pi, CFErrorRef *error);
35void SOSPeerInfoPackV2Data(SOSPeerInfoRef peer);
36bool SOSPeerInfoExpandV2Data(SOSPeerInfoRef pi, CFErrorRef *error);
37void SOSPeerInfoV2DictionarySetValue(SOSPeerInfoRef peer, const void *key, const void *value);
38void SOSPeerInfoV2DictionaryRemoveValue(SOSPeerInfoRef peer, const void *key);
e0e0d90e 39
5c19dc3a
A
40const CFMutableDataRef SOSPeerInfoV2DictionaryCopyData(SOSPeerInfoRef pi, const void *key);
41const CFMutableSetRef SOSPeerInfoV2DictionaryCopySet(SOSPeerInfoRef pi, const void *key);
42const CFMutableStringRef SOSPeerInfoV2DictionaryCopyString(SOSPeerInfoRef pi, const void *key);
43const CFBooleanRef SOSPeerInfoV2DictionaryCopyBoolean(SOSPeerInfoRef pi, const void *key);
e0e0d90e
A
44const CFMutableDictionaryRef SOSPeerInfoV2DictionaryCopyDictionary(SOSPeerInfoRef pi, const void *key);
45
5c19dc3a
A
46bool SOSPeerInfoV2DictionaryHasSet(SOSPeerInfoRef pi, const void *key);
47bool SOSPeerInfoV2DictionaryHasData(SOSPeerInfoRef pi, const void *key);
48bool SOSPeerInfoV2DictionaryHasString(SOSPeerInfoRef pi, const void *key);
49bool SOSPeerInfoV2DictionaryHasBoolean(SOSPeerInfoRef pi, const void *key);
50
51bool SOSPeerInfoV2DictionaryHasSetContaining(SOSPeerInfoRef pi, const void *key, const void* value);
52void SOSPeerInfoV2DictionaryForEachSetValue(SOSPeerInfoRef pi, const void *key, void (^action)(const void* value));
53void SOSPeerInfoV2DictionaryWithSet(SOSPeerInfoRef pi, const void *key, void(^operation)(CFSetRef set));
54
55
56bool SOSPeerInfoSerialNumberIsSet(SOSPeerInfoRef pi);
57void SOSPeerInfoSetSerialNumber(SOSPeerInfoRef pi);
fa7225c8 58CFStringRef SOSPeerInfoCopySerialNumber(SOSPeerInfoRef pi);
5c19dc3a
A
59
60#endif /* defined(_sec_SOSPeerInfoV2_) */