26
26
#include <util/functions.h>
27
27
#include <diskio/chunkmanager.h>
32
TorrentFile::TorrentFile() : TorrentFileInterface(0,QString(),0),missing(false),filetype(UNKNOWN)
34
TorrentFile::TorrentFile(Torrent* tor) : TorrentFileInterface(0,QString(),0),tor(tor),missing(false),filetype(UNKNOWN)
37
TorrentFile::TorrentFile(Torrent* tor,Uint32 index,const QString & path,
36
38
Uint64 off,Uint64 size,Uint64 chunk_size)
37
: TorrentFileInterface(index,path,size),cache_offset(off),missing(false),filetype(UNKNOWN)
39
: TorrentFileInterface(index,path,size),tor(tor),cache_offset(off),missing(false),filetype(UNKNOWN)
39
41
first_chunk = off / chunk_size;
40
42
first_chunk_off = off % chunk_size;