1// Copyright (C) 2015 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 QOPCUAAPPLICATIONDESCRIPTION_H
5#define QOPCUAAPPLICATIONDESCRIPTION_H
6
7#include <QtOpcUa/qopcualocalizedtext.h>
8
9#include <QtOpcUa/qopcuaglobal.h>
10#include <QtCore/qshareddata.h>
11
12QT_BEGIN_NAMESPACE
13
14class QOpcUaApplicationDescriptionData;
15class Q_OPCUA_EXPORT QOpcUaApplicationDescription
16{
17 Q_GADGET
18 Q_PROPERTY(QString applicationUri READ applicationUri)
19 Q_PROPERTY(QString productUri READ productUri)
20 Q_PROPERTY(QOpcUaLocalizedText applicationName READ applicationName)
21 Q_PROPERTY(QOpcUaApplicationDescription::ApplicationType applicationType READ applicationType)
22 Q_PROPERTY(QString gatewayServerUri READ gatewayServerUri)
23 Q_PROPERTY(QString discoveryProfileUri READ discoveryProfileUri)
24 Q_PROPERTY(QList<QString> discoveryUrls READ discoveryUrls)
25
26public:
27 QOpcUaApplicationDescription();
28 QOpcUaApplicationDescription(const QOpcUaApplicationDescription &);
29 QOpcUaApplicationDescription &operator=(const QOpcUaApplicationDescription &);
30 bool operator==(const QOpcUaApplicationDescription &) const;
31 ~QOpcUaApplicationDescription();
32
33 enum ApplicationType {
34 Server = 0,
35 Client = 1,
36 ClientAndServer = 2,
37 DiscoveryServer = 3
38 };
39 Q_ENUM(ApplicationType)
40
41 QString applicationUri() const;
42 void setApplicationUri(const QString &applicationUri);
43
44 QString productUri() const;
45 void setProductUri(const QString &productUri);
46
47 QOpcUaLocalizedText applicationName() const;
48 void setApplicationName(const QOpcUaLocalizedText &applicationName);
49
50 QOpcUaApplicationDescription::ApplicationType applicationType() const;
51 void setApplicationType(QOpcUaApplicationDescription::ApplicationType applicationType);
52
53 QString gatewayServerUri() const;
54 void setGatewayServerUri(const QString &gatewayServerUri);
55
56 QString discoveryProfileUri() const;
57 void setDiscoveryProfileUri(const QString &discoveryProfileUri);
58
59 QList<QString> discoveryUrls() const;
60 QList<QString> &discoveryUrlsRef();
61 void setDiscoveryUrls(const QList<QString> &discoveryUrls);
62
63private:
64 QSharedDataPointer<QOpcUaApplicationDescriptionData> data;
65};
66
67QT_END_NAMESPACE
68
69Q_DECLARE_METATYPE(QOpcUaApplicationDescription)
70
71#endif // QOPCUAAPPLICATIONDESCRIPTION_H
72

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