]> git.saurik.com Git - apple/security.git/blob - Security/sec/SOSCircle/SecureObjectSync/SOSTransportCircle.h
Security-57031.1.35.tar.gz
[apple/security.git] / Security / sec / SOSCircle / SecureObjectSync / SOSTransportCircle.h
1
2 #ifndef SOSTransportCircle_h
3 #define SOSTransportCircle_h
4
5 #include <CoreFoundation/CoreFoundation.h>
6 #include <CoreFoundation/CFRuntime.h>
7 #include <SecureObjectSync/SOSAccount.h>
8
9 typedef struct __OpaqueSOSTransportCircle * SOSTransportCircleRef;
10
11 struct __OpaqueSOSTransportCircle {
12 CFRuntimeBase _base;
13 SOSAccountRef account;
14
15 CFStringRef (*copyDescription)(SOSTransportCircleRef transport);
16 void (*destroy)(SOSTransportCircleRef transport);
17
18 bool (*postRetirement)(SOSTransportCircleRef transport, CFStringRef circleName, CFStringRef peer_id, CFDataRef retirement_data, CFErrorRef *error);
19 bool (*expireRetirementRecords)(SOSTransportCircleRef transport, CFDictionaryRef retirements, CFErrorRef *error);
20 bool (*flushChanges)(SOSTransportCircleRef transport, CFErrorRef *error);
21 bool (*postCircle)(SOSTransportCircleRef transport, CFStringRef circleName, CFDataRef circle_data, CFErrorRef *error);
22 CFDictionaryRef (*handleRetirementMessages)(SOSTransportCircleRef transport, CFMutableDictionaryRef circle_retirement_messages_table, CFErrorRef *error);
23 CFArrayRef (*handleCircleMessages)(SOSTransportCircleRef transport, CFMutableDictionaryRef circle_circle_messages_table, CFErrorRef *error);
24
25 };
26
27 SOSTransportCircleRef SOSTransportCircleCreateForSubclass(size_t size, SOSAccountRef account, CFErrorRef *error);
28
29 bool SOSTransportCirclePostCircle(SOSTransportCircleRef transport, CFStringRef circleName, CFDataRef circle_data, CFErrorRef *error);
30
31 bool SOSTransportCirclePostRetirement(SOSTransportCircleRef transport, CFStringRef circleName, CFStringRef peer_id, CFDataRef retirement_data, CFErrorRef *error);
32
33 bool SOSTransportCircleExpireRetirementRecords(SOSTransportCircleRef transport, CFDictionaryRef retirements, CFErrorRef *error);
34
35 bool SOSTransportCircleFlushChanges(SOSTransportCircleRef transport, CFErrorRef *error);
36
37
38 SOSAccountRef SOSTransportCircleGetAccount(SOSTransportCircleRef transport);
39 CF_RETURNS_RETAINED CFDictionaryRef SOSTransportCircleHandleRetirementMessages(SOSTransportCircleRef transport, CFMutableDictionaryRef circle_retirement_messages_table, CFErrorRef *error);
40
41
42 CF_RETURNS_RETAINED CFArrayRef SOSTransportCircleHandleCircleMessages(SOSTransportCircleRef transport, CFMutableDictionaryRef circle_circle_messages_table, CFErrorRef *error);
43
44
45 #endif