move src/plugins/coreplugin/ssh to src/lib/utils/ssh

Merge-request: 253
Reviewed-by: hjk <qtc-committer@nokia.com>
This commit is contained in:
Milian Wolff
2011-02-14 16:34:17 +01:00
committed by hjk
parent 3b2804d01a
commit 94548a1e1f
85 changed files with 341 additions and 337 deletions

View File

@@ -3,6 +3,7 @@ CONFIG += ordered
QT += core gui QT += core gui
SUBDIRS = \ SUBDIRS = \
3rdparty \
qtconcurrent \ qtconcurrent \
aggregation \ aggregation \
extensionsystem \ extensionsystem \
@@ -13,8 +14,7 @@ SUBDIRS = \
qmljs \ qmljs \
glsl \ glsl \
qmleditorwidgets \ qmleditorwidgets \
symbianutils \ symbianutils
3rdparty
# Windows: Compile Qt Creator CDB extension if Debugging tools can be detected. # Windows: Compile Qt Creator CDB extension if Debugging tools can be detected.
win32 { win32 {

View File

@@ -41,7 +41,7 @@
#include <QtCore/QDir> #include <QtCore/QDir>
#include <QtCore/QFile> #include <QtCore/QFile>
namespace Core { namespace Utils {
namespace Internal { namespace Internal {
namespace { namespace {
@@ -70,10 +70,10 @@ SftpChannel::SftpChannel(quint32 channelId,
Qt::QueuedConnection); Qt::QueuedConnection);
connect(d, SIGNAL(initializationFailed(QString)), this, connect(d, SIGNAL(initializationFailed(QString)), this,
SIGNAL(initializationFailed(QString)), Qt::QueuedConnection); SIGNAL(initializationFailed(QString)), Qt::QueuedConnection);
connect(d, SIGNAL(dataAvailable(Core::SftpJobId, QString)), this, connect(d, SIGNAL(dataAvailable(Utils::SftpJobId, QString)), this,
SIGNAL(dataAvailable(Core::SftpJobId, QString)), Qt::QueuedConnection); SIGNAL(dataAvailable(Utils::SftpJobId, QString)), Qt::QueuedConnection);
connect(d, SIGNAL(finished(Core::SftpJobId,QString)), this, connect(d, SIGNAL(finished(Utils::SftpJobId,QString)), this,
SIGNAL(finished(Core::SftpJobId,QString)), Qt::QueuedConnection); SIGNAL(finished(Utils::SftpJobId,QString)), Qt::QueuedConnection);
connect(d, SIGNAL(closed()), this, SIGNAL(closed()), Qt::QueuedConnection); connect(d, SIGNAL(closed()), this, SIGNAL(closed()), Qt::QueuedConnection);
} }
@@ -882,4 +882,4 @@ void SftpChannelPrivate::spawnReadRequests(const SftpDownload::Ptr &job)
} }
} // namespace Internal } // namespace Internal
} // namespace Core } // namespace Utils

View File

@@ -37,14 +37,14 @@
#include "sftpdefs.h" #include "sftpdefs.h"
#include "sftpincomingpacket_p.h" #include "sftpincomingpacket_p.h"
#include <coreplugin/core_global.h> #include <utils/utils_global.h>
#include <QtCore/QByteArray> #include <QtCore/QByteArray>
#include <QtCore/QObject> #include <QtCore/QObject>
#include <QtCore/QSharedPointer> #include <QtCore/QSharedPointer>
#include <QtCore/QString> #include <QtCore/QString>
namespace Core { namespace Utils {
namespace Internal { namespace Internal {
class SftpChannelPrivate; class SftpChannelPrivate;
@@ -71,7 +71,7 @@ class SshSendFacility;
* non-empty error string. * non-empty error string.
* Note that directory names must not have a trailing slash. * Note that directory names must not have a trailing slash.
*/ */
class CORE_EXPORT SftpChannel : public QObject class QTCREATOR_UTILS_EXPORT SftpChannel : public QObject
{ {
Q_OBJECT Q_OBJECT
@@ -108,14 +108,14 @@ signals:
void closed(); void closed();
// error.isEmpty <=> finished successfully // error.isEmpty <=> finished successfully
void finished(Core::SftpJobId job, const QString &error = QString()); void finished(Utils::SftpJobId job, const QString &error = QString());
/* /*
* This signal is only emitted by the "List Directory" operation, * This signal is only emitted by the "List Directory" operation,
* one file at a time. * one file at a time.
// TODO: Also emit for each file copied by uploadDir(). // TODO: Also emit for each file copied by uploadDir().
*/ */
void dataAvailable(Core::SftpJobId job, const QString &data); void dataAvailable(Utils::SftpJobId job, const QString &data);
private: private:
SftpChannel(quint32 channelId, Internal::SshSendFacility &sendFacility); SftpChannel(quint32 channelId, Internal::SshSendFacility &sendFacility);
@@ -123,6 +123,6 @@ private:
Internal::SftpChannelPrivate *d; Internal::SftpChannelPrivate *d;
}; };
} // namespace Core } // namespace Utils
#endif // SFTPCHANNEL_H #endif // SFTPCHANNEL_H

View File

@@ -43,14 +43,14 @@
#include <QtCore/QByteArray> #include <QtCore/QByteArray>
#include <QtCore/QMap> #include <QtCore/QMap>
namespace Core { namespace Utils {
class SftpChannel; class SftpChannel;
namespace Internal { namespace Internal {
class SftpChannelPrivate : public AbstractSshChannel class SftpChannelPrivate : public AbstractSshChannel
{ {
Q_OBJECT Q_OBJECT
friend class Core::SftpChannel; friend class Utils::SftpChannel;
public: public:
enum SftpState { Inactive, SubsystemRequested, InitSent, Initialized }; enum SftpState { Inactive, SubsystemRequested, InitSent, Initialized };
@@ -64,8 +64,8 @@ signals:
void initialized(); void initialized();
void initializationFailed(const QString &reason); void initializationFailed(const QString &reason);
void closed(); void closed();
void finished(Core::SftpJobId job, const QString &error = QString()); void finished(Utils::SftpJobId job, const QString &error = QString());
void dataAvailable(Core::SftpJobId job, const QString &data); void dataAvailable(Utils::SftpJobId job, const QString &data);
private: private:
typedef QMap<SftpJobId, AbstractSftpOperation::Ptr> JobMap; typedef QMap<SftpJobId, AbstractSftpOperation::Ptr> JobMap;
@@ -128,6 +128,6 @@ private:
}; };
} // namespace Internal } // namespace Internal
} // namespace Core } // namespace Utils
#endif // SFTPCHANNEL_P_H #endif // SFTPCHANNEL_P_H

View File

@@ -33,4 +33,4 @@
#include "sftpdefs.h" #include "sftpdefs.h"
namespace Core { const SftpJobId SftpInvalidJob = 0; } namespace Utils { const SftpJobId SftpInvalidJob = 0; }

View File

@@ -34,19 +34,19 @@
#ifndef SFTPDEFS_H #ifndef SFTPDEFS_H
#define SFTPDEFS_H #define SFTPDEFS_H
#include <coreplugin/core_global.h> #include <utils/utils_global.h>
#include <QtCore/QtGlobal> #include <QtCore/QtGlobal>
namespace Core { namespace Utils {
typedef quint32 SftpJobId; typedef quint32 SftpJobId;
CORE_EXPORT extern const SftpJobId SftpInvalidJob; QTCREATOR_UTILS_EXPORT extern const SftpJobId SftpInvalidJob;
enum SftpOverwriteMode { enum SftpOverwriteMode {
SftpOverwriteExisting, SftpAppendToExisting, SftpSkipExisting SftpOverwriteExisting, SftpAppendToExisting, SftpSkipExisting
}; };
} // namespace Core } // namespace Utils
#endif // SFTPDEFS_H #endif // SFTPDEFS_H

View File

@@ -36,7 +36,7 @@
#include "sshexception_p.h" #include "sshexception_p.h"
#include "sshpacketparser_p.h" #include "sshpacketparser_p.h"
namespace Core { namespace Utils {
namespace Internal { namespace Internal {
namespace { namespace {
@@ -231,4 +231,4 @@ SftpFileAttributes SftpIncomingPacket::asFileAttributes(quint32 &offset) const
} }
} // namespace Internal } // namespace Internal
} // namespace Core } // namespace Utils

View File

@@ -36,7 +36,7 @@
#include "sftppacket_p.h" #include "sftppacket_p.h"
namespace Core { namespace Utils {
namespace Internal { namespace Internal {
struct SftpHandleResponse { struct SftpHandleResponse {
@@ -110,6 +110,6 @@ private:
}; };
} // namespace Internal } // namespace Internal
} // namespace Core } // namespace Utils
#endif // SFTPINCOMINGPACKET_P_H #endif // SFTPINCOMINGPACKET_P_H

View File

@@ -37,7 +37,7 @@
#include <QtCore/QFile> #include <QtCore/QFile>
namespace Core { namespace Utils {
namespace Internal { namespace Internal {
AbstractSftpOperation::AbstractSftpOperation(SftpJobId jobId) : jobId(jobId) AbstractSftpOperation::AbstractSftpOperation(SftpJobId jobId) : jobId(jobId)
@@ -184,4 +184,4 @@ SftpOutgoingPacket &SftpUploadFile::initialPacket(SftpOutgoingPacket &packet)
SftpUploadDir::~SftpUploadDir() {} SftpUploadDir::~SftpUploadDir() {}
} // namespace Internal } // namespace Internal
} // namespace Core } // namespace Utils

View File

@@ -45,7 +45,7 @@ QT_BEGIN_NAMESPACE
class QFile; class QFile;
QT_END_NAMESPACE QT_END_NAMESPACE
namespace Core { namespace Utils {
namespace Internal { namespace Internal {
class SftpOutgoingPacket; class SftpOutgoingPacket;
@@ -227,6 +227,6 @@ struct SftpUploadDir
}; };
} // namespace Internal } // namespace Internal
} // namespace Core } // namespace Utils
#endif // SFTPOPERATION_P_H #endif // SFTPOPERATION_P_H

View File

@@ -37,7 +37,7 @@
#include <QtCore/QtEndian> #include <QtCore/QtEndian>
namespace Core { namespace Utils {
namespace Internal { namespace Internal {
namespace { namespace {
@@ -203,4 +203,4 @@ SftpOutgoingPacket &SftpOutgoingPacket::finalize()
} }
} // namespace Internal } // namespace Internal
} // namespace Core } // namespace Utils

View File

@@ -37,7 +37,7 @@
#include "sftppacket_p.h" #include "sftppacket_p.h"
#include "sftpdefs.h" #include "sftpdefs.h"
namespace Core { namespace Utils {
namespace Internal { namespace Internal {
class SftpOutgoingPacket : public AbstractSftpPacket class SftpOutgoingPacket : public AbstractSftpPacket
@@ -82,6 +82,6 @@ private:
}; };
} // namespace Internal } // namespace Internal
} // namespace Core } // namespace Utils
#endif // SFTPOUTGOINGPACKET_P_H #endif // SFTPOUTGOINGPACKET_P_H

View File

@@ -35,7 +35,7 @@
#include "sshpacketparser_p.h" #include "sshpacketparser_p.h"
namespace Core { namespace Utils {
namespace Internal { namespace Internal {
const quint32 AbstractSftpPacket::MaxDataSize = 32000; const quint32 AbstractSftpPacket::MaxDataSize = 32000;
@@ -55,4 +55,4 @@ quint32 AbstractSftpPacket::requestId() const
} }
} // namespace Internal } // namespace Internal
} // namespace Core } // namespace Utils

View File

@@ -38,7 +38,7 @@
#include <QtCore/QList> #include <QtCore/QList>
#include <QtCore/QString> #include <QtCore/QString>
namespace Core { namespace Utils {
namespace Internal { namespace Internal {
enum SftpPacketType { enum SftpPacketType {
@@ -107,6 +107,6 @@ protected:
}; };
} // namespace Internal } // namespace Internal
} // namespace Core } // namespace Utils
#endif // SFTPPACKET_P_H #endif // SFTPPACKET_P_H

View File

@@ -39,7 +39,7 @@
#include <botan/rng.h> #include <botan/rng.h>
#include <botan/secmem.h> #include <botan/secmem.h>
namespace Core { namespace Utils {
namespace Internal { namespace Internal {
inline const Botan::byte *convertByteArray(const QByteArray &a) inline const Botan::byte *convertByteArray(const QByteArray &a)
@@ -96,6 +96,6 @@ inline quint32 botanHMacKeyLen(const QByteArray &rfcAlgoName)
} }
} // namespace Internal } // namespace Internal
} // namespace Core } // namespace Utils
#endif // BYTEARRAYCONVERSIONS_P_H #endif // BYTEARRAYCONVERSIONS_P_H

View File

@@ -38,7 +38,7 @@
#include <QtCore/QCoreApplication> #include <QtCore/QCoreApplication>
#include <QtCore/QString> #include <QtCore/QString>
namespace Core { namespace Utils {
namespace Internal { namespace Internal {
namespace { namespace {
@@ -104,4 +104,4 @@ QByteArray SshCapabilities::findBestMatch(const QList<QByteArray> &myCapabilitie
} }
} // namespace Internal } // namespace Internal
} // namespace Core } // namespace Utils

View File

@@ -37,7 +37,7 @@
#include <QtCore/QByteArray> #include <QtCore/QByteArray>
#include <QtCore/QList> #include <QtCore/QList>
namespace Core { namespace Utils {
namespace Internal { namespace Internal {
class SshCapabilities class SshCapabilities
@@ -71,6 +71,6 @@ public:
}; };
} // namespace Internal } // namespace Internal
} // namespace Core } // namespace Utils
#endif // CAPABILITIES_P_H #endif // CAPABILITIES_P_H

View File

@@ -40,7 +40,7 @@
#include <QtCore/QTimer> #include <QtCore/QTimer>
namespace Core { namespace Utils {
namespace Internal { namespace Internal {
namespace { namespace {
@@ -261,4 +261,4 @@ quint32 AbstractSshChannel::maxDataSize() const
} }
} // namespace Internal } // namespace Internal
} // namespace Core } // namespace Utils

View File

@@ -40,7 +40,7 @@
QT_FORWARD_DECLARE_CLASS(QTimer) QT_FORWARD_DECLARE_CLASS(QTimer)
namespace Core { namespace Utils {
namespace Internal { namespace Internal {
struct SshChannelExitSignal; struct SshChannelExitSignal;
@@ -124,6 +124,6 @@ private:
}; };
} // namespace Internal } // namespace Internal
} // namespace Core } // namespace Utils
#endif // SSHCHANNEL_P_H #endif // SSHCHANNEL_P_H

View File

@@ -42,7 +42,7 @@
#include <QtCore/QList> #include <QtCore/QList>
namespace Core { namespace Utils {
namespace Internal { namespace Internal {
SshChannelManager::SshChannelManager(SshSendFacility &sendFacility, SshChannelManager::SshChannelManager(SshSendFacility &sendFacility,
@@ -150,14 +150,14 @@ AbstractSshChannel *SshChannelManager::lookupChannel(quint32 channelId,
return it == m_channels.end() ? 0 : it.value(); return it == m_channels.end() ? 0 : it.value();
} }
Core::SshRemoteProcess::Ptr SshChannelManager::createRemoteProcess(const QByteArray &command) Utils::SshRemoteProcess::Ptr SshChannelManager::createRemoteProcess(const QByteArray &command)
{ {
SshRemoteProcess::Ptr proc(new SshRemoteProcess(command, m_nextLocalChannelId++, m_sendFacility)); SshRemoteProcess::Ptr proc(new SshRemoteProcess(command, m_nextLocalChannelId++, m_sendFacility));
insertChannel(proc->d, proc); insertChannel(proc->d, proc);
return proc; return proc;
} }
Core::SftpChannel::Ptr SshChannelManager::createSftpChannel() Utils::SftpChannel::Ptr SshChannelManager::createSftpChannel()
{ {
SftpChannel::Ptr sftp(new SftpChannel(m_nextLocalChannelId++, m_sendFacility)); SftpChannel::Ptr sftp(new SftpChannel(m_nextLocalChannelId++, m_sendFacility));
insertChannel(sftp->d, sftp); insertChannel(sftp->d, sftp);
@@ -189,4 +189,4 @@ void SshChannelManager::removeChannel(ChannelIterator it)
} }
} // namespace Internal } // namespace Internal
} // namespace Core } // namespace Utils

View File

@@ -38,7 +38,7 @@
#include <QtCore/QObject> #include <QtCore/QObject>
#include <QtCore/QSharedPointer> #include <QtCore/QSharedPointer>
namespace Core { namespace Utils {
class SftpChannel; class SftpChannel;
class SshRemoteProcess; class SshRemoteProcess;
@@ -92,6 +92,6 @@ private:
}; };
} // namespace Internal } // namespace Internal
} // namespace Core } // namespace Utils
#endif // SSHCHANNELLAYER_P_H #endif // SSHCHANNELLAYER_P_H

View File

@@ -51,7 +51,7 @@
#include <QtNetwork/QNetworkProxy> #include <QtNetwork/QNetworkProxy>
#include <QtNetwork/QTcpSocket> #include <QtNetwork/QTcpSocket>
namespace Core { namespace Utils {
namespace { namespace {
const QByteArray ClientId("SSH-2.0-QtCreator\r\n"); const QByteArray ClientId("SSH-2.0-QtCreator\r\n");
@@ -65,8 +65,8 @@ namespace {
staticInitMutex.lock(); staticInitMutex.lock();
if (!staticInitializationsDone) { if (!staticInitializationsDone) {
Botan::LibraryInitializer::initialize("thread_safe=true"); Botan::LibraryInitializer::initialize("thread_safe=true");
qRegisterMetaType<Core::SshError>("Core::SshError"); qRegisterMetaType<Utils::SshError>("Utils::SshError");
qRegisterMetaType<Core::SftpJobId>("Core::SftpJobId"); qRegisterMetaType<Utils::SftpJobId>("Utils::SftpJobId");
staticInitializationsDone = true; staticInitializationsDone = true;
} }
staticInitMutex.unlock(); staticInitMutex.unlock();
@@ -89,12 +89,12 @@ static inline bool equals(const SshConnectionParameters &p1, const SshConnection
&& p1.timeout == p2.timeout && p1.port == p2.port; && p1.timeout == p2.timeout && p1.port == p2.port;
} }
CORE_EXPORT bool operator==(const SshConnectionParameters &p1, const SshConnectionParameters &p2) QTCREATOR_UTILS_EXPORT bool operator==(const SshConnectionParameters &p1, const SshConnectionParameters &p2)
{ {
return equals(p1, p2); return equals(p1, p2);
} }
CORE_EXPORT bool operator!=(const SshConnectionParameters &p1, const SshConnectionParameters &p2) QTCREATOR_UTILS_EXPORT bool operator!=(const SshConnectionParameters &p1, const SshConnectionParameters &p2)
{ {
return !equals(p1, p2); return !equals(p1, p2);
} }
@@ -115,8 +115,8 @@ SshConnection::SshConnection() : d(new Internal::SshConnectionPrivate(this))
SIGNAL(dataAvailable(QString)), Qt::QueuedConnection); SIGNAL(dataAvailable(QString)), Qt::QueuedConnection);
connect(d, SIGNAL(disconnected()), this, SIGNAL(disconnected()), connect(d, SIGNAL(disconnected()), this, SIGNAL(disconnected()),
Qt::QueuedConnection); Qt::QueuedConnection);
connect(d, SIGNAL(error(Core::SshError)), this, connect(d, SIGNAL(error(Utils::SshError)), this,
SIGNAL(error(Core::SshError)), Qt::QueuedConnection); SIGNAL(error(Utils::SshError)), Qt::QueuedConnection);
} }
void SshConnection::connectToHost(const SshConnectionParameters &serverInfo) void SshConnection::connectToHost(const SshConnectionParameters &serverInfo)
@@ -642,4 +642,4 @@ QSharedPointer<SftpChannel> SshConnectionPrivate::createSftpChannel()
const quint64 SshConnectionPrivate::InvalidSeqNr = static_cast<quint64>(-1); const quint64 SshConnectionPrivate::InvalidSeqNr = static_cast<quint64>(-1);
} // namespace Internal } // namespace Internal
} // namespace Core } // namespace Utils

View File

@@ -36,14 +36,14 @@
#include "ssherrors.h" #include "ssherrors.h"
#include <coreplugin/core_global.h> #include <utils/utils_global.h>
#include <QtCore/QByteArray> #include <QtCore/QByteArray>
#include <QtCore/QObject> #include <QtCore/QObject>
#include <QtCore/QSharedPointer> #include <QtCore/QSharedPointer>
#include <QtCore/QString> #include <QtCore/QString>
namespace Core { namespace Utils {
class SftpChannel; class SftpChannel;
class SshRemoteProcess; class SshRemoteProcess;
@@ -51,7 +51,7 @@ namespace Internal {
class SshConnectionPrivate; class SshConnectionPrivate;
} // namespace Internal } // namespace Internal
struct CORE_EXPORT SshConnectionParameters struct QTCREATOR_UTILS_EXPORT SshConnectionParameters
{ {
enum ProxyType { DefaultProxy, NoProxy }; enum ProxyType { DefaultProxy, NoProxy };
SshConnectionParameters(ProxyType proxyType); SshConnectionParameters(ProxyType proxyType);
@@ -66,15 +66,15 @@ struct CORE_EXPORT SshConnectionParameters
ProxyType proxyType; ProxyType proxyType;
}; };
CORE_EXPORT bool operator==(const SshConnectionParameters &p1, const SshConnectionParameters &p2); QTCREATOR_UTILS_EXPORT bool operator==(const SshConnectionParameters &p1, const SshConnectionParameters &p2);
CORE_EXPORT bool operator!=(const SshConnectionParameters &p1, const SshConnectionParameters &p2); QTCREATOR_UTILS_EXPORT bool operator!=(const SshConnectionParameters &p1, const SshConnectionParameters &p2);
/* /*
* This class provides an SSH connection, implementing protocol version 2.0 * This class provides an SSH connection, implementing protocol version 2.0
* It can spawn channels for remote execution and SFTP operations (version 3). * It can spawn channels for remote execution and SFTP operations (version 3).
* It operates asynchronously (non-blocking) and is not thread-safe. * It operates asynchronously (non-blocking) and is not thread-safe.
*/ */
class CORE_EXPORT SshConnection : public QObject class QTCREATOR_UTILS_EXPORT SshConnection : public QObject
{ {
Q_OBJECT Q_OBJECT
Q_DISABLE_COPY(SshConnection) Q_DISABLE_COPY(SshConnection)
@@ -99,7 +99,7 @@ signals:
void connected(); void connected();
void disconnected(); void disconnected();
void dataAvailable(const QString &message); void dataAvailable(const QString &message);
void error(Core::SshError); void error(Utils::SshError);
private: private:
SshConnection(); SshConnection();

View File

@@ -53,7 +53,7 @@ QT_END_NAMESPACE
namespace Botan { class Exception; } namespace Botan { class Exception; }
namespace Core { namespace Utils {
class SftpChannel; class SftpChannel;
namespace Internal { namespace Internal {
@@ -76,7 +76,7 @@ enum SshStateInternal {
class SshConnectionPrivate : public QObject class SshConnectionPrivate : public QObject
{ {
Q_OBJECT Q_OBJECT
friend class Core::SshConnection; friend class Utils::SshConnection;
public: public:
SshConnectionPrivate(SshConnection *conn); SshConnectionPrivate(SshConnection *conn);
~SshConnectionPrivate(); ~SshConnectionPrivate();
@@ -94,7 +94,7 @@ signals:
void connected(); void connected();
void disconnected(); void disconnected();
void dataAvailable(const QString &message); void dataAvailable(const QString &message);
void error(Core::SshError); void error(Utils::SshError);
private: private:
Q_SLOT void handleSocketConnected(); Q_SLOT void handleSocketConnected();
@@ -163,6 +163,6 @@ private:
}; };
} // namespace Internal } // namespace Internal
} // namespace Core } // namespace Utils
#endif // SSHCONNECTION_P_H #endif // SSHCONNECTION_P_H

View File

@@ -58,7 +58,7 @@
using namespace Botan; using namespace Botan;
namespace Core { namespace Utils {
namespace Internal { namespace Internal {
SshAbstractCryptoFacility::SshAbstractCryptoFacility() SshAbstractCryptoFacility::SshAbstractCryptoFacility()
@@ -370,4 +370,4 @@ void SshDecryptionFacility::decrypt(QByteArray &data, quint32 offset,
} }
} // namespace Internal } // namespace Internal
} // namespace Core } // namespace Utils

View File

@@ -51,7 +51,7 @@ namespace Botan {
class PK_Signing_Key; class PK_Signing_Key;
} }
namespace Core { namespace Utils {
namespace Internal { namespace Internal {
class SshKeyExchange; class SshKeyExchange;
@@ -153,6 +153,6 @@ private:
}; };
} // namespace Internal } // namespace Internal
} // namespace Core } // namespace Utils
#endif // SSHABSTRACTCRYPTOFACILITY_P_H #endif // SSHABSTRACTCRYPTOFACILITY_P_H

View File

@@ -34,7 +34,7 @@
#ifndef SSHERRORS_P_H #ifndef SSHERRORS_P_H
#define SSHERRORS_P_H #define SSHERRORS_P_H
namespace Core { namespace Utils {
enum SshError { enum SshError {
SshNoError, SshSocketError, SshTimeoutError, SshProtocolError, SshNoError, SshSocketError, SshTimeoutError, SshProtocolError,
@@ -42,6 +42,6 @@ enum SshError {
SshClosedByServerError, SshInternalError SshClosedByServerError, SshInternalError
}; };
} // namespace Core } // namespace Utils
#endif // SSHERRORS_P_H #endif // SSHERRORS_P_H

View File

@@ -40,7 +40,7 @@
#include <QtCore/QCoreApplication> #include <QtCore/QCoreApplication>
#include <QtCore/QString> #include <QtCore/QString>
namespace Core { namespace Utils {
namespace Internal { namespace Internal {
enum SshErrorCode { enum SshErrorCode {
@@ -88,6 +88,6 @@ struct SshClientException
}; };
} // namespace Internal } // namespace Internal
} // namespace Core } // namespace Utils
#endif // SSHEXCEPTION_P_H #endif // SSHEXCEPTION_P_H

View File

@@ -35,7 +35,7 @@
#include "sshcapabilities_p.h" #include "sshcapabilities_p.h"
namespace Core { namespace Utils {
namespace Internal { namespace Internal {
const QByteArray SshIncomingPacket::ExitStatusType("exit-status"); const QByteArray SshIncomingPacket::ExitStatusType("exit-status");
@@ -459,4 +459,4 @@ void SshIncomingPacket::calculateLength() const
} }
} // namespace Internal } // namespace Internal
} // namespace Core } // namespace Utils

View File

@@ -42,7 +42,7 @@
#include <QtCore/QList> #include <QtCore/QList>
#include <QtCore/QString> #include <QtCore/QString>
namespace Core { namespace Utils {
namespace Internal { namespace Internal {
class SshKeyExchange; class SshKeyExchange;
@@ -191,6 +191,6 @@ private:
}; };
} // namespace Internal } // namespace Internal
} // namespace Core } // namespace Utils
#endif // SSHINCOMINGPACKET_P_H #endif // SSHINCOMINGPACKET_P_H

View File

@@ -49,7 +49,7 @@
using namespace Botan; using namespace Botan;
namespace Core { namespace Utils {
namespace Internal { namespace Internal {
namespace { namespace {
@@ -198,4 +198,4 @@ void SshKeyExchange::sendNewKeysPacket(const SshIncomingPacket &dhReply,
} }
} // namespace Internal } // namespace Internal
} // namespace Core } // namespace Utils

View File

@@ -41,7 +41,7 @@
namespace Botan { class HashFunction; } namespace Botan { class HashFunction; }
namespace Core { namespace Utils {
namespace Internal { namespace Internal {
class SshSendFacility; class SshSendFacility;
@@ -86,6 +86,6 @@ private:
}; };
} // namespace Internal } // namespace Internal
} // namespace Core } // namespace Utils
#endif // SSHKEYEXCHANGE_P_H #endif // SSHKEYEXCHANGE_P_H

View File

@@ -48,7 +48,7 @@
#include <QtCore/QDateTime> #include <QtCore/QDateTime>
namespace Core { namespace Utils {
using namespace Botan; using namespace Botan;
using namespace Internal; using namespace Internal;
@@ -147,4 +147,4 @@ bool SshKeyGenerator::generateOpenSslKeys(const KeyPtr &key)
return true; return true;
} }
} // namespace Core } // namespace Utils

View File

@@ -34,7 +34,7 @@
#ifndef SSHKEYGENERATOR_H #ifndef SSHKEYGENERATOR_H
#define SSHKEYGENERATOR_H #define SSHKEYGENERATOR_H
#include <coreplugin/core_global.h> #include <utils/utils_global.h>
#include <QtCore/QCoreApplication> #include <QtCore/QCoreApplication>
#include <QtCore/QSharedPointer> #include <QtCore/QSharedPointer>
@@ -43,9 +43,9 @@ namespace Botan {
class Private_Key; class Private_Key;
} }
namespace Core { namespace Utils {
class CORE_EXPORT SshKeyGenerator class QTCREATOR_UTILS_EXPORT SshKeyGenerator
{ {
Q_DECLARE_TR_FUNCTIONS(SshKeyGenerator) Q_DECLARE_TR_FUNCTIONS(SshKeyGenerator)
public: public:
@@ -74,6 +74,6 @@ private:
PrivateKeyFormat m_format; PrivateKeyFormat m_format;
}; };
} // namespace Core } // namespace Utils
#endif // SSHKEYGENERATOR_H #endif // SSHKEYGENERATOR_H

View File

@@ -38,7 +38,7 @@
#include <QtCore/QtEndian> #include <QtCore/QtEndian>
namespace Core { namespace Utils {
namespace Internal { namespace Internal {
SshOutgoingPacket::SshOutgoingPacket(const SshEncryptionFacility &encrypter, SshOutgoingPacket::SshOutgoingPacket(const SshEncryptionFacility &encrypter,
@@ -295,4 +295,4 @@ QByteArray SshOutgoingPacket::encodeNameList(const QList<QByteArray> &list)
} }
} // namespace Internal } // namespace Internal
} // namespace Core } // namespace Utils

View File

@@ -36,7 +36,7 @@
#include "sshpacket_p.h" #include "sshpacket_p.h"
namespace Core { namespace Utils {
namespace Internal { namespace Internal {
class SshEncryptionFacility; class SshEncryptionFacility;
@@ -99,6 +99,6 @@ private:
}; };
} // namespace Internal } // namespace Internal
} // namespace Core } // namespace Utils
#endif // SSHOUTGOINGPACKET_P_H #endif // SSHOUTGOINGPACKET_P_H

View File

@@ -42,7 +42,7 @@
#include <cctype> #include <cctype>
namespace Core { namespace Utils {
namespace Internal { namespace Internal {
const quint32 AbstractSshPacket::PaddingLengthOffset = 4; const quint32 AbstractSshPacket::PaddingLengthOffset = 4;
@@ -168,4 +168,4 @@ void AbstractSshPacket::setLengthField(QByteArray &data)
} }
} // namespace Internal } // namespace Internal
} // namespace Core } // namespace Utils

View File

@@ -42,7 +42,7 @@
#include <botan/bigint.h> #include <botan/bigint.h>
namespace Core { namespace Utils {
namespace Internal { namespace Internal {
enum SshPacketType { enum SshPacketType {
@@ -141,6 +141,6 @@ protected:
}; };
} // namespace Internal } // namespace Internal
} // namespace Core } // namespace Utils
#endif // SSHPACKET_P_H #endif // SSHPACKET_P_H

View File

@@ -35,7 +35,7 @@
#include <cctype> #include <cctype>
namespace Core { namespace Utils {
namespace Internal { namespace Internal {
namespace { quint32 size(const QByteArray &data) { return data.size(); } } namespace { quint32 size(const QByteArray &data) { return data.size(); } }
@@ -154,4 +154,4 @@ Botan::BigInt SshPacketParser::asBigInt(const QByteArray &data, quint32 *offset)
} }
} // namespace Internal } // namespace Internal
} // namespace Core } // namespace Utils

View File

@@ -40,7 +40,7 @@
#include <QtCore/QList> #include <QtCore/QList>
#include <QtCore/QString> #include <QtCore/QString>
namespace Core { namespace Utils {
namespace Internal { namespace Internal {
struct SshNameList struct SshNameList
@@ -80,6 +80,6 @@ public:
}; };
} // namespace Internal } // namespace Internal
} // namespace Core } // namespace Utils
#endif // SSHPACKETPARSER_P_H #endif // SSHPACKETPARSER_P_H

View File

@@ -41,7 +41,7 @@
#include <QtCore/QTimer> #include <QtCore/QTimer>
namespace Core { namespace Utils {
const QByteArray SshRemoteProcess::AbrtSignal("ABRT"); const QByteArray SshRemoteProcess::AbrtSignal("ABRT");
const QByteArray SshRemoteProcess::AlrmSignal("ALRM"); const QByteArray SshRemoteProcess::AlrmSignal("ALRM");
@@ -234,4 +234,4 @@ void SshRemoteProcessPrivate::handleExitSignal(const SshChannelExitSignal &signa
} }
} // namespace Internal } // namespace Internal
} // namespace Core } // namespace Utils

View File

@@ -34,7 +34,7 @@
#ifndef SSHREMOTECOMMAND_H #ifndef SSHREMOTECOMMAND_H
#define SSHREMOTECOMMAND_H #define SSHREMOTECOMMAND_H
#include <coreplugin/core_global.h> #include <utils/utils_global.h>
#include <QtCore/QObject> #include <QtCore/QObject>
#include <QtCore/QSharedPointer> #include <QtCore/QSharedPointer>
@@ -43,7 +43,7 @@ QT_BEGIN_NAMESPACE
class QByteArray; class QByteArray;
QT_END_NAMESPACE QT_END_NAMESPACE
namespace Core { namespace Utils {
namespace Internal { namespace Internal {
class SshChannelManager; class SshChannelManager;
class SshRemoteProcessPrivate; class SshRemoteProcessPrivate;
@@ -63,7 +63,7 @@ class SshSendFacility;
* Note that the process does not have a terminal, so you can't use it * Note that the process does not have a terminal, so you can't use it
* for applications that require one. * for applications that require one.
*/ */
class CORE_EXPORT SshRemoteProcess : public QObject class QTCREATOR_UTILS_EXPORT SshRemoteProcess : public QObject
{ {
Q_OBJECT Q_OBJECT
Q_DISABLE_COPY(SshRemoteProcess) Q_DISABLE_COPY(SshRemoteProcess)
@@ -129,6 +129,6 @@ private:
Internal::SshRemoteProcessPrivate *d; Internal::SshRemoteProcessPrivate *d;
}; };
} // namespace Core } // namespace Utils
#endif // SSHREMOTECOMMAND_H #endif // SSHREMOTECOMMAND_H

View File

@@ -39,7 +39,7 @@
#include <QtCore/QList> #include <QtCore/QList>
#include <QtCore/QPair> #include <QtCore/QPair>
namespace Core { namespace Utils {
class SshRemoteProcess; class SshRemoteProcess;
namespace Internal { namespace Internal {
@@ -48,7 +48,7 @@ class SshSendFacility;
class SshRemoteProcessPrivate : public AbstractSshChannel class SshRemoteProcessPrivate : public AbstractSshChannel
{ {
Q_OBJECT Q_OBJECT
friend class Core::SshRemoteProcess; friend class Utils::SshRemoteProcess;
public: public:
enum ProcessState { enum ProcessState {
NotYetStarted, ExecRequested, StartFailed,Running, Exited NotYetStarted, ExecRequested, StartFailed,Running, Exited
@@ -93,6 +93,6 @@ private:
}; };
} // namespace Internal } // namespace Internal
} // namespace Core } // namespace Utils
#endif // SSHREMOTEPROCESS_P_H #endif // SSHREMOTEPROCESS_P_H

View File

@@ -2,7 +2,7 @@
#define ASSERT_STATE(states) assertState(states, Q_FUNC_INFO) #define ASSERT_STATE(states) assertState(states, Q_FUNC_INFO)
namespace Core { namespace Utils {
class SshRemoteProcessRunnerPrivate : public QObject class SshRemoteProcessRunnerPrivate : public QObject
{ {
@@ -19,7 +19,7 @@ public:
SshRemoteProcess::Ptr m_process; SshRemoteProcess::Ptr m_process;
signals: signals:
void connectionError(Core::SshError); void connectionError(Utils::SshError);
void processStarted(); void processStarted();
void processOutputAvailable(const QByteArray &output); void processOutputAvailable(const QByteArray &output);
void processErrorOutputAvailable(const QByteArray &output); void processErrorOutputAvailable(const QByteArray &output);
@@ -27,7 +27,7 @@ signals:
private slots: private slots:
void handleConnected(); void handleConnected();
void handleConnectionError(Core::SshError error); void handleConnectionError(Utils::SshError error);
void handleDisconnected(); void handleDisconnected();
void handleProcessStarted(); void handleProcessStarted();
void handleProcessFinished(int exitStatus); void handleProcessFinished(int exitStatus);
@@ -69,8 +69,8 @@ void SshRemoteProcessRunnerPrivate::run(const QByteArray &command)
setState(Connecting); setState(Connecting);
m_command = command; m_command = command;
connect(m_connection.data(), SIGNAL(error(Core::SshError)), connect(m_connection.data(), SIGNAL(error(Utils::SshError)),
SLOT(handleConnectionError(Core::SshError))); SLOT(handleConnectionError(Utils::SshError)));
connect(m_connection.data(), SIGNAL(disconnected()), connect(m_connection.data(), SIGNAL(disconnected()),
SLOT(handleDisconnected())); SLOT(handleDisconnected()));
if (m_connection->state() == SshConnection::Connected) { if (m_connection->state() == SshConnection::Connected) {
@@ -98,7 +98,7 @@ void SshRemoteProcessRunnerPrivate::handleConnected()
m_process->start(); m_process->start();
} }
void SshRemoteProcessRunnerPrivate::handleConnectionError(Core::SshError error) void SshRemoteProcessRunnerPrivate::handleConnectionError(Utils::SshError error)
{ {
handleDisconnected(); handleDisconnected();
emit connectionError(error); emit connectionError(error);
@@ -185,8 +185,8 @@ SshRemoteProcessRunner::SshRemoteProcessRunner(const SshConnection::Ptr &connect
void SshRemoteProcessRunner::init() void SshRemoteProcessRunner::init()
{ {
connect(d, SIGNAL(connectionError(Core::SshError)), connect(d, SIGNAL(connectionError(Utils::SshError)),
SIGNAL(connectionError(Core::SshError))); SIGNAL(connectionError(Utils::SshError)));
connect(d, SIGNAL(processStarted()), SIGNAL(processStarted())); connect(d, SIGNAL(processStarted()), SIGNAL(processStarted()));
connect(d, SIGNAL(processClosed(int)), SIGNAL(processClosed(int))); connect(d, SIGNAL(processClosed(int)), SIGNAL(processClosed(int)));
connect(d, SIGNAL(processOutputAvailable(QByteArray)), connect(d, SIGNAL(processOutputAvailable(QByteArray)),
@@ -204,7 +204,7 @@ QByteArray SshRemoteProcessRunner::command() const { return d->command(); }
SshConnection::Ptr SshRemoteProcessRunner::connection() const { return d->m_connection; } SshConnection::Ptr SshRemoteProcessRunner::connection() const { return d->m_connection; }
SshRemoteProcess::Ptr SshRemoteProcessRunner::process() const { return d->m_process; } SshRemoteProcess::Ptr SshRemoteProcessRunner::process() const { return d->m_process; }
} // namespace Core } // namespace Utils
#include "sshremoteprocessrunner.moc" #include "sshremoteprocessrunner.moc"

View File

@@ -4,11 +4,11 @@
#include "sshconnection.h" #include "sshconnection.h"
#include "sshremoteprocess.h" #include "sshremoteprocess.h"
namespace Core { namespace Utils {
class SshRemoteProcessRunnerPrivate; class SshRemoteProcessRunnerPrivate;
// Convenience class for running a remote process over an SSH connection. // Convenience class for running a remote process over an SSH connection.
class CORE_EXPORT SshRemoteProcessRunner : public QObject class QTCREATOR_UTILS_EXPORT SshRemoteProcessRunner : public QObject
{ {
Q_OBJECT Q_OBJECT
Q_DISABLE_COPY(SshRemoteProcessRunner) Q_DISABLE_COPY(SshRemoteProcessRunner)
@@ -25,7 +25,7 @@ public:
SshRemoteProcess::Ptr process() const; SshRemoteProcess::Ptr process() const;
signals: signals:
void connectionError(Core::SshError); void connectionError(Utils::SshError);
void processStarted(); void processStarted();
void processOutputAvailable(const QByteArray &output); void processOutputAvailable(const QByteArray &output);
void processErrorOutputAvailable(const QByteArray &output); void processErrorOutputAvailable(const QByteArray &output);
@@ -39,6 +39,6 @@ private:
SshRemoteProcessRunnerPrivate *d; SshRemoteProcessRunnerPrivate *d;
}; };
} // namespace Core } // namespace Utils
#endif // SSHREMOTEPROCESSRUNNER_H #endif // SSHREMOTEPROCESSRUNNER_H

View File

@@ -38,7 +38,7 @@
#include <QtNetwork/QTcpSocket> #include <QtNetwork/QTcpSocket>
namespace Core { namespace Utils {
namespace Internal { namespace Internal {
SshSendFacility::SshSendFacility(QTcpSocket *socket) SshSendFacility::SshSendFacility(QTcpSocket *socket)
@@ -207,4 +207,4 @@ void SshSendFacility::sendChannelClosePacket(quint32 remoteChannel)
} }
} // namespace Internal } // namespace Internal
} // namespace Core } // namespace Utils

View File

@@ -42,7 +42,7 @@ class QTcpSocket;
QT_END_NAMESPACE QT_END_NAMESPACE
namespace Core { namespace Utils {
namespace Internal { namespace Internal {
class SshKeyExchange; class SshKeyExchange;
@@ -92,6 +92,6 @@ private:
}; };
} // namespace Internal } // namespace Internal
} // namespace Core } // namespace Utils
#endif // SSHCONNECTIONOUTSTATE_P_H #endif // SSHCONNECTIONOUTSTATE_P_H

View File

@@ -55,7 +55,27 @@ SOURCES += $$PWD/environment.cpp \
$$PWD/buildablehelperlibrary.cpp \ $$PWD/buildablehelperlibrary.cpp \
$$PWD/annotateditemdelegate.cpp \ $$PWD/annotateditemdelegate.cpp \
$$PWD/fileinprojectfinder.cpp \ $$PWD/fileinprojectfinder.cpp \
$$PWD/ipaddresslineedit.cpp $$PWD/ipaddresslineedit.cpp \
$$PWD/ssh/sshsendfacility.cpp \
$$PWD/ssh/sshremoteprocess.cpp \
$$PWD/ssh/sshpacketparser.cpp \
$$PWD/ssh/sshpacket.cpp \
$$PWD/ssh/sshoutgoingpacket.cpp \
$$PWD/ssh/sshkeygenerator.cpp \
$$PWD/ssh/sshkeyexchange.cpp \
$$PWD/ssh/sshincomingpacket.cpp \
$$PWD/ssh/sshcryptofacility.cpp \
$$PWD/ssh/sshconnection.cpp \
$$PWD/ssh/sshchannelmanager.cpp \
$$PWD/ssh/sshchannel.cpp \
$$PWD/ssh/sshcapabilities.cpp \
$$PWD/ssh/sftppacket.cpp \
$$PWD/ssh/sftpoutgoingpacket.cpp \
$$PWD/ssh/sftpoperation.cpp \
$$PWD/ssh/sftpincomingpacket.cpp \
$$PWD/ssh/sftpdefs.cpp \
$$PWD/ssh/sftpchannel.cpp \
$$PWD/ssh/sshremoteprocessrunner.cpp
win32 { win32 {
SOURCES += $$PWD/abstractprocess_win.cpp \ SOURCES += $$PWD/abstractprocess_win.cpp \
@@ -121,7 +141,33 @@ HEADERS += $$PWD/environment.h \
$$PWD/buildablehelperlibrary.h \ $$PWD/buildablehelperlibrary.h \
$$PWD/annotateditemdelegate.h \ $$PWD/annotateditemdelegate.h \
$$PWD/fileinprojectfinder.h \ $$PWD/fileinprojectfinder.h \
$$PWD/ipaddresslineedit.h $$PWD/ipaddresslineedit.h \
$$PWD/ssh/sshsendfacility_p.h \
$$PWD/ssh/sshremoteprocess.h \
$$PWD/ssh/sshremoteprocess_p.h \
$$PWD/ssh/sshpacketparser_p.h \
$$PWD/ssh/sshpacket_p.h \
$$PWD/ssh/sshoutgoingpacket_p.h \
$$PWD/ssh/sshkeygenerator.h \
$$PWD/ssh/sshkeyexchange_p.h \
$$PWD/ssh/sshincomingpacket_p.h \
$$PWD/ssh/sshexception_p.h \
$$PWD/ssh/ssherrors.h \
$$PWD/ssh/sshcryptofacility_p.h \
$$PWD/ssh/sshconnection.h \
$$PWD/ssh/sshconnection_p.h \
$$PWD/ssh/sshchannelmanager_p.h \
$$PWD/ssh/sshchannel_p.h \
$$PWD/ssh/sshcapabilities_p.h \
$$PWD/ssh/sshbotanconversions_p.h \
$$PWD/ssh/sftppacket_p.h \
$$PWD/ssh/sftpoutgoingpacket_p.h \
$$PWD/ssh/sftpoperation_p.h \
$$PWD/ssh/sftpincomingpacket_p.h \
$$PWD/ssh/sftpdefs.h \
$$PWD/ssh/sftpchannel.h \
$$PWD/ssh/sftpchannel_p.h \
$$PWD/ssh/sshremoteprocessrunner.h
FORMS += $$PWD/filewizardpage.ui \ FORMS += $$PWD/filewizardpage.ui \
$$PWD/projectintropage.ui \ $$PWD/projectintropage.ui \

View File

@@ -5,6 +5,7 @@ QT += gui \
CONFIG += dll CONFIG += dll
include($$PWD/../../qtcreatorlibrary.pri) include($$PWD/../../qtcreatorlibrary.pri)
include($$PWD/../3rdparty/botan/botan.pri)
include(utils-lib.pri) include(utils-lib.pri)

View File

@@ -84,26 +84,6 @@ SOURCES += mainwindow.cpp \
designmode.cpp \ designmode.cpp \
editortoolbar.cpp \ editortoolbar.cpp \
helpmanager.cpp \ helpmanager.cpp \
ssh/sshsendfacility.cpp \
ssh/sshremoteprocess.cpp \
ssh/sshpacketparser.cpp \
ssh/sshpacket.cpp \
ssh/sshoutgoingpacket.cpp \
ssh/sshkeygenerator.cpp \
ssh/sshkeyexchange.cpp \
ssh/sshincomingpacket.cpp \
ssh/sshcryptofacility.cpp \
ssh/sshconnection.cpp \
ssh/sshchannelmanager.cpp \
ssh/sshchannel.cpp \
ssh/sshcapabilities.cpp \
ssh/sftppacket.cpp \
ssh/sftpoutgoingpacket.cpp \
ssh/sftpoperation.cpp \
ssh/sftpincomingpacket.cpp \
ssh/sftpdefs.cpp \
ssh/sftpchannel.cpp \
ssh/sshremoteprocessrunner.cpp \
outputpanemanager.cpp \ outputpanemanager.cpp \
navigationsubwidget.cpp \ navigationsubwidget.cpp \
sidebarwidget.cpp \ sidebarwidget.cpp \
@@ -189,32 +169,6 @@ HEADERS += mainwindow.h \
designmode.h \ designmode.h \
editortoolbar.h \ editortoolbar.h \
helpmanager.h \ helpmanager.h \
ssh/sshsendfacility_p.h \
ssh/sshremoteprocess.h \
ssh/sshremoteprocess_p.h \
ssh/sshpacketparser_p.h \
ssh/sshpacket_p.h \
ssh/sshoutgoingpacket_p.h \
ssh/sshkeygenerator.h \
ssh/sshkeyexchange_p.h \
ssh/sshincomingpacket_p.h \
ssh/sshexception_p.h \
ssh/ssherrors.h \
ssh/sshcryptofacility_p.h \
ssh/sshconnection.h \
ssh/sshconnection_p.h \
ssh/sshchannelmanager_p.h \
ssh/sshchannel_p.h \
ssh/sshcapabilities_p.h \
ssh/sshbotanconversions_p.h \
ssh/sftppacket_p.h \
ssh/sftpoutgoingpacket_p.h \
ssh/sftpoperation_p.h \
ssh/sftpincomingpacket_p.h \
ssh/sftpdefs.h \
ssh/sftpchannel.h \
ssh/sftpchannel_p.h \
ssh/sshremoteprocessrunner.h \
outputpanemanager.h \ outputpanemanager.h \
navigationsubwidget.h \ navigationsubwidget.h \
sidebarwidget.h \ sidebarwidget.h \

View File

@@ -1715,9 +1715,9 @@ void DebuggerPluginPrivate::startRemoteEngine()
sp.connParams.pwd = dlg.password(); sp.connParams.pwd = dlg.password();
sp.connParams.timeout = 5; sp.connParams.timeout = 5;
sp.connParams.authType = SshConnectionParameters::AuthByPwd; sp.connParams.authType = Utils::SshConnectionParameters::AuthByPwd;
sp.connParams.port = 22; sp.connParams.port = 22;
sp.connParams.proxyType = SshConnectionParameters::NoProxy; sp.connParams.proxyType = Utils::SshConnectionParameters::NoProxy;
sp.executable = dlg.inferiorPath(); sp.executable = dlg.inferiorPath();
sp.serverStartScript = dlg.enginePath(); sp.serverStartScript = dlg.enginePath();

View File

@@ -37,7 +37,7 @@
#include "debugger_global.h" #include "debugger_global.h"
#include "debuggerconstants.h" #include "debuggerconstants.h"
#include <coreplugin/ssh/sshconnection.h> #include <utils/ssh/sshconnection.h>
#include <utils/environment.h> #include <utils/environment.h>
#include <projectexplorer/toolchaintype.h> #include <projectexplorer/toolchaintype.h>
@@ -69,7 +69,7 @@ public:
qmlServerAddress(QLatin1String("127.0.0.1")), qmlServerAddress(QLatin1String("127.0.0.1")),
qmlServerPort(0), qmlServerPort(0),
useServerStartScript(false), useServerStartScript(false),
connParams(Core::SshConnectionParameters::NoProxy), connParams(Utils::SshConnectionParameters::NoProxy),
toolChainType(ProjectExplorer::ToolChain_UNKNOWN), toolChainType(ProjectExplorer::ToolChain_UNKNOWN),
startMode(NoStartMode), startMode(NoStartMode),
executableUid(0), executableUid(0),
@@ -114,7 +114,7 @@ public:
QByteArray remoteSourcesDir; QByteArray remoteSourcesDir;
QString remoteMountPoint; QString remoteMountPoint;
QString localMountDir; QString localMountDir;
Core::SshConnectionParameters connParams; Utils::SshConnectionParameters connParams;
QString debuggerCommand; QString debuggerCommand;
ProjectExplorer::ToolChainType toolChainType; ProjectExplorer::ToolChainType toolChainType;

View File

@@ -47,7 +47,7 @@ using namespace Core;
namespace Debugger { namespace Debugger {
namespace Internal { namespace Internal {
RemoteGdbProcess::RemoteGdbProcess(const Core::SshConnectionParameters &connParams, RemoteGdbProcess::RemoteGdbProcess(const Utils::SshConnectionParameters &connParams,
RemotePlainGdbAdapter *adapter, QObject *parent) RemotePlainGdbAdapter *adapter, QObject *parent)
: AbstractGdbProcess(parent), m_connParams(connParams), : AbstractGdbProcess(parent), m_connParams(connParams),
m_state(Inactive), m_adapter(adapter) m_state(Inactive), m_adapter(adapter)
@@ -91,9 +91,9 @@ void RemoteGdbProcess::realStart(const QString &cmd, const QStringList &args,
m_gdbOutput.clear(); m_gdbOutput.clear();
m_errorOutput.clear(); m_errorOutput.clear();
m_inputToSend.clear(); m_inputToSend.clear();
m_conn = SshConnection::create(); m_conn = Utils::SshConnection::create();
connect(m_conn.data(), SIGNAL(connected()), this, SLOT(handleConnected())); connect(m_conn.data(), SIGNAL(connected()), this, SLOT(handleConnected()));
connect(m_conn.data(), SIGNAL(error(Core::SshError)), this, connect(m_conn.data(), SIGNAL(error(Utils::SshError)), this,
SLOT(handleConnectionError())); SLOT(handleConnectionError()));
m_conn->connectToHost(m_connParams); m_conn->connectToHost(m_connParams);
} }
@@ -125,7 +125,7 @@ void RemoteGdbProcess::handleFifoCreationFinished(int exitStatus)
return; return;
QTC_ASSERT(m_state == CreatingFifo, return); QTC_ASSERT(m_state == CreatingFifo, return);
if (exitStatus != SshRemoteProcess::ExitedNormally) { if (exitStatus != Utils::SshRemoteProcess::ExitedNormally) {
emitErrorExit(tr("Could not create FIFO.")); emitErrorExit(tr("Could not create FIFO."));
} else { } else {
setState(StartingFifoReader); setState(StartingFifoReader);
@@ -167,7 +167,7 @@ void RemoteGdbProcess::handleAppOutputReaderStarted()
void RemoteGdbProcess::handleAppOutputReaderFinished(int exitStatus) void RemoteGdbProcess::handleAppOutputReaderFinished(int exitStatus)
{ {
if (exitStatus != SshRemoteProcess::ExitedNormally) if (exitStatus != Utils::SshRemoteProcess::ExitedNormally)
emitErrorExit(tr("Application output reader unexpectedly finished.")); emitErrorExit(tr("Application output reader unexpectedly finished."));
} }
@@ -187,15 +187,15 @@ void RemoteGdbProcess::handleGdbFinished(int exitStatus)
QTC_ASSERT(m_state == RunningGdb, return); QTC_ASSERT(m_state == RunningGdb, return);
switch (exitStatus) { switch (exitStatus) {
case SshRemoteProcess::FailedToStart: case Utils::SshRemoteProcess::FailedToStart:
m_error = tr("Remote gdb failed to start."); m_error = tr("Remote gdb failed to start.");
setState(Inactive); setState(Inactive);
emit startFailed(); emit startFailed();
break; break;
case SshRemoteProcess::KilledBySignal: case Utils::SshRemoteProcess::KilledBySignal:
emitErrorExit(tr("Remote gdb crashed.")); emitErrorExit(tr("Remote gdb crashed."));
break; break;
case SshRemoteProcess::ExitedNormally: case Utils::SshRemoteProcess::ExitedNormally:
const int exitCode = m_gdbProc->exitCode(); const int exitCode = m_gdbProc->exitCode();
setState(Inactive); setState(Inactive);
emit finished(exitCode, QProcess::NormalExit); emit finished(exitCode, QProcess::NormalExit);
@@ -224,7 +224,7 @@ qint64 RemoteGdbProcess::write(const QByteArray &data)
void RemoteGdbProcess::kill() void RemoteGdbProcess::kill()
{ {
if (m_state == RunningGdb) { if (m_state == RunningGdb) {
SshRemoteProcess::Ptr killProc Utils::SshRemoteProcess::Ptr killProc
= m_conn->createRemoteProcess("pkill -SIGKILL -x gdb"); = m_conn->createRemoteProcess("pkill -SIGKILL -x gdb");
killProc->start(); killProc->start();
} else { } else {
@@ -236,7 +236,7 @@ void RemoteGdbProcess::interruptInferior()
{ {
QTC_ASSERT(m_state == RunningGdb, return); QTC_ASSERT(m_state == RunningGdb, return);
SshRemoteProcess::Ptr intProc Utils::SshRemoteProcess::Ptr intProc
= m_conn->createRemoteProcess("pkill -x -SIGINT gdb"); = m_conn->createRemoteProcess("pkill -x -SIGINT gdb");
intProc->start(); intProc->start();
} }
@@ -375,15 +375,15 @@ void RemoteGdbProcess::setState(State newState)
if (m_state == Inactive) { if (m_state == Inactive) {
if (m_gdbProc) { if (m_gdbProc) {
disconnect(m_gdbProc.data(), 0, this, 0); disconnect(m_gdbProc.data(), 0, this, 0);
m_gdbProc = SshRemoteProcess::Ptr(); m_gdbProc = Utils::SshRemoteProcess::Ptr();
} }
if (m_appOutputReader) { if (m_appOutputReader) {
disconnect(m_appOutputReader.data(), 0, this, 0); disconnect(m_appOutputReader.data(), 0, this, 0);
m_appOutputReader = SshRemoteProcess::Ptr(); m_appOutputReader = Utils::SshRemoteProcess::Ptr();
} }
if (m_fifoCreator) { if (m_fifoCreator) {
disconnect(m_fifoCreator.data(), 0, this, 0); disconnect(m_fifoCreator.data(), 0, this, 0);
m_fifoCreator = SshRemoteProcess::Ptr(); m_fifoCreator = Utils::SshRemoteProcess::Ptr();
} }
disconnect(m_conn.data(), 0, this, 0); disconnect(m_conn.data(), 0, this, 0);
m_conn->disconnectFromHost(); m_conn->disconnectFromHost();

View File

@@ -36,8 +36,8 @@
#include "abstractgdbprocess.h" #include "abstractgdbprocess.h"
#include <coreplugin/ssh/sshconnection.h> #include <utils/ssh/sshconnection.h>
#include <coreplugin/ssh/sshremoteprocess.h> #include <utils/ssh/sshremoteprocess.h>
#include <QtCore/QByteArray> #include <QtCore/QByteArray>
#include <QtCore/QQueue> #include <QtCore/QQueue>
@@ -51,7 +51,7 @@ class RemoteGdbProcess : public AbstractGdbProcess
{ {
Q_OBJECT Q_OBJECT
public: public:
RemoteGdbProcess(const Core::SshConnectionParameters &server, RemoteGdbProcess(const Utils::SshConnectionParameters &server,
RemotePlainGdbAdapter *adapter, QObject *parent = 0); RemotePlainGdbAdapter *adapter, QObject *parent = 0);
virtual QByteArray readAllStandardOutput(); virtual QByteArray readAllStandardOutput();
@@ -106,11 +106,11 @@ private:
void emitErrorExit(const QString &error); void emitErrorExit(const QString &error);
void setState(State newState); void setState(State newState);
Core::SshConnectionParameters m_connParams; Utils::SshConnectionParameters m_connParams;
Core::SshConnection::Ptr m_conn; Utils::SshConnection::Ptr m_conn;
Core::SshRemoteProcess::Ptr m_gdbProc; Utils::SshRemoteProcess::Ptr m_gdbProc;
Core::SshRemoteProcess::Ptr m_appOutputReader; Utils::SshRemoteProcess::Ptr m_appOutputReader;
Core::SshRemoteProcess::Ptr m_fifoCreator; Utils::SshRemoteProcess::Ptr m_fifoCreator;
QByteArray m_gdbOutput; QByteArray m_gdbOutput;
QByteArray m_errorOutput; QByteArray m_errorOutput;
QString m_command; QString m_command;

View File

@@ -65,7 +65,7 @@
namespace Debugger { namespace Debugger {
namespace Internal { namespace Internal {
SshIODevice::SshIODevice(Core::SshRemoteProcessRunner::Ptr r) SshIODevice::SshIODevice(Utils::SshRemoteProcessRunner::Ptr r)
: runner(r) : runner(r)
, buckethead(0) , buckethead(0)
{ {
@@ -147,10 +147,10 @@ LldbEngineHost::LldbEngineHost(const DebuggerStartParameters &startParameters)
if (startParameters.startMode == StartRemoteEngine) if (startParameters.startMode == StartRemoteEngine)
{ {
m_guestProcess = 0; m_guestProcess = 0;
Core::SshRemoteProcessRunner::Ptr runner = Utils::SshRemoteProcessRunner::Ptr runner =
Core::SshRemoteProcessRunner::create(startParameters.connParams); Utils::SshRemoteProcessRunner::create(startParameters.connParams);
connect (runner.data(), SIGNAL(connectionError(Core::SshError)), connect (runner.data(), SIGNAL(connectionError(Utils::SshError)),
this, SLOT(sshConnectionError(Core::SshError))); this, SLOT(sshConnectionError(Utils::SshError)));
runner->run(startParameters.serverStartScript.toUtf8()); runner->run(startParameters.serverStartScript.toUtf8());
setGuestDevice(new SshIODevice(runner)); setGuestDevice(new SshIODevice(runner));
} else { } else {
@@ -210,7 +210,7 @@ void LldbEngineHost::nuke()
m_guestProcess->kill(); m_guestProcess->kill();
notifyEngineSpontaneousShutdown(); notifyEngineSpontaneousShutdown();
} }
void LldbEngineHost::sshConnectionError(Core::SshError e) void LldbEngineHost::sshConnectionError(Utils::SshError e)
{ {
showStatusMessage(tr("ssh connection error: %1").arg(e)); showStatusMessage(tr("ssh connection error: %1").arg(e));
} }

View File

@@ -35,10 +35,10 @@
#define DEBUGGER_LLDBENGINE_HOST_H #define DEBUGGER_LLDBENGINE_HOST_H
#include "ipcenginehost.h" #include "ipcenginehost.h"
#include <coreplugin/ssh/ssherrors.h> #include <utils/ssh/ssherrors.h>
#include <coreplugin/ssh/sshconnection.h> #include <utils/ssh/sshconnection.h>
#include <coreplugin/ssh/sshremoteprocess.h> #include <utils/ssh/sshremoteprocess.h>
#include <coreplugin/ssh/sshremoteprocessrunner.h> #include <utils/ssh/sshremoteprocessrunner.h>
#include <QtCore/QProcess> #include <QtCore/QProcess>
#include <QtCore/QQueue> #include <QtCore/QQueue>
@@ -50,7 +50,7 @@ class SshIODevice : public QIODevice
{ {
Q_OBJECT Q_OBJECT
public: public:
SshIODevice(Core::SshRemoteProcessRunner::Ptr r); SshIODevice(Utils::SshRemoteProcessRunner::Ptr r);
virtual qint64 bytesAvailable () const; virtual qint64 bytesAvailable () const;
virtual qint64 writeData (const char * data, qint64 maxSize); virtual qint64 writeData (const char * data, qint64 maxSize);
virtual qint64 readData (char * data, qint64 maxSize); virtual qint64 readData (char * data, qint64 maxSize);
@@ -59,8 +59,8 @@ private slots:
void outputAvailable(const QByteArray &output); void outputAvailable(const QByteArray &output);
void errorOutputAvailable(const QByteArray &output); void errorOutputAvailable(const QByteArray &output);
private: private:
Core::SshRemoteProcessRunner::Ptr runner; Utils::SshRemoteProcessRunner::Ptr runner;
Core::SshRemoteProcess::Ptr proc; Utils::SshRemoteProcess::Ptr proc;
int buckethead; int buckethead;
QQueue<QByteArray> buckets; QQueue<QByteArray> buckets;
QByteArray startupbuffer; QByteArray startupbuffer;
@@ -76,11 +76,11 @@ public:
private: private:
QProcess *m_guestProcess; QProcess *m_guestProcess;
Core::SshRemoteProcessRunner::Ptr m_ssh; Utils::SshRemoteProcessRunner::Ptr m_ssh;
protected: protected:
void nuke(); void nuke();
private slots: private slots:
void sshConnectionError(Core::SshError); void sshConnectionError(Utils::SshError);
void finished(int, QProcess::ExitStatus); void finished(int, QProcess::ExitStatus);
void stderrReady(); void stderrReady();
}; };

View File

@@ -39,12 +39,12 @@
#include "maemoglobal.h" #include "maemoglobal.h"
#include "maemousedportsgatherer.h" #include "maemousedportsgatherer.h"
#include <coreplugin/ssh/sshremoteprocessrunner.h> #include <utils/ssh/sshremoteprocessrunner.h>
#include <QtGui/QPalette> #include <QtGui/QPalette>
#include <QtGui/QPushButton> #include <QtGui/QPushButton>
using namespace Core; using namespace Utils;
namespace Qt4ProjectManager { namespace Qt4ProjectManager {
namespace Internal { namespace Internal {
@@ -87,7 +87,7 @@ void MaemoConfigTestDialog::startConfigTest()
m_ui->testResultEdit->setPlainText(testingText); m_ui->testResultEdit->setPlainText(testingText);
m_closeButton->setText(tr("Stop Test")); m_closeButton->setText(tr("Stop Test"));
m_testProcessRunner = SshRemoteProcessRunner::create(m_config->sshParameters()); m_testProcessRunner = SshRemoteProcessRunner::create(m_config->sshParameters());
connect(m_testProcessRunner.data(), SIGNAL(connectionError(Core::SshError)), connect(m_testProcessRunner.data(), SIGNAL(connectionError(Utils::SshError)),
this, SLOT(handleConnectionError())); this, SLOT(handleConnectionError()));
connect(m_testProcessRunner.data(), SIGNAL(processClosed(int)), this, connect(m_testProcessRunner.data(), SIGNAL(processClosed(int)), this,
SLOT(handleTestProcessFinished(int))); SLOT(handleTestProcessFinished(int)));

View File

@@ -43,9 +43,9 @@ class QPushButton;
class Ui_MaemoConfigTestDialog; class Ui_MaemoConfigTestDialog;
QT_END_NAMESPACE QT_END_NAMESPACE
namespace Core { namespace Utils {
class SshRemoteProcessRunner; class SshRemoteProcessRunner;
} // namespace Core } // namespace Utils
namespace Qt4ProjectManager { namespace Qt4ProjectManager {
namespace Internal { namespace Internal {
@@ -83,7 +83,7 @@ private:
QPushButton *m_closeButton; QPushButton *m_closeButton;
const QSharedPointer<const MaemoDeviceConfig> m_config; const QSharedPointer<const MaemoDeviceConfig> m_config;
QSharedPointer<Core::SshRemoteProcessRunner> m_testProcessRunner; QSharedPointer<Utils::SshRemoteProcessRunner> m_testProcessRunner;
QString m_deviceTestOutput; QString m_deviceTestOutput;
bool m_qtVersionOk; bool m_qtVersionOk;
MaemoUsedPortsGatherer *const m_portsGatherer; MaemoUsedPortsGatherer *const m_portsGatherer;

View File

@@ -41,7 +41,7 @@
#include "maemousedportsgatherer.h" #include "maemousedportsgatherer.h"
#include "qt4maemotarget.h" #include "qt4maemotarget.h"
#include <coreplugin/ssh/sftpchannel.h> #include <utils/ssh/sftpchannel.h>
#include <debugger/debuggerplugin.h> #include <debugger/debuggerplugin.h>
#include <debugger/debuggerstartparameters.h> #include <debugger/debuggerstartparameters.h>
#include <debugger/debuggerrunner.h> #include <debugger/debuggerrunner.h>
@@ -54,7 +54,7 @@
#define ASSERT_STATE(state) ASSERT_STATE_GENERIC(State, state, m_state) #define ASSERT_STATE(state) ASSERT_STATE_GENERIC(State, state, m_state)
using namespace Core; using namespace Utils;
using namespace Debugger; using namespace Debugger;
using namespace ProjectExplorer; using namespace ProjectExplorer;
@@ -205,8 +205,8 @@ void MaemoDebugSupport::startExecution()
SLOT(handleSftpChannelInitialized())); SLOT(handleSftpChannelInitialized()));
connect(m_uploader.data(), SIGNAL(initializationFailed(QString)), this, connect(m_uploader.data(), SIGNAL(initializationFailed(QString)), this,
SLOT(handleSftpChannelInitializationFailed(QString))); SLOT(handleSftpChannelInitializationFailed(QString)));
connect(m_uploader.data(), SIGNAL(finished(Core::SftpJobId, QString)), connect(m_uploader.data(), SIGNAL(finished(Utils::SftpJobId, QString)),
this, SLOT(handleSftpJobFinished(Core::SftpJobId, QString))); this, SLOT(handleSftpJobFinished(Utils::SftpJobId, QString)));
m_uploader->initialize(); m_uploader->initialize();
} else { } else {
setState(DumpersUploaded); setState(DumpersUploaded);
@@ -244,7 +244,7 @@ void MaemoDebugSupport::handleSftpChannelInitializationFailed(const QString &err
handleAdapterSetupFailed(error); handleAdapterSetupFailed(error);
} }
void MaemoDebugSupport::handleSftpJobFinished(Core::SftpJobId job, void MaemoDebugSupport::handleSftpJobFinished(Utils::SftpJobId job,
const QString &error) const QString &error)
{ {
if (m_state == Inactive) if (m_state == Inactive)

View File

@@ -37,7 +37,7 @@
#include "maemorunconfiguration.h" #include "maemorunconfiguration.h"
#include <coreplugin/ssh/sftpdefs.h> #include <utils/ssh/sftpdefs.h>
#include <utils/environment.h> #include <utils/environment.h>
#include <QtCore/QObject> #include <QtCore/QObject>
@@ -77,7 +77,7 @@ private slots:
void startExecution(); void startExecution();
void handleSftpChannelInitialized(); void handleSftpChannelInitialized();
void handleSftpChannelInitializationFailed(const QString &error); void handleSftpChannelInitializationFailed(const QString &error);
void handleSftpJobFinished(Core::SftpJobId job, const QString &error); void handleSftpJobFinished(Utils::SftpJobId job, const QString &error);
void handleDebuggingFinished(); void handleDebuggingFinished();
void handleRemoteOutput(const QByteArray &output); void handleRemoteOutput(const QByteArray &output);
void handleRemoteErrorOutput(const QByteArray &output); void handleRemoteErrorOutput(const QByteArray &output);
@@ -106,8 +106,8 @@ private:
const QString m_dumperLib; const QString m_dumperLib;
const QList<Utils::EnvironmentItem> m_userEnvChanges; const QList<Utils::EnvironmentItem> m_userEnvChanges;
QSharedPointer<Core::SftpChannel> m_uploader; QSharedPointer<Utils::SftpChannel> m_uploader;
Core::SftpJobId m_uploadJob; Utils::SftpJobId m_uploadJob;
QByteArray m_gdbserverOutput; QByteArray m_gdbserverOutput;
State m_state; State m_state;
int m_gdbServerPort; int m_gdbServerPort;

View File

@@ -45,9 +45,9 @@
#include "maemousedportsgatherer.h" #include "maemousedportsgatherer.h"
#include "qt4maemotarget.h" #include "qt4maemotarget.h"
#include <coreplugin/ssh/sftpchannel.h> #include <utils/ssh/sftpchannel.h>
#include <coreplugin/ssh/sshconnection.h> #include <utils/ssh/sshconnection.h>
#include <coreplugin/ssh/sshremoteprocess.h> #include <utils/ssh/sshremoteprocess.h>
#include <projectexplorer/buildconfiguration.h> #include <projectexplorer/buildconfiguration.h>
#include <projectexplorer/projectexplorerconstants.h> #include <projectexplorer/projectexplorerconstants.h>
@@ -66,6 +66,7 @@
#define ASSERT_STATE(state) ASSERT_STATE_GENERIC(State, state, m_state) #define ASSERT_STATE(state) ASSERT_STATE_GENERIC(State, state, m_state)
using namespace Core; using namespace Core;
using namespace Utils;
using namespace ProjectExplorer; using namespace ProjectExplorer;
namespace Qt4ProjectManager { namespace Qt4ProjectManager {
@@ -436,7 +437,7 @@ void MaemoDeployStep::handleSftpChannelInitializationFailed(const QString &error
} }
} }
void MaemoDeployStep::handleSftpJobFinished(Core::SftpJobId, void MaemoDeployStep::handleSftpJobFinished(Utils::SftpJobId,
const QString &error) const QString &error)
{ {
ASSERT_STATE(QList<State>() << Uploading << StopRequested); ASSERT_STATE(QList<State>() << Uploading << StopRequested);
@@ -612,8 +613,8 @@ void MaemoDeployStep::prepareSftpConnection()
SLOT(handleSftpChannelInitialized())); SLOT(handleSftpChannelInitialized()));
connect(m_uploader.data(), SIGNAL(initializationFailed(QString)), this, connect(m_uploader.data(), SIGNAL(initializationFailed(QString)), this,
SLOT(handleSftpChannelInitializationFailed(QString))); SLOT(handleSftpChannelInitializationFailed(QString)));
connect(m_uploader.data(), SIGNAL(finished(Core::SftpJobId, QString)), connect(m_uploader.data(), SIGNAL(finished(Utils::SftpJobId, QString)),
this, SLOT(handleSftpJobFinished(Core::SftpJobId, QString))); this, SLOT(handleSftpJobFinished(Utils::SftpJobId, QString)));
connect(m_uploader.data(), SIGNAL(closed()), this, connect(m_uploader.data(), SIGNAL(closed()), this,
SLOT(handleSftpChannelClosed())); SLOT(handleSftpChannelClosed()));
m_uploader->initialize(); m_uploader->initialize();
@@ -695,7 +696,7 @@ void MaemoDeployStep::connectToDevice()
m_connection = SshConnection::create(); m_connection = SshConnection::create();
connect(m_connection.data(), SIGNAL(connected()), this, connect(m_connection.data(), SIGNAL(connected()), this,
SLOT(handleConnected())); SLOT(handleConnected()));
connect(m_connection.data(), SIGNAL(error(Core::SshError)), this, connect(m_connection.data(), SIGNAL(error(Utils::SshError)), this,
SLOT(handleConnectionFailure())); SLOT(handleConnectionFailure()));
if (canReUse) { if (canReUse) {
handleConnected(); handleConnected();

View File

@@ -39,7 +39,7 @@
#include "maemodeviceconfigurations.h" #include "maemodeviceconfigurations.h"
#include "maemomountspecification.h" #include "maemomountspecification.h"
#include <coreplugin/ssh/sftpdefs.h> #include <utils/ssh/sftpdefs.h>
#include <projectexplorer/buildstep.h> #include <projectexplorer/buildstep.h>
#include <QtCore/QHash> #include <QtCore/QHash>
@@ -54,7 +54,7 @@ class QProcess;
class QTimer; class QTimer;
QT_END_NAMESPACE QT_END_NAMESPACE
namespace Core { namespace Utils {
class SftpChannel; class SftpChannel;
class SshConnection; class SshConnection;
class SshRemoteProcess; class SshRemoteProcess;
@@ -84,7 +84,7 @@ public:
const MaemoDeployable &deployable) const; const MaemoDeployable &deployable) const;
void setDeployed(const QString &host, const MaemoDeployable &deployable); void setDeployed(const QString &host, const MaemoDeployable &deployable);
QSharedPointer<MaemoDeployables> deployables() const { return m_deployables; } QSharedPointer<MaemoDeployables> deployables() const { return m_deployables; }
QSharedPointer<Core::SshConnection> sshConnection() const { return m_connection; } QSharedPointer<Utils::SshConnection> sshConnection() const { return m_connection; }
MaemoPortList freePorts() const; MaemoPortList freePorts() const;
bool isDeployToSysrootEnabled() const { return m_deployToSysroot; } bool isDeployToSysrootEnabled() const { return m_deployToSysroot; }
@@ -112,7 +112,7 @@ private slots:
void handleSysrootInstallerErrorOutput(); void handleSysrootInstallerErrorOutput();
void handleSftpChannelInitialized(); void handleSftpChannelInitialized();
void handleSftpChannelInitializationFailed(const QString &error); void handleSftpChannelInitializationFailed(const QString &error);
void handleSftpJobFinished(Core::SftpJobId job, const QString &error); void handleSftpJobFinished(Utils::SftpJobId job, const QString &error);
void handleSftpChannelClosed(); void handleSftpChannelClosed();
void handleInstallationFinished(int exitStatus); void handleInstallationFinished(int exitStatus);
void handleDeviceInstallerOutput(const QByteArray &output); void handleDeviceInstallerOutput(const QByteArray &output);
@@ -162,15 +162,15 @@ private:
static const QLatin1String Id; static const QLatin1String Id;
QSharedPointer<MaemoDeployables> m_deployables; QSharedPointer<MaemoDeployables> m_deployables;
QSharedPointer<Core::SshConnection> m_connection; QSharedPointer<Utils::SshConnection> m_connection;
QProcess *m_sysrootInstaller; QProcess *m_sysrootInstaller;
typedef QPair<MaemoDeployable, QSharedPointer<Core::SshRemoteProcess> > DeviceDeployAction; typedef QPair<MaemoDeployable, QSharedPointer<Utils::SshRemoteProcess> > DeviceDeployAction;
QScopedPointer<DeviceDeployAction> m_currentDeviceDeployAction; QScopedPointer<DeviceDeployAction> m_currentDeviceDeployAction;
QList<MaemoDeployable> m_filesToCopy; QList<MaemoDeployable> m_filesToCopy;
MaemoRemoteMounter *m_mounter; MaemoRemoteMounter *m_mounter;
bool m_deployToSysroot; bool m_deployToSysroot;
QSharedPointer<Core::SftpChannel> m_uploader; QSharedPointer<Utils::SftpChannel> m_uploader;
QSharedPointer<Core::SshRemoteProcess> m_deviceInstaller; QSharedPointer<Utils::SshRemoteProcess> m_deviceInstaller;
bool m_needsInstall; bool m_needsInstall;
typedef QPair<MaemoDeployable, QString> DeployablePerHost; typedef QPair<MaemoDeployable, QString> DeployablePerHost;

View File

@@ -44,7 +44,7 @@
#include <algorithm> #include <algorithm>
#include <cctype> #include <cctype>
typedef Core::SshConnectionParameters::AuthType AuthType; typedef Utils::SshConnectionParameters::AuthType AuthType;
namespace Qt4ProjectManager { namespace Qt4ProjectManager {
namespace Internal { namespace Internal {
@@ -74,7 +74,7 @@ namespace {
const int DefaultGdbServerPortSim(13219); const int DefaultGdbServerPortSim(13219);
const QString DefaultHostNameHW(QLatin1String("192.168.2.15")); const QString DefaultHostNameHW(QLatin1String("192.168.2.15"));
const QString DefaultHostNameSim(QLatin1String("localhost")); const QString DefaultHostNameSim(QLatin1String("localhost"));
const AuthType DefaultAuthType(Core::SshConnectionParameters::AuthByKey); const AuthType DefaultAuthType(Utils::SshConnectionParameters::AuthByKey);
const int DefaultTimeout(30); const int DefaultTimeout(30);
const MaemoDeviceConfig::DeviceType DefaultDeviceType(MaemoDeviceConfig::Physical); const MaemoDeviceConfig::DeviceType DefaultDeviceType(MaemoDeviceConfig::Physical);
} }
@@ -231,8 +231,8 @@ MaemoDeviceConfig::Ptr MaemoDeviceConfig::createHardwareConfig(const QString &na
MaemoGlobal::MaemoVersion osVersion, const QString &hostName, MaemoGlobal::MaemoVersion osVersion, const QString &hostName,
const QString privateKeyFilePath, Id &nextId) const QString privateKeyFilePath, Id &nextId)
{ {
Core::SshConnectionParameters sshParams(Core::SshConnectionParameters::NoProxy); Utils::SshConnectionParameters sshParams(Utils::SshConnectionParameters::NoProxy);
sshParams.authType = Core::SshConnectionParameters::AuthByKey; sshParams.authType = Utils::SshConnectionParameters::AuthByKey;
sshParams.host = hostName; sshParams.host = hostName;
sshParams.privateKeyFile = privateKeyFilePath; sshParams.privateKeyFile = privateKeyFilePath;
return Ptr(new MaemoDeviceConfig(name, osVersion, Physical, sshParams, nextId)); return Ptr(new MaemoDeviceConfig(name, osVersion, Physical, sshParams, nextId));
@@ -241,8 +241,8 @@ MaemoDeviceConfig::Ptr MaemoDeviceConfig::createHardwareConfig(const QString &na
MaemoDeviceConfig::Ptr MaemoDeviceConfig::createEmulatorConfig(const QString &name, MaemoDeviceConfig::Ptr MaemoDeviceConfig::createEmulatorConfig(const QString &name,
MaemoGlobal::MaemoVersion osVersion, Id &nextId) MaemoGlobal::MaemoVersion osVersion, Id &nextId)
{ {
Core::SshConnectionParameters sshParams(Core::SshConnectionParameters::NoProxy); Utils::SshConnectionParameters sshParams(Utils::SshConnectionParameters::NoProxy);
sshParams.authType = Core::SshConnectionParameters::AuthByPwd; sshParams.authType = Utils::SshConnectionParameters::AuthByPwd;
sshParams.host = defaultHost(Simulator); sshParams.host = defaultHost(Simulator);
sshParams.pwd = defaultQemuPassword(osVersion); sshParams.pwd = defaultQemuPassword(osVersion);
return Ptr(new MaemoDeviceConfig(name, osVersion, Simulator, sshParams, nextId)); return Ptr(new MaemoDeviceConfig(name, osVersion, Simulator, sshParams, nextId));
@@ -250,7 +250,7 @@ MaemoDeviceConfig::Ptr MaemoDeviceConfig::createEmulatorConfig(const QString &na
MaemoDeviceConfig::MaemoDeviceConfig(const QString &name, MaemoDeviceConfig::MaemoDeviceConfig(const QString &name,
MaemoGlobal::MaemoVersion osVersion, DeviceType devType, MaemoGlobal::MaemoVersion osVersion, DeviceType devType,
const Core::SshConnectionParameters &sshParams, Id &nextId) const Utils::SshConnectionParameters &sshParams, Id &nextId)
: m_sshParameters(sshParams), : m_sshParameters(sshParams),
m_name(name), m_name(name),
m_osVersion(osVersion), m_osVersion(osVersion),
@@ -266,7 +266,7 @@ MaemoDeviceConfig::MaemoDeviceConfig(const QString &name,
MaemoDeviceConfig::MaemoDeviceConfig(const QSettings &settings, MaemoDeviceConfig::MaemoDeviceConfig(const QSettings &settings,
Id &nextId) Id &nextId)
: m_sshParameters(Core::SshConnectionParameters::NoProxy), : m_sshParameters(Utils::SshConnectionParameters::NoProxy),
m_name(settings.value(NameKey).toString()), m_name(settings.value(NameKey).toString()),
m_osVersion(static_cast<MaemoGlobal::MaemoVersion>(settings.value(OsVersionKey, MaemoGlobal::Maemo5).toInt())), m_osVersion(static_cast<MaemoGlobal::MaemoVersion>(settings.value(OsVersionKey, MaemoGlobal::Maemo5).toInt())),
m_type(static_cast<DeviceType>(settings.value(TypeKey, DefaultDeviceType).toInt())), m_type(static_cast<DeviceType>(settings.value(TypeKey, DefaultDeviceType).toInt())),
@@ -493,7 +493,7 @@ void MaemoDeviceConfigurations::setConfigurationName(int i, const QString &name)
} }
void MaemoDeviceConfigurations::setSshParameters(int i, void MaemoDeviceConfigurations::setSshParameters(int i,
const Core::SshConnectionParameters &params) const Utils::SshConnectionParameters &params)
{ {
Q_ASSERT(i >= 0 && i < rowCount()); Q_ASSERT(i >= 0 && i < rowCount());
m_devConfigs.at(i)->m_sshParameters = params; m_devConfigs.at(i)->m_sshParameters = params;

View File

@@ -37,7 +37,7 @@
#include "maemoglobal.h" #include "maemoglobal.h"
#include <coreplugin/ssh/sshconnection.h> #include <utils/ssh/sshconnection.h>
#include <QtCore/QAbstractListModel> #include <QtCore/QAbstractListModel>
#include <QtCore/QList> #include <QtCore/QList>
@@ -77,7 +77,7 @@ public:
enum DeviceType { Physical, Simulator }; enum DeviceType { Physical, Simulator };
MaemoPortList freePorts() const; MaemoPortList freePorts() const;
Core::SshConnectionParameters sshParameters() const { return m_sshParameters; } Utils::SshConnectionParameters sshParameters() const { return m_sshParameters; }
QString name() const { return m_name; } QString name() const { return m_name; }
MaemoGlobal::MaemoVersion osVersion() const { return m_osVersion; } MaemoGlobal::MaemoVersion osVersion() const { return m_osVersion; }
DeviceType type() const { return m_type; } DeviceType type() const { return m_type; }
@@ -98,7 +98,7 @@ private:
typedef QSharedPointer<MaemoDeviceConfig> Ptr; typedef QSharedPointer<MaemoDeviceConfig> Ptr;
MaemoDeviceConfig(const QString &name, MaemoGlobal::MaemoVersion osVersion, MaemoDeviceConfig(const QString &name, MaemoGlobal::MaemoVersion osVersion,
DeviceType type, const Core::SshConnectionParameters &sshParams, DeviceType type, const Utils::SshConnectionParameters &sshParams,
Id &nextId); Id &nextId);
MaemoDeviceConfig(const QSettings &settings, Id &nextId); MaemoDeviceConfig(const QSettings &settings, Id &nextId);
MaemoDeviceConfig(const ConstPtr &other); MaemoDeviceConfig(const ConstPtr &other);
@@ -117,7 +117,7 @@ private:
void save(QSettings &settings) const; void save(QSettings &settings) const;
QString defaultPortsSpec(DeviceType type) const; QString defaultPortsSpec(DeviceType type) const;
Core::SshConnectionParameters m_sshParameters; Utils::SshConnectionParameters m_sshParameters;
QString m_name; QString m_name;
MaemoGlobal::MaemoVersion m_osVersion; MaemoGlobal::MaemoVersion m_osVersion;
DeviceType m_type; DeviceType m_type;
@@ -154,7 +154,7 @@ public:
MaemoGlobal::MaemoVersion osVersion); MaemoGlobal::MaemoVersion osVersion);
void removeConfiguration(int index); void removeConfiguration(int index);
void setConfigurationName(int i, const QString &name); void setConfigurationName(int i, const QString &name);
void setSshParameters(int i, const Core::SshConnectionParameters &params); void setSshParameters(int i, const Utils::SshConnectionParameters &params);
void setPortsSpec(int i, const QString &portsSpec); void setPortsSpec(int i, const QString &portsSpec);
void setDefaultDevice(int index); void setDefaultDevice(int index);

View File

@@ -44,7 +44,7 @@
#include "maemosshconfigdialog.h" #include "maemosshconfigdialog.h"
#include <coreplugin/icore.h> #include <coreplugin/icore.h>
#include <coreplugin/ssh/sshremoteprocessrunner.h> #include <utils/ssh/sshremoteprocessrunner.h>
#include <QtCore/QFileInfo> #include <QtCore/QFileInfo>
#include <QtCore/QRegExp> #include <QtCore/QRegExp>
@@ -58,6 +58,7 @@
#include <algorithm> #include <algorithm>
using namespace Core; using namespace Core;
using namespace Utils;
namespace Qt4ProjectManager { namespace Qt4ProjectManager {
namespace Internal { namespace Internal {
@@ -204,7 +205,7 @@ void MaemoDeviceConfigurationsSettingsWidget::displayCurrent()
m_ui->deviceTypeValueLabel->setText(tr("Emulator (Qemu)")); m_ui->deviceTypeValueLabel->setText(tr("Emulator (Qemu)"));
m_ui->portsLineEdit->setReadOnly(true); m_ui->portsLineEdit->setReadOnly(true);
} }
if (sshParams.authType == Core::SshConnectionParameters::AuthByPwd) if (sshParams.authType == Utils::SshConnectionParameters::AuthByPwd)
m_ui->passwordButton->setChecked(true); m_ui->passwordButton->setChecked(true);
else else
m_ui->keyButton->setChecked(true); m_ui->keyButton->setChecked(true);

View File

@@ -46,7 +46,7 @@ class QLineEdit;
class Ui_MaemoDeviceConfigurationsSettingsWidget; class Ui_MaemoDeviceConfigurationsSettingsWidget;
QT_END_NAMESPACE QT_END_NAMESPACE
namespace Core { namespace Utils {
class SshRemoteProcessRunner; class SshRemoteProcessRunner;
} }

View File

@@ -41,7 +41,7 @@
#include "maemodeviceconfigurations.h" #include "maemodeviceconfigurations.h"
#include "maemokeydeployer.h" #include "maemokeydeployer.h"
#include <coreplugin/ssh/sshkeygenerator.h> #include <utils/ssh/sshkeygenerator.h>
#include <QtCore/QDir> #include <QtCore/QDir>
#include <QtCore/QFile> #include <QtCore/QFile>
@@ -309,9 +309,9 @@ private:
m_ui->keyDirPathChooser->setEnabled(false); m_ui->keyDirPathChooser->setEnabled(false);
m_ui->createKeysButton->setEnabled(false); m_ui->createKeysButton->setEnabled(false);
m_ui->statusLabel->setText(tr("Creating keys ... ")); m_ui->statusLabel->setText(tr("Creating keys ... "));
Core::SshKeyGenerator keyGenerator; Utils::SshKeyGenerator keyGenerator;
if (!keyGenerator.generateKeys(Core::SshKeyGenerator::Rsa, if (!keyGenerator.generateKeys(Utils::SshKeyGenerator::Rsa,
Core::SshKeyGenerator::OpenSsl, 1024)) { Utils::SshKeyGenerator::OpenSsl, 1024)) {
QMessageBox::critical(this, tr("Can't Create Keys"), QMessageBox::critical(this, tr("Can't Create Keys"),
tr("Key creation failed: %1").arg(keyGenerator.error())); tr("Key creation failed: %1").arg(keyGenerator.error()));
enableInput(); enableInput();
@@ -402,11 +402,11 @@ private:
Q_SLOT void deployKey() Q_SLOT void deployKey()
{ {
using namespace Core; using namespace Utils;
m_ui->deviceAddressLineEdit->setEnabled(false); m_ui->deviceAddressLineEdit->setEnabled(false);
m_ui->passwordLineEdit->setEnabled(false); m_ui->passwordLineEdit->setEnabled(false);
m_ui->deployButton->setEnabled(false); m_ui->deployButton->setEnabled(false);
Core::SshConnectionParameters sshParams(SshConnectionParameters::NoProxy); Utils::SshConnectionParameters sshParams(SshConnectionParameters::NoProxy);
sshParams.authType = SshConnectionParameters::AuthByPwd; sshParams.authType = SshConnectionParameters::AuthByPwd;
sshParams.host = hostAddress(); sshParams.host = hostAddress();
sshParams.port = MaemoDeviceConfig::defaultSshPort(MaemoDeviceConfig::Physical); sshParams.port = MaemoDeviceConfig::defaultSshPort(MaemoDeviceConfig::Physical);

View File

@@ -38,7 +38,7 @@
#include "maemoglobal.h" #include "maemoglobal.h"
#include "maemorunconfiguration.h" #include "maemorunconfiguration.h"
#include <coreplugin/ssh/sshremoteprocessrunner.h> #include <utils/ssh/sshremoteprocessrunner.h>
namespace Qt4ProjectManager { namespace Qt4ProjectManager {
namespace Internal { namespace Internal {
@@ -63,13 +63,13 @@ void MaemoDeviceEnvReader::start()
return; return;
m_stop = false; m_stop = false;
if (!m_remoteProcessRunner if (!m_remoteProcessRunner
|| m_remoteProcessRunner->connection()->state() != Core::SshConnection::Connected || m_remoteProcessRunner->connection()->state() != Utils::SshConnection::Connected
|| m_remoteProcessRunner->connection()->connectionParameters() != m_devConfig->sshParameters()) { || m_remoteProcessRunner->connection()->connectionParameters() != m_devConfig->sshParameters()) {
m_remoteProcessRunner m_remoteProcessRunner
= Core::SshRemoteProcessRunner::create(m_devConfig->sshParameters()); = Utils::SshRemoteProcessRunner::create(m_devConfig->sshParameters());
} }
connect(m_remoteProcessRunner.data(), connect(m_remoteProcessRunner.data(),
SIGNAL(connectionError(Core::SshError)), this, SIGNAL(connectionError(Utils::SshError)), this,
SLOT(handleConnectionFailure())); SLOT(handleConnectionFailure()));
connect(m_remoteProcessRunner.data(), SIGNAL(processClosed(int)), this, connect(m_remoteProcessRunner.data(), SIGNAL(processClosed(int)), this,
SLOT(remoteProcessFinished(int))); SLOT(remoteProcessFinished(int)));
@@ -115,16 +115,16 @@ void MaemoDeviceEnvReader::handleCurrentDeviceConfigChanged()
void MaemoDeviceEnvReader::remoteProcessFinished(int exitCode) void MaemoDeviceEnvReader::remoteProcessFinished(int exitCode)
{ {
Q_ASSERT(exitCode == Core::SshRemoteProcess::FailedToStart Q_ASSERT(exitCode == Utils::SshRemoteProcess::FailedToStart
|| exitCode == Core::SshRemoteProcess::KilledBySignal || exitCode == Utils::SshRemoteProcess::KilledBySignal
|| exitCode == Core::SshRemoteProcess::ExitedNormally); || exitCode == Utils::SshRemoteProcess::ExitedNormally);
if (m_stop) if (m_stop)
return; return;
disconnect(m_remoteProcessRunner.data(), 0, this, 0); disconnect(m_remoteProcessRunner.data(), 0, this, 0);
m_env.clear(); m_env.clear();
if (exitCode == Core::SshRemoteProcess::ExitedNormally) { if (exitCode == Utils::SshRemoteProcess::ExitedNormally) {
if (!m_remoteOutput.isEmpty()) { if (!m_remoteOutput.isEmpty()) {
m_env = Utils::Environment(m_remoteOutput.split(QLatin1Char('\n'), m_env = Utils::Environment(m_remoteOutput.split(QLatin1Char('\n'),
QString::SkipEmptyParts)); QString::SkipEmptyParts));

View File

@@ -40,7 +40,7 @@
#include <QtCore/QObject> #include <QtCore/QObject>
#include <QtCore/QSharedPointer> #include <QtCore/QSharedPointer>
namespace Core { namespace Utils {
class SshRemoteProcessRunner; class SshRemoteProcessRunner;
} }
@@ -83,7 +83,7 @@ private:
Utils::Environment m_env; Utils::Environment m_env;
QSharedPointer<const MaemoDeviceConfig> m_devConfig; QSharedPointer<const MaemoDeviceConfig> m_devConfig;
MaemoRunConfiguration *m_runConfig; MaemoRunConfiguration *m_runConfig;
QSharedPointer<Core::SshRemoteProcessRunner> m_remoteProcessRunner; QSharedPointer<Utils::SshRemoteProcessRunner> m_remoteProcessRunner;
}; };
} // Internal } // Internal

View File

@@ -39,7 +39,7 @@
#include <projectexplorer/projectexplorerconstants.h> #include <projectexplorer/projectexplorerconstants.h>
#include <coreplugin/filemanager.h> #include <coreplugin/filemanager.h>
#include <coreplugin/ssh/sshconnection.h> #include <utils/ssh/sshconnection.h>
#include <qt4projectmanager/qt4projectmanagerconstants.h> #include <qt4projectmanager/qt4projectmanagerconstants.h>
#include <qt4projectmanager/qtversionmanager.h> #include <qt4projectmanager/qtversionmanager.h>
#include <utils/environment.h> #include <utils/environment.h>
@@ -138,18 +138,18 @@ QString MaemoGlobal::remoteEnvironment(const QList<Utils::EnvironmentItem> &list
return env.mid(0, env.size() - 1); return env.mid(0, env.size() - 1);
} }
QString MaemoGlobal::failedToConnectToServerMessage(const Core::SshConnection::Ptr &connection, QString MaemoGlobal::failedToConnectToServerMessage(const Utils::SshConnection::Ptr &connection,
const MaemoDeviceConfig::ConstPtr &deviceConfig) const MaemoDeviceConfig::ConstPtr &deviceConfig)
{ {
QString errorMsg = tr("Could not connect to host: %1") QString errorMsg = tr("Could not connect to host: %1")
.arg(connection->errorString()); .arg(connection->errorString());
if (deviceConfig->type() == MaemoDeviceConfig::Simulator) { if (deviceConfig->type() == MaemoDeviceConfig::Simulator) {
if (connection->errorState() == Core::SshTimeoutError if (connection->errorState() == Utils::SshTimeoutError
|| connection->errorState() == Core::SshSocketError) { || connection->errorState() == Utils::SshSocketError) {
errorMsg += tr("\nDid you start Qemu?"); errorMsg += tr("\nDid you start Qemu?");
} }
} else if (connection->errorState() == Core::SshTimeoutError) { } else if (connection->errorState() == Utils::SshTimeoutError) {
errorMsg += tr("\nIs the device connected and set up for network access?"); errorMsg += tr("\nIs the device connected and set up for network access?");
} }
return errorMsg; return errorMsg;

View File

@@ -51,7 +51,7 @@ class QProcess;
class QString; class QString;
QT_END_NAMESPACE QT_END_NAMESPACE
namespace Core { class SshConnection; } namespace Utils { class SshConnection; }
namespace Qt4ProjectManager { namespace Qt4ProjectManager {
class QtVersion; class QtVersion;
namespace Internal { namespace Internal {
@@ -82,7 +82,7 @@ public:
static QString remoteCommandPrefix(const QString &commandFilePath); static QString remoteCommandPrefix(const QString &commandFilePath);
static QString remoteEnvironment(const QList<Utils::EnvironmentItem> &list); static QString remoteEnvironment(const QList<Utils::EnvironmentItem> &list);
static QString remoteSourceProfilesCommand(); static QString remoteSourceProfilesCommand();
static QString failedToConnectToServerMessage(const QSharedPointer<Core::SshConnection> &connection, static QString failedToConnectToServerMessage(const QSharedPointer<Utils::SshConnection> &connection,
const QSharedPointer<const MaemoDeviceConfig> &deviceConfig); const QSharedPointer<const MaemoDeviceConfig> &deviceConfig);
static QString deviceConfigurationName(const QSharedPointer<const MaemoDeviceConfig> &devConf); static QString deviceConfigurationName(const QSharedPointer<const MaemoDeviceConfig> &devConf);

View File

@@ -33,11 +33,11 @@
****************************************************************************/ ****************************************************************************/
#include "maemokeydeployer.h" #include "maemokeydeployer.h"
#include <coreplugin/ssh/sshremoteprocessrunner.h> #include <utils/ssh/sshremoteprocessrunner.h>
#include <QtCore/QFile> #include <QtCore/QFile>
using namespace Core; using namespace Utils;
namespace Qt4ProjectManager { namespace Qt4ProjectManager {
namespace Internal { namespace Internal {
@@ -68,7 +68,7 @@ void MaemoKeyDeployer::deployPublicKey(const SshConnectionParameters &sshParams,
return; return;
} }
connect(m_deployProcess.data(), SIGNAL(connectionError(Core::SshError)), this, connect(m_deployProcess.data(), SIGNAL(connectionError(Utils::SshError)), this,
SLOT(handleConnectionFailure())); SLOT(handleConnectionFailure()));
connect(m_deployProcess.data(), SIGNAL(processClosed(int)), this, connect(m_deployProcess.data(), SIGNAL(processClosed(int)), this,
SLOT(handleKeyUploadFinished(int))); SLOT(handleKeyUploadFinished(int)));

View File

@@ -37,7 +37,7 @@
#include <QtCore/QObject> #include <QtCore/QObject>
#include <QtCore/QSharedPointer> #include <QtCore/QSharedPointer>
namespace Core { namespace Utils {
struct SshConnectionParameters; struct SshConnectionParameters;
class SshRemoteProcessRunner; class SshRemoteProcessRunner;
} }
@@ -52,7 +52,7 @@ public:
explicit MaemoKeyDeployer(QObject *parent = 0); explicit MaemoKeyDeployer(QObject *parent = 0);
~MaemoKeyDeployer(); ~MaemoKeyDeployer();
void deployPublicKey(const Core::SshConnectionParameters &sshParams, void deployPublicKey(const Utils::SshConnectionParameters &sshParams,
const QString &keyFilePath); const QString &keyFilePath);
void stopDeployment(); void stopDeployment();
@@ -67,7 +67,7 @@ private slots:
private: private:
void cleanup(); void cleanup();
QSharedPointer<Core::SshRemoteProcessRunner> m_deployProcess; QSharedPointer<Utils::SshRemoteProcessRunner> m_deployProcess;
}; };
} // namespace Internal } // namespace Internal

View File

@@ -54,6 +54,7 @@
#define ASSERT_STATE(state) ASSERT_STATE_GENERIC(State, state, m_state) #define ASSERT_STATE(state) ASSERT_STATE_GENERIC(State, state, m_state)
using namespace Core; using namespace Core;
using namespace Utils;
namespace Qt4ProjectManager { namespace Qt4ProjectManager {
namespace Internal { namespace Internal {
@@ -371,7 +372,7 @@ void MaemoPublisherFremantleFree::uploadPackage()
m_uploader = SshRemoteProcessRunner::create(m_sshParams); m_uploader = SshRemoteProcessRunner::create(m_sshParams);
connect(m_uploader.data(), SIGNAL(processStarted()), connect(m_uploader.data(), SIGNAL(processStarted()),
SLOT(handleScpStarted())); SLOT(handleScpStarted()));
connect(m_uploader.data(), SIGNAL(connectionError(Core::SshError)), connect(m_uploader.data(), SIGNAL(connectionError(Utils::SshError)),
SLOT(handleConnectionError())); SLOT(handleConnectionError()));
connect(m_uploader.data(), SIGNAL(processClosed(int)), connect(m_uploader.data(), SIGNAL(processClosed(int)),
SLOT(handleUploadJobFinished(int))); SLOT(handleUploadJobFinished(int)));

View File

@@ -33,7 +33,7 @@
#ifndef MAEMOPUBLISHERFREMANTLEFREE_H #ifndef MAEMOPUBLISHERFREMANTLEFREE_H
#define MAEMOPUBLISHERFREMANTLEFREE_H #define MAEMOPUBLISHERFREMANTLEFREE_H
#include <coreplugin/ssh/sshremoteprocessrunner.h> #include <utils/ssh/sshremoteprocessrunner.h>
#include <QtCore/QObject> #include <QtCore/QObject>
#include <QtCore/QProcess> #include <QtCore/QProcess>
@@ -112,9 +112,9 @@ private:
State m_state; State m_state;
QString m_tmpProjectDir; QString m_tmpProjectDir;
QProcess *m_process; QProcess *m_process;
Core::SshConnectionParameters m_sshParams; Utils::SshConnectionParameters m_sshParams;
QString m_remoteDir; QString m_remoteDir;
QSharedPointer<Core::SshRemoteProcessRunner> m_uploader; QSharedPointer<Utils::SshRemoteProcessRunner> m_uploader;
QByteArray m_scpOutput; QByteArray m_scpOutput;
QList<QString> m_filesToUpload; QList<QString> m_filesToUpload;
QString m_resultString; QString m_resultString;

View File

@@ -37,8 +37,8 @@
#include "maemousedportsgatherer.h" #include "maemousedportsgatherer.h"
#include "qt4maemotarget.h" #include "qt4maemotarget.h"
#include <coreplugin/ssh/sshconnection.h> #include <utils/ssh/sshconnection.h>
#include <coreplugin/ssh/sshremoteprocess.h> #include <utils/ssh/sshremoteprocess.h>
#include <qt4projectmanager/qt4buildconfiguration.h> #include <qt4projectmanager/qt4buildconfiguration.h>
#include <utils/qtcassert.h> #include <utils/qtcassert.h>
@@ -46,7 +46,7 @@
#define ASSERT_STATE(state) ASSERT_STATE_GENERIC(State, state, m_state) #define ASSERT_STATE(state) ASSERT_STATE_GENERIC(State, state, m_state)
using namespace Core; using namespace Utils;
namespace Qt4ProjectManager { namespace Qt4ProjectManager {
namespace Internal { namespace Internal {

View File

@@ -45,7 +45,7 @@
QT_FORWARD_DECLARE_CLASS(QTimer) QT_FORWARD_DECLARE_CLASS(QTimer)
namespace Core { namespace Utils {
class SftpChannel; class SftpChannel;
class SshConnection; class SshConnection;
class SshRemoteProcess; class SshRemoteProcess;
@@ -64,7 +64,7 @@ public:
~MaemoRemoteMounter(); ~MaemoRemoteMounter();
// Must already be connected. // Must already be connected.
void setConnection(const QSharedPointer<Core::SshConnection> &connection); void setConnection(const QSharedPointer<Utils::SshConnection> &connection);
void setBuildConfiguration(const Qt4BuildConfiguration *bc); void setBuildConfiguration(const Qt4BuildConfiguration *bc);
void addMountSpecification(const MaemoMountSpecification &mountSpec, void addMountSpecification(const MaemoMountSpecification &mountSpec,
@@ -120,10 +120,10 @@ private:
int remotePort; int remotePort;
}; };
QSharedPointer<Core::SshConnection> m_connection; QSharedPointer<Utils::SshConnection> m_connection;
QList<MountInfo> m_mountSpecs; QList<MountInfo> m_mountSpecs;
QSharedPointer<Core::SshRemoteProcess> m_mountProcess; QSharedPointer<Utils::SshRemoteProcess> m_mountProcess;
QSharedPointer<Core::SshRemoteProcess> m_unmountProcess; QSharedPointer<Utils::SshRemoteProcess> m_unmountProcess;
typedef QSharedPointer<QProcess> ProcPtr; typedef QSharedPointer<QProcess> ProcPtr;
QList<ProcPtr> m_utfsServers; QList<ProcPtr> m_utfsServers;

View File

@@ -43,11 +43,11 @@
#include "maemodeviceconfigurations.h" #include "maemodeviceconfigurations.h"
#include <coreplugin/ssh/sshremoteprocessrunner.h> #include <utils/ssh/sshremoteprocessrunner.h>
#include <QtCore/QStringList> #include <QtCore/QStringList>
using namespace Core; using namespace Utils;
namespace Qt4ProjectManager { namespace Qt4ProjectManager {
namespace Internal { namespace Internal {
@@ -114,7 +114,7 @@ void MaemoRemoteProcessList::startProcess(const QByteArray &cmdLine,
stop(); stop();
} }
m_state = newState; m_state = newState;
connect(m_process.data(), SIGNAL(connectionError(Core::SshError)), connect(m_process.data(), SIGNAL(connectionError(Utils::SshError)),
SLOT(handleConnectionError())); SLOT(handleConnectionError()));
connect(m_process.data(), SIGNAL(processOutputAvailable(QByteArray)), connect(m_process.data(), SIGNAL(processOutputAvailable(QByteArray)),
SLOT(handleRemoteStdOut(QByteArray))); SLOT(handleRemoteStdOut(QByteArray)));

View File

@@ -47,7 +47,7 @@
#include <QtCore/QList> #include <QtCore/QList>
#include <QtCore/QSharedPointer> #include <QtCore/QSharedPointer>
#include <QtCore/QString> #include <QtCore/QString>
#include <coreplugin/ssh/sshremoteprocessrunner.h> #include <utils/ssh/sshremoteprocessrunner.h>
namespace Qt4ProjectManager { namespace Qt4ProjectManager {
namespace Internal { namespace Internal {
@@ -87,7 +87,7 @@ private:
void stop(); void stop();
void startProcess(const QByteArray &cmdLine, State newState); void startProcess(const QByteArray &cmdLine, State newState);
const QSharedPointer<Core::SshRemoteProcessRunner> m_process; const QSharedPointer<Utils::SshRemoteProcessRunner> m_process;
QByteArray m_remoteStdout; QByteArray m_remoteStdout;
QByteArray m_remoteStderr; QByteArray m_remoteStderr;
QString m_errorMsg; QString m_errorMsg;

View File

@@ -36,7 +36,7 @@
#include "maemodeviceconfigurations.h" #include "maemodeviceconfigurations.h"
#include <coreplugin/ssh/sshkeygenerator.h> #include <utils/ssh/sshkeygenerator.h>
#include <QtCore/QDir> #include <QtCore/QDir>
#include <QtGui/QApplication> #include <QtGui/QApplication>
@@ -45,7 +45,7 @@
#include <QtGui/QMessageBox> #include <QtGui/QMessageBox>
#include <QtNetwork/QHostInfo> #include <QtNetwork/QHostInfo>
using namespace Core; using namespace Utils;
using namespace Qt4ProjectManager::Internal; using namespace Qt4ProjectManager::Internal;
MaemoSshConfigDialog::MaemoSshConfigDialog(QWidget *parent) MaemoSshConfigDialog::MaemoSshConfigDialog(QWidget *parent)

View File

@@ -40,7 +40,7 @@
#include <QtCore/QScopedPointer> #include <QtCore/QScopedPointer>
#include <QtGui/QDialog> #include <QtGui/QDialog>
namespace Core { namespace Utils {
class SshKeyGenerator; class SshKeyGenerator;
} }
@@ -69,7 +69,7 @@ private:
private: private:
QString home; QString home;
QScopedPointer<Core::SshKeyGenerator> m_keyGenerator; QScopedPointer<Utils::SshKeyGenerator> m_keyGenerator;
Ui::MaemoSshConfigDialog m_ui; Ui::MaemoSshConfigDialog m_ui;
}; };

View File

@@ -42,8 +42,8 @@
#include "maemorunconfiguration.h" #include "maemorunconfiguration.h"
#include "maemousedportsgatherer.h" #include "maemousedportsgatherer.h"
#include <coreplugin/ssh/sshconnection.h> #include <utils/ssh/sshconnection.h>
#include <coreplugin/ssh/sshremoteprocess.h> #include <utils/ssh/sshremoteprocess.h>
#include <QtCore/QFileInfo> #include <QtCore/QFileInfo>
@@ -51,7 +51,7 @@
#define ASSERT_STATE(state) ASSERT_STATE_GENERIC(State, state, m_state) #define ASSERT_STATE(state) ASSERT_STATE_GENERIC(State, state, m_state)
using namespace Core; using namespace Utils;
namespace Qt4ProjectManager { namespace Qt4ProjectManager {
namespace Internal { namespace Internal {
@@ -125,7 +125,7 @@ void MaemoSshRunner::start()
m_connection = SshConnection::create(); m_connection = SshConnection::create();
connect(m_connection.data(), SIGNAL(connected()), this, connect(m_connection.data(), SIGNAL(connected()), this,
SLOT(handleConnected())); SLOT(handleConnected()));
connect(m_connection.data(), SIGNAL(error(Core::SshError)), this, connect(m_connection.data(), SIGNAL(error(Utils::SshError)), this,
SLOT(handleConnectionFailure())); SLOT(handleConnectionFailure()));
if (reUse) { if (reUse) {
handleConnected(); handleConnected();

View File

@@ -44,7 +44,7 @@
#include <QtCore/QSharedPointer> #include <QtCore/QSharedPointer>
#include <QtCore/QStringList> #include <QtCore/QStringList>
namespace Core { namespace Utils {
class SshConnection; class SshConnection;
class SshRemoteProcess; class SshRemoteProcess;
} }
@@ -68,7 +68,7 @@ public:
void startExecution(const QByteArray &remoteCall); void startExecution(const QByteArray &remoteCall);
QSharedPointer<Core::SshConnection> connection() const { return m_connection; } QSharedPointer<Utils::SshConnection> connection() const { return m_connection; }
const MaemoUsedPortsGatherer *usedPortsGatherer() const { return m_portsGatherer; } const MaemoUsedPortsGatherer *usedPortsGatherer() const { return m_portsGatherer; }
MaemoPortList *freePorts() { return &m_freePorts; } MaemoPortList *freePorts() { return &m_freePorts; }
QString remoteExecutable() const { return m_remoteExecutable; } QString remoteExecutable() const { return m_remoteExecutable; }
@@ -121,9 +121,9 @@ private:
const MaemoPortList m_initialFreePorts; const MaemoPortList m_initialFreePorts;
QList<MaemoMountSpecification> m_mountSpecs; QList<MaemoMountSpecification> m_mountSpecs;
QSharedPointer<Core::SshConnection> m_connection; QSharedPointer<Utils::SshConnection> m_connection;
QSharedPointer<Core::SshRemoteProcess> m_runner; QSharedPointer<Utils::SshRemoteProcess> m_runner;
QSharedPointer<Core::SshRemoteProcess> m_cleaner; QSharedPointer<Utils::SshRemoteProcess> m_cleaner;
QStringList m_procsToKill; QStringList m_procsToKill;
MaemoPortList m_freePorts; MaemoPortList m_freePorts;

View File

@@ -35,9 +35,9 @@
#include "maemoglobal.h" #include "maemoglobal.h"
#include <coreplugin/ssh/sshremoteprocessrunner.h> #include <utils/ssh/sshremoteprocessrunner.h>
using namespace Core; using namespace Utils;
namespace Qt4ProjectManager { namespace Qt4ProjectManager {
namespace Internal { namespace Internal {
@@ -49,7 +49,7 @@ MaemoUsedPortsGatherer::MaemoUsedPortsGatherer(QObject *parent) :
MaemoUsedPortsGatherer::~MaemoUsedPortsGatherer() {} MaemoUsedPortsGatherer::~MaemoUsedPortsGatherer() {}
void MaemoUsedPortsGatherer::start(const Core::SshConnection::Ptr &connection, void MaemoUsedPortsGatherer::start(const Utils::SshConnection::Ptr &connection,
const MaemoPortList &portList) const MaemoPortList &portList)
{ {
if (m_running) if (m_running)
@@ -58,7 +58,7 @@ void MaemoUsedPortsGatherer::start(const Core::SshConnection::Ptr &connection,
m_remoteStdout.clear(); m_remoteStdout.clear();
m_remoteStderr.clear(); m_remoteStderr.clear();
m_procRunner = SshRemoteProcessRunner::create(connection); m_procRunner = SshRemoteProcessRunner::create(connection);
connect(m_procRunner.data(), SIGNAL(connectionError(Core::SshError)), connect(m_procRunner.data(), SIGNAL(connectionError(Utils::SshError)),
SLOT(handleConnectionError())); SLOT(handleConnectionError()));
connect(m_procRunner.data(), SIGNAL(processClosed(int)), connect(m_procRunner.data(), SIGNAL(processClosed(int)),
SLOT(handleProcessClosed(int))); SLOT(handleProcessClosed(int)));

View File

@@ -41,7 +41,7 @@
#include <QtCore/QSharedPointer> #include <QtCore/QSharedPointer>
#include <QtCore/QString> #include <QtCore/QString>
namespace Core { namespace Utils {
class SshConnection; class SshConnection;
class SshRemoteProcessRunner; class SshRemoteProcessRunner;
} }
@@ -55,7 +55,7 @@ class MaemoUsedPortsGatherer : public QObject
public: public:
explicit MaemoUsedPortsGatherer(QObject *parent = 0); explicit MaemoUsedPortsGatherer(QObject *parent = 0);
~MaemoUsedPortsGatherer(); ~MaemoUsedPortsGatherer();
void start(const QSharedPointer<Core::SshConnection> &connection, void start(const QSharedPointer<Utils::SshConnection> &connection,
const MaemoPortList &portList); const MaemoPortList &portList);
void stop(); void stop();
int getNextFreePort(MaemoPortList *freePorts) const; // returns -1 if no more are left int getNextFreePort(MaemoPortList *freePorts) const; // returns -1 if no more are left
@@ -74,7 +74,7 @@ private slots:
private: private:
void setupUsedPorts(); void setupUsedPorts();
QSharedPointer<Core::SshRemoteProcessRunner> m_procRunner; QSharedPointer<Utils::SshRemoteProcessRunner> m_procRunner;
QList<int> m_usedPorts; QList<int> m_usedPorts;
QByteArray m_remoteStdout; QByteArray m_remoteStdout;
QByteArray m_remoteStderr; QByteArray m_remoteStderr;