X-Git-Url: https://git.quassel-irc.org/?a=blobdiff_plain;f=src%2Fcore%2Fnetworkconnection.h;h=0d8d837af8151e596bafc888571dd5de599ca6e7;hb=480eab8daec4fb56a6886918c6a913cc197330f1;hp=cebf837920f2e9c730cae1e3ec5214026c4e0d55;hpb=b2f26944f3b4109d22bb1571aed2a7e2e9efbb5a;p=quassel.git diff --git a/src/core/networkconnection.h b/src/core/networkconnection.h index cebf8379..0d8d837a 100644 --- a/src/core/networkconnection.h +++ b/src/core/networkconnection.h @@ -26,7 +26,7 @@ #include #include -#ifndef QT_NO_OPENSSL +#ifdef HAVE_SSL # include # include #else @@ -39,8 +39,6 @@ #include "network.h" #include "signalproxy.h" -class Network; - class IrcServerHandler; class UserInputHandler; class CtcpHandler; @@ -140,11 +138,12 @@ private slots: 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 -#ifndef QT_NO_OPENSSL +#ifdef HAVE_SSL void socketEncrypted(); void sslErrors(const QList &errors); #endif @@ -152,7 +151,7 @@ private slots: void fillBucketAndProcessQueue(); private: -#ifndef QT_NO_OPENSSL +#ifdef HAVE_SSL QSslSocket socket; #else QTcpSocket socket; @@ -176,11 +175,16 @@ private: 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; + QTimer _pingTimer; + bool _autoWhoEnabled; QStringList _autoWhoQueue; QHash _autoWhoInProgress; @@ -195,12 +199,8 @@ private: int _tokenBucket; // the virtual bucket that holds the tokens QList _msgQueue; - int _maxMsgSize; - void writeToSocket(QByteArray s); - - class ParseError : public Exception { public: ParseError(QString cmd, QString prefix, QStringList params);