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 QOPCUAENDPOINTDESCRIPTION_H |
5 | #define QOPCUAENDPOINTDESCRIPTION_H |
6 | |
7 | #include <QtOpcUa/qopcuaglobal.h> |
8 | #include <QtOpcUa/qopcuaapplicationdescription.h> |
9 | #include <QtOpcUa/qopcuausertokenpolicy.h> |
10 | |
11 | #include <QtCore/qshareddata.h> |
12 | |
13 | QT_BEGIN_NAMESPACE |
14 | |
15 | class QOpcUaEndpointDescriptionData; |
16 | class Q_OPCUA_EXPORT QOpcUaEndpointDescription |
17 | { |
18 | Q_GADGET |
19 | Q_PROPERTY(QString endpointUrl READ endpointUrl) |
20 | Q_PROPERTY(QOpcUaApplicationDescription server READ server) |
21 | Q_PROPERTY(QOpcUaEndpointDescription::MessageSecurityMode securityMode READ securityMode) |
22 | Q_PROPERTY(QString securityPolicy READ securityPolicy) |
23 | Q_PROPERTY(QList<QOpcUaUserTokenPolicy> userIdentityTokens READ userIdentityTokens) |
24 | |
25 | public: |
26 | QOpcUaEndpointDescription(); |
27 | QOpcUaEndpointDescription(const QOpcUaEndpointDescription &); |
28 | QOpcUaEndpointDescription &operator=(const QOpcUaEndpointDescription &); |
29 | bool operator==(const QOpcUaEndpointDescription &) const; |
30 | ~QOpcUaEndpointDescription(); |
31 | |
32 | enum MessageSecurityMode { |
33 | Invalid = 0, |
34 | None = 1, |
35 | Sign = 2, |
36 | SignAndEncrypt = 3 |
37 | }; |
38 | Q_ENUM(MessageSecurityMode) |
39 | |
40 | QString endpointUrl() const; |
41 | void setEndpointUrl(const QString &endpointUrl); |
42 | |
43 | QOpcUaApplicationDescription server() const; |
44 | QOpcUaApplicationDescription &serverRef(); |
45 | void setServer(const QOpcUaApplicationDescription &server); |
46 | |
47 | QByteArray serverCertificate() const; |
48 | void setServerCertificate(const QByteArray &serverCertificate); |
49 | |
50 | QOpcUaEndpointDescription::MessageSecurityMode securityMode() const; |
51 | void setSecurityMode(QOpcUaEndpointDescription::MessageSecurityMode securityMode); |
52 | |
53 | QString securityPolicy() const; |
54 | void setSecurityPolicy(const QString &securityPolicy); |
55 | |
56 | QList<QOpcUaUserTokenPolicy> userIdentityTokens() const; |
57 | QList<QOpcUaUserTokenPolicy> &userIdentityTokensRef(); |
58 | void setUserIdentityTokens(const QList<QOpcUaUserTokenPolicy> &userIdentityTokens); |
59 | |
60 | QString transportProfileUri() const; |
61 | void setTransportProfileUri(const QString &transportProfileUri); |
62 | |
63 | quint8 securityLevel() const; |
64 | void setSecurityLevel(quint8 securityLevel); |
65 | |
66 | private: |
67 | QSharedDataPointer<QOpcUaEndpointDescriptionData> data; |
68 | }; |
69 | |
70 | QT_END_NAMESPACE |
71 | |
72 | Q_DECLARE_METATYPE(QOpcUaEndpointDescription) |
73 | |
74 | #endif // QOPCUAENDPOINTDESCRIPTION_H |
75 |