Gnash  0.8.10
Classes | Public Member Functions
gnash::MovieLoader Class Reference

Movie loader. More...

#include <MovieLoader.h>

List of all members.

Classes

class  Request
 A movie load request. More...

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 gnash::movie_root::~movie_root(), gnash::movie_root::reset(), and ~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:
urlstrbefore calling this function.
urlstrThe url exactly as requested. This may already contain a query string.
targetTarget for request.
dataThe variables data to send, URL encoded in key/value pairs
methodThe VariablesMethod to use for sending the data. If MovieClip::METHOD_NONE, no data will be sent.
handlerAn 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 url, gnash::movie_root::runResources(), gnash::RunResources::streamProvider(), gnash::StreamProvider::baseURL(), and gnash::MovieClip::METHOD_GET.

void gnash::MovieLoader::processCompletedRequests ( )
void gnash::MovieLoader::setReachable ( ) const

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