X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fcore%2Fcorenetwork.h;h=05565a47bfed9305681274d37ec553622459e9a8;hp=3b31f0ded6484eb299983bc75fc808e3e3a035a1;hb=b5e38970ffd55e2dd9f706ce75af9a8d7730b1b8;hpb=76db8cdfbeffaaba359c8e80cf2146da9e9e7f8a diff --git a/src/core/corenetwork.h b/src/core/corenetwork.h index 3b31f0de..05565a47 100644 --- a/src/core/corenetwork.h +++ b/src/core/corenetwork.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2013 by the Quassel Project * + * Copyright (C) 2005-2015 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * @@ -40,6 +40,8 @@ #include "coresession.h" +#include + class CoreIdentity; class CoreUserInputHandler; class CoreIgnoreListManager; @@ -93,6 +95,8 @@ public: inline quint16 localPort() const { return socket.localPort(); } inline quint16 peerPort() const { return socket.peerPort(); } + QList> splitMessage(const QString &cmd, const QString &message, std::function(QString &)> cmdGenerator); + public slots: virtual void setMyNick(const QString &mynick); @@ -112,6 +116,7 @@ public slots: void userInput(BufferInfo bufferInfo, QString msg); void putRawLine(QByteArray input); void putCmd(const QString &cmd, const QList ¶ms, const QByteArray &prefix = QByteArray()); + void putCmd(const QString &cmd, const QList> ¶ms, const QByteArray &prefix = QByteArray()); void setChannelJoined(const QString &channel); void setChannelParted(const QString &channel); @@ -123,6 +128,7 @@ public slots: Cipher *cipher(const QString &recipient); QByteArray cipherKey(const QString &recipient) const; void setCipherKey(const QString &recipient, const QByteArray &key); + bool cipherUsesCBC(const QString &target); #endif void setAutoWhoEnabled(bool enabled); @@ -156,6 +162,7 @@ signals: void sslErrors(const QVariant &errorData); void newEvent(Event *event); + void socketOpen(const CoreIdentity *identity, const QHostAddress &localAddress, quint16 localPort, const QHostAddress &peerAddress, quint16 peerPort); void socketInitialized(const CoreIdentity *identity, const QHostAddress &localAddress, quint16 localPort, const QHostAddress &peerAddress, quint16 peerPort); void socketDisconnected(const CoreIdentity *identity, const QHostAddress &localAddress, quint16 localPort, const QHostAddress &peerAddress, quint16 peerPort); @@ -173,7 +180,7 @@ private slots: void socketHasData(); void socketError(QAbstractSocket::SocketError); void socketInitialized(); - inline void socketCloseTimeout() { socket.disconnectFromHost(); } + inline void socketCloseTimeout() { socket.abort(); } void socketDisconnected(); void socketStateChanged(QAbstractSocket::SocketState); void networkInitialized(); @@ -225,6 +232,7 @@ private: QTimer _pingTimer; uint _lastPingTime; uint _pingCount; + bool _sendPings; QStringList _autoWhoQueue; QHash _autoWhoPending; @@ -237,9 +245,6 @@ private: QList _msgQueue; QString _requestedUserModes; // 2 strings separated by a '-' character. first part are requested modes to add, the second to remove - - // Blowfish key map - QHash _cipherKeys; };