ardour
Public Member Functions | Public Attributes | Private Member Functions | Static Private Member Functions | Private Attributes | List of all members
Mootcher Class Reference

#include <sfdb_freesound_mootcher.h>

Inheritance diagram for Mootcher:
PBD::ScopedConnectionList

Public Member Functions

 Mootcher ()
 
 ~Mootcher ()
 
bool checkAudioFile (std::string originalFileName, std::string ID)
 
bool fetchAudioFile (std::string originalFileName, std::string ID, std::string audioURL, SoundFileBrowser *caller)
 
std::string searchText (std::string query, int page, std::string filter, enum sortMethod sort)
 
std::string searchSimilar (std::string id)
 
void * threadFunc ()
 
- Public Member Functions inherited from PBD::ScopedConnectionList
 ScopedConnectionList ()
 
virtual ~ScopedConnectionList ()
 
void add_connection (const UnscopedConnection &c)
 
void drop_connections ()
 

Public Attributes

SoundFileBrowsersfb
 
std::string audioFileName
 
std::string ID
 
PBD::Signal2< void, double,
double > 
Progress
 
PBD::Signal0< void > Finished
 

Private Member Functions

void ensureWorkingDir ()
 
std::string doRequest (std::string uri, std::string params)
 
void setcUrlOptions ()
 
std::string sortMethodString (enum sortMethod sort)
 
std::string getSoundResourceFile (std::string ID)
 
void updateProgress (double dlnow, double dltotal)
 
void doneWithMootcher ()
 
void cancelDownload ()
 

Static Private Member Functions

static size_t WriteMemoryCallback (void *ptr, size_t size, size_t nmemb, void *data)
 
static int progress_callback (void *clientp, double dltotal, double dlnow, double ultotal, double ulnow)
 

Private Attributes

CURL * curl
 
char errorBuffer [CURL_ERROR_SIZE]
 
FILE * theFile
 
Gtk::HBox progress_hbox
 
Gtk::ProgressBar progress_bar
 
Gtk::Button cancel_download_btn
 
bool cancel_download
 
std::string basePath
 
std::string xmlLocation
 

Detailed Description

Definition at line 68 of file sfdb_freesound_mootcher.h.

Constructor & Destructor Documentation

Mootcher::Mootcher ( )

Definition at line 66 of file sfdb_freesound_mootcher.cc.

Mootcher::~Mootcher ( )

Definition at line 77 of file sfdb_freesound_mootcher.cc.

Member Function Documentation

void Mootcher::cancelDownload ( )
inlineprivate

Definition at line 116 of file sfdb_freesound_mootcher.h.

bool Mootcher::checkAudioFile ( std::string  originalFileName,
std::string  ID 
)

Definition at line 362 of file sfdb_freesound_mootcher.cc.

void Mootcher::doneWithMootcher ( )
private

Definition at line 337 of file sfdb_freesound_mootcher.cc.

std::string Mootcher::doRequest ( std::string  uri,
std::string  params 
)
private

Definition at line 161 of file sfdb_freesound_mootcher.cc.

void Mootcher::ensureWorkingDir ( )
private

Definition at line 84 of file sfdb_freesound_mootcher.cc.

bool Mootcher::fetchAudioFile ( std::string  originalFileName,
std::string  ID,
std::string  audioURL,
SoundFileBrowser caller 
)

Definition at line 385 of file sfdb_freesound_mootcher.cc.

std::string Mootcher::getSoundResourceFile ( std::string  ID)
private

Definition at line 249 of file sfdb_freesound_mootcher.cc.

int Mootcher::progress_callback ( void *  clientp,
double  dltotal,
double  dlnow,
double  ultotal,
double  ulnow 
)
staticprivate

Definition at line 449 of file sfdb_freesound_mootcher.cc.

std::string Mootcher::searchSimilar ( std::string  id)

Definition at line 206 of file sfdb_freesound_mootcher.cc.

std::string Mootcher::searchText ( std::string  query,
int  page,
std::string  filter,
enum sortMethod  sort 
)

Definition at line 218 of file sfdb_freesound_mootcher.cc.

void Mootcher::setcUrlOptions ( )
private

Definition at line 143 of file sfdb_freesound_mootcher.cc.

std::string Mootcher::sortMethodString ( enum sortMethod  sort)
private

Definition at line 124 of file sfdb_freesound_mootcher.cc.

void * Mootcher::threadFunc ( )

Definition at line 314 of file sfdb_freesound_mootcher.cc.

void Mootcher::updateProgress ( double  dlnow,
double  dltotal 
)
private

Definition at line 434 of file sfdb_freesound_mootcher.cc.

size_t Mootcher::WriteMemoryCallback ( void *  ptr,
size_t  size,
size_t  nmemb,
void *  data 
)
staticprivate

Definition at line 106 of file sfdb_freesound_mootcher.cc.

Member Data Documentation

std::string Mootcher::audioFileName

Definition at line 80 of file sfdb_freesound_mootcher.h.

std::string Mootcher::basePath
private

Definition at line 121 of file sfdb_freesound_mootcher.h.

bool Mootcher::cancel_download
private

Definition at line 115 of file sfdb_freesound_mootcher.h.

Gtk::Button Mootcher::cancel_download_btn
private

Definition at line 113 of file sfdb_freesound_mootcher.h.

CURL* Mootcher::curl
private

Definition at line 103 of file sfdb_freesound_mootcher.h.

char Mootcher::errorBuffer[CURL_ERROR_SIZE]
private

Definition at line 104 of file sfdb_freesound_mootcher.h.

PBD::Signal0<void> Mootcher::Finished

signal emitted when the mootcher has finished downloading.

Definition at line 88 of file sfdb_freesound_mootcher.h.

std::string Mootcher::ID

Definition at line 81 of file sfdb_freesound_mootcher.h.

PBD::Signal2<void, double, double> Mootcher::Progress

signal emitted when mootcher reports progress updates during download. The parameters are current and total numbers of bytes downloaded.

Definition at line 86 of file sfdb_freesound_mootcher.h.

Gtk::ProgressBar Mootcher::progress_bar
private

Definition at line 112 of file sfdb_freesound_mootcher.h.

Gtk::HBox Mootcher::progress_hbox
private

Definition at line 111 of file sfdb_freesound_mootcher.h.

SoundFileBrowser* Mootcher::sfb

Definition at line 79 of file sfdb_freesound_mootcher.h.

FILE* Mootcher::theFile
private

Definition at line 106 of file sfdb_freesound_mootcher.h.

std::string Mootcher::xmlLocation
private

Definition at line 122 of file sfdb_freesound_mootcher.h.


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