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
26QT_BEGIN_NAMESPACE
27
28class QOpcUaNode;
29class QOpcUaClient;
30class OpcUaRelativeNodeId;
31class QOpcUaClient;
32
33class OpcUaPathResolver : public QObject
34{
35 Q_OBJECT
36public:
37 OpcUaPathResolver(OpcUaRelativeNodeId *relativeNode, QOpcUaClient *client, QObject *target);
38 ~OpcUaPathResolver();
39 void startResolving();
40
41signals:
42 void resolvedStartNode(const UniversalNode &nodeId, const QString &errorMessage);
43 void resolvedNode(UniversalNode node, QString errorMessage);
44
45private slots:
46 void startNodeResolved(UniversalNode startNode, const QString &errorMessage);
47 void browsePathFinished(QList<QOpcUaBrowsePathTarget> results, QList<QOpcUaRelativePathElement> path, QOpcUa::UaStatusCode status);
48
49private:
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
59QT_END_NAMESPACE
60

source code of qtopcua/src/declarative_opcua/opcuapathresolver_p.h