QXmpp Version: 1.5.6
Loading...
Searching...
No Matches
QXmppHttpUploadIq.h
1// SPDX-FileCopyrightText: 2019 Linus Jahn <lnj@kaidan.im>
2//
3// SPDX-License-Identifier: LGPL-2.1-or-later
4
5#ifndef QXMPPHTTPUPLOADIQ_H
6#define QXMPPHTTPUPLOADIQ_H
7
8#include "QXmppIq.h"
9
10#include <QSharedDataPointer>
11
12class QUrl;
13class QMimeType;
14
15class QXmppHttpUploadRequestIqPrivate;
16class QXmppHttpUploadSlotIqPrivate;
17
26class QXMPP_EXPORT QXmppHttpUploadRequestIq : public QXmppIq
27{
28public:
33
36
37 QString fileName() const;
38 void setFileName(const QString &filename);
39
40 qint64 size() const;
41 void setSize(qint64 size);
42
43 QMimeType contentType() const;
44 void setContentType(const QMimeType &type);
45
46 static bool isHttpUploadRequestIq(const QDomElement &element);
47
48protected:
50 void parseElementFromChild(const QDomElement &element) override;
51 void toXmlElementFromChild(QXmlStreamWriter *writer) const override;
53
54private:
55 QSharedDataPointer<QXmppHttpUploadRequestIqPrivate> d;
56};
57
66class QXMPP_EXPORT QXmppHttpUploadSlotIq : public QXmppIq
67{
68public:
72 ~QXmppHttpUploadSlotIq() override;
73
76
77 QUrl putUrl() const;
78 void setPutUrl(const QUrl &putUrl);
79
80 QUrl getUrl() const;
81 void setGetUrl(const QUrl &getUrl);
82
83 QMap<QString, QString> putHeaders() const;
84 void setPutHeaders(const QMap<QString, QString> &putHeaders);
85
86 static bool isHttpUploadSlotIq(const QDomElement &element);
87
88protected:
90 void parseElementFromChild(const QDomElement &element) override;
91 void toXmlElementFromChild(QXmlStreamWriter *writer) const override;
93
94private:
95 QSharedDataPointer<QXmppHttpUploadSlotIqPrivate> d;
96};
97
98#endif // QXMPPHTTPUPLOADIQ_H
Represents an HTTP File Upload IQ for requesting an upload slot as defined by XEP-0363: HTTP File Upl...
Definition QXmppHttpUploadIq.h:27
QXmppHttpUploadRequestIq & operator=(const QXmppHttpUploadRequestIq &)
Default assignment operator.
QXmppHttpUploadRequestIq(const QXmppHttpUploadRequestIq &)
Default copy-constructor.
QXmppHttpUploadRequestIq & operator=(QXmppHttpUploadRequestIq &&)
Default assignment operator.
QXmppHttpUploadRequestIq(QXmppHttpUploadRequestIq &&)
Default move-constructor.
Represents an HTTP File Upload IQ result for receiving an upload slot as defined by XEP-0363: HTTP Fi...
Definition QXmppHttpUploadIq.h:67
QXmppHttpUploadSlotIq & operator=(QXmppHttpUploadSlotIq &&)
Default move-assignment operator.
QXmppHttpUploadSlotIq(const QXmppHttpUploadSlotIq &)
Default copy-constructor.
QXmppHttpUploadSlotIq(QXmppHttpUploadSlotIq &&)
Default move-constructor.
QXmppHttpUploadSlotIq & operator=(const QXmppHttpUploadSlotIq &)
Default assignment operator.
The QXmppIq class is the base class for all IQs.
Definition QXmppIq.h:23