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:
uri
Definition: test.py:12
~SharedObjectLibrary()
Definition: SharedObject_as.cpp:470
Anonymous namespace for callbacks, local functions, event handlers etc.
Definition: dbus_ext.cpp:40
The base class for all ActionScript objects.
Definition: as_object.h:161
Definition: GnashKey.h:161
void registerSharedObjectNative(as_object &o)
Definition: SharedObject_as.cpp:604
A URI for describing as_objects.
Definition: ObjectURI.h:44
std::map< std::string, SharedObject_as * > SoLib
Definition: SharedObject_as.h:40
Definition: SharedObject_as.h:36
void markReachableResources() const
Definition: SharedObject_as.cpp:453
The AVM1 virtual machine.
Definition: VM.h:71
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
SharedObjectLibrary(VM &vm)
Definition: SharedObject_as.cpp:386
void clear()
Definition: SharedObject_as.cpp:464
void sharedobject_class_init(as_object &where, const ObjectURI &uri)
Initialize the global SharedObject class.
Definition: SharedObject_as.cpp:591
std::string name
Definition: LocalConnection_as.cpp:149