| 1 | // Copyright (C) 2016 The Qt Company Ltd. |
| 2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only |
| 3 | |
| 4 | #ifndef QQML_NATIVE_DEBUG_SERVICE_H |
| 5 | #define QQML_NATIVE_DEBUG_SERVICE_H |
| 6 | |
| 7 | #include <private/qqmldebugconnector_p.h> |
| 8 | #include <private/qv4debugging_p.h> |
| 9 | #include <private/qv4engine_p.h> |
| 10 | #include <private/qv4debugging_p.h> |
| 11 | #include <private/qv4script_p.h> |
| 12 | #include <private/qv4string_p.h> |
| 13 | #include <private/qv4objectiterator_p.h> |
| 14 | #include <private/qv4identifierhash_p.h> |
| 15 | #include <private/qv4runtime_p.h> |
| 16 | #include <private/qqmldebugserviceinterfaces_p.h> |
| 17 | |
| 18 | #include <QtCore/qjsonarray.h> |
| 19 | |
| 20 | #include <qqmlengine.h> |
| 21 | |
| 22 | #include <QJsonArray> |
| 23 | #include <QJsonDocument> |
| 24 | #include <QJsonObject> |
| 25 | #include <QJsonValue> |
| 26 | #include <QPointer> |
| 27 | |
| 28 | QT_BEGIN_NAMESPACE |
| 29 | |
| 30 | class NativeDebugger; |
| 31 | class BreakPointHandler; |
| 32 | |
| 33 | class QQmlNativeDebugServiceImpl : public QQmlNativeDebugService |
| 34 | { |
| 35 | public: |
| 36 | QQmlNativeDebugServiceImpl(QObject *parent); |
| 37 | |
| 38 | ~QQmlNativeDebugServiceImpl() override; |
| 39 | |
| 40 | void engineAboutToBeAdded(QJSEngine *engine) override; |
| 41 | void engineAboutToBeRemoved(QJSEngine *engine) override; |
| 42 | |
| 43 | void stateAboutToBeChanged(State state) override; |
| 44 | |
| 45 | void messageReceived(const QByteArray &message) override; |
| 46 | |
| 47 | void emitAsynchronousMessageToClient(const QJsonObject &message); |
| 48 | |
| 49 | private: |
| 50 | friend class NativeDebugger; |
| 51 | |
| 52 | QList<QPointer<NativeDebugger> > m_debuggers; |
| 53 | BreakPointHandler *m_breakHandler; |
| 54 | }; |
| 55 | |
| 56 | QT_END_NAMESPACE |
| 57 | |
| 58 | #endif // QQML_NATIVE_DEBUG_SERVICE_H |
| 59 | |