MythTV  master
Public Member Functions | Private Slots | Private Attributes | List of all members
MythSingleDownload Class Reference

#include <mythsingledownload.h>

Inheritance diagram for MythSingleDownload:
Inheritance graph
[legend]
Collaboration diagram for MythSingleDownload:
Collaboration graph
[legend]

Public Member Functions

 MythSingleDownload (void)=default
 
 ~MythSingleDownload (void)=default
 
bool DownloadURL (const QUrl &url, QByteArray *buffer, uint timeout=30000, uint redirs=0, qint64 maxsize=0)
 
void Cancel (void)
 
QString ErrorString (void) const
 
QNetworkReply::NetworkError ErrorCode (void) const
 

Private Slots

void Progress (qint64 bytesRead, qint64 totalBytes)
 

Private Attributes

QNetworkAccessManager m_mgr
 
QTimer m_timer
 
QNetworkReply * m_reply {nullptr}
 
QMutex m_lock
 
QMutex m_replylock
 
QString m_errorstring
 
QNetworkReply::NetworkError m_errorcode {QNetworkReply::NoError}
 
QByteArray * m_buffer {nullptr}
 
qint64 m_maxsize {0}
 

Detailed Description

Definition at line 23 of file mythsingledownload.h.

Constructor & Destructor Documentation

◆ MythSingleDownload()

MythSingleDownload::MythSingleDownload ( void  )
default

◆ ~MythSingleDownload()

MythSingleDownload::~MythSingleDownload ( void  )
default

Member Function Documentation

◆ DownloadURL()

bool MythSingleDownload::DownloadURL ( const QUrl &  url,
QByteArray *  buffer,
uint  timeout = 30000,
uint  redirs = 0,
qint64  maxsize = 0 
)

◆ Cancel()

void MythSingleDownload::Cancel ( void  )

◆ ErrorString()

QString MythSingleDownload::ErrorString ( void  ) const
inline

◆ ErrorCode()

QNetworkReply::NetworkError MythSingleDownload::ErrorCode ( void  ) const
inline

Definition at line 35 of file mythsingledownload.h.

◆ Progress

void MythSingleDownload::Progress ( qint64  bytesRead,
qint64  totalBytes 
)
privateslot

Definition at line 112 of file mythsingledownload.cpp.

Referenced by DownloadURL().

Member Data Documentation

◆ m_mgr

QNetworkAccessManager MythSingleDownload::m_mgr
private

Definition at line 41 of file mythsingledownload.h.

Referenced by DownloadURL().

◆ m_timer

QTimer MythSingleDownload::m_timer
private

Definition at line 42 of file mythsingledownload.h.

Referenced by DownloadURL().

◆ m_reply

QNetworkReply* MythSingleDownload::m_reply {nullptr}
private

Definition at line 43 of file mythsingledownload.h.

Referenced by Cancel(), DownloadURL(), and Progress().

◆ m_lock

QMutex MythSingleDownload::m_lock
private

Definition at line 44 of file mythsingledownload.h.

Referenced by DownloadURL().

◆ m_replylock

QMutex MythSingleDownload::m_replylock
private

Definition at line 45 of file mythsingledownload.h.

Referenced by Cancel(), DownloadURL(), and Progress().

◆ m_errorstring

QString MythSingleDownload::m_errorstring
private

Definition at line 47 of file mythsingledownload.h.

Referenced by DownloadURL().

◆ m_errorcode

QNetworkReply::NetworkError MythSingleDownload::m_errorcode {QNetworkReply::NoError}
private

Definition at line 48 of file mythsingledownload.h.

Referenced by DownloadURL().

◆ m_buffer

QByteArray* MythSingleDownload::m_buffer {nullptr}
private

Definition at line 49 of file mythsingledownload.h.

Referenced by DownloadURL(), and Progress().

◆ m_maxsize

qint64 MythSingleDownload::m_maxsize {0}
private

Definition at line 50 of file mythsingledownload.h.

Referenced by DownloadURL(), and Progress().


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