~ubuntu-branches/ubuntu/oneiric/psi/oneiric

« back to all changes in this revision

Viewing changes to iris/src/xmpp/zlib/zlibcompressor.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 ZLIBCOMPRESSOR_H
 
2
#define ZLIBCOMPRESSOR_H
 
3
 
 
4
#include <QObject>
 
5
 
 
6
#include "zlib.h"
 
7
 
 
8
class QIODevice;
 
9
 
 
10
class ZLibCompressor : public QObject
 
11
{
 
12
        Q_OBJECT
 
13
 
 
14
public:
 
15
        ZLibCompressor(QIODevice* device, int compression = Z_DEFAULT_COMPRESSION);
 
16
        ~ZLibCompressor();
 
17
 
 
18
        int write(const QByteArray&);
 
19
 
 
20
protected slots:
 
21
        void flush();
 
22
 
 
23
protected:
 
24
        int write(const QByteArray&, bool flush);
 
25
 
 
26
private:
 
27
        QIODevice* device_;
 
28
        z_stream* zlib_stream_;
 
29
        bool flushed_;
 
30
};
 
31
 
 
32
#endif