Public Member Functions

gnash::MovieLoader Class Reference

Movie loader. More...

#include <MovieLoader.h>

Collaboration diagram for gnash::MovieLoader:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 MovieLoader (movie_root &mr)
 ~MovieLoader ()
void loadMovie (const std::string &url, const std::string &target, const std::string &data, MovieClip::VariablesMethod method, as_object *handler=0)
 Queue a request for loading a movie.
void clear ()
 Drop all requests and kill the thread.
void processCompletedRequests ()
 Process all completed movie load requests.
void setReachable () const

Detailed Description

Movie loader.

All public functions are intended to be called by the main thread Hide the asynchonous mechanism of movies loading. Currently implemented using threads, could be refactored to use non-blocking reads.


Constructor & Destructor Documentation

gnash::MovieLoader::MovieLoader ( movie_root mr  ) 
gnash::MovieLoader::~MovieLoader (  ) 

References clear().


Member Function Documentation

void gnash::MovieLoader::clear (  ) 

Drop all requests and kill the thread.

Referenced by ~MovieLoader().

void gnash::MovieLoader::loadMovie ( const std::string &  url,
const std::string &  target,
const std::string &  data,
MovieClip::VariablesMethod  method,
as_object handler = 0 
)

Queue a request for loading a movie.

This function constructs the URL and, if required, the postdata from the arguments. The variables to send should *not* be appended to

Parameters:
urlstr before calling this function.
urlstr The url exactly as requested. This may already contain a query string.
target Target for request.
data The variables data to send, URL encoded in key/value pairs
method The VariablesMethod to use for sending the data. If MovieClip::METHOD_NONE, no data will be sent.
handler An object which will be signalled of load events (onLoadStart, onLoadComplete, onLoadInit, onLoadError). Can be null if caller doesn't care.

URL security is checked in StreamProvider::getStream() down the chain.

If the method is MovieClip::METHOD_NONE, we send no data.

GET: append data to query string.

References gnash::RunResources::baseURL(), gnash::MovieClip::METHOD_GET, gnash::movie_root::runResources(), and url.

void gnash::MovieLoader::processCompletedRequests (  ) 

Process all completed movie load requests.

References gnash::key::_1.

void gnash::MovieLoader::setReachable (  )  const

References s2x::end.


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