projects
/
quassel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Implement IRCv3 tag parsing and sending
[quassel.git]
/
src
/
common
/
compressor.h
diff --git
a/src/common/compressor.h
b/src/common/compressor.h
index
d80e41d
..
47a4350
100644
(file)
--- a/
src/common/compressor.h
+++ b/
src/common/compressor.h
@@
-1,5
+1,5
@@
/***************************************************************************
/***************************************************************************
- * Copyright (C) 2005-201
8
by the Quassel Project *
+ * Copyright (C) 2005-201
9
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 *
@@
-20,10
+20,10
@@
#pragma once
#pragma once
-#include <zlib.h>
-
#include <QObject>
#include <QObject>
+#include <zlib.h>
+
class QTcpSocket;
class Compressor : public QObject
class QTcpSocket;
class Compressor : public QObject
@@
-31,33
+31,36
@@
class Compressor : public QObject
Q_OBJECT
public:
Q_OBJECT
public:
- enum CompressionLevel {
+ enum CompressionLevel
+ {
NoCompression,
DefaultCompression,
BestCompression,
BestSpeed
};
NoCompression,
DefaultCompression,
BestCompression,
BestSpeed
};
- enum Error {
+ enum Error
+ {
NoError,
StreamError,
DeviceError
};
NoError,
StreamError,
DeviceError
};
- enum WriteBufferHint {
+ enum WriteBufferHint
+ {
NoFlush,
Flush
};
NoFlush,
Flush
};
- Compressor(QTcpSocket
*socket, CompressionLevel level, QObject *parent = 0
);
- ~Compressor();
+ Compressor(QTcpSocket
* socket, CompressionLevel level, QObject* parent = nullptr
);
+ ~Compressor()
override
;
CompressionLevel compressionLevel() const { return _level; }
qint64 bytesAvailable() const;
CompressionLevel compressionLevel() const { return _level; }
qint64 bytesAvailable() const;
- qint64 read(char
*
data, qint64 maxSize);
- qint64 write(const char
*
data, qint64 count, WriteBufferHint flush = Flush);
+ qint64 read(char
*
data, qint64 maxSize);
+ qint64 write(const char
*
data, qint64 count, WriteBufferHint flush = Flush);
void flush();
void flush();
@@
-73,7
+76,7
@@
private:
void writeData();
private:
void writeData();
private:
- QTcpSocket
*
_socket;
+ QTcpSocket
*
_socket;
CompressionLevel _level;
QByteArray _readBuffer;
CompressionLevel _level;
QByteArray _readBuffer;