2012-10-02 09:12:39 +02:00
|
|
|
/****************************************************************************
|
2010-03-17 11:37:08 +01:00
|
|
|
**
|
2012-10-02 09:12:39 +02:00
|
|
|
** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
|
|
|
|
|
** Contact: http://www.qt-project.org/legal
|
2010-03-17 11:37:08 +01:00
|
|
|
**
|
2012-10-02 09:12:39 +02:00
|
|
|
** This file is part of Qt Creator.
|
2010-03-17 11:37:08 +01:00
|
|
|
**
|
2012-10-02 09:12:39 +02:00
|
|
|
** Commercial License Usage
|
|
|
|
|
** Licensees holding valid commercial Qt licenses may use this file in
|
|
|
|
|
** accordance with the commercial license agreement provided with the
|
|
|
|
|
** Software or, alternatively, in accordance with the terms contained in
|
|
|
|
|
** a written agreement between you and Digia. For licensing terms and
|
|
|
|
|
** conditions see http://qt.digia.com/licensing. For further information
|
|
|
|
|
** use the contact form at http://qt.digia.com/contact-us.
|
2010-03-17 11:37:08 +01:00
|
|
|
**
|
|
|
|
|
** GNU Lesser General Public License Usage
|
2012-10-02 09:12:39 +02:00
|
|
|
** Alternatively, this file may be used under the terms of the GNU Lesser
|
|
|
|
|
** General Public License version 2.1 as published by the Free Software
|
|
|
|
|
** Foundation and appearing in the file LICENSE.LGPL included in the
|
|
|
|
|
** packaging of this file. Please review the following information to
|
|
|
|
|
** ensure the GNU Lesser General Public License version 2.1 requirements
|
|
|
|
|
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
|
|
|
|
|
**
|
|
|
|
|
** In addition, as a special exception, Digia gives you certain additional
|
|
|
|
|
** rights. These rights are described in the Digia Qt LGPL Exception
|
2010-12-17 16:01:08 +01:00
|
|
|
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
|
|
|
|
|
**
|
2012-10-02 09:12:39 +02:00
|
|
|
****************************************************************************/
|
2010-08-12 09:46:22 +02:00
|
|
|
|
2012-04-18 12:06:10 +02:00
|
|
|
#ifndef BASEQMLDEBUGGERCLIENT_H
|
|
|
|
|
#define BASEQMLDEBUGGERCLIENT_H
|
2010-03-17 11:37:08 +01:00
|
|
|
|
2011-12-22 18:43:09 +01:00
|
|
|
#include "debuggerengine.h"
|
2012-04-18 13:31:36 +02:00
|
|
|
#include <qmldebug/qmldebugclient.h>
|
2010-03-17 11:37:08 +01:00
|
|
|
|
2010-08-13 14:18:10 +02:00
|
|
|
namespace Debugger {
|
2010-03-17 11:37:08 +01:00
|
|
|
namespace Internal {
|
|
|
|
|
|
2011-07-26 16:22:49 +02:00
|
|
|
class WatchData;
|
|
|
|
|
class BreakHandler;
|
|
|
|
|
class BreakpointModelId;
|
|
|
|
|
class QmlEngine;
|
2012-04-18 12:06:10 +02:00
|
|
|
class BaseQmlDebuggerClientPrivate;
|
2011-07-26 16:22:49 +02:00
|
|
|
|
2012-04-18 13:31:36 +02:00
|
|
|
class BaseQmlDebuggerClient : public QmlDebug::QmlDebugClient
|
2010-03-17 11:37:08 +01:00
|
|
|
{
|
2010-03-22 11:39:14 +01:00
|
|
|
Q_OBJECT
|
|
|
|
|
|
2010-03-17 11:37:08 +01:00
|
|
|
public:
|
2012-04-18 12:06:10 +02:00
|
|
|
BaseQmlDebuggerClient(QmlDebug::QmlDebugConnection* client, QLatin1String clientName);
|
|
|
|
|
virtual ~BaseQmlDebuggerClient();
|
2010-03-17 11:37:08 +01:00
|
|
|
|
2011-08-24 17:35:07 +02:00
|
|
|
virtual void startSession() = 0;
|
|
|
|
|
virtual void endSession() = 0;
|
2011-08-22 13:08:58 +02:00
|
|
|
|
2011-07-26 16:22:49 +02:00
|
|
|
virtual void executeStep() = 0;
|
|
|
|
|
virtual void executeStepOut() = 0;
|
|
|
|
|
virtual void executeNext() = 0;
|
|
|
|
|
virtual void executeStepI() = 0;
|
|
|
|
|
|
2011-12-22 18:43:09 +01:00
|
|
|
virtual void executeRunToLine(const ContextData &data) = 0;
|
|
|
|
|
|
2011-07-26 16:22:49 +02:00
|
|
|
virtual void continueInferior() = 0;
|
|
|
|
|
virtual void interruptInferior() = 0;
|
|
|
|
|
|
|
|
|
|
virtual void activateFrame(int index) = 0;
|
|
|
|
|
|
2011-09-13 12:47:46 +02:00
|
|
|
virtual bool acceptsBreakpoint(const BreakpointModelId &id);
|
2012-02-28 17:30:15 +01:00
|
|
|
virtual void insertBreakpoint(const BreakpointModelId &id, int adjustedLine,
|
|
|
|
|
int adjustedColumn = -1) = 0;
|
2011-09-13 12:47:46 +02:00
|
|
|
virtual void removeBreakpoint(const BreakpointModelId &id) = 0;
|
|
|
|
|
virtual void changeBreakpoint(const BreakpointModelId &id) = 0;
|
2011-10-26 10:02:37 +02:00
|
|
|
virtual void synchronizeBreakpoints() = 0;
|
2011-07-26 16:22:49 +02:00
|
|
|
|
2012-03-14 11:58:31 +01:00
|
|
|
virtual void assignValueInDebugger(const WatchData *data,
|
|
|
|
|
const QString &expression,
|
|
|
|
|
const QVariant &valueV) = 0;
|
2011-07-26 16:22:49 +02:00
|
|
|
|
2011-10-26 10:02:37 +02:00
|
|
|
virtual void updateWatchData(const WatchData &data) = 0;
|
2011-07-26 16:22:49 +02:00
|
|
|
virtual void executeDebuggerCommand(const QString &command) = 0;
|
|
|
|
|
|
|
|
|
|
virtual void synchronizeWatchers(const QStringList &watchers) = 0;
|
|
|
|
|
|
|
|
|
|
virtual void expandObject(const QByteArray &iname, quint64 objectId) = 0;
|
|
|
|
|
|
|
|
|
|
virtual void setEngine(QmlEngine *engine) = 0;
|
|
|
|
|
|
2011-11-30 15:23:02 +01:00
|
|
|
virtual void getSourceFiles() {}
|
|
|
|
|
|
2011-07-26 16:22:49 +02:00
|
|
|
void flushSendBuffer();
|
|
|
|
|
|
2010-08-12 09:46:22 +02:00
|
|
|
signals:
|
2012-05-10 10:29:11 +02:00
|
|
|
void newStatus(QmlDebug::ClientStatus status);
|
2012-10-09 16:13:29 +02:00
|
|
|
void stackFrameCompleted();
|
2010-03-22 11:39:14 +01:00
|
|
|
|
2010-06-28 17:46:42 +02:00
|
|
|
protected:
|
2012-05-10 10:29:11 +02:00
|
|
|
virtual void statusChanged(QmlDebug::ClientStatus status);
|
2011-07-26 16:22:49 +02:00
|
|
|
void sendMessage(const QByteArray &msg);
|
|
|
|
|
|
|
|
|
|
private:
|
2012-04-18 12:06:10 +02:00
|
|
|
BaseQmlDebuggerClientPrivate *d;
|
|
|
|
|
friend class BaseQmlDebuggerClientPrivate;
|
2010-03-17 11:37:08 +01:00
|
|
|
};
|
|
|
|
|
|
2010-03-22 11:39:14 +01:00
|
|
|
} // Internal
|
2011-07-26 16:22:49 +02:00
|
|
|
} // Debugger
|
2010-03-17 11:37:08 +01:00
|
|
|
|
2012-04-18 12:06:10 +02:00
|
|
|
#endif // BASEQMLDEBUGGERCLIENT_H
|