BytestreamHandler Class Reference

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

#include <bytestreamhandler.h>

Inherited by SIProfileFT.

List of all members.

Public Member Functions

virtual ~BytestreamHandler ()
virtual void handleIncomingBytestreamRequest (const std::string &sid, const JID &from)=0
virtual void handleIncomingBytestream (Bytestream *bs)=0
virtual void handleOutgoingBytestream (Bytestream *bs)=0
virtual void handleBytestreamError (const IQ &iq, const std::string &sid)=0

Detailed Description

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

You should not need to use this interface directly.

See SIProfileFT on how to implement file transfer in general.

Author:
Jakob Schroeter <js@camaya.net>
Since:
1.0

Definition at line 33 of file bytestreamhandler.h.


Constructor & Destructor Documentation

virtual ~BytestreamHandler (  )  [inline, virtual]

Virtual destructor.

Definition at line 25 of file bytestreamhandler.h.


Member Function Documentation

virtual void handleBytestreamError ( const IQ iq,
const std::string &  sid 
) [pure virtual]

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

Parameters:
iq The error stanza.
sid The request's SID.

Implemented in SIProfileFT.

virtual void handleIncomingBytestream ( Bytestream bs  )  [pure virtual]

Notifies the implementor of a new incoming bytestream. The bytestream is not yet ready to send data. To initialize the bytestream and to prepare it for data transfer, register a BytestreamDataHandler with it and call its connect() method. To not block your application while the data transfer lasts, you most likely want to put the bytestream into its own thread or process (before calling connect() on it). It is safe to do so without additional synchronization. When you are finished using the bytestream, use SIProfileFT::dispose() to get rid of it.

Parameters:
bs The bytestream.

Implemented in SIProfileFT.

virtual void handleIncomingBytestreamRequest ( const std::string &  sid,
const JID from 
) [pure virtual]

Notifies the implementor of a new incoming bytestream request. You have to call either BytestreamManager::acceptBytestream() or BytestreamManager::rejectBytestream(), to accept or reject the bytestream request, respectively.

Parameters:
sid The bytestream's id, to be passed to BytestreamManager::acceptBytestream() and BytestreamManager::rejectBytestream(), respectively.
from The remote initiator of the bytestream request.

Implemented in SIProfileFT.

virtual void handleOutgoingBytestream ( Bytestream bs  )  [pure virtual]

Notifies the implementor of successful establishing of an outgoing bytestream request. The stream has been accepted by the remote entity and is ready to send data. The BytestreamHandler does not become the owner of the Bytestream object. Use SIProfileFT::dispose() to get rid of the bytestream object after it has been closed.

Parameters:
bs The new bytestream.

Implemented in SIProfileFT.


The documentation for this class was generated from the following file:
Generated on Tue Jun 8 23:37:55 2010 for gloox by  doxygen 1.6.3