Loading...
Searching...
No Matches
QXmppSendResult.h
// SPDX-FileCopyrightText: 2021 Linus Jahn <lnj@kaidan.im>
//
// SPDX-License-Identifier: LGPL-2.1-or-later
#ifndef QXMPPSENDRESULT_H
#define QXMPPSENDRESULT_H
#include "QXmppError.h"
#include <variant>
namespace QXmpp {
enum class SendError : uint8_t {
SocketWriteError,
Disconnected,
EncryptionError,
};
struct SendSuccess {
bool acknowledged = false;
};
using SendResult = std::variant<SendSuccess, QXmppError>;
} // namespace QXmpp
#endif // QXMPPSENDRESULT_H
QXmpp
Definition Algorithms.h:14
QXmpp::SendResult
std::variant< SendSuccess, QXmppError > SendResult
Definition QXmppSendResult.h:43
QXmpp::SendError
SendError
Definition QXmppSendResult.h:19
QXmpp::SendError::EncryptionError
@ EncryptionError
The packet couldn't be sent because prior encryption failed.
Definition QXmppSendResult.h:25
QXmpp::SendError::SocketWriteError
@ SocketWriteError
The packet was written to the socket with no success (only happens when Stream Management is disabled...
Definition QXmppSendResult.h:21
QXmpp::SendError::Disconnected
@ Disconnected
The packet couldn't be sent because the connection hasn't been (re)established.
Definition QXmppSendResult.h:23
QXmpp::SendSuccess
Definition QXmppSendResult.h:33
QXmpp::SendSuccess::acknowledged
bool acknowledged
Indicates whether the packet has been acknowledged by the other peer.
Definition QXmppSendResult.h:35