Gnash  0.8.11dev
Public Types | Public Member Functions | List of all members
gnash::LoadVariablesThread Class Reference

A manager for loadVariable requests. More...

#include <LoadVariablesThread.h>

Public Types

enum  Status : std::int8_t { Status::STARTED = 0, Status::FINISHED, Status::CANCEL_REQUESTED }
 
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...
 
bool completed ()
 

Detailed Description

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.

Member Typedef Documentation

§ ValuesMap

typedef std::map<std::string, std::string> gnash::LoadVariablesThread::ValuesMap

Member Enumeration Documentation

§ Status

enum gnash::LoadVariablesThread::Status : std::int8_t
strong
Enumerator
STARTED 
FINISHED 
CANCEL_REQUESTED 

Constructor & Destructor Documentation

§ LoadVariablesThread() [1/2]

gnash::LoadVariablesThread::LoadVariablesThread ( const StreamProvider sp,
const URL url 
)

Construct a LoadVariablesThread opening a stream for the given URL.

Throws a NetworkException if unable.

Parameters
urlURL to post to and fetch from

References FINISHED, and gnash::StreamProvider::getStream().

§ LoadVariablesThread() [2/2]

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.

Parameters
urlURL to post to and fetch from
postdataUrl-encoded post data.

References gnash::StreamProvider::getStream().

§ ~LoadVariablesThread()

gnash::LoadVariablesThread::~LoadVariablesThread ( )

Destroy the LoadVariablesThread, joining the thread if spawned.

References CANCEL_REQUESTED.

Member Function Documentation

§ completed()

bool gnash::LoadVariablesThread::completed ( )
inline

§ getValues()

ValuesMap gnash::LoadVariablesThread::getValues ( )
inline

Return the name,value map parsed out of the loaded stream.

Referenced by gnash::MovieClip::loadVariables().


The documentation for this class was generated from the following files: