From 6efebe555d30170c2ecfc2372113f342c513b0c2 Mon Sep 17 00:00:00 2001 From: Linus Jahn Date: Fri, 30 Dec 2022 23:35:47 +0100 Subject: Replace QXmpp::SendError with QXmppError everywhere Part of #501. --- src/base/QXmppSendResult.h | 30 +++++++++++++----------------- 1 file changed, 13 insertions(+), 17 deletions(-) (limited to 'src/base/QXmppSendResult.h') 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 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; +using SendResult = std::variant; } // namespace QXmpp -- cgit v1.2.3