Loading...
Searching...
No Matches
QXmppHttpUploadIq.h
// SPDX-FileCopyrightText: 2019 Linus Jahn <lnj@kaidan.im>
//
// SPDX-License-Identifier: LGPL-2.1-or-later
#ifndef QXMPPHTTPUPLOADIQ_H
#define QXMPPHTTPUPLOADIQ_H
#include "QXmppIq.h"
#include <QSharedDataPointer>
class QUrl;
class QMimeType;
class QXmppHttpUploadRequestIqPrivate;
class QXmppHttpUploadSlotIqPrivate;
class QXMPP_EXPORT QXmppHttpUploadRequestIq : public QXmppIq
{
public:
QXmppHttpUploadRequestIq();
QXmppHttpUploadRequestIq(const QXmppHttpUploadRequestIq &);
QXmppHttpUploadRequestIq(QXmppHttpUploadRequestIq &&);
~QXmppHttpUploadRequestIq() override;
QXmppHttpUploadRequestIq &operator=(const QXmppHttpUploadRequestIq &);
QXmppHttpUploadRequestIq &operator=(QXmppHttpUploadRequestIq &&);
QString fileName() const;
void setFileName(const QString &filename);
qint64 size() const;
void setSize(qint64 size);
QMimeType contentType() const;
void setContentType(const QMimeType &type);
static constexpr std::tuple PayloadXmlTag = { u"request", QXmpp::Private::ns_http_upload };
[[deprecated("Use QXmpp::isIqElement()")]]
static bool isHttpUploadRequestIq(const QDomElement &element);
protected:
void parseElementFromChild(const QDomElement &element) override;
void toXmlElementFromChild(QXmlStreamWriter *writer) const override;
private:
QSharedDataPointer<QXmppHttpUploadRequestIqPrivate> d;
};
class QXMPP_EXPORT QXmppHttpUploadSlotIq : public QXmppIq
{
public:
QXmppHttpUploadSlotIq();
QXmppHttpUploadSlotIq(const QXmppHttpUploadSlotIq &);
QXmppHttpUploadSlotIq(QXmppHttpUploadSlotIq &&);
~QXmppHttpUploadSlotIq() override;
QXmppHttpUploadSlotIq &operator=(const QXmppHttpUploadSlotIq &);
QXmppHttpUploadSlotIq &operator=(QXmppHttpUploadSlotIq &&);
QUrl putUrl() const;
void setPutUrl(const QUrl &putUrl);
QUrl getUrl() const;
void setGetUrl(const QUrl &getUrl);
QMap<QString, QString> putHeaders() const;
void setPutHeaders(const QMap<QString, QString> &putHeaders);
static constexpr std::tuple PayloadXmlTag = { u"slot", QXmpp::Private::ns_http_upload };
[[deprecated("Use QXmpp::isIqElement()")]]
static bool isHttpUploadSlotIq(const QDomElement &element);
protected:
void parseElementFromChild(const QDomElement &element) override;
void toXmlElementFromChild(QXmlStreamWriter *writer) const override;
private:
QSharedDataPointer<QXmppHttpUploadSlotIqPrivate> d;
};
#endif // QXMPPHTTPUPLOADIQ_H
QXmppHttpUploadRequestIq::setContentType
void setContentType(const QMimeType &type)
Definition QXmppHttpUploadIq.cpp:86
QXmppHttpUploadRequestIq::contentType
QMimeType contentType() const
Definition QXmppHttpUploadIq.cpp:78
QXmppHttpUploadRequestIq::operator=
QXmppHttpUploadRequestIq & operator=(const QXmppHttpUploadRequestIq &)
Default assignment operator.
QXmppHttpUploadRequestIq::QXmppHttpUploadRequestIq
QXmppHttpUploadRequestIq(const QXmppHttpUploadRequestIq &)
Default copy-constructor.
QXmppHttpUploadRequestIq::size
qint64 size() const
Definition QXmppHttpUploadIq.cpp:62
QXmppHttpUploadRequestIq::fileName
QString fileName() const
Definition QXmppHttpUploadIq.cpp:43
QXmppHttpUploadRequestIq::operator=
QXmppHttpUploadRequestIq & operator=(QXmppHttpUploadRequestIq &&)
Default assignment operator.
QXmppHttpUploadRequestIq::QXmppHttpUploadRequestIq
QXmppHttpUploadRequestIq(QXmppHttpUploadRequestIq &&)
Default move-constructor.
QXmppHttpUploadRequestIq::setSize
void setSize(qint64 size)
Definition QXmppHttpUploadIq.cpp:70
QXmppHttpUploadRequestIq::setFileName
void setFileName(const QString &filename)
Definition QXmppHttpUploadIq.cpp:54
QXmppHttpUploadSlotIq::putUrl
QUrl putUrl() const
Definition QXmppHttpUploadIq.cpp:143
QXmppHttpUploadSlotIq::getUrl
QUrl getUrl() const
Definition QXmppHttpUploadIq.cpp:159
QXmppHttpUploadSlotIq::setGetUrl
void setGetUrl(const QUrl &getUrl)
Definition QXmppHttpUploadIq.cpp:167
QXmppHttpUploadSlotIq::setPutHeaders
void setPutHeaders(const QMap< QString, QString > &putHeaders)
Definition QXmppHttpUploadIq.cpp:187
QXmppHttpUploadSlotIq::setPutUrl
void setPutUrl(const QUrl &putUrl)
Definition QXmppHttpUploadIq.cpp:151
QXmppHttpUploadSlotIq::operator=
QXmppHttpUploadSlotIq & operator=(QXmppHttpUploadSlotIq &&)
Default move-assignment operator.
QXmppHttpUploadSlotIq::QXmppHttpUploadSlotIq
QXmppHttpUploadSlotIq(const QXmppHttpUploadSlotIq &)
Default copy-constructor.
QXmppHttpUploadSlotIq::QXmppHttpUploadSlotIq
QXmppHttpUploadSlotIq(QXmppHttpUploadSlotIq &&)
Default move-constructor.
QXmppHttpUploadSlotIq::operator=
QXmppHttpUploadSlotIq & operator=(const QXmppHttpUploadSlotIq &)
Default assignment operator.
QXmppHttpUploadSlotIq::putHeaders
QMap< QString, QString > putHeaders() const
Definition QXmppHttpUploadIq.cpp:177
QXmppIq::QXmppIq
QXmppIq(QXmppIq::Type type=QXmppIq::Get)
Definition QXmppIq.cpp:39
QXmppIq::type
QXmppIq::Type type() const
Definition QXmppIq.cpp:60