1 | // Copyright (C) 2019 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 | #ifndef QOPCUADISTINGUISHEDNAME_H |
5 | #define QOPCUADISTINGUISHEDNAME_H |
6 | |
7 | #include <QtOpcUa/qopcuaglobal.h> |
8 | #include <QtCore/qshareddata.h> |
9 | |
10 | QT_BEGIN_NAMESPACE |
11 | |
12 | class QOpcUaX509DistinguishedNameData; |
13 | class Q_OPCUA_EXPORT QOpcUaX509DistinguishedName |
14 | { |
15 | public: |
16 | enum class Type { |
17 | CommonName, // 2.5.4.3 |
18 | CountryName, // 2.5.4.6 |
19 | LocalityName, // 2.5.4.7 |
20 | StateOrProvinceName, // 2.5.4.8 |
21 | OrganizationName, // 2.5.4.10 |
22 | }; |
23 | |
24 | QOpcUaX509DistinguishedName(); |
25 | QOpcUaX509DistinguishedName(const QOpcUaX509DistinguishedName &); |
26 | QOpcUaX509DistinguishedName &operator=(const QOpcUaX509DistinguishedName &); |
27 | bool operator==(const QOpcUaX509DistinguishedName &rhs) const; |
28 | ~QOpcUaX509DistinguishedName(); |
29 | void setEntry(Type type, const QString &value); |
30 | QString entry(Type type) const; |
31 | static QString typeToOid(Type type); |
32 | |
33 | private: |
34 | QSharedDataPointer<QOpcUaX509DistinguishedNameData> data; |
35 | }; |
36 | |
37 | QT_END_NAMESPACE |
38 | |
39 | #endif // QOPCUADISTINGUISHEDNAME_H |
40 | |