Add igungor to aboutdlg.cpp
[quassel.git] / src / core / networkconnection.h
index 16bfccc..d947455 100644 (file)
@@ -26,7 +26,7 @@
 #include <QStringList>
 #include <QTimer>
 
-#ifndef QT_NO_OPENSSL
+#ifdef HAVE_SSL
 # include <QSslSocket>
 # include <QSslError>
 #else
@@ -39,8 +39,6 @@
 #include "network.h"
 #include "signalproxy.h"
 
-class Network;
-
 class IrcServerHandler;
 class UserInputHandler;
 class CtcpHandler;
@@ -91,11 +89,12 @@ 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);
-  void putCmd(const QString &cmd, const QVariantList &params, const QByteArray &prefix = QByteArray());
+  int lastParamOverrun(const QString &cmd, const QList<QByteArray> &params);
+  void putCmd(const QString &cmd, const QList<QByteArray> &params, const QByteArray &prefix = QByteArray());
 
   void setChannelJoined(const QString &channel);
   void setChannelParted(const QString &channel);
@@ -139,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<QSslError> &errors);
 #endif
@@ -151,7 +151,7 @@ private slots:
   void fillBucketAndProcessQueue();
 
 private:
-#ifndef QT_NO_OPENSSL
+#ifdef HAVE_SSL
   QSslSocket socket;
 #else
   QTcpSocket socket;
@@ -175,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<QString, int> _autoWhoInProgress;
@@ -194,12 +199,8 @@ private:
   int _tokenBucket; // the virtual bucket that holds the tokens
   QList<QByteArray> _msgQueue;
 
-  int _maxMsgSize;
-
   void writeToSocket(QByteArray s);
 
-
-
   class ParseError : public Exception {
   public:
     ParseError(QString cmd, QString prefix, QStringList params);