projects
/
quassel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fixing BR #233 - redirecting chanservs welcome messages to the channel buffer
[quassel.git]
/
src
/
core
/
networkconnection.h
diff --git
a/src/core/networkconnection.h
b/src/core/networkconnection.h
index
0745e9e
..
0d8d837
100644
(file)
--- a/
src/core/networkconnection.h
+++ b/
src/core/networkconnection.h
@@
-26,7
+26,7
@@
#include <QStringList>
#include <QTimer>
#include <QStringList>
#include <QTimer>
-#if
ndef QT_NO_OPEN
SSL
+#if
def HAVE_
SSL
# include <QSslSocket>
# include <QSslError>
#else
# include <QSslSocket>
# include <QSslError>
#else
@@
-39,8
+39,6
@@
#include "network.h"
#include "signalproxy.h"
#include "network.h"
#include "signalproxy.h"
-class Network;
-
class IrcServerHandler;
class UserInputHandler;
class CtcpHandler;
class IrcServerHandler;
class UserInputHandler;
class CtcpHandler;
@@
-86,7
+84,7
@@
public:
inline QString channelKey(const QString &channel) const { return _channelKeys.value(channel.toLower(), QString()); }
inline QStringList persistentChannels() const { return _channelKeys.keys(); }
inline QString channelKey(const QString &channel) const { return _channelKeys.value(channel.toLower(), QString()); }
inline QStringList persistentChannels() const { return _channelKeys.keys(); }
- inline bool isAutoWhoInProgress(const QString &channel) const { return _autoWhoInProgress.
contains(channel
); }
+ inline bool isAutoWhoInProgress(const QString &channel) const { return _autoWhoInProgress.
value(channel.toLower(), 0
); }
public slots:
// void setServerOptions();
public slots:
// void setServerOptions();
@@
-95,7
+93,8
@@
public slots:
void userInput(BufferInfo bufferInfo, QString msg);
void putRawLine(QByteArray input);
void userInput(BufferInfo bufferInfo, QString msg);
void putRawLine(QByteArray input);
- void putCmd(const QString &cmd, const QVariantList ¶ms, const QByteArray &prefix = QByteArray());
+ int lastParamOverrun(const QString &cmd, const QList<QByteArray> ¶ms);
+ void putCmd(const QString &cmd, const QList<QByteArray> ¶ms, const QByteArray &prefix = QByteArray());
void setChannelJoined(const QString &channel);
void setChannelParted(const QString &channel);
void setChannelJoined(const QString &channel);
void setChannelParted(const QString &channel);
@@
-130,6
+129,7
@@
private slots:
void socketError(QAbstractSocket::SocketError);
void socketConnected();
void socketInitialized();
void socketError(QAbstractSocket::SocketError);
void socketConnected();
void socketInitialized();
+ void socketCloseTimeout();
void socketDisconnected();
void socketStateChanged(QAbstractSocket::SocketState);
void setConnectionState(Network::ConnectionState);
void socketDisconnected();
void socketStateChanged(QAbstractSocket::SocketState);
void setConnectionState(Network::ConnectionState);
@@
-138,11
+138,12
@@
private slots:
void sendPerform();
void autoReconnectSettingsChanged();
void doAutoReconnect();
void sendPerform();
void autoReconnectSettingsChanged();
void doAutoReconnect();
+ void sendPing();
void sendAutoWho();
void startAutoWhoCycle();
void nickChanged(const QString &newNick, const QString &oldNick); // this signal is inteded to rename query buffers in the storage backend
void sendAutoWho();
void startAutoWhoCycle();
void nickChanged(const QString &newNick, const QString &oldNick); // this signal is inteded to rename query buffers in the storage backend
-#if
ndef QT_NO_OPEN
SSL
+#if
def HAVE_
SSL
void socketEncrypted();
void sslErrors(const QList<QSslError> &errors);
#endif
void socketEncrypted();
void sslErrors(const QList<QSslError> &errors);
#endif
@@
-150,7
+151,7
@@
private slots:
void fillBucketAndProcessQueue();
private:
void fillBucketAndProcessQueue();
private:
-#if
ndef QT_NO_OPEN
SSL
+#if
def HAVE_
SSL
QSslSocket socket;
#else
QTcpSocket socket;
QSslSocket socket;
#else
QTcpSocket socket;
@@
-169,14
+170,24
@@
private:
QHash<QString, QString> _channelKeys; // stores persistent channels and their passwords, if any
QTimer _autoReconnectTimer;
QHash<QString, QString> _channelKeys; // stores persistent channels and their passwords, if any
QTimer _autoReconnectTimer;
+
int _autoReconnectCount;
int _autoReconnectCount;
+ QTimer _socketCloseTimer;
+
+ /* this flag triggers quitRequested() once the socket is closed
+ * it is needed to determine whether or not the connection needs to be
+ *in the automatic session restore. */
+ bool _quitRequested;
+
bool _previousConnectionAttemptFailed;
int _lastUsedServerlistIndex;
bool _previousConnectionAttemptFailed;
int _lastUsedServerlistIndex;
+ QTimer _pingTimer;
+
bool _autoWhoEnabled;
QStringList _autoWhoQueue;
bool _autoWhoEnabled;
QStringList _autoWhoQueue;
- Q
Set<QString
> _autoWhoInProgress;
+ Q
Hash<QString, int
> _autoWhoInProgress;
int _autoWhoInterval;
int _autoWhoNickLimit;
int _autoWhoDelay;
int _autoWhoInterval;
int _autoWhoNickLimit;
int _autoWhoDelay;
@@
-190,8
+201,6
@@
private:
void writeToSocket(QByteArray s);
void writeToSocket(QByteArray s);
-
-
class ParseError : public Exception {
public:
ParseError(QString cmd, QString prefix, QStringList params);
class ParseError : public Exception {
public:
ParseError(QString cmd, QString prefix, QStringList params);