X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fcore%2Fcorenetwork.h;h=8093bb61c10f3e302745ccbbc36f5ca3500d4aa5;hp=2dbd6a9e271dd718d9de5093bf3ccbfc6b148146;hb=9c15e81b15a20e861c707e240c2cfee56bdf4bc9;hpb=03eb5a574ec55546c62336428c7a9caa63b45a7a diff --git a/src/core/corenetwork.h b/src/core/corenetwork.h index 2dbd6a9e..8093bb61 100644 --- a/src/core/corenetwork.h +++ b/src/core/corenetwork.h @@ -26,7 +26,6 @@ #include "coreircuser.h" #include -#include #ifdef HAVE_SSL # include @@ -87,12 +86,12 @@ public: inline UserId userId() const { return _coreSession->user(); } - inline QAbstractSocket::SocketState socketState() { return socket.state(); } - inline bool socketConnected() { return socket.state() == QAbstractSocket::ConnectedState; } - inline QHostAddress localAddress() { return socket.localAddress(); } - inline QHostAddress peerAddress() { return socket.peerAddress(); } - inline quint16 localPort() { return socket.localPort(); } - inline quint16 peerPort() { return socket.peerPort(); } + inline QAbstractSocket::SocketState socketState() const { return socket.state(); } + inline bool socketConnected() const { return socket.state() == QAbstractSocket::ConnectedState; } + inline QHostAddress localAddress() const { return socket.localAddress(); } + inline QHostAddress peerAddress() const { return socket.peerAddress(); } + inline quint16 localPort() const { return socket.localPort(); } + inline quint16 peerPort() const { return socket.peerPort(); } public slots: virtual void setMyNick(const QString &mynick); @@ -155,6 +154,8 @@ signals: void sslErrors(const QVariant &errorData); void newEvent(Event *event); + 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); protected: inline virtual IrcChannel *ircChannelFactory(const QString &channelname) { return new CoreIrcChannel(channelname, this); }