Public Member Functions

gnash::StreamProvider Class Reference

Provide IOChannel streams for network or filesystem resources. More...

#include <StreamProvider.h>

List of all members.

Public Member Functions

 StreamProvider (std::auto_ptr< NamingPolicy >=std::auto_ptr< NamingPolicy >(new NamingPolicy))
virtual ~StreamProvider ()
virtual std::auto_ptr< IOChannelgetStream (const URL &url, bool namedCacheFile=false) const
 Returned stream ownership is transferred to caller.
virtual std::auto_ptr< IOChannelgetStream (const URL &url, const std::string &postdata, bool namedCacheFile=false) const
 Get a stream from the response of a POST operation.
virtual std::auto_ptr< IOChannelgetStream (const URL &url, const std::string &postdata, const NetworkAdapter::RequestHeaders &headers, bool namedCacheFile=false) const
void setNamingPolicy (std::auto_ptr< NamingPolicy > np)
 Set the NamingPolicy for cache files.
const NamingPolicynamingPolicy () const
 Return the currently selected policy for converting URL to filename.

Detailed Description

Provide IOChannel streams for network or filesystem resources.


Constructor & Destructor Documentation

gnash::StreamProvider::StreamProvider ( std::auto_ptr< NamingPolicy np = std::auto_ptr<NamingPolicy>(new NamingPolicy)  ) 

Referenced by getStream().

virtual gnash::StreamProvider::~StreamProvider (  )  [inline, virtual]

Member Function Documentation

std::auto_ptr< IOChannel > gnash::StreamProvider::getStream ( const URL url,
bool  namedCacheFile = false 
) const [virtual]

Returned stream ownership is transferred to caller.

On error NULL is returned Derive from this for a CachingStreamProvider

References gnash::URLAccessManager::allow(), gnash::URL::path(), gnash::URL::protocol(), StreamProvider(), and url.

Referenced by gnash::NetConnection_as::getStream().

std::auto_ptr< IOChannel > gnash::StreamProvider::getStream ( const URL url,
const std::string &  postdata,
bool  namedCacheFile = false 
) const [virtual]

Get a stream from the response of a POST operation.

Returned stream ownership is transferred to caller.

On error NULL is returned Derive from this for a CachingStreamProvider

Parameters:
url The url to post to.
postdata Post data in url-encoded form.

References gnash::NetworkAdapter::makeStream(), and namingPolicy().

std::auto_ptr< IOChannel > gnash::StreamProvider::getStream ( const URL url,
const std::string &  postdata,
const NetworkAdapter::RequestHeaders headers,
bool  namedCacheFile = false 
) const [virtual]
const NamingPolicy& gnash::StreamProvider::namingPolicy (  )  const [inline]

Return the currently selected policy for converting URL to filename.

Referenced by getStream().

void gnash::StreamProvider::setNamingPolicy ( std::auto_ptr< NamingPolicy np  )  [inline]

Set the NamingPolicy for cache files.

This is only used when cache file naming is requested in getStream() This StreamProvider owns the NamingPolicy instance.


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