Add accessors for the amount of transferred data to Transfer classes
[quassel.git] / src / client / clienttransfer.h
index b1ca5df..a1d062b 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2013 by the Quassel Project                        *
+ *   Copyright (C) 2005-2015 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
@@ -25,6 +25,8 @@
 
 #include "transfer.h"
 
+class QFile;
+
 class ClientTransfer : public Transfer
 {
     Q_OBJECT
@@ -35,14 +37,23 @@ public:
 
     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;
+
+    QFile *_file;
 };
 
 #endif