20 #ifndef BTPREALLOCATIONTHREAD_H
21 #define BTPREALLOCATIONTHREAD_H
27 #include <util/constants.h>
28 #include "cachefile.h"
29 #include "ktorrent_export.h"
41 class KTORRENT_EXPORT PreallocationThread :
public QThread
44 PreallocationThread();
45 ~PreallocationThread()
override;
48 void add(CacheFile::Ptr cache_file);
61 void setErrorMsg(
const QString & msg);
64 bool isStopped()
const;
67 bool errorHappened()
const;
70 const QString & errorMessage()
const {
return error_msg;}
73 void written(Uint64 nb);
76 Uint64 bytesWritten();
79 void setNotFinished();
82 bool isNotFinished()
const;
87 bool expand(
const QString & path, Uint64 max_size);
90 QList<CacheFile::Ptr> todo;
91 bool stopped, not_finished, done;