Ardour  9.0-pre0-582-g084a23a80d
PBD::Downloader Class Reference

#include <downloader.h>

Public Member Functions

 Downloader (std::string const &url, std::string const &destdir)
 
 ~Downloader ()
 
int start ()
 
void cleanup ()
 
void cancel ()
 
double progress () const
 
uint64_t download_size () const
 
uint64_t downloaded () const
 
size_t write (void *contents, size_t size, size_t nmemb)
 
int status () const
 
std::string download_path () const
 

Private Member Functions

void download ()
 

Private Attributes

std::string url
 
std::string destdir
 
std::string file_path
 
FILE * file
 
CURL * curl
 
bool _cancel
 
std::atomic< uint64_t > _download_size
 
std::atomic< uint64_t > _downloaded
 
std::atomic< int > _status
 
PBD::Threadthread
 

Detailed Description

Definition at line 32 of file downloader.h.

Constructor & Destructor Documentation

◆ Downloader()

PBD::Downloader::Downloader ( std::string const &  url,
std::string const &  destdir 
)

◆ ~Downloader()

PBD::Downloader::~Downloader ( )

Member Function Documentation

◆ cancel()

void PBD::Downloader::cancel ( )

◆ cleanup()

void PBD::Downloader::cleanup ( )

◆ download()

void PBD::Downloader::download ( )
private

◆ download_path()

std::string PBD::Downloader::download_path ( ) const

◆ download_size()

uint64_t PBD::Downloader::download_size ( ) const
inline

Definition at line 42 of file downloader.h.

◆ downloaded()

uint64_t PBD::Downloader::downloaded ( ) const
inline

Definition at line 43 of file downloader.h.

◆ progress()

double PBD::Downloader::progress ( ) const

◆ start()

int PBD::Downloader::start ( )

◆ status()

int PBD::Downloader::status ( ) const
inline

Definition at line 48 of file downloader.h.

◆ write()

size_t PBD::Downloader::write ( void *  contents,
size_t  size,
size_t  nmemb 
)

Member Data Documentation

◆ _cancel

bool PBD::Downloader::_cancel
private

Definition at line 57 of file downloader.h.

◆ _download_size

std::atomic<uint64_t> PBD::Downloader::_download_size
private

Definition at line 58 of file downloader.h.

◆ _downloaded

std::atomic<uint64_t> PBD::Downloader::_downloaded
private

Definition at line 59 of file downloader.h.

◆ _status

std::atomic<int> PBD::Downloader::_status
private

Definition at line 60 of file downloader.h.

◆ curl

CURL* PBD::Downloader::curl
private

Definition at line 56 of file downloader.h.

◆ destdir

std::string PBD::Downloader::destdir
private

Definition at line 53 of file downloader.h.

◆ file

FILE* PBD::Downloader::file
private

Definition at line 55 of file downloader.h.

◆ file_path

std::string PBD::Downloader::file_path
private

Definition at line 54 of file downloader.h.

◆ thread

PBD::Thread* PBD::Downloader::thread
private

Definition at line 61 of file downloader.h.

◆ url

std::string PBD::Downloader::url
private

Definition at line 52 of file downloader.h.


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