SSH: Export information about the underlying TCP connection.

Change-Id: I62bce3b563b6aba481642fac0d427c0f0d3b2ddd
Reviewed-by: hjk <qthjk@ovi.com>
This commit is contained in:
Christian Kandeler
2012-02-10 10:39:48 +01:00
committed by hjk
parent 17c18623ef
commit 220f67dfdf
4 changed files with 22 additions and 5 deletions

View File

@@ -41,7 +41,7 @@
#include <QtCore/QObject>
#include <QtCore/QSharedPointer>
#include <QtCore/QString>
#include <QtNetwork/QAbstractSocket>
#include <QtNetwork/QHostAddress>
namespace Utils {
class SftpChannel;
@@ -71,6 +71,19 @@ public:
QTCREATOR_UTILS_EXPORT bool operator==(const SshConnectionParameters &p1, const SshConnectionParameters &p2);
QTCREATOR_UTILS_EXPORT bool operator!=(const SshConnectionParameters &p1, const SshConnectionParameters &p2);
class QTCREATOR_UTILS_EXPORT SshConnectionInfo
{
public:
SshConnectionInfo() : localPort(0), peerPort(0) {}
SshConnectionInfo(const QHostAddress &la, quint16 lp, const QHostAddress &pa, quint16 pp)
: localAddress(la), localPort(lp), peerAddress(pa), peerPort(pp) {}
QHostAddress localAddress;
quint16 localPort;
QHostAddress peerAddress;
quint16 peerPort;
};
class QTCREATOR_UTILS_EXPORT SshConnection : public QObject
{
Q_OBJECT
@@ -87,7 +100,7 @@ public:
SshError errorState() const;
QString errorString() const;
SshConnectionParameters connectionParameters() const;
QAbstractSocket::NetworkLayerProtocol ipProtocolVersion() const;
SshConnectionInfo connectionInfo() const;
~SshConnection();
QSharedPointer<SshRemoteProcess> createRemoteProcess(const QByteArray &command);