projects
/
quassel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add initial implementation for showing and kicking connected clients
[quassel.git]
/
src
/
common
/
compressor.h
diff --git
a/src/common/compressor.h
b/src/common/compressor.h
index
b8b9e71
..
177137d
100644
(file)
--- a/
src/common/compressor.h
+++ b/
src/common/compressor.h
@@
-1,5
+1,5
@@
/***************************************************************************
/***************************************************************************
- * Copyright (C) 2005-201
4
by the Quassel Project *
+ * Copyright (C) 2005-201
6
by the Quassel Project *
* devel@quassel-irc.org *
* *
* This program is free software; you can redistribute it and/or modify *
* devel@quassel-irc.org *
* *
* This program is free software; you can redistribute it and/or modify *
@@
-25,6
+25,12
@@
class QTcpSocket;
class QTcpSocket;
+#ifdef HAVE_ZLIB
+ typedef struct z_stream_s *z_streamp;
+#else
+ typedef struct mz_stream_s *z_streamp;
+#endif
+
class Compressor : public QObject
{
Q_OBJECT
class Compressor : public QObject
{
Q_OBJECT
@@
-49,6
+55,7
@@
public:
};
Compressor(QTcpSocket *socket, CompressionLevel level, QObject *parent = 0);
};
Compressor(QTcpSocket *socket, CompressionLevel level, QObject *parent = 0);
+ ~Compressor();
CompressionLevel compressionLevel() const { return _level; }
CompressionLevel compressionLevel() const { return _level; }
@@
-61,12
+68,13
@@
public:
signals:
void readyRead();
signals:
void readyRead();
- void error(Compressor::Error errorCode);
+ void error(Compressor::Error errorCode
= StreamError
);
private slots:
void readData();
private:
private slots:
void readData();
private:
+ bool initStreams();
void writeData();
private:
void writeData();
private:
@@
-75,6
+83,12
@@
private:
QByteArray _readBuffer;
QByteArray _writeBuffer;
QByteArray _readBuffer;
QByteArray _writeBuffer;
+
+ QByteArray _inputBuffer;
+ QByteArray _outputBuffer;
+
+ z_streamp _inflater;
+ z_streamp _deflater;
};
#endif
};
#endif