diff options
| author | Jonah BrĂ¼chert <jbb@kaidan.im> | 2022-09-09 23:15:10 +0200 |
|---|---|---|
| committer | Linus Jahn <lnj@kaidan.im> | 2022-09-29 23:46:36 +0200 |
| commit | 68f167995e7ba71a6f2e556a7a0eab3d234e2d1a (patch) | |
| tree | de645b606d96f01da7ea6db63e90224519a89de3 /src/client/QXmppFileTransfer.h | |
| parent | 7b02df3ef42ccb2d8c40eea901c5c6dd4b140204 (diff) | |
| download | qxmpp-68f167995e7ba71a6f2e556a7a0eab3d234e2d1a.tar.gz | |
Implement XEP-0448: Stateless File Sharing
This adds a file sharing manager that is capable of using multiple back
ends. Currently implemented are a normal HTTP File Upload backend and an
encrypted HTTP File Upload. Jingle File Transfer could be implemented
later.
Co-authored-by: Linus Jahn <lnj@kaidan.im>
Diffstat (limited to 'src/client/QXmppFileTransfer.h')
| -rw-r--r-- | src/client/QXmppFileTransfer.h | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/src/client/QXmppFileTransfer.h b/src/client/QXmppFileTransfer.h new file mode 100644 index 00000000..30a91aa9 --- /dev/null +++ b/src/client/QXmppFileTransfer.h @@ -0,0 +1,31 @@ +// SPDX-FileCopyrightText: 2022 Linus Jahn <lnj@kaidan.im> +// +// SPDX-License-Identifier: LGPL-2.1-or-later + +#ifndef QXMPPFILETRANSFER_H +#define QXMPPFILETRANSFER_H + +#include "QXmppGlobal.h" + +#include <QObject> + +class QXMPP_EXPORT QXmppFileTransfer : public QObject +{ + Q_OBJECT + /// Progress of the file transfer between 0.0 and 1.0. + Q_PROPERTY(float progress READ progress NOTIFY progressChanged) + +public: + /// Returns the current progress between 0.0 and 1.0. + virtual float progress() = 0; + virtual void cancel() = 0; + virtual bool isFinished() = 0; + virtual quint64 bytesTransferred() = 0; + virtual quint64 bytesTotal() = 0; + + // TODO consider adding speed getter + + Q_SIGNAL void progressChanged(); +}; + +#endif // QXMPPFILETRANSFER_H |
