qBittorrent
Net::DownloadRequest Class Reference

#include <downloadmanager.h>

Public Member Functions

 DownloadRequest (const QString &url)
 
 DownloadRequest (const DownloadRequest &other)=default
 
QString url () const
 
DownloadRequesturl (const QString &value)
 
QString userAgent () const
 
DownloadRequestuserAgent (const QString &value)
 
qint64 limit () const
 
DownloadRequestlimit (qint64 value)
 
bool saveToFile () const
 
DownloadRequestsaveToFile (bool value)
 
QString destFileName () const
 
DownloadRequestdestFileName (const QString &value)
 

Private Attributes

QString m_url
 
QString m_userAgent
 
qint64 m_limit = 0
 
bool m_saveToFile = false
 
QString m_destFileName
 

Detailed Description

Definition at line 63 of file downloadmanager.h.

Constructor & Destructor Documentation

◆ DownloadRequest() [1/2]

Net::DownloadRequest::DownloadRequest ( const QString &  url)

Definition at line 302 of file downloadmanager.cpp.

303  : m_url {url}
304 {
305 }

◆ DownloadRequest() [2/2]

Net::DownloadRequest::DownloadRequest ( const DownloadRequest other)
default

Member Function Documentation

◆ destFileName() [1/2]

QString Net::DownloadRequest::destFileName ( ) const

Definition at line 351 of file downloadmanager.cpp.

352 {
353  return m_destFileName;
354 }

Referenced by DownloadHandlerImpl::processFinishedDownload().

Here is the caller graph for this function:

◆ destFileName() [2/2]

Net::DownloadRequest & Net::DownloadRequest::destFileName ( const QString &  value)

Definition at line 356 of file downloadmanager.cpp.

357 {
359  return *this;
360 }
T value(const QString &key, const T &defaultValue={})
Definition: preferences.cpp:64

References anonymous_namespace{preferences.cpp}::value().

Here is the call graph for this function:

◆ limit() [1/2]

qint64 Net::DownloadRequest::limit ( ) const

Definition at line 329 of file downloadmanager.cpp.

330 {
331  return m_limit;
332 }

Referenced by DownloadHandlerImpl::assignNetworkReply(), and DownloadHandlerImpl::checkDownloadSize().

Here is the caller graph for this function:

◆ limit() [2/2]

Net::DownloadRequest & Net::DownloadRequest::limit ( qint64  value)

Definition at line 334 of file downloadmanager.cpp.

335 {
336  m_limit = value;
337  return *this;
338 }

References anonymous_namespace{preferences.cpp}::value().

Here is the call graph for this function:

◆ saveToFile() [1/2]

bool Net::DownloadRequest::saveToFile ( ) const

Definition at line 340 of file downloadmanager.cpp.

341 {
342  return m_saveToFile;
343 }

Referenced by PluginSelectDialog::addNewPlugin(), and DownloadHandlerImpl::processFinishedDownload().

Here is the caller graph for this function:

◆ saveToFile() [2/2]

Net::DownloadRequest & Net::DownloadRequest::saveToFile ( bool  value)

Definition at line 345 of file downloadmanager.cpp.

346 {
348  return *this;
349 }

References anonymous_namespace{preferences.cpp}::value().

Here is the call graph for this function:

◆ url() [1/2]

QString Net::DownloadRequest::url ( ) const

Definition at line 307 of file downloadmanager.cpp.

308 {
309  return m_url;
310 }

Referenced by anonymous_namespace{downloadmanager.cpp}::createNetworkRequest(), Net::DownloadManager::download(), and DownloadHandlerImpl::url().

Here is the caller graph for this function:

◆ url() [2/2]

Net::DownloadRequest & Net::DownloadRequest::url ( const QString &  value)

Definition at line 312 of file downloadmanager.cpp.

313 {
314  m_url = value;
315  return *this;
316 }

References anonymous_namespace{preferences.cpp}::value().

Here is the call graph for this function:

◆ userAgent() [1/2]

QString Net::DownloadRequest::userAgent ( ) const

Definition at line 318 of file downloadmanager.cpp.

319 {
320  return m_userAgent;
321 }

Referenced by anonymous_namespace{downloadmanager.cpp}::createNetworkRequest().

Here is the caller graph for this function:

◆ userAgent() [2/2]

Net::DownloadRequest & Net::DownloadRequest::userAgent ( const QString &  value)

Definition at line 323 of file downloadmanager.cpp.

324 {
325  m_userAgent = value;
326  return *this;
327 }

References anonymous_namespace{preferences.cpp}::value().

Here is the call graph for this function:

Member Data Documentation

◆ m_destFileName

QString Net::DownloadRequest::m_destFileName
private

Definition at line 92 of file downloadmanager.h.

◆ m_limit

qint64 Net::DownloadRequest::m_limit = 0
private

Definition at line 90 of file downloadmanager.h.

◆ m_saveToFile

bool Net::DownloadRequest::m_saveToFile = false
private

Definition at line 91 of file downloadmanager.h.

◆ m_url

QString Net::DownloadRequest::m_url
private

Definition at line 88 of file downloadmanager.h.

◆ m_userAgent

QString Net::DownloadRequest::m_userAgent
private

Definition at line 89 of file downloadmanager.h.


The documentation for this class was generated from the following files: