~ubuntu-branches/ubuntu/saucy/kopete/saucy-proposed

« back to all changes in this revision

Viewing changes to protocols/jabber/libiris/src/xmpp/xmpp-core/compressionhandler.h

  • Committer: Package Import Robot
  • Author(s): Jonathan Riddell
  • Date: 2013-06-21 02:22:39 UTC
  • Revision ID: package-import@ubuntu.com-20130621022239-63l3zc8p0nf26pt6
Tags: upstream-4.10.80
ImportĀ upstreamĀ versionĀ 4.10.80

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#ifndef COMPRESSIONHANDLER_H
 
2
#define COMPRESSIONHANDLER_H
 
3
 
 
4
#include <QObject>
 
5
#include <QBuffer>
 
6
 
 
7
class ZLibCompressor;
 
8
class ZLibDecompressor;
 
9
 
 
10
class CompressionHandler : public QObject
 
11
{
 
12
        Q_OBJECT
 
13
 
 
14
public:
 
15
        CompressionHandler();
 
16
        ~CompressionHandler();
 
17
        void writeIncoming(const QByteArray& a);
 
18
        void write(const QByteArray& a);
 
19
        QByteArray read();
 
20
        QByteArray readOutgoing(int*);
 
21
        int errorCode();
 
22
 
 
23
signals:
 
24
        void readyRead();
 
25
        void readyReadOutgoing();
 
26
        void error();
 
27
 
 
28
private: 
 
29
        ZLibCompressor* compressor_;
 
30
        ZLibDecompressor* decompressor_;
 
31
        QBuffer outgoing_buffer_, incoming_buffer_;
 
32
        int errorCode_;
 
33
};
 
34
 
 
35
#endif