InBandBytestreamDataHandler Class Reference

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

#include <inbandbytestreamdatahandler.h>

List of all members.

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 JEP-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@camaya.net>
Since:
0.8

Definition at line 35 of file inbandbytestreamdatahandler.h.


Constructor & Destructor Documentation

virtual ~InBandBytestreamDataHandler (  )  [inline, virtual]

Virtual destructor.

Definition at line 41 of file inbandbytestreamdatahandler.h.


Member Function Documentation

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:
data The actual stream payload. Not base64 encoded.
sid The stream's ID.

Referenced by InBandBytestream::filter().

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:
sid The stream's ID.
remote The remote entity.
se The error.

Referenced by InBandBytestream::filter().

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:
sid The closed bytestream's ID.
from The remote entity's JID which closed the bytestream.


The documentation for this class was generated from the following file:
Generated on Tue May 1 14:20:24 2007 for gloox by  doxygen 1.5.1