qBittorrent
|
#include <torrentscontroller.h>
Public Member Functions | |
APIController (ISessionManager *sessionManager, QObject *parent=nullptr) | |
Public Member Functions inherited from APIController | |
APIController (ISessionManager *sessionManager, QObject *parent=nullptr) | |
QVariant | run (const QString &action, const StringMap ¶ms, const DataMap &data={}) |
ISessionManager * | sessionManager () const |
Additional Inherited Members | |
Protected Member Functions inherited from APIController | |
const StringMap & | params () const |
const DataMap & | data () const |
void | requireParams (const QVector< QString > &requiredParams) const |
void | setResult (const QString &result) |
void | setResult (const QJsonArray &result) |
void | setResult (const QJsonObject &result) |
Definition at line 33 of file torrentscontroller.h.
|
privateslot |
Definition at line 635 of file torrentscontroller.cpp.
References BitTorrent::AddTorrentParams::addPaused, BitTorrent::Session::addTorrent(), asConst(), BadData, BitTorrent::AddTorrentParams::category, BitTorrent::AddTorrentParams::contentLayout, APIController::data(), BitTorrent::AddTorrentParams::downloadLimit, BitTorrent::AddTorrentParams::downloadPath, BitTorrent::AddTorrentParams::firstLastPiecePriority, BitTorrent::Session::instance(), Net::DownloadManager::instance(), BitTorrent::TorrentInfo::load(), BitTorrent::AddTorrentParams::name, APIController::params(), Utils::String::parseBool(), Utils::String::parseDouble(), Utils::String::parseInt(), BitTorrent::AddTorrentParams::ratioLimit, BitTorrent::AddTorrentParams::savePath, BitTorrent::AddTorrentParams::seedingTimeLimit, BitTorrent::AddTorrentParams::sequential, Net::DownloadManager::setCookiesFromUrl(), APIController::setResult(), BitTorrent::AddTorrentParams::skipChecking, BitTorrent::AddTorrentParams::tags, Utils::String::toEnum(), BitTorrent::AddTorrentParams::uploadLimit, BitTorrent::Torrent::USE_GLOBAL_RATIO, BitTorrent::Torrent::USE_GLOBAL_SEEDING_TIME, BitTorrent::AddTorrentParams::useAutoTMM, BitTorrent::AddTorrentParams::useDownloadPath, and anonymous_namespace{preferences.cpp}::value().
|
privateslot |
Definition at line 815 of file torrentscontroller.cpp.
References anonymous_namespace{torrentscontroller.cpp}::applyToTorrents(), BadParams, BitTorrent::Torrent::id(), BitTorrent::PeerAddress::ip, APIController::params(), BitTorrent::PeerAddress::parse(), APIController::requireParams(), APIController::setResult(), and Digest32< N >::toString().
|
privateslot |
Definition at line 1290 of file torrentscontroller.cpp.
References BitTorrent::Torrent::addTag(), anonymous_namespace{torrentscontroller.cpp}::applyToTorrents(), APIController::params(), and APIController::requireParams().
|
privateslot |
Definition at line 726 of file torrentscontroller.cpp.
References BitTorrent::Torrent::addTrackers(), asConst(), BitTorrent::Session::findTorrent(), BitTorrent::TorrentID::fromString(), BitTorrent::Session::instance(), NotFound, APIController::params(), and APIController::requireParams().
|
explicit |
Definition at line 53 of file apicontroller.cpp.
|
privateslot |
Definition at line 1068 of file torrentscontroller.cpp.
References BitTorrent::Session::bottomTorrentsQueuePos(), Conflict, BitTorrent::Session::instance(), APIController::params(), APIController::requireParams(), and anonymous_namespace{torrentscontroller.cpp}::toTorrentIDs().
|
privateslot |
Definition at line 1273 of file torrentscontroller.cpp.
References BitTorrent::Session::instance(), APIController::setResult(), and BitTorrent::CategoryOptions::toJSON().
|
privateslot |
Definition at line 1217 of file torrentscontroller.cpp.
References BadParams, Conflict, BitTorrent::CategoryOptions::downloadPath, BitTorrent::Session::instance(), BitTorrent::Session::isValidCategoryName(), APIController::params(), Utils::String::parseBool(), APIController::requireParams(), and BitTorrent::CategoryOptions::savePath.
|
privateslot |
Definition at line 1332 of file torrentscontroller.cpp.
References BitTorrent::Session::addTag(), BitTorrent::Session::instance(), APIController::params(), and APIController::requireParams().
|
privateslot |
Definition at line 1046 of file torrentscontroller.cpp.
References Conflict, BitTorrent::Session::decreaseTorrentsQueuePos(), BitTorrent::Session::instance(), APIController::params(), APIController::requireParams(), and anonymous_namespace{torrentscontroller.cpp}::toTorrentIDs().
|
privateslot |
Definition at line 1022 of file torrentscontroller.cpp.
References anonymous_namespace{torrentscontroller.cpp}::applyToTorrents(), DeleteTorrent, BitTorrent::Session::deleteTorrent(), DeleteTorrentAndFiles, BitTorrent::Torrent::id(), BitTorrent::Session::instance(), APIController::params(), Utils::String::parseBool(), and APIController::requireParams().
|
privateslot |
Definition at line 1342 of file torrentscontroller.cpp.
References BitTorrent::Session::instance(), APIController::params(), BitTorrent::Session::removeTag(), and APIController::requireParams().
|
privateslot |
Definition at line 928 of file torrentscontroller.cpp.
References BitTorrent::Torrent::downloadLimit(), BitTorrent::Session::findTorrent(), BitTorrent::TorrentID::fromString(), BitTorrent::Session::instance(), APIController::params(), APIController::requireParams(), and APIController::setResult().
|
privateslot |
Definition at line 1242 of file torrentscontroller.cpp.
References BadParams, Conflict, BitTorrent::CategoryOptions::downloadPath, BitTorrent::Session::instance(), APIController::params(), Utils::String::parseBool(), APIController::requireParams(), and BitTorrent::CategoryOptions::savePath.
|
privateslot |
Definition at line 745 of file torrentscontroller.cpp.
References BadParams, Conflict, BitTorrent::Session::findTorrent(), BitTorrent::Torrent::forceReannounce(), BitTorrent::TorrentID::fromString(), BitTorrent::Session::instance(), BitTorrent::Torrent::isPaused(), NotFound, APIController::params(), BitTorrent::Torrent::replaceTrackers(), APIController::requireParams(), and BitTorrent::Torrent::trackers().
|
privateslot |
Definition at line 869 of file torrentscontroller.cpp.
References BadParams, Conflict, BitTorrent::Torrent::filePriorities(), BitTorrent::AbstractFileStorage::filesCount(), BitTorrent::Session::findTorrent(), BitTorrent::TorrentID::fromString(), BitTorrent::Torrent::hasMetadata(), BitTorrent::Session::instance(), BitTorrent::isValidDownloadPriority(), NotFound, APIController::params(), BitTorrent::Torrent::prioritizeFiles(), and APIController::requireParams().
|
privateslot |
Definition at line 517 of file torrentscontroller.cpp.
References asConst(), BitTorrent::Torrent::availableFileFractions(), BitTorrent::AbstractFileStorage::filePath(), BitTorrent::TorrentInfo::filePieces(), BitTorrent::Torrent::filePriorities(), BitTorrent::AbstractFileStorage::filesCount(), BitTorrent::AbstractFileStorage::fileSize(), BitTorrent::Torrent::filesProgress(), BitTorrent::Session::findTorrent(), IndexRange< Index, IndexDiff >::first(), BitTorrent::TorrentID::fromString(), BitTorrent::Torrent::hasMetadata(), BitTorrent::Torrent::info(), BitTorrent::Session::instance(), BitTorrent::Torrent::isSeed(), KEY_FILE_AVAILABILITY, KEY_FILE_INDEX, KEY_FILE_IS_SEED, KEY_FILE_NAME, KEY_FILE_PIECE_RANGE, KEY_FILE_PRIORITY, KEY_FILE_PROGRESS, KEY_FILE_SIZE, IndexRange< Index, IndexDiff >::last(), NotFound, APIController::params(), APIController::requireParams(), APIController::setResult(), and Utils::Fs::toUniformPath().
|
privateslot |
Definition at line 1035 of file torrentscontroller.cpp.
References Conflict, BitTorrent::Session::increaseTorrentsQueuePos(), BitTorrent::Session::instance(), APIController::params(), APIController::requireParams(), and anonymous_namespace{torrentscontroller.cpp}::toTorrentIDs().
|
privateslot |
Definition at line 256 of file torrentscontroller.cpp.
References TorrentFilter::AnyID, asConst(), BadParams, BitTorrent::TorrentID::fromString(), BitTorrent::Session::instance(), TorrentFilter::match(), APIController::params(), Utils::String::parseBool(), serialize(), and APIController::setResult().
|
privateslot |
Definition at line 853 of file torrentscontroller.cpp.
References anonymous_namespace{torrentscontroller.cpp}::applyToTorrents(), APIController::params(), BitTorrent::Torrent::pause(), and APIController::requireParams().
|
privateslot |
Definition at line 586 of file torrentscontroller.cpp.
References BitTorrent::Session::findTorrent(), BitTorrent::TorrentID::fromString(), BitTorrent::Torrent::hasMetadata(), BitTorrent::Torrent::info(), BitTorrent::Session::instance(), NotFound, APIController::params(), BitTorrent::TorrentInfo::pieceHashes(), APIController::requireParams(), and APIController::setResult().
|
privateslot |
Definition at line 611 of file torrentscontroller.cpp.
References BitTorrent::Torrent::downloadingPieces(), BitTorrent::Session::findTorrent(), BitTorrent::TorrentID::fromString(), BitTorrent::Session::instance(), NotFound, APIController::params(), BitTorrent::Torrent::pieces(), APIController::requireParams(), and APIController::setResult().
|
privateslot |
Definition at line 378 of file torrentscontroller.cpp.
References BitTorrent::Torrent::activeTime(), BitTorrent::Torrent::addedTime(), BitTorrent::Torrent::comment(), BitTorrent::Torrent::completedTime(), BitTorrent::Torrent::connectionsCount(), BitTorrent::Torrent::connectionsLimit(), BitTorrent::Torrent::creationDate(), BitTorrent::Torrent::creator(), BitTorrent::Torrent::downloadLimit(), BitTorrent::Torrent::downloadPath(), BitTorrent::Torrent::downloadPayloadRate(), BitTorrent::Torrent::eta(), BitTorrent::Session::findTorrent(), BitTorrent::Torrent::finishedTime(), BitTorrent::TorrentID::fromString(), BitTorrent::Torrent::hasMetadata(), BitTorrent::Torrent::infoHash(), BitTorrent::Session::instance(), KEY_PROP_ADDITION_DATE, KEY_PROP_COMMENT, KEY_PROP_COMPLETION_DATE, KEY_PROP_CONNECT_COUNT, KEY_PROP_CONNECT_COUNT_LIMIT, KEY_PROP_CREATED_BY, KEY_PROP_CREATION_DATE, KEY_PROP_DL_LIMIT, KEY_PROP_DL_SPEED, KEY_PROP_DL_SPEED_AVG, KEY_PROP_DOWNLOAD_PATH, KEY_PROP_DOWNLOADED, KEY_PROP_DOWNLOADED_SESSION, KEY_PROP_ETA, KEY_PROP_LAST_SEEN, KEY_PROP_PEERS, KEY_PROP_PEERS_TOTAL, KEY_PROP_PIECE_SIZE, KEY_PROP_PIECES_HAVE, KEY_PROP_PIECES_NUM, KEY_PROP_RATIO, KEY_PROP_REANNOUNCE, KEY_PROP_SAVE_PATH, KEY_PROP_SEEDING_TIME, KEY_PROP_SEEDS, KEY_PROP_SEEDS_TOTAL, KEY_PROP_TIME_ELAPSED, KEY_PROP_TOTAL_SIZE, KEY_PROP_UP_LIMIT, KEY_PROP_UP_SPEED, KEY_PROP_UP_SPEED_AVG, KEY_PROP_UPLOADED, KEY_PROP_UPLOADED_SESSION, KEY_PROP_WASTED, KEY_TORRENT_INFOHASHV1, KEY_TORRENT_INFOHASHV2, BitTorrent::Torrent::lastSeenComplete(), BitTorrent::Torrent::leechsCount(), BitTorrent::Torrent::MAX_RATIO, BitTorrent::Torrent::nextAnnounce(), NotFound, APIController::params(), BitTorrent::Torrent::pieceLength(), BitTorrent::Torrent::piecesCount(), BitTorrent::Torrent::piecesHave(), BitTorrent::Torrent::realRatio(), APIController::requireParams(), BitTorrent::Torrent::savePath(), BitTorrent::Torrent::seedsCount(), APIController::setResult(), Utils::Fs::toNativePath(), Digest32< N >::toString(), BitTorrent::Torrent::totalDownload(), BitTorrent::Torrent::totalLeechersCount(), BitTorrent::Torrent::totalPayloadDownload(), BitTorrent::Torrent::totalPayloadUpload(), BitTorrent::Torrent::totalSeedsCount(), BitTorrent::Torrent::totalSize(), BitTorrent::Torrent::totalUpload(), BitTorrent::Torrent::uploadLimit(), BitTorrent::Torrent::uploadPayloadRate(), BitTorrent::InfoHash::v1(), BitTorrent::InfoHash::v2(), and BitTorrent::Torrent::wastedSize().
|
privateslot |
Definition at line 1195 of file torrentscontroller.cpp.
References anonymous_namespace{torrentscontroller.cpp}::applyToTorrents(), BitTorrent::Torrent::forceReannounce(), APIController::params(), and APIController::requireParams().
|
privateslot |
Definition at line 1187 of file torrentscontroller.cpp.
References anonymous_namespace{torrentscontroller.cpp}::applyToTorrents(), BitTorrent::Torrent::forceRecheck(), APIController::params(), and APIController::requireParams().
|
privateslot |
Definition at line 1264 of file torrentscontroller.cpp.
References BitTorrent::Session::instance(), APIController::params(), BitTorrent::Session::removeCategory(), and APIController::requireParams().
|
privateslot |
Definition at line 1307 of file torrentscontroller.cpp.
References anonymous_namespace{torrentscontroller.cpp}::applyToTorrents(), APIController::params(), BitTorrent::Torrent::removeAllTags(), BitTorrent::Torrent::removeTag(), and APIController::requireParams().
|
privateslot |
Definition at line 786 of file torrentscontroller.cpp.
References Conflict, BitTorrent::Session::findTorrent(), BitTorrent::Torrent::forceReannounce(), BitTorrent::TorrentID::fromString(), BitTorrent::Session::instance(), BitTorrent::Torrent::isPaused(), NotFound, APIController::params(), BitTorrent::Torrent::replaceTrackers(), APIController::requireParams(), and BitTorrent::Torrent::trackers().
|
privateslot |
Definition at line 1156 of file torrentscontroller.cpp.
References Conflict, BitTorrent::Session::findTorrent(), BitTorrent::TorrentID::fromString(), BitTorrent::Session::instance(), NotFound, APIController::params(), APIController::requireParams(), and BitTorrent::Torrent::setName().
|
privateslot |
Definition at line 1359 of file torrentscontroller.cpp.
References Conflict, BitTorrent::Session::findTorrent(), BitTorrent::TorrentID::fromString(), BitTorrent::Session::instance(), Exception::message(), NotFound, APIController::params(), BitTorrent::AbstractFileStorage::renameFile(), and APIController::requireParams().
|
privateslot |
Definition at line 1381 of file torrentscontroller.cpp.
References Conflict, BitTorrent::Session::findTorrent(), BitTorrent::TorrentID::fromString(), BitTorrent::Session::instance(), Exception::message(), NotFound, APIController::params(), BitTorrent::AbstractFileStorage::renameFolder(), and APIController::requireParams().
|
privateslot |
Definition at line 861 of file torrentscontroller.cpp.
References anonymous_namespace{torrentscontroller.cpp}::applyToTorrents(), APIController::params(), APIController::requireParams(), and BitTorrent::Torrent::resume().
|
privateslot |
Definition at line 1174 of file torrentscontroller.cpp.
References anonymous_namespace{torrentscontroller.cpp}::applyToTorrents(), APIController::params(), Utils::String::parseBool(), APIController::requireParams(), and BitTorrent::Torrent::setAutoTMMEnabled().
|
privateslot |
Definition at line 1203 of file torrentscontroller.cpp.
References anonymous_namespace{torrentscontroller.cpp}::applyToTorrents(), Conflict, APIController::params(), APIController::requireParams(), and BitTorrent::Torrent::setCategory().
|
privateslot |
Definition at line 958 of file torrentscontroller.cpp.
References anonymous_namespace{torrentscontroller.cpp}::applyToTorrents(), APIController::params(), APIController::requireParams(), and BitTorrent::Torrent::setDownloadLimit().
|
privateslot |
Definition at line 1131 of file torrentscontroller.cpp.
References AccessDenied, anonymous_namespace{torrentscontroller.cpp}::applyToTorrents(), Conflict, BitTorrent::Torrent::isAutoTMMEnabled(), APIController::params(), APIController::requireParams(), and BitTorrent::Torrent::setDownloadPath().
|
privateslot |
Definition at line 1010 of file torrentscontroller.cpp.
References anonymous_namespace{torrentscontroller.cpp}::applyToTorrents(), APIController::params(), Utils::String::parseBool(), APIController::requireParams(), BitTorrent::Torrent::resume(), and anonymous_namespace{preferences.cpp}::value().
|
privateslot |
Definition at line 1079 of file torrentscontroller.cpp.
References AccessDenied, anonymous_namespace{torrentscontroller.cpp}::applyToTorrents(), BadParams, Conflict, Utils::Fs::expandPathAbs(), LogMsg(), BitTorrent::Torrent::name(), APIController::params(), APIController::requireParams(), BitTorrent::Torrent::savePath(), BitTorrent::Torrent::setAutoTMMEnabled(), BitTorrent::Torrent::setSavePath(), and Utils::Fs::toNativePath().
|
privateslot |
Definition at line 1106 of file torrentscontroller.cpp.
References AccessDenied, anonymous_namespace{torrentscontroller.cpp}::applyToTorrents(), BadParams, Conflict, BitTorrent::Torrent::isAutoTMMEnabled(), APIController::params(), APIController::requireParams(), and BitTorrent::Torrent::setSavePath().
|
privateslot |
Definition at line 970 of file torrentscontroller.cpp.
References anonymous_namespace{torrentscontroller.cpp}::applyToTorrents(), APIController::params(), APIController::requireParams(), BitTorrent::Torrent::setRatioLimit(), and BitTorrent::Torrent::setSeedingTimeLimit().
|
privateslot |
Definition at line 1001 of file torrentscontroller.cpp.
References anonymous_namespace{torrentscontroller.cpp}::applyToTorrents(), APIController::params(), Utils::String::parseBool(), APIController::requireParams(), BitTorrent::Torrent::setSuperSeeding(), and anonymous_namespace{preferences.cpp}::value().
|
privateslot |
Definition at line 946 of file torrentscontroller.cpp.
References anonymous_namespace{torrentscontroller.cpp}::applyToTorrents(), APIController::params(), APIController::requireParams(), and BitTorrent::Torrent::setUploadLimit().
|
privateslot |
Definition at line 1351 of file torrentscontroller.cpp.
References asConst(), BitTorrent::Session::instance(), and APIController::setResult().
|
privateslot |
Definition at line 993 of file torrentscontroller.cpp.
References anonymous_namespace{torrentscontroller.cpp}::applyToTorrents(), APIController::params(), APIController::requireParams(), and BitTorrent::Torrent::toggleFirstLastPiecePriority().
|
privateslot |
Definition at line 985 of file torrentscontroller.cpp.
References anonymous_namespace{torrentscontroller.cpp}::applyToTorrents(), APIController::params(), APIController::requireParams(), and BitTorrent::Torrent::toggleSequentialDownload().
|
privateslot |
Definition at line 1057 of file torrentscontroller.cpp.
References Conflict, BitTorrent::Session::instance(), APIController::params(), APIController::requireParams(), BitTorrent::Session::topTorrentsQueuePos(), and anonymous_namespace{torrentscontroller.cpp}::toTorrentIDs().
|
privateslot |
Definition at line 452 of file torrentscontroller.cpp.
References asConst(), BitTorrent::Session::findTorrent(), BitTorrent::TorrentID::fromString(), anonymous_namespace{torrentscontroller.cpp}::getStickyTrackers(), BitTorrent::Session::instance(), KEY_TRACKER_DOWNLOADED_COUNT, KEY_TRACKER_LEECHES_COUNT, KEY_TRACKER_MSG, KEY_TRACKER_PEERS_COUNT, KEY_TRACKER_SEEDS_COUNT, KEY_TRACKER_STATUS, KEY_TRACKER_TIER, KEY_TRACKER_URL, NotFound, APIController::params(), APIController::requireParams(), APIController::setResult(), and BitTorrent::Torrent::trackers().
|
privateslot |
Definition at line 910 of file torrentscontroller.cpp.
References BitTorrent::Session::findTorrent(), BitTorrent::TorrentID::fromString(), BitTorrent::Session::instance(), APIController::params(), APIController::requireParams(), APIController::setResult(), and BitTorrent::Torrent::uploadLimit().
|
privateslot |
Definition at line 485 of file torrentscontroller.cpp.
References asConst(), BitTorrent::Session::findTorrent(), BitTorrent::TorrentID::fromString(), BitTorrent::Session::instance(), KEY_WEBSEED_URL, NotFound, APIController::params(), APIController::requireParams(), APIController::setResult(), and BitTorrent::Torrent::urlSeeds().