Gin
|
Async Download. More...
Inherits juce::Thread, and juce::AsyncUpdater.
Public Member Functions | |
AsyncDownload (juce::String url_, std::function< void(AsyncDownload *, const juce::MemoryBlock &, bool)> cb_, int timeoutMS_=0) | |
AsyncDownload (juce::URL url_, std::function< void(AsyncDownload *, const juce::MemoryBlock &, bool)> cb_, int timeoutMS_=0) | |
~AsyncDownload () override | |
void | run () override |
bool | readEntireBinaryStream (juce::MemoryBlock &destData, bool usePostCommand=false) |
void | handleAsyncUpdate () override |
Public Attributes | |
juce::URL | url |
std::function< void(AsyncDownload *, juce::MemoryBlock, bool)> | cb |
int | timeoutMS = 0 |
bool | ok = false |
juce::MemoryBlock | data |
Async Download.
Doesn't have the main thread pause the URL::downloadToFile has
AsyncDownload::AsyncDownload | ( | juce::String | url_, |
std::function< void(AsyncDownload *, const juce::MemoryBlock &, bool)> | cb_, | ||
int | timeoutMS_ = 0 |
||
) |
AsyncDownload::AsyncDownload | ( | juce::URL | url_, |
std::function< void(AsyncDownload *, const juce::MemoryBlock &, bool)> | cb_, | ||
int | timeoutMS_ = 0 |
||
) |
|
override |
|
override |
References data, ok, and readEntireBinaryStream().
bool AsyncDownload::readEntireBinaryStream | ( | juce::MemoryBlock & | destData, |
bool | usePostCommand = false |
||
) |
juce::URL AsyncDownload::url |
Referenced by readEntireBinaryStream().
std::function<void (AsyncDownload*, juce::MemoryBlock, bool)> AsyncDownload::cb |
Referenced by handleAsyncUpdate().
int AsyncDownload::timeoutMS = 0 |
Referenced by readEntireBinaryStream().
bool AsyncDownload::ok = false |
Referenced by handleAsyncUpdate(), and run().
juce::MemoryBlock AsyncDownload::data |
Referenced by handleAsyncUpdate(), and run().