QXmpp Version: 1.10.0
QXmppPacket_p.h
1// SPDX-FileCopyrightText: 2020 Linus Jahn <lnj@kaidan.im>
2//
3// SPDX-License-Identifier: LGPL-2.1-or-later
4
5#ifndef QXMPPPACKET_H
6#define QXMPPPACKET_H
7
8#include "QXmppGlobal.h"
9#include "QXmppPromise.h"
10#include "QXmppSendResult.h"
11
12#include <memory>
13
14#include <QFutureInterface>
15
16class QXmppNonza;
17
18class QXmppPacket
19{
20public:
21 QXmppPacket(const QXmppNonza &nonza, QXmppPromise<QXmpp::SendResult> = {});
22 QXmppPacket(const QByteArray &data, bool isXmppStanza, QXmppPromise<QXmpp::SendResult> = {});
23
24 QByteArray data() const;
25 bool isXmppStanza() const;
26
28
29 void reportFinished(QXmpp::SendResult &&);
30
31private:
33 QByteArray m_data;
34 bool m_isXmppStanza;
35};
36
37#endif // QXMPPPACKET_H
Definition: QXmppNonza.h:14
Definition: QXmppTask.h:62
std::variant< SendSuccess, QXmppError > SendResult
Definition: QXmppSendResult.h:43