This repository has been archived on 2025-12-24. You can view files and clone it, but you cannot make any changes to it's state, such as pushing and creating new issues, pull requests or comments.
yachat/iris-legacy/iris/xmpp-core/compressionhandler.h

36 lines
604 B
C
Raw Normal View History

2025-12-25 01:37:49 +05:00
#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