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

#include <inbandbytestreamhandler.h>

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@ca.nosp@m.maya.nosp@m..net
Since
0.8

Definition at line 33 of file inbandbytestreamhandler.h.

Constructor & Destructor Documentation

virtual ~InBandBytestreamHandler ( )
inlinevirtual

Virtual destructor.

Definition at line 39 of file inbandbytestreamhandler.h.

Member Function Documentation

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
remoteThe remote entity's JID which relates to the error.
seThe error.
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
fromThe remote initiator of the bytestream request.
ibbThe 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.
virtual void handleOutgoingInBandBytestream ( const JID to,
InBandBytestream ibb 
)
pure virtual

Notifies the implementor of successful establishing of an outgoing 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
toThe remote entity's JID.
ibbThe new bytestream.

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