QXmpp
Version: 1.10.0
src
base
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
16
class
QXmppNonza
;
17
18
class
QXmppPacket
19
{
20
public
:
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
27
QXmppTask<QXmpp::SendResult>
task();
28
29
void
reportFinished(
QXmpp::SendResult
&&);
30
31
private
:
32
QXmppPromise<QXmpp::SendResult>
m_promise;
33
QByteArray m_data;
34
bool
m_isXmppStanza;
35
};
36
37
#endif
// QXMPPPACKET_H
QXmppNonza
Definition:
QXmppNonza.h:14
QXmppPromise< QXmpp::SendResult >
QXmppTask
Definition:
QXmppTask.h:62
QXmpp::SendResult
std::variant< SendSuccess, QXmppError > SendResult
Definition:
QXmppSendResult.h:43
Generated by
1.9.4