20 #ifndef BTPREALLOCATIONTHREAD_H
21 #define BTPREALLOCATIONTHREAD_H
27 #include <util/constants.h>
28 #include "cachefile.h"
29 #include "ktorrent_export.h"
48 void add(CacheFile::Ptr cache_file);
87 bool expand(
const QString & path, Uint64 max_size);
90 QList<CacheFile::Ptr> todo;
91 bool stopped, not_finished, done;
bool isStopped() const
See if the thread has been stopped.
void setNotFinished()
Allocation was aborted, so the next time the torrent is started it needs to be started again.
void setErrorMsg(const QString &msg)
const QString & errorMessage() const
Get the error_msg.
void add(CacheFile::Ptr cache_file)
Add a CacheFile to preallocate.
Uint64 bytesWritten()
Get the number of bytes written.
bool isDone() const
See if the thread was done.
bool errorHappened() const
Did an error occur during the preallocation ?
bool isNotFinished() const
See if the allocation hasn't completed yet.
void written(Uint64 nb)
nb Number of bytes have been written