initial commit
This commit is contained in:
commit
9d20827c46
2469 changed files with 470994 additions and 0 deletions
35
iris-legacy/iris/xmpp-core/compressionhandler.h
Normal file
35
iris-legacy/iris/xmpp-core/compressionhandler.h
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
#ifndef COMPRESSIONHANDLER_H
|
||||
#define COMPRESSIONHANDLER_H
|
||||
|
||||
#include <QObject>
|
||||
#include <QBuffer>
|
||||
|
||||
class Compressor;
|
||||
class Decompressor;
|
||||
|
||||
class CompressionHandler : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
CompressionHandler();
|
||||
~CompressionHandler();
|
||||
void writeIncoming(const QByteArray& a);
|
||||
void write(const QByteArray& a);
|
||||
QByteArray read();
|
||||
QByteArray readOutgoing(int*);
|
||||
int errorCode();
|
||||
|
||||
signals:
|
||||
void readyRead();
|
||||
void readyReadOutgoing();
|
||||
void error();
|
||||
|
||||
private:
|
||||
Compressor* compressor_;
|
||||
Decompressor* decompressor_;
|
||||
QBuffer outgoing_buffer_, incoming_buffer_;
|
||||
int errorCode_;
|
||||
};
|
||||
|
||||
#endif
|
||||
Reference in a new issue