Go to the documentation of this file.
19 #ifndef GNASH_STREAMPROVIDER_H
20 #define GNASH_STREAMPROVIDER_H
60 std::unique_ptr<NamingPolicy> np =
69 virtual std::unique_ptr<IOChannel> getStream(
const URL&
url,
70 bool namedCacheFile =
false)
const;
81 virtual std::unique_ptr<IOChannel> getStream(
const URL&
url,
82 const std::string& postdata,
bool namedCacheFile =
false)
const;
84 virtual std::unique_ptr<IOChannel> getStream(
const URL&
url,
85 const std::string& postdata,
87 bool namedCacheFile =
false)
const;
94 _namingPolicy = std::move(np);
99 assert(_namingPolicy.get());
100 return *_namingPolicy;
124 std::unique_ptr<NamingPolicy> _namingPolicy;
VGPath path
Definition: testr_gtk.cpp:84
Definition: NamingPolicy.h:32
void setNamingPolicy(std::unique_ptr< NamingPolicy > np)
Set the NamingPolicy for cache files.
Definition: StreamProvider.h:93
bool allow(const URL &url) const
Check whether access to a URL is allowed.
Definition: StreamProvider.cpp:51
#define _(String)
Definition: log.h:44
Anonymous namespace for callbacks, local functions, event handlers etc.
Definition: dbus_ext.cpp:41
virtual ~StreamProvider()
Definition: StreamProvider.h:63
StreamProvider(URL original, URL base, std::unique_ptr< NamingPolicy > np=std::unique_ptr< NamingPolicy >(new NamingPolicy))
Construct a StreamProvider.
Definition: StreamProvider.cpp:41
const NamingPolicy & namingPolicy() const
Return the currently selected policy for converting URL to filename.
Definition: StreamProvider.h:98
void log_error(StringType msg, Args... args)
Definition: log.h:283
A virtual IO channel.
Definition: IOChannel.h:43
bool allow(const URL &url, const URL &baseurl)
Return true if access to given url is allowed, false otherwise.
Definition: URLAccessManager.cpp:273
A StreamProvider makes IOChannels available to the core on request.
Definition: StreamProvider.h:50
virtual std::unique_ptr< IOChannel > getStream(const URL &url, bool namedCacheFile=false) const
Returned stream ownership is transferred to caller.
Definition: StreamProvider.cpp:61
std::string url
Definition: gnash.cpp:59
std::unique_ptr< IOChannel > makeFileChannel(FILE *fp, bool close)
Creates an IOChannel wrapper around a C stream.
Definition: tu_file.cpp:244
#define DSOEXPORT
Definition: dsodefs.h:55
const URL & baseURL() const
The base URL that should be used to resolve all relative URLs.
Definition: StreamProvider.h:117
std::map< std::string, std::string, StringNoCaseLessThan > RequestHeaders
Definition: NetworkAdapter.h:43
Uniform Resource Locator.
Definition: URL.h:35
static DSOEXPORT std::unique_ptr< IOChannel > makeStream(const std::string &url, const std::string &cachefile)
Returns a read-only IOChannel that fetches data from an url.
Definition: NetworkAdapter.cpp:47