#include <dndfile.h>
|
typedef QSharedPointer< DNDFile > | Ptr |
|
|
| DNDFile (const QString &path, const TorrentFile *tf, Uint32 chunk_size) |
|
void | changePath (const QString &npath) |
| Change the path of the file.
|
|
void | checkIntegrity () |
|
Uint32 | readFirstChunk (Uint8 *buf, Uint32 off, Uint32 size) |
|
Uint32 | readLastChunk (Uint8 *buf, Uint32 off, Uint32 size) |
|
void | writeFirstChunk (const Uint8 *buf, Uint32 off, Uint32 size) |
|
void | writeLastChunk (const Uint8 *buf, Uint32 off, Uint32 size) |
|
- Author
- Joris Guisson joris.nosp@m..gui.nosp@m.sson@.nosp@m.gmai.nosp@m.l.com
Special file where we keep the first and last chunk of a file which is marked as do not download. THe first and last chunk of a file will most certainly be partial chunks.
Definition at line 55 of file dndfile.h.
◆ checkIntegrity()
void bt::DNDFile::checkIntegrity |
( |
| ) |
|
CHeck integrity of the file, create it if it doesn't exist.
◆ readFirstChunk()
Uint32 bt::DNDFile::readFirstChunk |
( |
Uint8 * |
buf, |
|
|
Uint32 |
off, |
|
|
Uint32 |
size |
|
) |
| |
Read the (partial)first chunk into a buffer.
- Parameters
-
buf | The buffer |
off | Offset off chunk |
size | How many bytes to read of the first chunk |
◆ readLastChunk()
Uint32 bt::DNDFile::readLastChunk |
( |
Uint8 * |
buf, |
|
|
Uint32 |
off, |
|
|
Uint32 |
size |
|
) |
| |
Read the (partial)last chunk into a buffer.
- Parameters
-
buf | The buffer |
off | Offset off chunk |
size | How many bytes to read of the last chunk |
◆ writeFirstChunk()
void bt::DNDFile::writeFirstChunk |
( |
const Uint8 * |
buf, |
|
|
Uint32 |
off, |
|
|
Uint32 |
size |
|
) |
| |
Write the partial first chunk.
- Parameters
-
buf | The buffer |
off | Offset into partial chunk |
size | Size to write |
◆ writeLastChunk()
void bt::DNDFile::writeLastChunk |
( |
const Uint8 * |
buf, |
|
|
Uint32 |
off, |
|
|
Uint32 |
size |
|
) |
| |
Write the partial last chunk.
- Parameters
-
buf | The buffer |
off | Offset into partial chunk |
size | Size to write |
The documentation for this class was generated from the following file: