+ 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);
+
+ // Blowfish stuff
+#ifdef HAVE_QCA2
+ Cipher *cipher(const QString &recipient) const;
+ QByteArray cipherKey(const QString &recipient) const;
+ void setCipherKey(const QString &recipient, const QByteArray &key);
+#endif
+
+ void setAutoWhoEnabled(bool enabled);
+ void setAutoWhoInterval(int interval);
+ void setAutoWhoDelay(int delay);
+
+ bool setAutoWhoDone(const QString &channel);
+
+ void updateIssuedModes(const QString &requestedModes);
+ void updatePersistentModes(QString addModes, QString removeModes);
+ void resetPersistentModes();
+
+ 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); }
+ inline virtual IrcUser *ircUserFactory(const QString &hostmask) { return new CoreIrcUser(hostmask, this); }
+
+protected slots:
+ // TODO: remove cached cipher keys, when appropriate
+ //virtual void removeIrcUser(IrcUser *ircuser);
+ //virtual void removeIrcChannel(IrcChannel *ircChannel);
+ //virtual void removeChansAndUsers();
+
+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);