Gnash  0.8.10
SharedObject_as.h
Go to the documentation of this file.
00001 // 
00002 //   Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012
00003 //   Free Software Foundation, Inc
00004 //
00005 // This program is free software; you can redistribute it and/or modify
00006 // it under the terms of the GNU General Public License as published by
00007 // the Free Software Foundation; either version 3 of the License, or
00008 // (at your option) any later version.
00009 //
00010 // This program is distributed in the hope that it will be useful,
00011 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00012 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00013 // GNU General Public License for more details.
00014 //
00015 // You should have received a copy of the GNU General Public License
00016 // along with this program; if not, write to the Free Software
00017 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
00018 //
00019 
00020 #ifndef GNASH_ASOBJ_SHAREDOBJECT_H
00021 #define GNASH_ASOBJ_SHAREDOBJECT_H
00022 
00023 #include <string>
00024 #include <map>
00025 
00026 // Forward declarations
00027 namespace gnash {
00028     class as_object;
00029     struct ObjectURI;
00030     class SharedObject_as;
00031     class VM;
00032 }
00033 
00034 namespace gnash {
00035 
00036 class SharedObjectLibrary
00037 {
00038 public:
00039 
00040     typedef std::map<std::string, SharedObject_as*> SoLib;
00041 
00042     SharedObjectLibrary(VM& vm);
00043 
00044     ~SharedObjectLibrary();
00045 
00047     //
00050     as_object* getLocal(const std::string& name, const std::string& root);
00051 
00052     void markReachableResources() const;
00053 
00054     // Drop all library items
00055     void clear();
00056 
00057 private:
00058 
00059     VM& _vm;
00060 
00062     std::string _baseDomain;
00063 
00065     std::string _basePath;
00066 
00068     std::string _solSafeDir;
00069     SoLib       _soLib;
00070 };
00071 
00073 void sharedobject_class_init(as_object& where, const ObjectURI& uri);
00074 
00075 void registerSharedObjectNative(as_object& o);
00076 
00077   
00078 } // end of gnash namespace
00079 
00080 #endif
00081 
00082 // local Variables:
00083 // mode: C++
00084 // indent-tabs-mode: t
00085 // End: