diff options
| author | Linus Jahn <lnj@kaidan.im> | 2022-12-30 23:35:47 +0100 |
|---|---|---|
| committer | Linus Jahn <lnj@kaidan.im> | 2022-12-30 23:35:47 +0100 |
| commit | 6efebe555d30170c2ecfc2372113f342c513b0c2 (patch) | |
| tree | 146535dd164abe60d28a020a2680e17c0de2b055 /src/base/QXmppSendResult.h | |
| parent | 93c35b3f1260f3dfafbc77609fcadb9a40a7b97f (diff) | |
| download | qxmpp-6efebe555d30170c2ecfc2372113f342c513b0c2.tar.gz | |
Replace QXmpp::SendError with QXmppError everywhere
Part of #501.
Diffstat (limited to 'src/base/QXmppSendResult.h')
| -rw-r--r-- | src/base/QXmppSendResult.h | 30 |
1 files changed, 13 insertions, 17 deletions
diff --git a/src/base/QXmppSendResult.h b/src/base/QXmppSendResult.h index b4b4ce81..451387ac 100644 --- a/src/base/QXmppSendResult.h +++ b/src/base/QXmppSendResult.h @@ -5,30 +5,24 @@ #ifndef QXMPPSENDRESULT_H #define QXMPPSENDRESULT_H -#include "QXmppGlobal.h" +#include "QXmppError.h" #include <variant> namespace QXmpp { /// -/// A struct containing a packet send error type and error message. +/// Describes the type of a packet sending error. /// /// \since QXmpp 1.5 /// -struct SendError -{ - /// Describes the type of an error. - enum Type : uint8_t { - SocketWriteError, ///< The packet was written to the socket with no success (only happens when Stream Management is disabled). - Disconnected, ///< The packet couldn't be sent because the connection hasn't been (re)established. - EncryptionError, ///< The packet couldn't be sent because prior encryption failed. - }; - - /// Text describing the error. - QString text; - /// Type of the occured error. - Type type; +enum class SendError : uint8_t { + /// The packet was written to the socket with no success (only happens when Stream Management is disabled). + SocketWriteError, + /// The packet couldn't be sent because the connection hasn't been (re)established. + Disconnected, + /// The packet couldn't be sent because prior encryption failed. + EncryptionError, }; /// @@ -43,9 +37,11 @@ struct SendSuccess }; /// -/// A variant containing either a SendSuccess object or a SendError. +/// A variant containing either a SendSuccess object or a QXmppError. +/// +/// The QXmppError will likely contain a SendError. /// -using SendResult = std::variant<SendSuccess, SendError>; +using SendResult = std::variant<SendSuccess, QXmppError>; } // namespace QXmpp |
