Furrent
|
#include <furrent.hpp>
Public Types | |
enum | Error { Error::GenericError, Error::LoadingTorrentFailed } |
All possible Furrent errors. More... | |
template<typename R > | |
using | Result = util::Result< R, Error > |
Errors for the furrent class. More... | |
using | Empty = util::Empty |
Public Member Functions | |
Furrent () | |
virtual | ~Furrent () |
Result< Empty > | set_download_folder (const std::string &folder) |
Set the download folder. More... | |
Result< TorrentID > | add_torrent (const std::string &filename) |
Begin download of a torrent. More... | |
void | remove_torrent (TorrentID tid) |
Removes a torrent descriptor and all of his tasks. More... | |
TorrentGuiData | get_gui_data (TorrentID tid) const |
Extract torrents stats. More... | |
![]() | |
Singleton ()=default | |
Singleton (const Singleton &)=delete | |
Singleton (Singleton &&) noexcept=delete | |
Singleton & | operator= (const Singleton &)=delete |
Singleton & | operator= (Singleton &&) noexcept=delete |
Additional Inherited Members | |
![]() | |
static Furrent & | instance () |
Returns the instance of the singleton. More... | |
Main state of the program NB: All added torrent handle descriptor will never be removed from memory!
using fur::Furrent::Empty = util::Empty |
using fur::Furrent::Result = util::Result<R, Error> |
Errors for the furrent class.
|
strong |
All possible Furrent errors.
Enumerator | |
---|---|
GenericError | |
LoadingTorrentFailed |
fur::Furrent::Furrent | ( | ) |
This is the core of all workers
|
virtual |
auto fur::Furrent::add_torrent | ( | const std::string & | filename | ) |
Begin download of a torrent.
Begin download of a torrent
filename | filename of the .torrent file |
TorrentGuiData fur::Furrent::get_gui_data | ( | TorrentID | tid | ) | const |
Extract torrents stats.
void fur::Furrent::remove_torrent | ( | TorrentID | tid | ) |
Removes a torrent descriptor and all of his tasks.
Removes a torrent descriptor and all of his tasks
uid | uid of the torrent to remove |
auto fur::Furrent::set_download_folder | ( | const std::string & | folder | ) |
Set the download folder.