2 #ifndef SOSTransportCoder_h
3 #define SOSTransportCoder_h
4 #include <SecureObjectSync/SOSTransportMessage.h>
5 #include <SecureObjectSync/SOSCoder.h>
7 enum SOSCoderUnwrapStatus
{
8 SOSCoderUnwrapError
= 0,
9 SOSCoderUnwrapDecoded
= 1,
10 SOSCoderUnwrapHandled
= 2
13 bool SOSPeerCoderSendMessageIfNeeded(SOSPeerRef peer
, CFDataRef
*message_to_send
, CFStringRef circle_id
, CFStringRef peer_id
, SOSEnginePeerMessageSentBlock
*sent
, CFErrorRef
*error
);
15 enum SOSCoderUnwrapStatus
SOSPeerHandleCoderMessage(SOSPeerRef peer
, CFStringRef peer_id
, CFDataRef codedMessage
, CFDataRef
*decodedMessage
, CFErrorRef
*error
);
17 bool SOSPeerCoderInitializeForPeer(SOSTransportMessageRef transport
, SOSFullPeerInfoRef myPeerInfo
, SOSPeerInfoRef peerInfo
, CFErrorRef
*error
);
19 bool SOSPeerSendMessageIfNeeded(SOSPeerRef peer
, CFDataRef
*message
, CFDataRef
*message_to_send
, SOSCoderRef
*coder
, CFStringRef circle_id
, CFStringRef peer_id
, SOSEnginePeerMessageSentBlock
*sent
, CFErrorRef
*error
);
21 void SOSPeerCoderConsume(SOSEnginePeerMessageSentBlock
*sent
, bool ok
);