1 | // Copyright (C) 2018 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 | #pragma once |
5 | |
6 | #include <private/universalnode_p.h> |
7 | |
8 | #include <QObject> |
9 | #include <QPointer> |
10 | |
11 | #include "qopcuatype.h" |
12 | #include "qopcuabrowsepathtarget.h" |
13 | #include "qopcuarelativepathelement.h" |
14 | |
15 | // |
16 | // W A R N I N G |
17 | // ------------- |
18 | // |
19 | // This file is not part of the Qt API. It exists purely as an |
20 | // implementation detail. This header file may change from version to |
21 | // version without notice, or even be removed. |
22 | // |
23 | // We mean it. |
24 | // |
25 | |
26 | QT_BEGIN_NAMESPACE |
27 | |
28 | class QOpcUaNode; |
29 | class QOpcUaClient; |
30 | class OpcUaRelativeNodeId; |
31 | class QOpcUaClient; |
32 | |
33 | class OpcUaPathResolver : public QObject |
34 | { |
35 | Q_OBJECT |
36 | public: |
37 | OpcUaPathResolver(OpcUaRelativeNodeId *relativeNode, QOpcUaClient *client, QObject *target); |
38 | ~OpcUaPathResolver(); |
39 | void startResolving(); |
40 | |
41 | signals: |
42 | void resolvedStartNode(const UniversalNode &nodeId, const QString &errorMessage); |
43 | void resolvedNode(UniversalNode node, QString errorMessage); |
44 | |
45 | private slots: |
46 | void startNodeResolved(UniversalNode startNode, const QString &errorMessage); |
47 | void browsePathFinished(QList<QOpcUaBrowsePathTarget> results, QList<QOpcUaRelativePathElement> path, QOpcUa::UaStatusCode status); |
48 | |
49 | private: |
50 | OpcUaPathResolver(int level, OpcUaRelativeNodeId *relativeNode, QOpcUaClient *client, QObject *target); |
51 | |
52 | int m_level; |
53 | QPointer<OpcUaRelativeNodeId> m_relativeNode; |
54 | QPointer<QObject> m_target; |
55 | QPointer<QOpcUaClient> m_client; |
56 | QOpcUaNode *m_node; |
57 | }; |
58 | |
59 | QT_END_NAMESPACE |
60 | |