QXmpp: QXmppStreamInitiationIq_p.h Source File

QXmpp Version: 1.14.2

Loading...
Searching...
No Matches
QXmppStreamInitiationIq_p.h
1// SPDX-FileCopyrightText: 2012 Jeremy Lainé <jeremy.laine@m4x.org>
2//
3// SPDX-License-Identifier: LGPL-2.1-or-later
4
5#ifndef QXMPPSTREAMINITIATIONIQ_P_H
6#define QXMPPSTREAMINITIATIONIQ_P_H
7
8#include "QXmppDataForm.h"
9#include "QXmppIq.h"
10#include "QXmppTransferManager.h"
11
12#include <QDateTime>
13
14//
15// W A R N I N G
16// -------------
17//
18// This file is not part of the QXmpp API. It exists for the convenience
19// of the QXmppTransferManager class.
20//
21// This header file may change from version to version without notice,
22// or even be removed.
23//
24// We mean it.
25//
26
28class QXMPP_AUTOTEST_EXPORT QXmppStreamInitiationIq : public QXmppIq
29{
30public:
31 enum Profile {
32 None = 0,
33 FileTransfer
34 };
35
36 QXmppDataForm featureForm() const;
37 void setFeatureForm(const QXmppDataForm &form);
38
39 QXmppTransferFileInfo fileInfo() const;
40 void setFileInfo(const QXmppTransferFileInfo &info);
41
42 QString mimeType() const;
43 void setMimeType(const QString &mimeType);
44
45 QXmppStreamInitiationIq::Profile profile() const;
46 void setProfile(QXmppStreamInitiationIq::Profile profile);
47
48 QString siId() const;
49 void setSiId(const QString &id);
50
51 static constexpr std::tuple PayloadXmlTag = { u"si", QXmpp::Private::ns_stream_initiation };
52
53protected:
54 void parseElementFromChild(const QDomElement &element) override;
55 void toXmlElementFromChild(QXmlStreamWriter *writer) const override;
56
57private:
58 QXmppDataForm m_featureForm;
59 QXmppTransferFileInfo m_fileInfo;
60 QString m_mimeType;
61 Profile m_profile;
62 QString m_siId;
63};
65
66#endif
QXmppIq
The QXmppIq class is the base class for all IQs.
Definition QXmppIq.h:23