]> git.saurik.com Git - apple/security.git/blob - OSX/sec/SOSCircle/SecureObjectSync/SOSTransportCircle.h
Security-57336.1.9.tar.gz
[apple/security.git] / OSX / 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 <Security/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 CFIndex (*getTransportType)(SOSTransportCircleRef transport, CFErrorRef *error);
23
24 CFDictionaryRef (*handleRetirementMessages)(SOSTransportCircleRef transport, CFMutableDictionaryRef circle_retirement_messages_table, CFErrorRef *error);
25 CFArrayRef (*handleCircleMessages)(SOSTransportCircleRef transport, CFMutableDictionaryRef circle_circle_messages_table, CFErrorRef *error);
26
27 bool (*sendPeerInfo)(SOSTransportCircleRef transport, CFStringRef peerID, CFDataRef peerInfoData, CFErrorRef *error);
28 bool (*flushRingChanges)(SOSTransportCircleRef transport, CFErrorRef* error);
29 bool (*postRing)(SOSTransportCircleRef transport, CFStringRef ringName, CFDataRef ring, CFErrorRef *error);
30 bool (*sendDebugInfo)(SOSTransportCircleRef transport, CFStringRef type, CFTypeRef debugInfo, CFErrorRef *error);
31 bool (*sendAccountChangedWithDSID)(SOSTransportCircleRef transport, CFStringRef dsid, CFErrorRef *error);
32 };
33
34 SOSTransportCircleRef SOSTransportCircleCreateForSubclass(size_t size, SOSAccountRef account, CFErrorRef *error);
35
36 bool SOSTransportCirclePostCircle(SOSTransportCircleRef transport, CFStringRef circleName, CFDataRef circle_data, CFErrorRef *error);
37
38 bool SOSTransportCirclePostRetirement(SOSTransportCircleRef transport, CFStringRef circleName, SOSPeerInfoRef peer, CFErrorRef *error);
39
40 bool SOSTransportCircleExpireRetirementRecords(SOSTransportCircleRef transport, CFDictionaryRef retirements, CFErrorRef *error);
41
42 bool SOSTransportCircleFlushChanges(SOSTransportCircleRef transport, CFErrorRef *error);
43
44 CFTypeID SOSTransportCircleGetTypeID(void);
45
46 CFIndex SOSTransportCircleGetTransportType(SOSTransportCircleRef transport, CFErrorRef *error);
47
48 SOSAccountRef SOSTransportCircleGetAccount(SOSTransportCircleRef transport);
49 CF_RETURNS_RETAINED CFDictionaryRef SOSTransportCircleHandleRetirementMessages(SOSTransportCircleRef transport, CFMutableDictionaryRef circle_retirement_messages_table, CFErrorRef *error);
50
51
52 CF_RETURNS_RETAINED CFArrayRef SOSTransportCircleHandleCircleMessages(SOSTransportCircleRef transport, CFMutableDictionaryRef circle_circle_messages_table, CFErrorRef *error);
53
54 bool SOSTransportCircleSendPeerInfo(SOSTransportCircleRef transport, CFStringRef peerID, CFDataRef peerInfoData, CFErrorRef *error);
55
56 bool SOSTransportCircleRingFlushChanges(SOSTransportCircleRef transport, CFErrorRef* error);
57
58 bool SOSTransportCircleRingPostRing(SOSTransportCircleRef transport, CFStringRef ringName, CFDataRef ring, CFErrorRef *error);
59
60 bool SOSTransportCircleSendDebugInfo(SOSTransportCircleRef transport, CFStringRef type, CFTypeRef debugInfo, CFErrorRef *error);
61
62 bool SOSTransportCircleSendAccountChangedWithDSID(SOSTransportCircleRef transport, CFStringRef dsid, CFErrorRef *error);
63
64 bool SOSTransportCircleSendOfficialDSID(SOSTransportCircleRef transport, CFStringRef dsid, CFErrorRef *error);
65
66 bool SOSTransportCircleRecordLastCirclePushedInKVS(SOSTransportCircleRef transport, CFStringRef circle_name, CFDataRef circleData);
67
68 #endif