blob: 30a91aa9adcd7f39c897390484005382e202bb50 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
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
|