20 #ifndef BTMULTIFILECACHE_H
21 #define BTMULTIFILECACHE_H
26 #include "cachefile.h"
42 MultiFileCache(
Torrent& tor,
const QString & tmpdir,
const QString & datadir,
bool custom_output_name);
68 void downloadStatusChanged(
TorrentFile*,
bool)
override;
69 void saveFirstAndLastChunk(
TorrentFile* tf,
const QString & src_file,
const QString & dst_file);
70 void recreateFile(
TorrentFile* tf,
const QString & dnd_file,
const QString & output_file);
71 PieceData::Ptr createPiece(
Chunk* c, Uint32 off, Uint32 length,
bool read_only);
72 void calculateOffsetAndLength(Uint32 piece_off, Uint32 piece_len, Uint64 file_off, Uint32 chunk_off, Uint32 chunk_len, Uint64 & off, Uint32 & len);
75 QString cache_dir, output_dir;
76 QMap<Uint32, CacheFile::Ptr> files;
77 QMap<Uint32, DNDFile::Ptr> dnd_files;
78 QString new_output_dir;