X-Git-Url: https://git.quassel-irc.org/?a=blobdiff_plain;f=src%2Fcore%2Fnetworkconnection.h;h=745afc7761a05454f62abb94cfd48223de7c3aec;hb=8010224cf5bfe5685dc2cf535e8dc1ec19c4c364;hp=c5694caa0a39e20cc9d1bf95ecd098caea7c536d;hpb=5b560ec1a01349562ac58051ca7e7fa899d4b994;p=quassel.git diff --git a/src/core/networkconnection.h b/src/core/networkconnection.h index c5694caa..745afc77 100644 --- a/src/core/networkconnection.h +++ b/src/core/networkconnection.h @@ -27,6 +27,7 @@ #include #include +#include "identity.h" #include "message.h" #include "network.h" #include "signalproxy.h" @@ -48,6 +49,7 @@ public: NetworkId networkId() const; QString networkName() const; Network *network() const; + Identity *identity() const; CoreSession *coreSession() const; bool isConnected() const; @@ -63,19 +65,19 @@ public: //! Decode a string using the server (network) decoding. QString serverDecode(const QByteArray &string) const; - //! Decode a string using a buffer-specific encoding if one is set (and use the server encoding else). - QString bufferDecode(const QString &bufferName, const QByteArray &string) const; + //! Decode a string using a channel-specific encoding if one is set (and use the standard encoding else). + QString channelDecode(const QString &channelName, const QByteArray &string) const; - //! Decode a string using a IrcUser specific encoding, if one exists (using the server encoding else). + //! Decode a string using an IrcUser-specific encoding, if one exists (using the standaed encoding else). QString userDecode(const QString &userNick, const QByteArray &string) const; //! Encode a string using the server (network) encoding. QByteArray serverEncode(const QString &string) const; - //! Encode a string using the buffer-specific encoding, if set, and use the server encoding else. - QByteArray bufferEncode(const QString &bufferName, const QString &string) const; + //! Encode a string using the channel-specific encoding, if set, and use the standard encoding else. + QByteArray channelEncode(const QString &channelName, const QString &string) const; - //! Encode a string using the user-specific encoding, if set, and use the server encoding else. + //! Encode a string using the user-specific encoding, if set, and use the standard encoding else. QByteArray userEncode(const QString &userNick, const QString &string) const; public slots: @@ -84,8 +86,8 @@ public slots: void disconnectFromIrc(); void userInput(BufferInfo bufferInfo, QString msg); - void putRawLine(QString input); - void putCmd(QString cmd, QStringList params, QString prefix = 0); + void putRawLine(QByteArray input); + void putCmd(const QString &cmd, const QVariantList ¶ms, const QByteArray &prefix = QByteArray()); private slots: @@ -113,7 +115,7 @@ private slots: void socketDisconnected(); void socketStateChanged(QAbstractSocket::SocketState); void setConnectionState(Network::ConnectionState); - void networkInitialized(); + void networkInitialized(const QString ¤tServer); private: QTcpSocket socket; @@ -126,9 +128,6 @@ private: UserInputHandler *_userInputHandler; CtcpHandler *_ctcpHandler; - QVariantMap networkSettings; - QVariantMap identity; - QVariant _previousState; class ParseError : public Exception {