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 QQMLENGINECONTROLCLIENT_P_P_H
5#define QQMLENGINECONTROLCLIENT_P_P_H
6
7#include "qqmlenginecontrolclient_p.h"
8#include "qqmldebugclient_p_p.h"
9
10#include <QtCore/QHash>
11
12//
13// W A R N I N G
14// -------------
15//
16// This file is not part of the Qt API. It exists purely as an
17// implementation detail. This header file may change from version to
18// version without notice, or even be removed.
19//
20// We mean it.
21//
22
23QT_BEGIN_NAMESPACE
24
25class QQmlEngineControlClientPrivate : public QQmlDebugClientPrivate
26{
27 Q_DECLARE_PUBLIC(QQmlEngineControlClient)
28public:
29 enum MessageType {
30 EngineAboutToBeAdded,
31 EngineAdded,
32 EngineAboutToBeRemoved,
33 EngineRemoved
34 };
35
36 enum CommandType {
37 StartWaitingEngine,
38 StopWaitingEngine,
39 InvalidCommand
40 };
41
42 QQmlEngineControlClientPrivate(QQmlDebugConnection *connection);
43
44 void sendCommand(CommandType command, int engineId);
45
46 struct EngineState {
47 EngineState(CommandType command = InvalidCommand) : releaseCommand(command), blockers(0) {}
48 CommandType releaseCommand;
49 int blockers;
50 };
51
52 QHash<int, EngineState> blockedEngines;
53};
54
55QT_END_NAMESPACE
56
57#endif // QQMLENGINECONTROLCLIENT_P_P_H
58

source code of qtdeclarative/src/qmldebug/qqmlenginecontrolclient_p_p.h