Gnash  0.8.11dev
SharedObject_as.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_ASOBJ_SHAREDOBJECT_H
21 #define GNASH_ASOBJ_SHAREDOBJECT_H
22 
23 #include <string>
24 #include <map>
25 
26 // Forward declarations
27 namespace gnash {
28  class as_object;
29  struct ObjectURI;
30  class SharedObject_as;
31  class VM;
32 }
33 
34 namespace gnash {
35 
37 {
38 public:
39 
40  typedef std::map<std::string, SharedObject_as*> SoLib;
41 
43 
45 
47  //
50  as_object* getLocal(const std::string& name, const std::string& root);
51 
52  void markReachableResources() const;
53 
54  // Drop all library items
55  void clear();
56 
57 private:
58 
59  VM& _vm;
60 
62  std::string _baseDomain;
63 
65  std::string _basePath;
66 
68  std::string _solSafeDir;
69  SoLib _soLib;
70 };
71 
73 void sharedobject_class_init(as_object& where, const ObjectURI& uri);
74 
76 
77 
78 } // end of gnash namespace
79 
80 #endif
81 
82 // local Variables:
83 // mode: C++
84 // indent-tabs-mode: t
85 // End:
SharedObject_as.h
movie_root.h
name
std::string name
Definition: LocalConnection_as.cpp:149
gnash::SharedObjectLibrary::~SharedObjectLibrary
~SharedObjectLibrary()
Definition: SharedObject_as.cpp:470
gnash::toInt
std::int32_t toInt(const as_value &v, const VM &vm)
AS2-compatible conversion to 32bit integer.
Definition: VM.cpp:463
gnash::SharedObjectLibrary::clear
void clear()
Definition: SharedObject_as.cpp:464
gnash::as_object
The base class for all ActionScript objects.
Definition: as_object.h:162
as_object.h
SimpleBuffer.h
AMFConverter.h
gnash::URL::hostname
const std::string & hostname() const
Return the 'hostname' member of this URL, as a string.
Definition: URL.h:64
gnash::arraySize
size_t arraySize(T(&)[N])
Get the size of an array without passing a pointer by mistake.
Definition: GnashAlgorithm.h:58
gnash::log_debug
void log_debug(StringType msg, Args... args)
Definition: log.h:301
LOG_ONCE
#define LOG_ONCE(x)
Definition: log.h:49
rc.h
_
#define _(String)
Definition: log.h:44
gnash::VM::getRoot
movie_root & getRoot() const
Get a pointer to this VM's Root movie (stage)
Definition: VM.cpp:143
gnash::NSV::CLASS_SHARED_OBJECT
@ CLASS_SHARED_OBJECT
Definition: namedStrings.h:237
gnash::as_object::init_member
void init_member(const std::string &name, const as_value &val, int flags=DefaultFlags)
Initialize a member value by string.
Definition: as_object.cpp:669
gnash::VM
The AVM1 virtual machine.
Definition: VM.h:72
gnash
Anonymous namespace for callbacks, local functions, event handlers etc.
Definition: dbus_ext.cpp:41
gnash::VM::getGlobal
Global_as * getGlobal() const
Get a pointer to this VM's _global Object.
Definition: VM.cpp:149
GNASH_REPORT_FUNCTION
#define GNASH_REPORT_FUNCTION
Definition: log.h:452
gnash::PropFlags::dontEnum
@ dontEnum
Protect from enumeration.
Definition: PropFlags.h:36
gnash::PropFlags::dontDelete
@ dontDelete
Protect from deletion.
Definition: PropFlags.h:39
gnash::key::s
@ s
Definition: GnashKey.h:165
as_value.h
NativeFunction.h
Global_as.h
__FUNCTION__
#define __FUNCTION__
Definition: log.h:437
gnash::getGlobal
Global_as & getGlobal(const as_environment &env)
Definition: as_environment.cpp:651
gnash::NSV::PROP_CONSTRUCTOR
@ PROP_CONSTRUCTOR
Definition: namedStrings.h:68
gnash::getVM
VM & getVM(const as_environment &env)
Definition: as_environment.h:222
UNUSED
#define UNUSED(x)
Definition: utility.h:113
gnash::log_error
void log_error(StringType msg, Args... args)
Definition: log.h:283
gnash::getMember
as_value getMember(as_object &o, const ObjectURI &uri)
Get a member of an object using AS lookup rules.
Definition: as_object.h:756
gnash::createObject
as_object * createObject(const Global_as &gl)
Definition: Global_as.cpp:303
gnash::URL::path
const std::string & path() const
Return the 'path' member of this URL, as a string.
Definition: URL.h:76
gnash::registerSharedObjectNative
void registerSharedObjectNative(as_object &o)
Definition: SharedObject_as.cpp:604
gnash::as_object::DefaultFlags
static const int DefaultFlags
The most common flags for built-in properties.
Definition: as_object.h:192
GnashFileUtilities.h
gnash::SharedObjectLibrary::SoLib
std::map< std::string, SharedObject_as * > SoLib
Definition: SharedObject_as.h:40
gnash::fn_call::Args
FunctionArgs< as_value > Args
Definition: fn_call.h:121
gnash::renderer::opengl::for_each
void for_each(C &container, R(T::*pmf)(const A &), const A &arg)
Definition: Renderer_ogl.cpp:690
GnashSystemNetHeaders.h
gnash::Global_as::createClass
as_object * createClass(Global_as::ASFunction ctor, as_object *prototype)
Create an ActionScript class.
Definition: Global_as.cpp:180
Property.h
gnash::as_value::to_function
as_function * to_function() const
Return the value as a function only if it is a function.
Definition: as_value.cpp:499
GnashAlgorithm.h
IF_VERBOSE_ASCODING_ERRORS
#define IF_VERBOSE_ASCODING_ERRORS(x)
Definition: log.h:397
gnash::emptyFunction
as_value emptyFunction(const fn_call &)
Definition: Global_as.h:256
gnash::constructInstance
as_object * constructInstance(as_function &ctor, const as_environment &env, fn_call::Args &args)
Definition: as_function.cpp:47
gnash::StringNoCaseEqual
A case-insensitive string equality operator.
Definition: StringPredicates.h:42
gnash::VM::registerNative
void registerNative(as_c_function_ptr fun, unsigned int x, unsigned int y)
Definition: VM.cpp:268
URL.h
test.w
w
Definition: test.py:8
gnash::NSV::PROP_DATA
@ PROP_DATA
Definition: namedStrings.h:70
Object.h
gnash::SharedObjectLibrary::markReachableResources
void markReachableResources() const
Definition: SharedObject_as.cpp:453
VM.h
gnash::sharedobject_class_init
void sharedobject_class_init(as_object &where, const ObjectURI &uri)
Initialize the global SharedObject class.
Definition: SharedObject_as.cpp:591
gnash::log_aserror
void log_aserror(StringType msg, Args... args)
Definition: log.h:331
gnash::SharedMem::SharedMem
DSOEXPORT SharedMem(size_t size)
Construct a SharedMem with the requested size.
Definition: SharedMem.cpp:52
log.h
fn_call.h
gnash::PropFlags::onlySWF6Up
@ onlySWF6Up
Only visible by VM initialized for version 6 or higher.
Definition: PropFlags.h:45
NetConnection_as.h
gnash::SharedObjectLibrary::getLocal
as_object * getLocal(const std::string &name, const std::string &root)
Return a local shared object with given name and with given root.
Definition: SharedObject_as.cpp:476
url
std::string url
Definition: gnash.cpp:59
gnashconfig.h
gnash::image::end
pixel_iterator< T > end(GnashImage &im)
Definition: ImageIterators.h:198
gnash::RcInitFile::getDefaultInstance
static RcInitFile & getDefaultInstance()
Return the default instance of RC file.
Definition: rc.cpp:61
gnash::movie_root
This class represents the 'Stage' and top-level movie.
Definition: movie_root.h:151
namedStrings.h
gnash::Global_as
The Global object ultimately contains all objects in an ActionScript run.
Definition: Global_as.h:50
gnash::getSWFVersion
int getSWFVersion(const as_environment &env)
Definition: as_environment.cpp:657
RunResources.h
test.uri
uri
Definition: test.py:12
gnash::mkdirRecursive
bool mkdirRecursive(const std::string &filename)
Create a directory for a given filename.
Definition: GnashFileUtilities.cpp:35
gnash::log_security
void log_security(StringType msg, Args... args)
Definition: log.h:319
gnash::SharedObjectLibrary
Definition: SharedObject_as.h:37
gnash::foreachSecond
void foreachSecond(T begin, T end, U op)
Call a functor on the second element of each element in a range.
Definition: GnashAlgorithm.h:73
gnash::NSV::PROP_uuPROTOuu
@ PROP_uuPROTOuu
Definition: namedStrings.h:118
gnash::getURI
ObjectURI getURI(const VM &vm, const std::string &str, bool lowerCaseHint=false)
Definition: VM.h:290
gnash::StreamProvider::baseURL
const URL & baseURL() const
The base URL that should be used to resolve all relative URLs.
Definition: StreamProvider.h:117
gnash::SharedObjectLibrary::SharedObjectLibrary
SharedObjectLibrary(VM &vm)
Definition: SharedObject_as.cpp:386
gnash::caseless
bool caseless(const as_object &o)
Return whether property matching is caseless.
Definition: as_object.h:924
gnash::URL
Uniform Resource Locator.
Definition: URL.h:35
gnash::toString
const std::string & toString(VM &vm, const ObjectURI &uri)
Definition: VM.h:308
StreamProvider.h
gnash::key::o
@ o
Definition: GnashKey.h:161
gnash::PropFlags::readOnly
@ readOnly
Protect from assigning a value.
Definition: PropFlags.h:42
gnash::log_unimpl
void log_unimpl(StringType msg, Args... args)
Definition: log.h:289
gnash::ObjectURI
A URI for describing as_objects.
Definition: ObjectURI.h:45
gnash::movie_root::runResources
const RunResources & runResources() const
Definition: movie_root.h:788
data
SimpleBuffer data
Definition: LocalConnection_as.cpp:151
gnash::key::e
@ e
Definition: GnashKey.h:151
gnash::RcInitFile
Definition: rc.h:44
gnash::RunResources::streamProvider
const StreamProvider & streamProvider() const
Get a StreamProvider instance.
Definition: RunResources.h:76
SharedMem.h