|
Gin
|
Async Download. More...
#include <gin_util.h>
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 ) |
References AsyncDownload(), cb, timeoutMS, and url.
Referenced by AsyncDownload(), and AsyncDownload().
| AsyncDownload::AsyncDownload | ( | juce::URL | url_, |
| std::function< void(AsyncDownload *, const juce::MemoryBlock &, bool)> | cb_, | ||
| int | timeoutMS_ = 0 ) |
References AsyncDownload(), cb, timeoutMS, and url.
|
override |
|
override |
References data, ok, and readEntireBinaryStream().
| bool AsyncDownload::readEntireBinaryStream | ( | juce::MemoryBlock & | destData, |
| bool | usePostCommand = false ) |
| juce::URL AsyncDownload::url |
Referenced by AsyncDownload(), AsyncDownload(), and readEntireBinaryStream().
| std::function<void (AsyncDownload*, juce::MemoryBlock, bool)> AsyncDownload::cb |
Referenced by AsyncDownload(), AsyncDownload(), and handleAsyncUpdate().
| int AsyncDownload::timeoutMS = 0 |
Referenced by AsyncDownload(), AsyncDownload(), and readEntireBinaryStream().
| bool AsyncDownload::ok = false |
Referenced by handleAsyncUpdate(), and run().
| juce::MemoryBlock AsyncDownload::data |
Referenced by handleAsyncUpdate(), and run().