InBandBytestreamHandler Class Reference

A virtual interface that allows to receive new incoming In-Band Bytestream requests from remote entities. More...

#include <inbandbytestreamhandler.h>

List of all members.

Public Member Functions

virtual ~InBandBytestreamHandler ()
virtual bool handleIncomingInBandBytestream (const JID &from, InBandBytestream *ibb)=0
virtual void handleOutgoingInBandBytestream (const JID &to, InBandBytestream *ibb)=0
virtual void handleInBandBytestreamError (const JID &remote, StanzaError se)=0


Detailed Description

A virtual interface that allows to receive new incoming In-Band Bytestream requests from remote entities.

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 33 of file inbandbytestreamhandler.h.


Constructor & Destructor Documentation

virtual ~InBandBytestreamHandler (  )  [inline, virtual]

Virtual destructor.

Definition at line 39 of file inbandbytestreamhandler.h.


Member Function Documentation

virtual bool handleIncomingInBandBytestream ( const JID from,
InBandBytestream ibb 
) [pure virtual]

Notifies the implementor of a new incoming IBB request. Attach the IBB to a MessageSession using InBandBytestream::attachTo().
For synchronous InBandBytestreamHandler:
If the return value is true the bytestream holds as accepted and the InBandBytestreamHandler becomes the owner of the InBandBytestream object. If false is returned, the InBandBytestream is deleted by the InBandBytestreamManager and the bytestream request will be declined.
For asynchronous InBandBytestreamHandler:
The return value is ignored. You have to call either InBandBytestreamManager::acceptInBandBytestream() or InBandBytestreamManager::rejectInBandBytestream(), respectively.

Parameters:
from The remote initiator of the bytestream request.
ibb The bytestream.
Returns:
True to accept the byte stream, false to reject.
Note:
You should not send any data over this bytestream from within this function. The bytestream will only be accepted after this function returned.

Referenced by InBandBytestreamManager::handleIq().

virtual void handleOutgoingInBandBytestream ( const JID to,
InBandBytestream ibb 
) [pure virtual]

Notifies the implementor of successful establishing of an outcoming IBB request. Attach the IBB to a MessageSession using InBandBytestream::attachTo(). The stream has been accepted by the remote entity and is ready to send data. The InBandBytestreamHandler becomes the owner of the InBandBytestream object.

Parameters:
to The remote entity's JID.
ibb The new bytestream.

Referenced by InBandBytestreamManager::handleIqID().

virtual void handleInBandBytestreamError ( const JID remote,
StanzaError  se 
) [pure virtual]

Notifies the handler of errors occuring when a bytestream was requested. For example, if the remote entity does not implement IBB.

Parameters:
remote The remote entity's JID which relates to the error.
se The error.


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