2
// Copyright (C) 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
4
// This program is free software; you can redistribute it and/or modify
5
// it under the terms of the GNU General Public License as published by
6
// the Free Software Foundation; either version 3 of the License, or
7
// (at your option) any later version.
9
// This program is distributed in the hope that it will be useful,
10
// but WITHOUT ANY WARRANTY; without even the implied warranty of
11
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
// GNU General Public License for more details.
14
// You should have received a copy of the GNU General Public License
15
// along with this program; if not, write to the Free Software
16
// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
19
#ifndef GNASH_ASOBJ_SHAREDOBJECT_H
20
#define GNASH_ASOBJ_SHAREDOBJECT_H
25
// Forward declarations
30
class SharedObject_as;
36
class SharedObjectLibrary
40
typedef std::map<std::string, SharedObject_as *> SoLib;
42
SharedObjectLibrary(VM& vm);
44
~SharedObjectLibrary();
46
/// Return a local shared object with given name and with given root
48
/// May return NULL if name is invalid or can't access the given root
50
SharedObject_as* getLocal(const std::string& name, const std::string& root);
52
/// Return a remote shared object with given name
54
/// @param persistance false
55
/// May return NULL if name is invalid or can't access the given root
57
SharedObject_as* getRemote(const std::string& name, const std::string& uri,
58
const std::string& persistance);
60
void markReachableResources() const;
62
// Drop all library items
69
/// Domain component of the VM SWF url
70
std::string _baseDomain;
72
/// Path component of the VM SWF url
73
std::string _basePath;
76
std::string _solSafeDir;
80
/// Initialize the global SharedObject class
81
void sharedobject_class_init(as_object& where, const ObjectURI& uri);
83
void registerSharedObjectNative(as_object& o);
86
} // end of gnash namespace
92
// indent-tabs-mode: t