Provide IOChannel streams for network or filesystem resources. More...
#include <StreamProvider.h>
Public Member Functions | |
| StreamProvider (std::auto_ptr< NamingPolicy >=std::auto_ptr< NamingPolicy >(new NamingPolicy)) | |
| virtual | ~StreamProvider () |
| virtual std::auto_ptr< IOChannel > | getStream (const URL &url, bool namedCacheFile=false) const |
| Returned stream ownership is transferred to caller. | |
| virtual std::auto_ptr< IOChannel > | getStream (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< IOChannel > | getStream (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 NamingPolicy & | namingPolicy () const |
| Return the currently selected policy for converting URL to filename. | |
Provide IOChannel streams for network or filesystem resources.
| gnash::StreamProvider::StreamProvider | ( | std::auto_ptr< NamingPolicy > | np = std::auto_ptr<NamingPolicy>(new NamingPolicy) |
) |
Referenced by getStream().
| virtual gnash::StreamProvider::~StreamProvider | ( | ) | [inline, virtual] |
| 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
| 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.
1.7.1