X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fcore%2Fnetworkconnection.h;h=9b9c43bb81eee694b3067f0e2f7d6c40de4484f2;hp=1e1247b5d89b66db9d10f931325c6d9bb6ee5fa8;hb=6623fd2d46dadd0168e4e28d1db6944c26c2a773;hpb=d1b6499b0b848d4287efae89107576548533502c diff --git a/src/core/networkconnection.h b/src/core/networkconnection.h index 1e1247b5..9b9c43bb 100644 --- a/src/core/networkconnection.h +++ b/src/core/networkconnection.h @@ -28,6 +28,7 @@ #include #include "message.h" +#include "network.h" #include "signalproxy.h" class CoreSession; @@ -50,6 +51,7 @@ public: CoreSession *coreSession() const; bool isConnected() const; + Network::ConnectionState connectionState() const; IrcServerHandler *ircServerHandler() const; UserInputHandler *userInputHandler() const; @@ -95,10 +97,11 @@ signals: void displayStatusMsg(QString); //void displayMsg(Message msg); void displayMsg(Message::Type, QString target, QString text, QString sender = "", quint8 flags = Message::None); - void connected(NetworkId networkId); + void connected(NetworkId networkId); ///< Emitted after receipt of 001 to indicate that we can now send data to the IRC server void disconnected(NetworkId networkId); - + void connectionStateChanged(Network::ConnectionState); void connectionInitialized(); ///< Emitted after receipt of 001 to indicate that we can now send data to the IRC server + void connectionError(const QString &errorMsg); //void queryRequested(QString network, QString nick); @@ -107,10 +110,14 @@ private slots: void socketHasData(); void socketError(QAbstractSocket::SocketError); void socketConnected(); + void socketDisconnected(); void socketStateChanged(QAbstractSocket::SocketState); + void setConnectionState(Network::ConnectionState); + void networkInitialized(); private: QTcpSocket socket; + Network::ConnectionState _connectionState; Network *_network; CoreSession *_coreSession;