qBittorrent
|
#include <downloadmanager.h>
Public Member Functions | |
DownloadHandler * | download (const DownloadRequest &downloadRequest) |
template<typename Context , typename Func > | |
void | download (const DownloadRequest &downloadRequest, Context context, Func &&slot) |
void | registerSequentialService (const ServiceID &serviceID) |
QList< QNetworkCookie > | cookiesForUrl (const QUrl &url) const |
bool | setCookiesFromUrl (const QList< QNetworkCookie > &cookieList, const QUrl &url) |
QList< QNetworkCookie > | allCookies () const |
void | setAllCookies (const QList< QNetworkCookie > &cookieList) |
bool | deleteCookie (const QNetworkCookie &cookie) |
Static Public Member Functions | |
static void | initInstance () |
static void | freeInstance () |
static DownloadManager * | instance () |
static bool | hasSupportedScheme (const QString &url) |
Private Slots | |
void | ignoreSslErrors (QNetworkReply *, const QList< QSslError > &) |
Private Member Functions | |
DownloadManager (QObject *parent=nullptr) | |
void | applyProxySettings () |
void | handleReplyFinished (const QNetworkReply *reply) |
Private Attributes | |
QNetworkAccessManager | m_networkManager |
QSet< ServiceID > | m_sequentialServices |
QSet< ServiceID > | m_busyServices |
QHash< ServiceID, QQueue< DownloadHandler * > > | m_waitingJobs |
Static Private Attributes | |
static DownloadManager * | m_instance = nullptr |
Definition at line 119 of file downloadmanager.h.
|
explicitprivate |
Definition at line 137 of file downloadmanager.cpp.
References applyProxySettings(), handleReplyFinished(), ignoreSslErrors(), Net::ProxyConfigurationManager::instance(), m_networkManager, and Net::ProxyConfigurationManager::proxyConfigurationChanged().
QList< QNetworkCookie > Net::DownloadManager::allCookies | ( | ) | const |
Definition at line 209 of file downloadmanager.cpp.
|
private |
Definition at line 233 of file downloadmanager.cpp.
References Net::ProxyConfigurationManager::instance(), Net::ProxyConfiguration::ip, Net::None, Net::ProxyConfiguration::password, Net::ProxyConfiguration::port, Net::SOCKS5, Net::SOCKS5_PW, Net::ProxyConfiguration::type, and Net::ProxyConfiguration::username.
Referenced by DownloadManager().
QList< QNetworkCookie > Net::DownloadManager::cookiesForUrl | ( | const QUrl & | url | ) | const |
Definition at line 199 of file downloadmanager.cpp.
bool Net::DownloadManager::deleteCookie | ( | const QNetworkCookie & | cookie | ) |
Definition at line 219 of file downloadmanager.cpp.
Net::DownloadHandler * Net::DownloadManager::download | ( | const DownloadRequest & | downloadRequest | ) |
Definition at line 165 of file downloadmanager.cpp.
References anonymous_namespace{downloadmanager.cpp}::createNetworkRequest(), Net::DownloadHandler::finished(), Net::ServiceID::fromURL(), and Net::DownloadRequest::url().
Referenced by BitTorrent::Session::addTorrent(), ProgramUpdater::checkForUpdates(), Net::DNSUpdater::checkPublicIP(), download(), Net::GeoIPManager::downloadDatabaseFile(), TrackerFiltersList::downloadFavicon(), RSS::Feed::downloadIcon(), DownloadHandlerImpl::handleRedirection(), TrackersAdditionDialog::on_uTorrentListButton_clicked(), RSS::Feed::refresh(), AddNewTorrentDialog::show(), and Net::DNSUpdater::updateDNSService().
void Net::DownloadManager::download | ( | const DownloadRequest & | downloadRequest, |
Context | context, | ||
Func && | slot | ||
) |
Definition at line 162 of file downloadmanager.h.
References download(), and Net::DownloadHandler::finished().
|
static |
Definition at line 154 of file downloadmanager.cpp.
Referenced by Application::cleanup().
|
private |
Definition at line 271 of file downloadmanager.cpp.
References anonymous_namespace{downloadmanager.cpp}::createNetworkRequest(), and Net::ServiceID::fromURL().
Referenced by DownloadManager().
|
static |
Definition at line 224 of file downloadmanager.cpp.
Referenced by BitTorrent::Session::addTorrent(), PluginSelectDialog::askForPluginUrl(), SearchPluginManager::installPlugin(), anonymous_namespace{mainwindow.cpp}::isTorrentLink(), RSSWidget::on_newFeedButton_clicked(), and AddNewTorrentDialog::show().
|
privateslot |
Definition at line 291 of file downloadmanager.cpp.
References LogMsg(), and Log::WARNING.
Referenced by DownloadManager().
|
static |
Definition at line 148 of file downloadmanager.cpp.
Referenced by Application::exec().
|
static |
Definition at line 160 of file downloadmanager.cpp.
Referenced by CookiesDialog::accept(), TorrentsController::addAction(), BitTorrent::Session::addTorrent(), ProgramUpdater::checkForUpdates(), Net::DNSUpdater::checkPublicIP(), Net::GeoIPManager::downloadDatabaseFile(), TrackerFiltersList::downloadFavicon(), RSS::Feed::downloadIcon(), RSS::Feed::Feed(), TrackersAdditionDialog::on_uTorrentListButton_clicked(), RSS::Feed::refresh(), AddNewTorrentDialog::show(), and Net::DNSUpdater::updateDNSService().
void Net::DownloadManager::registerSequentialService | ( | const ServiceID & | serviceID | ) |
Definition at line 194 of file downloadmanager.cpp.
Referenced by RSS::Feed::Feed().
void Net::DownloadManager::setAllCookies | ( | const QList< QNetworkCookie > & | cookieList | ) |
Definition at line 214 of file downloadmanager.cpp.
Referenced by CookiesDialog::accept().
bool Net::DownloadManager::setCookiesFromUrl | ( | const QList< QNetworkCookie > & | cookieList, |
const QUrl & | url | ||
) |
Definition at line 204 of file downloadmanager.cpp.
Referenced by TorrentsController::addAction().
|
private |
Definition at line 157 of file downloadmanager.h.
|
staticprivate |
Definition at line 153 of file downloadmanager.h.
|
private |
Definition at line 154 of file downloadmanager.h.
Referenced by DownloadManager().
|
private |
Definition at line 156 of file downloadmanager.h.
|
private |
Definition at line 158 of file downloadmanager.h.