X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fclient%2Fclienttransfer.h;h=a274f3b021505f5d64bdcecf757b1776b2d87bfc;hp=04637c78ef97714f35b330e19898ee368b0ba662;hb=47b54cd3ad35201ff2ab9ef6bfdba83fc086558d;hpb=921e54680da16fcf2adb7a90506875aceb6633a4 diff --git a/src/client/clienttransfer.h b/src/client/clienttransfer.h index 04637c78..a274f3b0 100644 --- a/src/client/clienttransfer.h +++ b/src/client/clienttransfer.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2015 by the Quassel Project * + * Copyright (C) 2005-2020 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * @@ -18,8 +18,7 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * ***************************************************************************/ -#ifndef CLIENTTRANSFER_H -#define CLIENTTRANSFER_H +#pragma once #include @@ -30,28 +29,27 @@ class QFile; class ClientTransfer : public Transfer { Q_OBJECT - SYNCABLE_OBJECT public: - ClientTransfer(const QUuid &uuid, QObject *parent = 0); + ClientTransfer(const QUuid& uuid, QObject* parent = nullptr); QString savePath() const; + quint64 transferred() const override; + public slots: // called on the client side - void accept(const QString &savePath) const; - void reject() const; + void accept(const QString& savePath) const override; + void reject() const override; private slots: - void dataReceived(PeerPtr peer, const QByteArray &data); - void onStateChanged(State state); + void dataReceived(PeerPtr peer, const QByteArray& data) override; + void onStatusChanged(Transfer::Status status); private: - virtual void cleanUp(); + void cleanUp() override; mutable QString _savePath; - QFile *_file; + QFile* _file; }; - -#endif