+ virtual void requestSetNetworkInfo(const NetworkInfo &info);
+
+ virtual void setUseAutoReconnect(bool);
+ virtual void setAutoReconnectInterval(quint32);
+ virtual void setAutoReconnectRetries(quint16);
+
+ void setPingInterval(int interval);
+
+ void connectToIrc(bool reconnecting = false);
+ void disconnectFromIrc(bool requested = true, const QString &reason = QString(), bool withReconnect = false);
+
+ void userInput(BufferInfo bufferInfo, QString msg);
+ void putRawLine(QByteArray input);
+ void putCmd(const QString &cmd, const QList<QByteArray> ¶ms, const QByteArray &prefix = QByteArray());
+
+ void setChannelJoined(const QString &channel);
+ void setChannelParted(const QString &channel);
+ void addChannelKey(const QString &channel, const QString &key);
+ void removeChannelKey(const QString &channel);
+
+ void setAutoWhoEnabled(bool enabled);
+ void setAutoWhoInterval(int interval);
+ void setAutoWhoDelay(int delay);
+
+ bool setAutoWhoDone(const QString &channel);
+
+ Server usedServer() const;
+
+ inline void resetPingTimeout() { _pingCount = 0; }
+
+ inline void displayMsg(Message::Type msgType, BufferInfo::Type bufferType, const QString &target, const QString &text, const QString &sender = "", Message::Flags flags = Message::None) {
+ emit displayMsg(networkId(), msgType, bufferType, target, text, sender, flags);
+ }
+
+signals:
+ void recvRawServerMsg(QString);
+ void displayStatusMsg(QString);
+ void displayMsg(NetworkId, Message::Type, BufferInfo::Type, const QString &target, const QString &text, const QString &sender = "", Message::Flags flags = Message::None);
+ void disconnected(NetworkId networkId);
+ void connectionError(const QString &errorMsg);
+
+ void quitRequested(NetworkId networkId);
+ void sslErrors(const QVariant &errorData);
+
+protected:
+ inline virtual IrcChannel *ircChannelFactory(const QString &channelname) { return new CoreIrcChannel(channelname, this); }
+
+private slots:
+ void socketHasData();
+ void socketError(QAbstractSocket::SocketError);
+ void socketInitialized();
+ inline void socketCloseTimeout() { socket.disconnectFromHost(); }
+ void socketDisconnected();
+ void socketStateChanged(QAbstractSocket::SocketState);
+ void networkInitialized();
+
+ void sendPerform();
+ void restoreUserModes();
+ void doAutoReconnect();
+ void sendPing();
+ void enablePingTimeout(bool enable = true);
+ void disablePingTimeout();
+ void sendAutoWho();
+ void startAutoWhoCycle();
+
+#ifdef HAVE_SSL
+ void sslErrors(const QList<QSslError> &errors);
+#endif
+
+ void fillBucketAndProcessQueue();
+
+ void writeToSocket(const QByteArray &data);