2 #ifndef SOSTransportCircle_h
3 #define SOSTransportCircle_h
5 #include <CoreFoundation/CoreFoundation.h>
6 #include <CoreFoundation/CFRuntime.h>
7 #include <SecureObjectSync/SOSAccount.h>
9 typedef struct __OpaqueSOSTransportCircle
* SOSTransportCircleRef
;
11 struct __OpaqueSOSTransportCircle
{
13 SOSAccountRef account
;
15 CFStringRef (*copyDescription
)(SOSTransportCircleRef transport
);
16 void (*destroy
)(SOSTransportCircleRef transport
);
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
);
27 SOSTransportCircleRef
SOSTransportCircleCreateForSubclass(size_t size
, SOSAccountRef account
, CFErrorRef
*error
);
29 bool SOSTransportCirclePostCircle(SOSTransportCircleRef transport
, CFStringRef circleName
, CFDataRef circle_data
, CFErrorRef
*error
);
31 bool SOSTransportCirclePostRetirement(SOSTransportCircleRef transport
, CFStringRef circleName
, CFStringRef peer_id
, CFDataRef retirement_data
, CFErrorRef
*error
);
33 bool SOSTransportCircleExpireRetirementRecords(SOSTransportCircleRef transport
, CFDictionaryRef retirements
, CFErrorRef
*error
);
35 bool SOSTransportCircleFlushChanges(SOSTransportCircleRef transport
, CFErrorRef
*error
);
38 SOSAccountRef
SOSTransportCircleGetAccount(SOSTransportCircleRef transport
);
39 CF_RETURNS_RETAINED CFDictionaryRef
SOSTransportCircleHandleRetirementMessages(SOSTransportCircleRef transport
, CFMutableDictionaryRef circle_retirement_messages_table
, CFErrorRef
*error
);
42 CF_RETURNS_RETAINED CFArrayRef
SOSTransportCircleHandleCircleMessages(SOSTransportCircleRef transport
, CFMutableDictionaryRef circle_circle_messages_table
, CFErrorRef
*error
);