libktorrent  2.2.0
Public Member Functions | List of all members
bt::PreallocationThread Class Reference

#include <preallocationthread.h>

Inheritance diagram for bt::PreallocationThread:
Inheritance graph
[legend]

Public Member Functions

void add (CacheFile::Ptr cache_file)
 Add a CacheFile to preallocate.
 
Uint64 bytesWritten ()
 Get the number of bytes written.
 
bool errorHappened () const
 Did an error occur during the preallocation ?
 
const QString & errorMessage () const
 Get the error_msg.
 
bool isDone () const
 See if the thread was done.
 
bool isNotFinished () const
 See if the allocation hasn't completed yet.
 
bool isStopped () const
 See if the thread has been stopped.
 
void run () override
 
void setErrorMsg (const QString &msg)
 
void setNotFinished ()
 Allocation was aborted, so the next time the torrent is started it needs to be started again.
 
void stop ()
 
void written (Uint64 nb)
 nb Number of bytes have been written
 

Detailed Description

Author
Joris Guisson joris.nosp@m..gui.nosp@m.sson@.nosp@m.gmai.nosp@m.l.com

Thread to preallocate diskspace

Definition at line 59 of file preallocationthread.h.

Member Function Documentation

◆ setErrorMsg()

void bt::PreallocationThread::setErrorMsg ( const QString &  msg)

Set an error message, also calls stop

Parameters
msgThe message

◆ stop()

void bt::PreallocationThread::stop ( )

Stop the thread.


The documentation for this class was generated from the following file: