clazy: Convert many old-style connects into function pointer based
[quassel.git] / src / client / clienttransfer.h
index b1ca5df..9b27666 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2013 by the Quassel Project                        *
+ *   Copyright (C) 2005-2018 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
  *   51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.         *
  ***************************************************************************/
 
-#ifndef CLIENTTRANSFER_H
-#define CLIENTTRANSFER_H
+#pragma once
 
 #include <QUuid>
 
 #include "transfer.h"
 
+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) override;
+    void onStatusChanged(Transfer::Status status);
 
 private:
-    // non-synced attributes
+    void cleanUp() override;
+
     mutable QString _savePath;
-};
 
-#endif
+    QFile *_file;
+};