gloox  0.9.9.12
Public Member Functions | List of all members
InBandBytestreamDataHandler Class Reference

#include <inbandbytestreamdatahandler.h>

Public Member Functions

virtual ~InBandBytestreamDataHandler ()
virtual void handleInBandData (const std::string &data, const std::string &sid)=0
virtual void handleInBandError (const std::string &sid, const JID &remote, StanzaError se)=0
virtual void handleInBandClose (const std::string &sid, const JID &from)=0

Detailed Description

A virtual interface that allows implementors to receive data sent over a In-Band Bytestream as defined in XEP-0047.

An InBandBytestreamDataHandler is registered with an InBandBytestream.

See InBandBytestreamManager for a detailed description on how to implement In-Band Bytestreams.

Author
Jakob Schroeter js@ca.nosp@m.maya.nosp@m..net
Since
0.8

Definition at line 35 of file inbandbytestreamdatahandler.h.

Constructor & Destructor Documentation

virtual ~InBandBytestreamDataHandler ( )
inlinevirtual

Virtual destructor.

Definition at line 41 of file inbandbytestreamdatahandler.h.

Member Function Documentation

virtual void handleInBandClose ( const std::string &  sid,
const JID from 
)
pure virtual

Notifies the handler that the bytestream for the given JID has been closed by the peer.

Parameters
sidThe closed bytestream's ID.
fromThe remote entity's JID which closed the bytestream.
virtual void handleInBandData ( const std::string &  data,
const std::string &  sid 
)
pure virtual

Reimplement this function to receive data which is sent over the bytestream. The data received here is (probably) only a single chunk of the complete data (depending on the amount of data you want to send). In any case, its size is at maximum equal to the bytestream's negotiated blocksize.

Parameters
dataThe actual stream payload. Not base64 encoded.
sidThe stream's ID.
virtual void handleInBandError ( const std::string &  sid,
const JID remote,
StanzaError  se 
)
pure virtual

Notifies about an error occuring while using a bytestream. When this handler is called the stream has already been closed.

Parameters
sidThe stream's ID.
remoteThe remote entity.
seThe error.

The documentation for this class was generated from the following file: