|
JUCE-7.0.12-0-g4f43011b96 JUCE-7.0.12-0-g4f43011b96
JUCE — C++ application framework with suport for VST, VST3, LV2 audio plug-ins
« « « Anklang Documentation |
Public Member Functions | |
| FallbackDownloadTask (std::unique_ptr< FileOutputStream > outputStreamToUse, size_t bufferSizeToUse, std::unique_ptr< WebInputStream > streamToUse, URL::DownloadTask::Listener *listenerToUse) | |
| void | run () override |
| Must be implemented to perform the thread's actual code. | |
Public Member Functions inherited from juce::URL::DownloadTask | |
| virtual | ~DownloadTask () |
| Releases the resources of the download task, unregisters the listener and cancels the download if necessary. | |
| int64 | getTotalLength () const |
| Returns the total length of the download task. | |
| int64 | getLengthDownloaded () const |
| Returns the number of bytes that have been downloaded so far. | |
| bool | isFinished () const |
| Returns true if the download finished or there was an error. | |
| int | statusCode () const |
| Returns the status code of the server's response. | |
| bool | hadError () const |
| Returns true if there was an error. | |
| File | getTargetLocation () const |
| Returns the target file location that was provided in URL::downloadToFile. | |
Public Member Functions inherited from juce::Thread | |
| Thread (const String &threadName, size_t threadStackSize=osDefaultStackSize) | |
| Creates a thread. | |
| virtual | ~Thread () |
| Destructor. | |
| bool | startThread () |
| Attempts to start a new thread with default ('Priority::normal') priority. | |
| bool | startThread (Priority newPriority) |
| Attempts to start a new thread with a given priority. | |
| bool | startRealtimeThread (const RealtimeOptions &options) |
| Starts the thread with realtime performance characteristics on platforms that support it. | |
| bool | stopThread (int timeOutMilliseconds) |
| Attempts to stop the thread running. | |
| bool | isThreadRunning () const |
| Returns true if the thread is currently active. | |
| void | signalThreadShouldExit () |
| Sets a flag to tell the thread it should stop. | |
| bool | threadShouldExit () const |
| Checks whether the thread has been told to stop running. | |
| bool | waitForThreadToExit (int timeOutMilliseconds) const |
| Waits for the thread to stop. | |
| void | addListener (Listener *) |
| Add a listener to this thread which will receive a callback when signalThreadShouldExit was called on this thread. | |
| void | removeListener (Listener *) |
| Removes a listener added with addListener. | |
| bool | isRealtime () const |
| Returns true if this Thread represents a realtime thread. | |
| void | setAffinityMask (uint32 affinityMask) |
| Sets the affinity mask for the thread. | |
| bool | wait (double timeOutMilliseconds) const |
| Suspends the execution of this thread until either the specified timeout period has elapsed, or another thread calls the notify() method to wake it up. | |
| void | notify () const |
| Wakes up the thread. | |
| ThreadID | getThreadId () const noexcept |
| Returns the ID of this thread. | |
| const String & | getThreadName () const noexcept |
| Returns the name of the thread. | |
Public Attributes | |
| std::unique_ptr< FileOutputStream > | fileStream |
| const std::unique_ptr< WebInputStream > | stream |
| const size_t | bufferSize |
| HeapBlock< char > | buffer |
| URL::DownloadTask::Listener *const | listener |
Additional Inherited Members | |
Public Types inherited from juce::URL::DownloadTask | |
| using | Listener = DownloadTaskListener |
Public Types inherited from juce::Thread | |
| enum class | Priority { highest , high , normal , low , background } |
| The different runtime priorities of non-realtime threads. More... | |
| using | ThreadID = void * |
| A value type used for thread IDs. | |
Static Public Member Functions inherited from juce::Thread | |
| static bool | launch (std::function< void()> functionToRun) |
| Invokes a lambda or function on its own thread with the default priority. | |
| static bool | launch (Priority priority, std::function< void()> functionToRun) |
| Invokes a lambda or function on its own thread with a custom priority. | |
| static bool | currentThreadShouldExit () |
| Checks whether the current thread has been told to stop running. | |
| static void JUCE_CALLTYPE | setCurrentThreadAffinityMask (uint32 affinityMask) |
| Changes the affinity mask for the caller thread. | |
| static void JUCE_CALLTYPE | sleep (int milliseconds) |
| Suspends the execution of the current thread until the specified timeout period has elapsed (note that this may not be exact). | |
| static void JUCE_CALLTYPE | yield () |
| Yields the current thread's CPU time-slot and allows a new thread to run. | |
| static ThreadID JUCE_CALLTYPE | getCurrentThreadId () |
| Returns an id that identifies the caller thread. | |
| static Thread *JUCE_CALLTYPE | getCurrentThread () |
| Finds the thread object that is currently running. | |
| static void JUCE_CALLTYPE | setCurrentThreadName (const String &newThreadName) |
| Changes the name of the caller thread. | |
| static void | initialiseJUCE (void *jniEnv, void *jContext) |
| Initialises the JUCE subsystem for projects not created by the Projucer. | |
Static Public Attributes inherited from juce::Thread | |
| static constexpr size_t | osDefaultStackSize |
Protected Member Functions inherited from juce::Thread | |
| Priority | getPriority () const |
| Returns the current priority of this thread. | |
| bool | setPriority (Priority newPriority) |
| Attempts to set the priority for this thread. | |
Protected Attributes inherited from juce::URL::DownloadTask | |
| int64 | contentLength |
| int64 | downloaded |
| bool | finished |
| bool | error |
| int | httpCode |
| File | targetLocation |
Definition at line 26 of file juce_URL.cpp.
| juce::FallbackDownloadTask::FallbackDownloadTask | ( | std::unique_ptr< FileOutputStream > | outputStreamToUse, |
| size_t | bufferSizeToUse, | ||
| std::unique_ptr< WebInputStream > | streamToUse, | ||
| URL::DownloadTask::Listener * | listenerToUse | ||
| ) |
Definition at line 29 of file juce_URL.cpp.
|
override |
Definition at line 50 of file juce_URL.cpp.
|
overridevirtual |
Must be implemented to perform the thread's actual code.
Remember that the thread must regularly check the threadShouldExit() method whilst running, and if this returns true it should return from the run() method as soon as possible to avoid being forcibly killed.
Implements juce::Thread.
Definition at line 58 of file juce_URL.cpp.
Definition at line 103 of file juce_URL.cpp.
Definition at line 102 of file juce_URL.cpp.
| std::unique_ptr<FileOutputStream> juce::FallbackDownloadTask::fileStream |
Definition at line 100 of file juce_URL.cpp.
| URL::DownloadTask::Listener* const juce::FallbackDownloadTask::listener |
Definition at line 104 of file juce_URL.cpp.
| const std::unique_ptr<WebInputStream> juce::FallbackDownloadTask::stream |
Definition at line 101 of file juce_URL.cpp.