gloox
0.9.9.12
|
#include <inbandbytestream.h>
Public Member Functions | |
virtual | ~InBandBytestream () |
bool | isOpen () const |
bool | sendBlock (const std::string &data) |
const std::string & | sid () const |
int | blockSize () const |
void | registerInBandBytestreamDataHandler (InBandBytestreamDataHandler *ibbdh) |
void | removeInBandBytestreamDataHandler () |
virtual void | decorate (Tag *tag) |
virtual void | filter (Stanza *stanza) |
Public Member Functions inherited from MessageFilter | |
MessageFilter (MessageSession *parent) | |
virtual | ~MessageFilter () |
virtual void | attachTo (MessageSession *session) |
An implementation of a single In-Band Bytestream (XEP-0047).
One instance of this class handles one byte stream. You can attach as many InBandBytestream objects to a MessageSession as you like.
See InBandBytestreamManager for a detailed description on how to implement In-Band Bytestreams.
Definition at line 39 of file inbandbytestream.h.
|
virtual |
Virtual destructor.
Definition at line 33 of file inbandbytestream.cpp.
|
inline |
Lets you retrieve this bytestream's block-size.
Definition at line 77 of file inbandbytestream.h.
|
virtual |
This function receives a message right before it is sent out (there may be other filters which get to see the message after this filter, though).
tag | The tag to decorate. It contains the message to be sent. |
Implements MessageFilter.
Definition at line 42 of file inbandbytestream.cpp.
|
virtual |
This function receives a message stanza right after it was received (there may be other filters which got to see the stanza before this filter, though).
stanza | The complete message stanza. |
Implements MessageFilter.
Definition at line 46 of file inbandbytestream.cpp.
|
inline |
Returns whether the bytestream is open, that is, accepted by both parties.
Definition at line 53 of file inbandbytestream.h.
void registerInBandBytestreamDataHandler | ( | InBandBytestreamDataHandler * | ibbdh | ) |
Use this function to register an object that will receive any notifications from the InBandBytestream instance. Only one InBandBytestreamDataHandler can be registered at any one time.
ibbdh | The InBandBytestreamDataHandler-derived object to receive notifications. |
Definition at line 149 of file inbandbytestream.cpp.
void removeInBandBytestreamDataHandler | ( | ) |
Removes the registered InBandBytestreamDataHandler.
Definition at line 154 of file inbandbytestream.cpp.
bool sendBlock | ( | const std::string & | data | ) |
Use this function to send a chunk of data over an open byte stream. The negotiated block size is enforced. If the block is larger, nothing is sent and false is returned. If the stream is not open or has been closed again (by the remote entity or locally), nothing is sent and false is returned. This function does the necessary base64 encoding for you.
data | The block of data to send. |
Definition at line 93 of file inbandbytestream.cpp.
|
inline |
Lets you retrieve the stream's ID.
Definition at line 71 of file inbandbytestream.h.