14 #ifndef INBANDBYTESTREAM_H__
15 #define INBANDBYTESTREAM_H__
17 #include "bytestream.h"
18 #include "iqhandler.h"
19 #include "messagehandler.h"
25 class BytestreamDataHandler;
71 bool send(
const std::string& data );
74 virtual bool connect();
80 virtual bool handleIq(
const IQ& iq );
83 virtual void handleIqID(
const IQ& iq,
int context );
89 #ifdef INBANDBYTESTREAM_TEST
106 class IBB :
public StanzaExtension
114 IBB(
const std::string& sid,
int blocksize );
123 IBB(
const std::string& sid,
int seq,
const std::string& data );
129 IBB(
const std::string& sid );
135 IBB(
const Tag* tag = 0 );
146 IBBType type()
const {
return m_type; }
152 int blocksize()
const {
return m_blockSize; }
158 int seq()
const {
return m_seq; }
164 const std::string sid()
const {
return m_sid; }
170 const std::string& data()
const {
return m_data; }
173 virtual const std::string& filterString()
const;
176 virtual StanzaExtension* newInstance(
const Tag* tag )
const
178 return new IBB( tag );
182 virtual Tag* tag()
const;
185 virtual StanzaExtension* clone()
const
187 return new IBB( *
this );
198 InBandBytestream( ClientBase* clientbase, LogSink& logInstance,
const JID& initiator,
199 const JID& target,
const std::string& sid );
200 InBandBytestream& operator=(
const InBandBytestream& );
202 void returnResult(
const JID& to,
const std::string&
id );
205 ClientBase* m_clientbase;
208 int m_lastChunkReceived;
214 #endif // INBANDBYTESTREAM_H__