21 #ifndef BTTORRENTFILE_H
22 #define BTTORRENTFILE_H
25 #include <util/constants.h>
26 #include <interfaces/torrentfileinterface.h>
48 Priority old_priority;
66 TorrentFile(
Torrent* tor,Uint32 index,
const QString & path,Uint64 off,Uint64 size,Uint64 chunk_size);
97 void setPriority(Priority newpriority = NORMAL_PRIORITY)
override;
void setPriority(Priority newpriority=NORMAL_PRIORITY) override
Sets the priority of the file.
TorrentFile(const TorrentFile &tf)
Uint64 getLastChunkSize() const
Get how many bytes the files takes up of the last chunk.
Interface for a file in a multifile torrent.
bool isMultimedia() const override
Checks if this file is multimedial.
void setEmitDownloadStatusChanged(bool show) override
Wheather to emit signal when dl status changes or not.
bool doNotDownload() const override
Check if this file doesn't have to be downloaded.
Uint64 fileOffset(Uint32 cindex, Uint64 chunk_size) const
Priority getOldPriority() const
Get the previous priority value.
TorrentFile(Torrent *tor=0)
void updateNumDownloadedChunks(ChunkManager &cman)
Priority getPriority() const override
Gets the priority of the file.
Uint64 getCacheOffset() const
Get the offset into the torrent.
TorrentFile(Torrent *tor, Uint32 index, const QString &path, Uint64 off, Uint64 size, Uint64 chunk_size)
void emitDownloadStatusChanged() override
emits signal.
Uint64 getFirstChunkOffset() const
Get the offset at which the file starts in the first chunk.
bool isMissing() const
See if the file is missing.
void setMissing(bool m)
Set the file to be missing or not.
void setDoNotDownload(bool dnd) override
Set whether we have to not download this file.