Class to generate torrent files.
More...
#include <torrentcreator.h>
|
| TorrentCreator (const QString &target, const QStringList &trackers, const QList< QUrl > &webseeds, Uint32 chunk_size, const QString &name, const QString &comments, bool priv, bool decentralized) |
|
Uint32 | getCurrentChunk () const |
|
Uint32 | getNumChunks () const |
| Get the number of chunks.
|
|
TorrentControl * | makeTC (const QString &data_dir) |
|
void | saveTorrent (const QString &url) |
|
void | stop () |
| Stop the thread.
|
|
- Author
- Joris Guisson This class generates torrent files. It also allows to create a TorrentControl object, so that we immediately can start to share the torrent.
Definition at line 60 of file torrentcreator.h.
◆ TorrentCreator()
bt::TorrentCreator::TorrentCreator |
( |
const QString & |
target, |
|
|
const QStringList & |
trackers, |
|
|
const QList< QUrl > & |
webseeds, |
|
|
Uint32 |
chunk_size, |
|
|
const QString & |
name, |
|
|
const QString & |
comments, |
|
|
bool |
priv, |
|
|
bool |
decentralized |
|
) |
| |
Constructor.
- Parameters
-
target | The file or directory to make a torrent of |
trackers | A list of tracker urls |
webseeds | A list of webseed urls |
chunk_size | The size of each chunk |
name | The name suggestion |
comments | The comments field of the torrent |
priv | Private torrent or not |
◆ makeTC()
TorrentControl* bt::TorrentCreator::makeTC |
( |
const QString & |
data_dir | ) |
|
Make a TorrentControl object for this torrent. This will also create the files : data_dir/index data_dir/torrent data_dir/cache (symlink to target)
- Parameters
-
data_dir | The data directory |
- Exceptions
-
Error | if something goes wrong |
- Returns
- The newly created object
◆ saveTorrent()
void bt::TorrentCreator::saveTorrent |
( |
const QString & |
url | ) |
|
Save the torrent file.
- Parameters
-
- Exceptions
-
Error | if something goes wrong |
The documentation for this class was generated from the following file: