5#ifndef QXMPPUPLOADREQUESTMANAGER_H
6#define QXMPPUPLOADREQUESTMANAGER_H
8#include "QXmppClientExtension.h"
13#include <QSharedDataPointer>
21class QXmppUploadServicePrivate;
22class QXmppUploadRequestManagerPrivate;
39 void setJid(
const QString &jid);
41 qint64 sizeLimit()
const;
42 void setSizeLimit(qint64 sizeLimit);
45 QSharedDataPointer<QXmppUploadServicePrivate> d;
92 QString requestUploadSlot(
const QFileInfo &file,
93 const QString &uploadService = QString());
94 QString requestUploadSlot(
const QFileInfo &file,
95 const QString &customFileName,
96 const QString &uploadService = QString());
97 QString requestUploadSlot(
const QString &fileName,
99 const QMimeType &mimeType,
100 const QString &uploadService = QString());
102 using SlotResult = std::variant<QXmppHttpUploadSlotIq, QXmppError>;
104 const QString &uploadService = {});
106 const QString &customFileName,
107 const QString &uploadService = {});
110 const QMimeType &mimeType,
111 const QString &uploadService = {});
113 bool serviceFound()
const;
115 QVector<QXmppUploadService> uploadServices()
const;
117 bool handleStanza(
const QDomElement &stanza)
override;
138 const std::unique_ptr<QXmppUploadRequestManagerPrivate> d;
The QXmppClientExtension class is the base class for QXmppClient extensions.
Definition: QXmppClientExtension.h:32
Main class for starting and managing connections to XMPP servers.
Definition: QXmppClient.h:62
Definition: QXmppDiscoveryIq.h:18
Represents an HTTP File Upload IQ for requesting an upload slot as defined by XEP-0363: HTTP File Upl...
Definition: QXmppHttpUploadIq.h:27
Represents an HTTP File Upload IQ result for receiving an upload slot as defined by XEP-0363: HTTP Fi...
Definition: QXmppHttpUploadIq.h:67
Definition: QXmppTask.h:62
The QXmppUploadRequestManager implements the core of XEP-0369: HTTP File Upload.
Definition: QXmppUploadRequestManager.h:85
std::variant< QXmppHttpUploadSlotIq, QXmppError > SlotResult
Definition: QXmppUploadRequestManager.h:102
void requestFailed(const QXmppHttpUploadRequestIq &request)
void serviceFoundChanged()
Emitted when the first upload service has been found.
void slotReceived(const QXmppHttpUploadSlotIq &slot)
Emitted when an upload slot was received.
QXmppUploadService represents an HTTP File Upload service.
Definition: QXmppUploadRequestManager.h:30
QXmppUploadService(const QXmppUploadService &)
Copy constructor.
QXmppUploadService & operator=(const QXmppUploadService &)
Equal operator.