Commit 532a8ad2 authored by Pawel Polanski's avatar Pawel Polanski

Symbian: tcftrk renamed to Coda

parent 3212e115
......@@ -31,8 +31,8 @@
**
**************************************************************************/
#ifndef DEBUGGER_TCFTRKGDBADAPTER_H
#define DEBUGGER_TCFTRKGDBADAPTER_H
#ifndef DEBUGGER_CODAGDBADAPTER_H
#define DEBUGGER_CODAGDBADAPTER_H
#include "abstractgdbadapter.h"
#include "localgdbprocess.h"
......@@ -51,11 +51,11 @@ class QTcpSocket;
class QIODevice;
QT_END_NAMESPACE
namespace tcftrk {
struct TcfTrkCommandResult;
class TcfTrkDevice;
class TcfTrkEvent;
class TcfTrkRunControlModuleLoadContextSuspendedEvent;
namespace Coda {
struct CodaCommandResult;
class CodaDevice;
class CodaEvent;
class CodaRunControlModuleLoadContextSuspendedEvent;
}
namespace Debugger {
......@@ -66,21 +66,21 @@ struct GdbResult;
///////////////////////////////////////////////////////////////////////
//
// TcfTrkGdbAdapter
// CodaGdbAdapter
//
///////////////////////////////////////////////////////////////////////
class TcfTrkGdbAdapter : public AbstractGdbAdapter
class CodaGdbAdapter : public AbstractGdbAdapter
{
Q_OBJECT
public:
typedef trk::Callback<const GdbResult &> GdbResultCallback;
typedef trk::Callback<const tcftrk::TcfTrkCommandResult &> TcfTrkCallback;
typedef trk::Callback<const Coda::CodaCommandResult &> CodaCallback;
typedef trk::Callback<const GdbResponse &> GdbCallback;
explicit TcfTrkGdbAdapter(GdbEngine *engine);
virtual ~TcfTrkGdbAdapter();
explicit CodaGdbAdapter(GdbEngine *engine);
virtual ~CodaGdbAdapter();
void setGdbServerName(const QString &name);
QString gdbServerName() const { return m_gdbServerName; }
......@@ -113,22 +113,22 @@ private:
void shutdownInferior();
void shutdownAdapter();
void sendRunControlTerminateCommand();
void handleRunControlTerminate(const tcftrk::TcfTrkCommandResult &);
void handleRunControlTerminate(const Coda::CodaCommandResult &);
void sendRegistersGetMCommand();
void handleWriteRegister(const tcftrk::TcfTrkCommandResult &result);
void handleWriteRegister(const Coda::CodaCommandResult &result);
void reportRegisters();
void handleReadRegisters(const tcftrk::TcfTrkCommandResult &result);
void handleRegisterChildren(const tcftrk::TcfTrkCommandResult &result);
void handleAndReportReadRegisters(const tcftrk::TcfTrkCommandResult &result);
void handleAndReportReadRegister(const tcftrk::TcfTrkCommandResult &result);
void handleAndReportReadRegistersAfterStop(const tcftrk::TcfTrkCommandResult &result);
void handleReadRegisters(const Coda::CodaCommandResult &result);
void handleRegisterChildren(const Coda::CodaCommandResult &result);
void handleAndReportReadRegisters(const Coda::CodaCommandResult &result);
void handleAndReportReadRegister(const Coda::CodaCommandResult &result);
void handleAndReportReadRegistersAfterStop(const Coda::CodaCommandResult &result);
QByteArray stopMessage() const;
void handleAndReportSetBreakpoint(const tcftrk::TcfTrkCommandResult &result);
void handleClearBreakpoint(const tcftrk::TcfTrkCommandResult &result);
void handleAndReportSetBreakpoint(const Coda::CodaCommandResult &result);
void handleClearBreakpoint(const Coda::CodaCommandResult &result);
void readMemory(uint addr, uint len, bool buffered);
void handleReadMemoryBuffered(const tcftrk::TcfTrkCommandResult &result);
void handleReadMemoryUnbuffered(const tcftrk::TcfTrkCommandResult &result);
void handleWriteMemory(const tcftrk::TcfTrkCommandResult &result);
void handleReadMemoryBuffered(const Coda::CodaCommandResult &result);
void handleReadMemoryUnbuffered(const Coda::CodaCommandResult &result);
void handleWriteMemory(const Coda::CodaCommandResult &result);
void tryAnswerGdbMemoryRequest(bool buffered);
inline void sendMemoryGetCommand(const MemoryRange &range, bool buffered);
void addThread(unsigned id);
......@@ -144,7 +144,7 @@ private:
QString m_gdbServerName; // 127.0.0.1:(2222+uid)
bool m_running;
int m_stopReason;
tcftrk::TcfTrkDevice *m_trkDevice;
Coda::CodaDevice *m_trkDevice;
QSharedPointer<QIODevice> m_trkIODevice;
//
......@@ -152,14 +152,14 @@ private:
//
Q_SLOT void handleGdbConnection();
Q_SLOT void readGdbServerCommand();
Q_SLOT void tcftrkDeviceError(const QString &);
Q_SLOT void codaDeviceError(const QString &);
void startGdb();
Q_SLOT void tcftrkEvent(const tcftrk::TcfTrkEvent &knownEvent);
void handleTcfTrkRunControlModuleLoadContextSuspendedEvent(const tcftrk::TcfTrkRunControlModuleLoadContextSuspendedEvent &e);
Q_SLOT void codaEvent(const Coda::CodaEvent &knownEvent);
void handleCodaRunControlModuleLoadContextSuspendedEvent(const Coda::CodaRunControlModuleLoadContextSuspendedEvent &e);
inline void sendTrkContinue();
void sendTrkStepRange();
void handleStep(const tcftrk::TcfTrkCommandResult &result);
void handleCreateProcess(const tcftrk::TcfTrkCommandResult &result);
void handleStep(const Coda::CodaCommandResult &result);
void handleCreateProcess(const Coda::CodaCommandResult &result);
void readGdbResponse();
void handleGdbServerCommand(const QByteArray &cmd);
......@@ -197,4 +197,4 @@ private:
} // namespace Internal
} // namespace Debugger
#endif // DEBUGGER_TCFTRKGDBADAPTER_H
#endif // DEBUGGER_CODAGDBADAPTER_H
......@@ -10,7 +10,7 @@ HEADERS += \
$$PWD/termgdbadapter.h \
$$PWD/remotegdbserveradapter.h \
$$PWD/trkgdbadapter.h \
$$PWD/tcftrkgdbadapter.h \
$$PWD/codagdbadapter.h \
$$PWD/s60debuggerbluetoothstarter.h \
$$PWD/abstractgdbprocess.h \
$$PWD/localgdbprocess.h \
......@@ -33,7 +33,7 @@ SOURCES += \
$$PWD/termgdbadapter.cpp \
$$PWD/remotegdbserveradapter.cpp \
$$PWD/trkgdbadapter.cpp \
$$PWD/tcftrkgdbadapter.cpp \
$$PWD/codagdbadapter.cpp \
$$PWD/s60debuggerbluetoothstarter.cpp \
$$PWD/abstractgdbprocess.cpp \
$$PWD/localgdbprocess.cpp \
......
......@@ -44,7 +44,7 @@
#include "remotegdbserveradapter.h"
#include "remoteplaingdbadapter.h"
#include "trkgdbadapter.h"
#include "tcftrkgdbadapter.h"
#include "codagdbadapter.h"
#include "debuggeractions.h"
#include "debuggerconstants.h"
......@@ -1798,7 +1798,7 @@ AbstractGdbAdapter *GdbEngine::createAdapter()
case ProjectExplorer::ToolChain_RVCT_ARMV5_GNUPOC:
case ProjectExplorer::ToolChain_GCCE_GNUPOC:
if (sp.debugClient == DebuggerStartParameters::DebugClientCoda)
return new TcfTrkGdbAdapter(this);
return new CodaGdbAdapter(this);
else
return new TrkGdbAdapter(this);
default:
......
......@@ -100,7 +100,7 @@ private:
friend class RemoteGdbServerAdapter;
friend class RemotePlainGdbAdapter;
friend class TrkGdbAdapter;
friend class TcfTrkGdbAdapter;
friend class CodaGdbAdapter;
private: ////////// General Interface //////////
......
......@@ -1673,7 +1673,7 @@ void TrkGdbAdapter::handleCreateProcess(const TrkResult &result)
logMessage(startMsg, LogMisc);
// 26.8.2010: When paging occurs in S^3, bogus starting ROM addresses
// like 0x500000 or 0x40000 are reported. Warn about symbol resolution errors.
// Code duplicated in TcfTrkAdapter. @TODO: Hopefully fixed in future TRK versions.
// Code duplicated in CodaAdapter. @TODO: Hopefully fixed in future TRK versions.
if ((m_session.codeseg & 0xFFFFF) == 0) {
const QString warnMessage = tr("The reported code segment address (0x%1) might be invalid. Symbol resolution or setting breakoints may not work.").
arg(m_session.codeseg, 0, 16);
......
......@@ -36,8 +36,8 @@
#include "s60deployconfiguration.h"
#include "s60devicerunconfiguration.h"
#include "tcftrkdevice.h"
#include "tcftrkmessage.h"
#include "codadevice.h"
#include "codamessage.h"
#include "qt4buildconfiguration.h"
#include "qt4symbiantarget.h"
......@@ -63,13 +63,13 @@
using namespace ProjectExplorer;
using namespace Qt4ProjectManager;
using namespace Qt4ProjectManager::Internal;
using namespace tcftrk;
using namespace Coda;
enum { debug = 0 };
CodaRunControl::CodaRunControl(RunConfiguration *runConfiguration, const QString &mode) :
S60RunControlBase(runConfiguration, mode),
m_tcfTrkDevice(0),
m_codaDevice(0),
m_port(0),
m_state(StateUninit)
{
......@@ -91,8 +91,8 @@ CodaRunControl::CodaRunControl(RunConfiguration *runConfiguration, const QString
CodaRunControl::~CodaRunControl()
{
if (m_tcfTrkDevice)
m_tcfTrkDevice->deleteLater();
if (m_codaDevice)
m_codaDevice->deleteLater();
}
bool CodaRunControl::doStart()
......@@ -115,22 +115,22 @@ bool CodaRunControl::isRunning() const
bool CodaRunControl::setupLauncher()
{
QTC_ASSERT(!m_tcfTrkDevice, return false);
QTC_ASSERT(!m_codaDevice, return false);
m_tcfTrkDevice = new TcfTrkDevice;
m_codaDevice = new CodaDevice;
if (debug)
m_tcfTrkDevice->setVerbose(debug);
m_codaDevice->setVerbose(debug);
connect(m_tcfTrkDevice, SIGNAL(error(QString)), this, SLOT(slotError(QString)));
connect(m_tcfTrkDevice, SIGNAL(logMessage(QString)), this, SLOT(slotTrkLogMessage(QString)));
connect(m_tcfTrkDevice, SIGNAL(tcfEvent(tcftrk::TcfTrkEvent)), this, SLOT(slotTcftrkEvent(tcftrk::TcfTrkEvent)));
connect(m_tcfTrkDevice, SIGNAL(serialPong(QString)), this, SLOT(slotSerialPong(QString)));
connect(m_codaDevice, SIGNAL(error(QString)), this, SLOT(slotError(QString)));
connect(m_codaDevice, SIGNAL(logMessage(QString)), this, SLOT(slotTrkLogMessage(QString)));
connect(m_codaDevice, SIGNAL(tcfEvent(Coda::CodaEvent)), this, SLOT(slotCodaEvent(Coda::CodaEvent)));
connect(m_codaDevice, SIGNAL(serialPong(QString)), this, SLOT(slotSerialPong(QString)));
if (m_serialPort.length()) {
const QSharedPointer<SymbianUtils::VirtualSerialDevice> serialDevice(new SymbianUtils::VirtualSerialDevice(m_serialPort));
appendMessage(tr("Conecting to '%2'...").arg(m_serialPort), NormalMessageFormat);
m_tcfTrkDevice->setSerialFrame(true);
m_tcfTrkDevice->setDevice(serialDevice);
m_codaDevice->setSerialFrame(true);
m_codaDevice->setDevice(serialDevice);
bool ok = serialDevice->open(QIODevice::ReadWrite);
if (!ok) {
appendMessage(tr("Couldn't open serial device: %1").arg(serialDevice->errorString()), ErrorMessageFormat);
......@@ -139,12 +139,12 @@ bool CodaRunControl::setupLauncher()
connect(SymbianUtils::SymbianDeviceManager::instance(), SIGNAL(deviceRemoved(const SymbianUtils::SymbianDevice)),
this, SLOT(deviceRemoved(SymbianUtils::SymbianDevice)));
m_state = StateConnecting;
m_tcfTrkDevice->sendSerialPing(false);
m_codaDevice->sendSerialPing(false);
QTimer::singleShot(4000, this, SLOT(checkForTimeout()));
} else {
const QSharedPointer<QTcpSocket> tcfTrkSocket(new QTcpSocket);
m_tcfTrkDevice->setDevice(tcfTrkSocket);
tcfTrkSocket->connectToHost(m_address, m_port);
const QSharedPointer<QTcpSocket> codaSocket(new QTcpSocket);
m_codaDevice->setDevice(codaSocket);
codaSocket->connectToHost(m_address, m_port);
m_state = StateConnecting;
appendMessage(tr("Connecting to %1:%2...").arg(m_address).arg(m_port), NormalMessageFormat);
QTimer::singleShot(4000, this, SLOT(checkForTimeout()));
......@@ -162,7 +162,7 @@ void CodaRunControl::doStop()
break;
case StateProcessRunning:
QTC_ASSERT(!m_runningProcessId.isEmpty(), return);
m_tcfTrkDevice->sendRunControlTerminateCommand(TcfTrkCallback(),
m_codaDevice->sendRunControlTerminateCommand(CodaCallback(),
m_runningProcessId.toAscii());
break;
}
......@@ -187,34 +187,34 @@ void CodaRunControl::slotSerialPong(const QString &message)
qDebug() << "CODA serial pong:" << message;
}
void CodaRunControl::slotTcftrkEvent(const TcfTrkEvent &event)
void CodaRunControl::slotCodaEvent(const CodaEvent &event)
{
if (debug)
qDebug() << "CODA event:" << "Type:" << event.type() << "Message:" << event.toString();
switch (event.type()) {
case TcfTrkEvent::LocatorHello: { // Commands accepted now
case CodaEvent::LocatorHello: { // Commands accepted now
m_state = StateConnected;
appendMessage(tr("Connected."), NormalMessageFormat);
setProgress(maxProgress()*0.80);
initCommunication();
}
break;
case TcfTrkEvent::RunControlContextRemoved:
case CodaEvent::RunControlContextRemoved:
handleContextRemoved(event);
break;
case TcfTrkEvent::RunControlContextAdded:
case CodaEvent::RunControlContextAdded:
m_state = StateProcessRunning;
reportLaunchFinished();
handleContextAdded(event);
break;
case TcfTrkEvent::RunControlSuspended:
case CodaEvent::RunControlSuspended:
handleContextSuspended(event);
break;
case TcfTrkEvent::RunControlModuleLoadSuspended:
case CodaEvent::RunControlModuleLoadSuspended:
handleModuleLoadSuspended(event);
break;
case TcfTrkEvent::LoggingWriteEvent:
case CodaEvent::LoggingWriteEvent:
handleLogging(event);
break;
default:
......@@ -226,13 +226,13 @@ void CodaRunControl::slotTcftrkEvent(const TcfTrkEvent &event)
void CodaRunControl::initCommunication()
{
m_tcfTrkDevice->sendLoggingAddListenerCommand(TcfTrkCallback(this, &CodaRunControl::handleAddListener));
m_codaDevice->sendLoggingAddListenerCommand(CodaCallback(this, &CodaRunControl::handleAddListener));
}
void CodaRunControl::handleContextRemoved(const TcfTrkEvent &event)
void CodaRunControl::handleContextRemoved(const CodaEvent &event)
{
const QVector<QByteArray> removedItems
= static_cast<const TcfTrkRunControlContextRemovedEvent &>(event).ids();
= static_cast<const CodaRunControlContextRemovedEvent &>(event).ids();
if (!m_runningProcessId.isEmpty()
&& removedItems.contains(m_runningProcessId.toAscii())) {
appendMessage(tr("Process has finished."), NormalMessageFormat);
......@@ -240,9 +240,9 @@ void CodaRunControl::handleContextRemoved(const TcfTrkEvent &event)
}
}
void CodaRunControl::handleContextAdded(const TcfTrkEvent &event)
void CodaRunControl::handleContextAdded(const CodaEvent &event)
{
typedef TcfTrkRunControlContextAddedEvent TcfAddedEvent;
typedef CodaRunControlContextAddedEvent TcfAddedEvent;
const TcfAddedEvent &me = static_cast<const TcfAddedEvent &>(event);
foreach (const RunControlContext &context, me.contexts()) {
......@@ -251,9 +251,9 @@ void CodaRunControl::handleContextAdded(const TcfTrkEvent &event)
}
}
void CodaRunControl::handleContextSuspended(const TcfTrkEvent &event)
void CodaRunControl::handleContextSuspended(const CodaEvent &event)
{
typedef TcfTrkRunControlContextSuspendedEvent TcfSuspendEvent;
typedef CodaRunControlContextSuspendedEvent TcfSuspendEvent;
const TcfSuspendEvent &me = static_cast<const TcfSuspendEvent &>(event);
......@@ -262,7 +262,7 @@ void CodaRunControl::handleContextSuspended(const TcfTrkEvent &event)
appendMessage(tr("Thread has crashed: %1").arg(QString::fromLatin1(me.message())), ErrorMessageFormat);
//If we get a crash report then we display it and stop the process.
//Now sure if this should be the final solution but it works for now.
//m_tcfTrkDevice->sendRunControlResumeCommand(TcfTrkCallback(), me.id()); //TODO: Should I resume automaticly
//m_codaDevice->sendRunControlResumeCommand(CodaCallback(), me.id()); //TODO: Should I resume automaticly
stop();
break;
default:
......@@ -272,31 +272,31 @@ void CodaRunControl::handleContextSuspended(const TcfTrkEvent &event)
}
}
void CodaRunControl::handleModuleLoadSuspended(const TcfTrkEvent &event)
void CodaRunControl::handleModuleLoadSuspended(const CodaEvent &event)
{
// Debug mode start: Continue:
typedef TcfTrkRunControlModuleLoadContextSuspendedEvent TcfModuleLoadSuspendedEvent;
typedef CodaRunControlModuleLoadContextSuspendedEvent TcfModuleLoadSuspendedEvent;
const TcfModuleLoadSuspendedEvent &me = static_cast<const TcfModuleLoadSuspendedEvent &>(event);
if (me.info().requireResume)
m_tcfTrkDevice->sendRunControlResumeCommand(TcfTrkCallback(), me.id());
m_codaDevice->sendRunControlResumeCommand(CodaCallback(), me.id());
}
void CodaRunControl::handleLogging(const TcfTrkEvent &event)
void CodaRunControl::handleLogging(const CodaEvent &event)
{
const TcfTrkLoggingWriteEvent &me = static_cast<const TcfTrkLoggingWriteEvent &>(event);
const CodaLoggingWriteEvent &me = static_cast<const CodaLoggingWriteEvent &>(event);
appendMessage(me.message(), StdOutFormat);
}
void CodaRunControl::handleAddListener(const TcfTrkCommandResult &result)
void CodaRunControl::handleAddListener(const CodaCommandResult &result)
{
Q_UNUSED(result)
m_tcfTrkDevice->sendSymbianOsDataFindProcessesCommand(TcfTrkCallback(this, &CodaRunControl::handleFindProcesses),
m_codaDevice->sendSymbianOsDataFindProcessesCommand(CodaCallback(this, &CodaRunControl::handleFindProcesses),
QByteArray(),
QByteArray::number(executableUid(), 16));
}
void CodaRunControl::handleFindProcesses(const TcfTrkCommandResult &result)
void CodaRunControl::handleFindProcesses(const CodaCommandResult &result)
{
if (result.values.size() && result.values.at(0).type() == JsonValue::Array && result.values.at(0).children().count()) {
//there are processes running. Cannot run mine
......@@ -304,15 +304,15 @@ void CodaRunControl::handleFindProcesses(const TcfTrkCommandResult &result)
finishRunControl();
} else {
setProgress(maxProgress()*0.90);
m_tcfTrkDevice->sendProcessStartCommand(TcfTrkCallback(this, &CodaRunControl::handleCreateProcess),
m_codaDevice->sendProcessStartCommand(CodaCallback(this, &CodaRunControl::handleCreateProcess),
executableName(), executableUid(), commandLineArguments().split(" "), QString(), true);
appendMessage(tr("Launching: %1").arg(executableName()), NormalMessageFormat);
}
}
void CodaRunControl::handleCreateProcess(const TcfTrkCommandResult &result)
void CodaRunControl::handleCreateProcess(const CodaCommandResult &result)
{
const bool ok = result.type == TcfTrkCommandResult::SuccessReply;
const bool ok = result.type == CodaCommandResult::SuccessReply;
if (ok) {
setProgress(maxProgress());
appendMessage(tr("Launched."), NormalMessageFormat);
......@@ -325,9 +325,9 @@ void CodaRunControl::handleCreateProcess(const TcfTrkCommandResult &result)
void CodaRunControl::finishRunControl()
{
m_runningProcessId.clear();
if (m_tcfTrkDevice)
m_tcfTrkDevice->deleteLater();
m_tcfTrkDevice = 0;
if (m_codaDevice)
m_codaDevice->deleteLater();
m_codaDevice = 0;
m_state = StateUninit;
emit finished();
}
......@@ -366,7 +366,7 @@ void CodaRunControl::cancelConnection()
void CodaRunControl::deviceRemoved(const SymbianUtils::SymbianDevice &device)
{
if (m_tcfTrkDevice && device.portName() == m_serialPort) {
if (m_codaDevice && device.portName() == m_serialPort) {
QString msg = tr("The device '%1' has been disconnected").arg(device.friendlyName());
appendMessage(msg, ErrorMessageFormat);
finishRunControl();
......
......@@ -41,10 +41,10 @@ class QMessageBox;
class QWidget;
QT_END_NAMESPACE
namespace tcftrk {
struct TcfTrkCommandResult;
class TcfTrkDevice;
class TcfTrkEvent;
namespace Coda {
struct CodaCommandResult;
class CodaDevice;
class CodaEvent;
}
namespace SymbianUtils {
......@@ -54,7 +54,7 @@ class SymbianDevice;
namespace Qt4ProjectManager {
namespace Internal {
// CodaRunControl configures tcftrk to run the application
// CodaRunControl configures Coda to run the application
class CodaRunControl : public S60RunControlBase
{
Q_OBJECT
......@@ -79,22 +79,22 @@ protected slots:
private slots:
void slotError(const QString &error);
void slotTrkLogMessage(const QString &log);
void slotTcftrkEvent(const tcftrk::TcfTrkEvent &event);
void slotCodaEvent(const Coda::CodaEvent &event);
void slotSerialPong(const QString &message);
private:
void initCommunication();
void handleModuleLoadSuspended(const tcftrk::TcfTrkEvent &event);
void handleContextSuspended(const tcftrk::TcfTrkEvent &event);
void handleContextAdded(const tcftrk::TcfTrkEvent &event);
void handleContextRemoved(const tcftrk::TcfTrkEvent &event);
void handleLogging(const tcftrk::TcfTrkEvent &event);
void handleModuleLoadSuspended(const Coda::CodaEvent &event);
void handleContextSuspended(const Coda::CodaEvent &event);
void handleContextAdded(const Coda::CodaEvent &event);
void handleContextRemoved(const Coda::CodaEvent &event);
void handleLogging(const Coda::CodaEvent &event);
private:
void handleCreateProcess(const tcftrk::TcfTrkCommandResult &result);
void handleAddListener(const tcftrk::TcfTrkCommandResult &result);
void handleFindProcesses(const tcftrk::TcfTrkCommandResult &result);
void handleCreateProcess(const Coda::CodaCommandResult &result);
void handleAddListener(const Coda::CodaCommandResult &result);
void handleFindProcesses(const Coda::CodaCommandResult &result);
private:
enum State {
......@@ -104,7 +104,7 @@ private:
StateProcessRunning
};
tcftrk::TcfTrkDevice *m_tcfTrkDevice;
Coda::CodaDevice *m_codaDevice;
QString m_address;
unsigned short m_port;
......
......@@ -37,7 +37,7 @@
#include "s60deployconfiguration.h"
#include "s60devicerunconfiguration.h"
#include "s60runconfigbluetoothstarter.h"
#include "tcftrkdevice.h"
#include "codadevice.h"
#include "trkruncontrol.h"
#include <coreplugin/icore.h>
......@@ -295,7 +295,7 @@ void S60DeployStep::start()
}
if (!trkClient) {
QTC_ASSERT(!m_trkDevice, return);
m_trkDevice = new tcftrk::TcfTrkDevice;
m_trkDevice = new Coda::CodaDevice;
if (m_address.isEmpty() && !serialConnection) {
errorMessage = tr("No address for a device has been defined. Please define an address and try again.");
reportError(errorMessage);
......@@ -347,7 +347,7 @@ void S60DeployStep::setupConnections()
} else {
connect(m_trkDevice, SIGNAL(error(QString)), this, SLOT(slotError(QString)));
connect(m_trkDevice, SIGNAL(logMessage(QString)), this, SLOT(slotTrkLogMessage(QString)));
connect(m_trkDevice, SIGNAL(tcfEvent(tcftrk::TcfTrkEvent)), this, SLOT(slotTcftrkEvent(tcftrk::TcfTrkEvent)), Qt::DirectConnection);
connect(m_trkDevice, SIGNAL(tcfEvent(Coda::CodaEvent)), this, SLOT(slotCodaEvent(Coda::CodaEvent)), Qt::DirectConnection);
connect(m_trkDevice, SIGNAL(serialPong(QString)), this, SLOT(slotSerialPong(QString)));
connect(this, SIGNAL(manualInstallation()), this, SLOT(showManualInstallationInfo()));
}
......@@ -400,9 +400,9 @@ void S60DeployStep::startDeployment()
m_trkDevice->sendSerialPing(false);
QTimer::singleShot(4000, this, SLOT(checkForTimeout()));
} else {
const QSharedPointer<QTcpSocket> tcfTrkSocket(new QTcpSocket);
m_trkDevice->setDevice(tcfTrkSocket);
tcfTrkSocket->connectToHost(m_address, m_port);
const QSharedPointer<QTcpSocket> codaSocket(new QTcpSocket);
m_trkDevice->setDevice(codaSocket);
codaSocket->connectToHost(m_address, m_port);
m_state = StateConnecting;
appendMessage(tr("Connecting to %1:%2...").arg(m_address).arg(m_port), false);
QTimer::singleShot(4000, this, SLOT(checkForTimeout()));
......@@ -466,13 +466,13 @@ void S60DeployStep::slotSerialPong(const QString &message)
qDebug() << "CODA serial pong:" << message;
}
void S60DeployStep::slotTcftrkEvent (const tcftrk::TcfTrkEvent &event)
void S60DeployStep::slotCodaEvent (const Coda::CodaEvent &event)
{
if (debug)
qDebug() << "CODA event:" << "Type:" << event.type() << "Message:" << event.toString();
switch (event.type()) {
case tcftrk::TcfTrkEvent::LocatorHello: {// Commands accepted now
case Coda::CodaEvent::LocatorHello: {// Commands accepted now
m_state = StateConnected;
emit codaConnected();
startTransferring();
......@@ -491,14 +491,14 @@ void S60DeployStep::initFileSending()
QTC_ASSERT(m_currentFileIndex >= 0, return);
const unsigned flags =
tcftrk::TcfTrkDevice::FileSystem_TCF_O_WRITE
|tcftrk::TcfTrkDevice::FileSystem_TCF_O_CREAT
|tcftrk::TcfTrkDevice::FileSystem_TCF_O_TRUNC;
Coda::CodaDevice::FileSystem_TCF_O_WRITE
|Coda::CodaDevice::FileSystem_TCF_O_CREAT
|Coda::CodaDevice::FileSystem_TCF_O_TRUNC;
m_putWriteOk = false;
QString packageName(QFileInfo(m_signedPackages.at(m_currentFileIndex)).fileName());
QString remoteFileLocation = QString::fromLatin1("%1:\\Data\\%2").arg(m_installationDrive).arg(packageName);
m_trkDevice->sendFileSystemOpenCommand(tcftrk::TcfTrkCallback(this, &S60DeployStep::handleFileSystemOpen),
m_trkDevice->sendFileSystemOpenCommand(Coda::CodaCallback(this, &S60DeployStep::handleFileSystemOpen),
remoteFileLocation.toAscii(), flags);
appendMessage(tr("Copying \"%1\"...").arg(packageName), false);
}
......@@ -511,11 +511,11 @@ void S60DeployStep::initFileInstallation()
QString packageName(QFileInfo(m_signedPackages.at(m_currentFileIndex)).fileName());
QString remoteFileLocation = QString::fromLatin1("%1:\\Data\\%2").arg(m_installationDrive).arg(packageName);