QXmpp  Version: 1.7.1
QXmppSendResult.h
1 // SPDX-FileCopyrightText: 2021 Linus Jahn <lnj@kaidan.im>
2 //
3 // SPDX-License-Identifier: LGPL-2.1-or-later
4 
5 #ifndef QXMPPSENDRESULT_H
6 #define QXMPPSENDRESULT_H
7 
8 #include "QXmppError.h"
9 
10 #include <variant>
11 
12 namespace QXmpp {
13 
19 enum class SendError : uint8_t {
26 };
27 
33 struct SendSuccess {
35  bool acknowledged = false;
36 };
37 
43 using SendResult = std::variant<SendSuccess, QXmppError>;
44 
45 } // namespace QXmpp
46 
47 #endif // QXMPPSENDRESULT_H
Definition: Algorithms.h:10
std::variant< SendSuccess, QXmppError > SendResult
Definition: QXmppSendResult.h:43
SendError
Definition: QXmppSendResult.h:19
@ EncryptionError
The packet couldn't be sent because prior encryption failed.
@ 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.
Definition: QXmppSendResult.h:33
bool acknowledged
Indicates whether the packet has been acknowledged by the other peer.
Definition: QXmppSendResult.h:35