Port things from MSN to WLM plugin:
[kdenetwork.git] / kopete / protocols / groupwise / libgroupwise / compressionhandler.h
blob056aafdf478506b85c6956ceadefe3d566fc5903
1 #ifndef COMPRESSIONHANDLER_H
2 #define COMPRESSIONHANDLER_H
4 #include <QObject>
5 #include <QBuffer>
7 class Compressor;
8 class Decompressor;
10 class CompressionHandler : public QObject
12 Q_OBJECT
14 public:
15 CompressionHandler();
16 void writeIncoming(const QByteArray& a);
17 void write(const QByteArray& a);
18 QByteArray read();
19 QByteArray readOutgoing(int*);
20 int errorCode();
22 signals:
23 void readyRead();
24 void readyReadOutgoing();
25 void error();
27 private:
28 Compressor* compressor_;
29 Decompressor* decompressor_;
30 QBuffer outgoing_buffer_, incoming_buffer_;
31 int errorCode_;
34 #endif