]> git.saurik.com Git - apple/security.git/blob - OSX/sec/SOSCircle/SecureObjectSync/SOSTransportKeyParameter.h
Security-57337.50.23.tar.gz
[apple/security.git] / OSX / sec / SOSCircle / SecureObjectSync / SOSTransportKeyParameter.h
1
2 #ifndef SOSTransportKeyParameter_h
3 #define SOSTransportKeyParameter_h
4
5 #include <CoreFoundation/CoreFoundation.h>
6 #include <CoreFoundation/CFRuntime.h>
7 #include <Security/SecureObjectSync/SOSAccount.h>
8
9 typedef struct __OpaqueSOSTransportKeyParameter * SOSTransportKeyParameterRef;
10
11 struct __OpaqueSOSTransportKeyParameter {
12 CFRuntimeBase _base;
13 SOSAccountRef account;
14 /* Connections from CF land to vtable land */
15 CFStringRef (*copyDescription)(SOSTransportKeyParameterRef object);
16 void (*destroy)(SOSTransportKeyParameterRef object);
17
18
19 // TODO: Make this take broader parameters and assemble the key parameters blob?
20 bool (*publishCloudParameters)(SOSTransportKeyParameterRef transport, CFDataRef data, CFErrorRef* error);
21 bool (*handleKeyParameterChanges)(SOSTransportKeyParameterRef transport, CFDataRef data, CFErrorRef error);
22 bool (*setToNewAccount)(SOSTransportKeyParameterRef transport, SOSAccountRef account);
23 CFIndex (*getTransportType)(SOSTransportKeyParameterRef transport, CFErrorRef *error);
24 };
25
26 bool SOSTransportKeyParameterPublishCloudParameters(SOSTransportKeyParameterRef transport, CFDataRef data, CFErrorRef* error);
27
28 SOSTransportKeyParameterRef SOSTransportKeyParameterCreateForSubclass(size_t size, SOSAccountRef account, CFErrorRef *error);
29 bool SOSTransportKeyParameterHandleKeyParameterChanges(SOSTransportKeyParameterRef transport, CFDataRef data, CFErrorRef error);
30 bool SOSTransportKeyParameterHandleNewAccount(SOSTransportKeyParameterRef transport, SOSAccountRef account);
31 CFTypeID SOSTransportKeyParameterGetTypeID(void);
32
33 SOSAccountRef SOSTransportKeyParameterGetAccount(SOSTransportKeyParameterRef transport);
34 CFIndex SOSTransportKeyParameterGetTransportType(SOSTransportKeyParameterRef transport, CFErrorRef *error);
35 bool SOSTransportKeyParameterPublishLastKeyParameters(SOSTransportKeyParameterRef transport, CFDataRef Parameters, CFErrorRef *error);
36
37 #endif