13 #ifndef CONNECTIONCOMPRESSION_H__
14 #define CONNECTIONCOMPRESSION_H__
18 #include <gloox/gloox.h>
19 #include <gloox/compressiondatahandler.h>
20 #include <gloox/connectionbase.h>
21 #include <gloox/connectiondatahandler.h>
26 class CompressionDefault;
44 public gloox::ConnectionBase,
45 gloox::ConnectionDataHandler
57 const gloox::LogSink& log );
77 void setConnectionImpl( gloox::ConnectionBase* connection );
80 virtual gloox::ConnectionError connect();
83 virtual gloox::ConnectionError recv(
int timeout = -1 );
86 virtual bool send(
const std::string& data );
89 virtual gloox::ConnectionError receive();
92 virtual void disconnect();
95 virtual void cleanup();
98 virtual void getStatistics(
long int& totalIn,
long int& totalOut );
101 virtual void handleReceivedData(
const gloox::ConnectionBase* connection,
const std::string& data );
104 virtual void handleConnect(
const gloox::ConnectionBase* connection );
107 virtual void handleDisconnect(
const gloox::ConnectionBase* connection, gloox::ConnectionError reason );
110 virtual gloox::ConnectionBase* newInstance()
const;
113 virtual void handleCompressedData(
const std::string& data );
116 virtual void handleDecompressedData(
const std::string& data );
120 gloox::ConnectionBase* m_connection;
121 gloox::CompressionDefault* m_compression;
122 const gloox::LogSink& m_log;
128 #endif // CONNECTIONCOMPRESSION_H__