]>
Commit | Line | Data |
---|---|---|
d8f41ccd A |
1 | |
2 | #ifndef SOSTransportKeyParameter_h | |
3 | #define SOSTransportKeyParameter_h | |
4 | ||
5 | #include <CoreFoundation/CoreFoundation.h> | |
6 | #include <CoreFoundation/CFRuntime.h> | |
5c19dc3a | 7 | #include <Security/SecureObjectSync/SOSAccount.h> |
d8f41ccd A |
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); | |
5c19dc3a A |
22 | bool (*setToNewAccount)(SOSTransportKeyParameterRef transport, SOSAccountRef account); |
23 | CFIndex (*getTransportType)(SOSTransportKeyParameterRef transport, CFErrorRef *error); | |
d8f41ccd A |
24 | }; |
25 | ||
5c19dc3a | 26 | bool SOSTransportKeyParameterPublishCloudParameters(SOSTransportKeyParameterRef transport, CFDataRef data, CFErrorRef* error); |
d8f41ccd | 27 | |
d8f41ccd A |
28 | SOSTransportKeyParameterRef SOSTransportKeyParameterCreateForSubclass(size_t size, SOSAccountRef account, CFErrorRef *error); |
29 | bool SOSTransportKeyParameterHandleKeyParameterChanges(SOSTransportKeyParameterRef transport, CFDataRef data, CFErrorRef error); | |
5c19dc3a A |
30 | bool SOSTransportKeyParameterHandleNewAccount(SOSTransportKeyParameterRef transport, SOSAccountRef account); |
31 | CFTypeID SOSTransportKeyParameterGetTypeID(void); | |
d8f41ccd A |
32 | |
33 | SOSAccountRef SOSTransportKeyParameterGetAccount(SOSTransportKeyParameterRef transport); | |
5c19dc3a A |
34 | CFIndex SOSTransportKeyParameterGetTransportType(SOSTransportKeyParameterRef transport, CFErrorRef *error); |
35 | bool SOSTransportKeyParameterPublishLastKeyParameters(SOSTransportKeyParameterRef transport, CFDataRef Parameters, CFErrorRef *error); | |
d8f41ccd A |
36 | |
37 | #endif |