1// Copyright (C) 2016 basysKom GmbH, opensource@basyskom.com
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 QOPCUACLIENT_P_H
5#define QOPCUACLIENT_P_H
6
7//
8// W A R N I N G
9// -------------
10//
11// This file is not part of the Qt API. It exists purely as an
12// implementation detail. This header file may change from version to
13// version without notice, or even be removed.
14//
15// We mean it.
16//
17
18#include <QtOpcUa/qopcuaclient.h>
19#include <QtOpcUa/qopcuaglobal.h>
20#include <QtOpcUa/qopcuaauthenticationinformation.h>
21#include <QtOpcUa/qopcuaconnectionsettings.h>
22#include <private/qopcuaclientimpl_p.h>
23
24#include <QtCore/qobject.h>
25#include <QtCore/qscopedpointer.h>
26#include <QtCore/qurl.h>
27#include <private/qobject_p.h>
28
29QT_BEGIN_NAMESPACE
30
31class Q_OPCUA_EXPORT QOpcUaClientPrivate : public QObjectPrivate
32{
33public:
34 Q_DECLARE_PUBLIC(QOpcUaClient)
35
36 QOpcUaClientPrivate(QOpcUaClientImpl *impl);
37 ~QOpcUaClientPrivate() override;
38
39 void connectToEndpoint(const QOpcUaEndpointDescription &endpoint);
40 void disconnectFromEndpoint();
41
42 QScopedPointer<QOpcUaClientImpl> m_impl;
43 QOpcUaClient::ClientState m_state;
44 QOpcUaClient::ClientError m_error;
45 QOpcUaEndpointDescription m_endpoint;
46 bool m_enableNamespaceArrayAutoupdate;
47 QOpcUaAuthenticationInformation m_authenticationInformation;
48 QOpcUaConnectionSettings m_connectionSettings;
49
50 bool checkAndSetUrl(const QUrl &url);
51 void setStateAndError(QOpcUaClient::ClientState state,
52 QOpcUaClient::ClientError error = QOpcUaClient::NoError);
53
54 bool updateNamespaceArray();
55 QStringList namespaceArray() const;
56 void namespaceArrayUpdated(QOpcUa::NodeAttributes attr);
57 void setupNamespaceArrayMonitoring();
58
59 void setApplicationIdentity(const QOpcUaApplicationIdentity &identity);
60 QOpcUaApplicationIdentity applicationIdentity() const;
61
62 void setPkiConfiguration(const QOpcUaPkiConfiguration &config);
63 QOpcUaPkiConfiguration pkiConfiguration() const;
64
65private:
66 QStringList m_namespaceArray;
67 QScopedPointer<QOpcUaNode> m_namespaceArrayNode;
68 bool m_namespaceArrayAutoupdateEnabled;
69 unsigned int m_namespaceArrayUpdateInterval;
70 QOpcUaApplicationIdentity m_applicationIdentity;
71 QOpcUaPkiConfiguration m_pkiConfig;
72};
73
74QT_END_NAMESPACE
75
76#endif // QOPCUACLIENT_P_H
77

source code of qtopcua/src/opcua/client/qopcuaclient_p.h