|
Gnash
0.8.11dev
|
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. More... | |
| 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. More... | |
| ~LoadVariablesThread () | |
| Destroy the LoadVariablesThread, joining the thread if spawned. More... | |
| ValuesMap & | getValues () |
| Return the name,value map parsed out of the loaded stream. More... | |
| void | process () |
| Start the load and parse thread. More... | |
| void | cancel () |
| Cancel a download in progress. More... | |
| bool | inProgress () |
| Return true if loading/parsing is in progress. More... | |
| bool | completed () |
| Mutex-protected inspector for thread completion. More... | |
| 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. |
| gnash::LoadVariablesThread::~LoadVariablesThread | ( | ) |
Destroy the LoadVariablesThread, joining the thread if spawned.
References cancel().
| void gnash::LoadVariablesThread::cancel | ( | ) |
|
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.
|
inline |
|
inline |
|
inline |
Return the name,value map parsed out of the loaded stream.
|
inline |
Return true if loading/parsing is in progress.
|
inline |
Start the load and parse thread.
1.8.5