~ubuntu-branches/ubuntu/utopic/psi/utopic

« back to all changes in this revision

Viewing changes to iris/xmpp-core/compressionhandler.h

  • Committer: Bazaar Package Importer
  • Author(s): Jan Niehusmann
  • Date: 2009-09-25 17:49:51 UTC
  • mfrom: (6.1.3 sid)
  • Revision ID: james.westby@ubuntu.com-20090925174951-lvm7kdap82o8xhn3
Tags: 0.13-1
* Updated to upstream version 0.13
* Set Standards-Version to 3.8.3

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 Compressor;
8
 
class Decompressor;
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
 
        Compressor* compressor_;
30
 
        Decompressor* decompressor_;
31
 
        QBuffer outgoing_buffer_, incoming_buffer_;
32
 
        int errorCode_;
33
 
};
34
 
 
35
 
#endif