X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fcore%2Fnetworkconnection.h;h=d9474557f5c06c633b4296c6368740696136e210;hp=a02997f902f0ebd37f97d632e718d693162af0e6;hb=f7379184b7c0ae4e53d7470809f84e2ad3239ec1;hpb=257ca0d5f944a8f63d002e1dcaaa3902258d85e0 diff --git a/src/core/networkconnection.h b/src/core/networkconnection.h index a02997f9..d9474557 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; @@ -91,7 +89,7 @@ public: public slots: // void setServerOptions(); void connectToIrc(bool reconnecting = false); - void disconnectFromIrc(bool requested = true); + void disconnectFromIrc(bool requested = true, const QString &reason = QString()); void userInput(BufferInfo bufferInfo, QString msg); void putRawLine(QByteArray input); @@ -145,7 +143,7 @@ private slots: 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 @@ -153,7 +151,7 @@ private slots: void fillBucketAndProcessQueue(); private: -#ifndef QT_NO_OPENSSL +#ifdef HAVE_SSL QSslSocket socket; #else QTcpSocket socket; @@ -177,6 +175,9 @@ 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; @@ -200,8 +201,6 @@ private: void writeToSocket(QByteArray s); - - class ParseError : public Exception { public: ParseError(QString cmd, QString prefix, QStringList params);