| 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 | #ifndef QOPCUAERRORSTATE_H | 
| 5 | #define QOPCUAERRORSTATE_H | 
| 6 |  | 
| 7 | #include <QtCore/qshareddata.h> | 
| 8 | #include <QtOpcUa/qopcuatype.h> | 
| 9 | #include <QtOpcUa/qopcuaglobal.h> | 
| 10 |  | 
| 11 | QT_BEGIN_NAMESPACE | 
| 12 |  | 
| 13 | class QOpcUaErrorStateData; | 
| 14 |  | 
| 15 | class Q_OPCUA_EXPORT QOpcUaErrorState | 
| 16 | { | 
| 17 | public: | 
| 18 |     enum class ConnectionStep { | 
| 19 |         Unknown = 0x00, | 
| 20 |         CertificateValidation, | 
| 21 |         OpenSecureChannel, | 
| 22 |         CreateSession, | 
| 23 |         ActivateSession, | 
| 24 |     }; | 
| 25 |  | 
| 26 |     QOpcUaErrorState(); | 
| 27 |     QOpcUaErrorState(const QOpcUaErrorState &other); | 
| 28 |     QOpcUaErrorState &operator =(const QOpcUaErrorState &rhs); | 
| 29 |     ~QOpcUaErrorState(); | 
| 30 |  | 
| 31 |     ConnectionStep connectionStep() const; | 
| 32 |     void setConnectionStep(ConnectionStep step); | 
| 33 |  | 
| 34 |     QOpcUa::UaStatusCode errorCode() const; | 
| 35 |     void setErrorCode(QOpcUa::UaStatusCode error); | 
| 36 |  | 
| 37 |     bool isClientSideError() const; | 
| 38 |     void setClientSideError(bool clientSideError); | 
| 39 |  | 
| 40 |     void setIgnoreError(bool ignore = true); | 
| 41 |     bool ignoreError() const; | 
| 42 |  | 
| 43 | private: | 
| 44 |     QSharedDataPointer<QOpcUaErrorStateData> data; | 
| 45 | }; | 
| 46 |  | 
| 47 | QT_END_NAMESPACE | 
| 48 |  | 
| 49 | Q_DECLARE_METATYPE(QOpcUaErrorState) | 
| 50 |  | 
| 51 | #endif // QOPCUAERRORSTATE_H | 
| 52 |  |