14 #ifndef INBANDBYTESTREAM_H__
15 #define INBANDBYTESTREAM_H__
17 #include "bytestream.h"
18 #include "iqhandler.h"
19 #include "messagehandler.h"
25 class BytestreamDataHandler;
72 bool send(
const std::string& data );
75 virtual bool connect();
81 virtual bool handleIq(
const IQ& iq );
84 virtual void handleIqID(
const IQ& iq,
int context );
90 #ifdef INBANDBYTESTREAM_TEST
107 class IBB :
public StanzaExtension
115 IBB(
const std::string& sid,
int blocksize );
124 IBB(
const std::string& sid,
int seq,
const std::string& data );
130 IBB(
const std::string& sid );
136 IBB(
const Tag* tag = 0 );
147 IBBType type()
const {
return m_type; }
153 int blocksize()
const {
return m_blockSize; }
159 int seq()
const {
return m_seq; }
165 const std::string sid()
const {
return m_sid; }
171 const std::string& data()
const {
return m_data; }
174 virtual const std::string& filterString()
const;
177 virtual StanzaExtension* newInstance(
const Tag* tag )
const
179 return new IBB( tag );
183 virtual Tag* tag()
const;
186 virtual StanzaExtension* clone()
const
188 return new IBB( *
this );
199 InBandBytestream( ClientBase* clientbase, LogSink& logInstance,
const JID& initiator,
200 const JID& target,
const std::string& sid );
201 InBandBytestream& operator=(
const InBandBytestream& );
203 void returnResult(
const JID& to,
const std::string&
id );
206 ClientBase* m_clientbase;
209 int m_lastChunkReceived;
An abstraction of a single bytestream.
An abstraction of an IQ stanza.
An implementation of a single In-Band Bytestream (XEP-0047).
void setBlockSize(int blockSize)
virtual ConnectionError recv(int timeout=-1)
A virtual interface which can be reimplemented to receive IQ stanzas.
A virtual interface which can be reimplemented to receive incoming message stanzas.
An abstraction of a message session between any two entities.
An abstraction of a message stanza.
An implementation of the file transfer SI profile (XEP-0096).
The namespace for the gloox library.