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 QQMLDEBUGSERVERCONNECTION_P_H
5#define QQMLDEBUGSERVERCONNECTION_P_H
6
7#include <private/qtqmlglobal_p.h>
8#include <QtCore/qobject.h>
9
10//
11// W A R N I N G
12// -------------
13//
14// This file is not part of the Qt API. It exists purely as an
15// implementation detail. This header file may change from version to
16// version without notice, or even be removed.
17//
18// We mean it.
19//
20
21QT_BEGIN_NAMESPACE
22
23class QQmlDebugServer;
24class Q_QML_PRIVATE_EXPORT QQmlDebugServerConnection : public QObject
25{
26 Q_OBJECT
27public:
28 QQmlDebugServerConnection(QObject *parent = nullptr) : QObject(parent) {}
29 ~QQmlDebugServerConnection() override;
30
31 virtual void setServer(QQmlDebugServer *server) = 0;
32 virtual bool setPortRange(int portFrom, int portTo, bool block, const QString &hostaddress) = 0;
33 virtual bool setFileName(const QString &fileName, bool block) = 0;
34 virtual bool isConnected() const = 0;
35 virtual void disconnect() = 0;
36 virtual void waitForConnection() = 0;
37 virtual void flush() = 0;
38};
39
40class Q_QML_PRIVATE_EXPORT QQmlDebugServerConnectionFactory : public QObject
41{
42 Q_OBJECT
43public:
44 ~QQmlDebugServerConnectionFactory() override;
45 virtual QQmlDebugServerConnection *create(const QString &key) = 0;
46};
47
48#define QQmlDebugServerConnectionFactory_iid "org.qt-project.Qt.QQmlDebugServerConnectionFactory"
49Q_DECLARE_INTERFACE(QQmlDebugServerConnectionFactory, QQmlDebugServerConnectionFactory_iid)
50
51QT_END_NAMESPACE
52
53#endif // QQMLDEBUGSERVERCONNECTION_H
54

source code of qtdeclarative/src/qml/debugger/qqmldebugserverconnection_p.h