21 #ifndef BTTORRENTFILE_H
22 #define BTTORRENTFILE_H
25 #include <util/constants.h>
26 #include <interfaces/torrentfileinterface.h>
41 class KTORRENT_EXPORT TorrentFile :
public TorrentFileInterface
48 Priority old_priority;
55 TorrentFile(Torrent* tor = 0);
66 TorrentFile(Torrent* tor,Uint32 index,
const QString & path,Uint64 off,Uint64 size,Uint64 chunk_size);
72 TorrentFile(
const TorrentFile & tf);
73 ~TorrentFile()
override;
76 Uint64 getCacheOffset()
const {
return cache_offset;}
79 Uint64 getFirstChunkOffset()
const {
return first_chunk_off;}
82 Uint64 getLastChunkSize()
const {
return last_chunk_size;}
85 bool doNotDownload()
const override {
return (priority == EXCLUDED);}
88 void setDoNotDownload(
bool dnd)
override;
91 bool isMultimedia()
const override;
94 Priority getPriority()
const override {
return priority;}
97 void setPriority(Priority newpriority = NORMAL_PRIORITY)
override;
100 Priority getOldPriority()
const {
return old_priority;}
104 void emitDownloadStatusChanged()
override;
106 void setEmitDownloadStatusChanged(
bool show)
override { emit_status_changed = show; }
116 bool isMissing()
const {
return missing;}
119 void setMissing(
bool m) {missing = m;}
126 Uint64 fileOffset(Uint32 cindex,Uint64 chunk_size)
const;