Gnash  0.8.11dev
MovieFactory.h
Go to the documentation of this file.
1 //
2 // Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012
3 // Free Software Foundation, Inc
4 //
5 // This program is free software; you can redistribute it and/or modify
6 // it under the terms of the GNU General Public License as published by
7 // the Free Software Foundation; either version 3 of the License, or
8 // (at your option) any later version.
9 //
10 // This program is distributed in the hope that it will be useful,
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 // GNU General Public License for more details.
14 //
15 // You should have received a copy of the GNU General Public License
16 // along with this program; if not, write to the Free Software
17 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
18 
19 
20 #ifndef GNASH_MOVIE_FACTORY_H
21 #define GNASH_MOVIE_FACTORY_H
22 
23 #include "dsodefs.h"
24 
25 #include <boost/intrusive_ptr.hpp>
26 #include <string>
27 #include <memory>
28 
29 namespace gnash {
30  class IOChannel;
31  class RunResources;
32  class movie_definition;
33  class URL;
34  class MovieLibrary;
35 }
36 
37 namespace gnash {
38 
40 {
41 public:
42 
44  //
84  static DSOEXPORT boost::intrusive_ptr<movie_definition> makeMovie(
85  const URL& url, const RunResources& runResources,
86  const char* real_url = nullptr, bool startLoaderThread = true,
87  const std::string* postdata = nullptr);
88 
90  //
113  static DSOEXPORT boost::intrusive_ptr<movie_definition> makeMovie(
114  std::unique_ptr<IOChannel> in, const std::string& url,
115  const RunResources& runResources, bool startLoaderThread);
116 
118  //
120  static DSOEXPORT void clear();
121 
123 };
124 
125 } // namespace gnash
126 
127 
128 #endif // GNASH_IMPL_H
129 
130 
131 // Local Variables:
132 // mode: C++
133 // indent-tabs-mode: t
134 // End:
gnash::MovieFactory::makeMovie
static DSOEXPORT boost::intrusive_ptr< movie_definition > makeMovie(const URL &url, const RunResources &runResources, const char *real_url=nullptr, bool startLoaderThread=true, const std::string *postdata=nullptr)
Create a gnash::movie_definition from the given URL.
Definition: MovieFactory.cpp:109
gnash::MovieLibrary::add
void add(const std::string &key, movie_definition *mov)
Definition: MovieLibrary.h:78
BitmapMovieDefinition.h
gnash::MovieLibrary
Library of SWF movies indexed by URL strings.
Definition: MovieLibrary.h:38
gnash::IOChannel::eof
virtual bool eof() const =0
Return true if the end of the stream has been reached.
dsodefs.h
gnash::log_debug
void log_debug(StringType msg, Args... args)
Definition: log.h:301
_
#define _(String)
Definition: log.h:44
gnash
Anonymous namespace for callbacks, local functions, event handlers etc.
Definition: dbus_ext.cpp:41
gnash::FileType
FileType
Definition: GnashEnums.h:25
gnash::GNASH_FILETYPE_JPEG
@ GNASH_FILETYPE_JPEG
Definition: GnashEnums.h:26
gnash::key::m
@ m
Definition: GnashKey.h:159
MovieLibrary.h
utility.h
gnash::IOChannel::seek
virtual bool seek(std::streampos p)=0
Seek to the specified position.
GnashImage.h
GnashEnums.h
gnash::log_error
void log_error(StringType msg, Args... args)
Definition: log.h:283
gnash::MovieFactory::clear
static DSOEXPORT void clear()
Clear the MovieFactory resources.
Definition: MovieFactory.cpp:157
MovieFactory.h
gnash::key::r
@ r
Definition: GnashKey.h:164
gnash::IOChannel
A virtual IO channel.
Definition: IOChannel.h:43
gnash::MovieLibrary::get
bool get(const std::string &key, boost::intrusive_ptr< movie_definition > *ret)
Definition: MovieLibrary.h:66
gnash::key::type
type
Definition: GnashKey.h:330
URL.h
gnash::RunResources
Class to group together per-run and external resources for Gnash.
Definition: RunResources.h:54
SWFMovieDefinition.h
gnash::GNASH_FILETYPE_PNG
@ GNASH_FILETYPE_PNG
Definition: GnashEnums.h:27
log.h
gnash::MovieFactory
Definition: MovieFactory.h:40
url
std::string url
Definition: gnash.cpp:59
gnash::RcInitFile::getDefaultInstance
static RcInitFile & getDefaultInstance()
Return the default instance of RC file.
Definition: rc.cpp:61
gnash::IOChannel::read_byte
std::uint8_t read_byte()
Read a single byte from the stream.
Definition: IOChannel.cpp:63
RunResources.h
gnash::GNASH_FILETYPE_FLV
@ GNASH_FILETYPE_FLV
Definition: GnashEnums.h:30
gnash::GNASH_FILETYPE_GIF
@ GNASH_FILETYPE_GIF
Definition: GnashEnums.h:28
DSOEXPORT
#define DSOEXPORT
Definition: dsodefs.h:55
gnash::GNASH_FILETYPE_SWF
@ GNASH_FILETYPE_SWF
Definition: GnashEnums.h:29
gnash::equal
bool equal(string_table &st, string_table::key a, string_table::key b, bool caseless)
Check whether two keys are equivalent.
Definition: string_table.cpp:174
gnash::IOChannel::tell
virtual std::streampos tell() const =0
Return current stream position.
gnash::MovieLibrary::clear
void clear()
Definition: MovieLibrary.h:95
gnash::image::Input::readImageData
static DSOEXPORT std::unique_ptr< GnashImage > readImageData(std::shared_ptr< gnash::IOChannel > in, FileType type)
Read image data from an IOChannel into an GnashImage.
Definition: GnashImage.cpp:215
gnash::URL
Uniform Resource Locator.
Definition: URL.h:35
gnash::GNASH_FILETYPE_UNKNOWN
@ GNASH_FILETYPE_UNKNOWN
Definition: GnashEnums.h:31
StreamProvider.h
gnash::log_unimpl
void log_unimpl(StringType msg, Args... args)
Definition: log.h:289
gnash::URL::str
std::string str() const
Return the full absolute URL as a string.
Definition: URL.cpp:272
IOChannel.h
gnash::key::e
@ e
Definition: GnashKey.h:151
gnash::MovieFactory::movieLibrary
static MovieLibrary movieLibrary
Definition: MovieFactory.h:122
gnash::IOChannel::read
virtual std::streamsize read(void *dst, std::streamsize num)=0
Read the given number of bytes from the stream.
fontlib.h