]> git.saurik.com Git - apple/security.git/blob - Security/sec/SOSCircle/SecureObjectSync/SOSPeerCoder.h
Security-57031.40.6.tar.gz
[apple/security.git] / Security / sec / SOSCircle / SecureObjectSync / SOSPeerCoder.h
1
2 #ifndef SOSTransportCoder_h
3 #define SOSTransportCoder_h
4 #include <SecureObjectSync/SOSTransportMessage.h>
5 #include <SecureObjectSync/SOSCoder.h>
6
7 enum SOSCoderUnwrapStatus{
8 SOSCoderUnwrapError = 0,
9 SOSCoderUnwrapDecoded = 1,
10 SOSCoderUnwrapHandled = 2
11 };
12
13 bool SOSPeerCoderSendMessageIfNeeded(SOSPeerRef peer, CFDataRef *message_to_send, CFStringRef circle_id, CFStringRef peer_id, SOSEnginePeerMessageSentBlock *sent, CFErrorRef *error);
14
15 enum SOSCoderUnwrapStatus SOSPeerHandleCoderMessage(SOSPeerRef peer, CFStringRef peer_id, CFDataRef codedMessage, CFDataRef *decodedMessage, CFErrorRef *error);
16
17 bool SOSPeerCoderInitializeForPeer(SOSTransportMessageRef transport, SOSFullPeerInfoRef myPeerInfo, SOSPeerInfoRef peerInfo, CFErrorRef *error);
18
19 bool SOSPeerSendMessageIfNeeded(SOSPeerRef peer, CFDataRef *message, CFDataRef *message_to_send, SOSCoderRef *coder, CFStringRef circle_id, CFStringRef peer_id, SOSEnginePeerMessageSentBlock *sent, CFErrorRef *error);
20
21 void SOSPeerCoderConsume(SOSEnginePeerMessageSentBlock *sent, bool ok);
22
23 #endif