14#ifndef INBANDBYTESTREAM_H__
15#define INBANDBYTESTREAM_H__
17#include "bytestream.h"
19#include "messagehandler.h"
46 friend class SIProfileFT;
52 virtual ~InBandBytestream();
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 );
204 void returnError(
const JID& to,
const std::string&
id, StanzaErrorType type, StanzaError error );
206 ClientBase* m_clientbase;
209 int m_lastChunkReceived;
A virtual interface that allows implementors to receive data sent over a SOCKS5 Bytestream as defined...
Bytestream(StreamType type, LogSink &logInstance, const JID &initiator, const JID &target, const std::string &sid)
This is the common base class for a Jabber/XMPP Client and a Jabber Component.
An abstraction of an IQ stanza.
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.
The namespace for the gloox library.