|
Gnash
0.8.10
|
A manager for loadVariable requests. More...
#include <LoadVariablesThread.h>
Public Types | |
| typedef std::map< std::string, std::string > | ValuesMap |
Public Member Functions | |
| LoadVariablesThread (const StreamProvider &sp, const URL &url) | |
| Construct a LoadVariablesThread opening a stream for the given URL. | |
| LoadVariablesThread (const StreamProvider &sp, const URL &url, const std::string &postdata) | |
| Construct a LoadVariablesThread opening a stream for the given URL, posting the given url-encoded data if using HTTP. | |
| ~LoadVariablesThread () | |
| Destroy the LoadVariablesThread, joining the thread if spawned. | |
| ValuesMap & | getValues () |
| Return the name,value map parsed out of the loaded stream. | |
| void | process () |
| Start the load and parse thread. | |
| void | cancel () |
| Cancel a download in progress. | |
| bool | inProgress () |
| Return true if loading/parsing is in progress. | |
| bool | completed () |
| Mutex-protected inspector for thread completion. | |
| size_t | getBytesLoaded () const |
| size_t | getBytesTotal () const |
A manager for loadVariable requests.
Provides services for starting a "load and parse" thread, checking its status and getting a parsed variables structure back when done.
| typedef std::map<std::string, std::string> gnash::LoadVariablesThread::ValuesMap |
| gnash::LoadVariablesThread::LoadVariablesThread | ( | const StreamProvider & | sp, |
| const URL & | url | ||
| ) |
Construct a LoadVariablesThread opening a stream for the given URL.
Throws a NetworkException if unable.
| url | URL to post to and fetch from |
| gnash::LoadVariablesThread::LoadVariablesThread | ( | const StreamProvider & | sp, |
| const URL & | url, | ||
| const std::string & | postdata | ||
| ) |
Construct a LoadVariablesThread opening a stream for the given URL, posting the given url-encoded data if using HTTP.
Throws a NetworkException if unable.
| url | URL to post to and fetch from |
| postdata | Url-encoded post data. |
Destroy the LoadVariablesThread, joining the thread if spawned.
References cancel().
| void gnash::LoadVariablesThread::cancel | ( | ) |
| bool gnash::LoadVariablesThread::completed | ( | ) | [inline] |
Mutex-protected inspector for thread completion.
Only call this method from the same thread that also called process(), as the thread will be joined if it completed.
| size_t gnash::LoadVariablesThread::getBytesLoaded | ( | ) | const [inline] |
| size_t gnash::LoadVariablesThread::getBytesTotal | ( | ) | const [inline] |
| ValuesMap& gnash::LoadVariablesThread::getValues | ( | ) | [inline] |
Return the name,value map parsed out of the loaded stream.
| bool gnash::LoadVariablesThread::inProgress | ( | ) | [inline] |
Return true if loading/parsing is in progress.
| void gnash::LoadVariablesThread::process | ( | ) | [inline] |
Start the load and parse thread.
References assert.
1.7.6.1