1 /* ScummVM - Graphic Adventure Engine 2 * 3 * ScummVM is the legal property of its developers, whose names 4 * are too numerous to list here. Please refer to the COPYRIGHT 5 * file distributed with this source distribution. 6 * 7 * This program is free software; you can redistribute it and/or 8 * modify it under the terms of the GNU General Public License 9 * as published by the Free Software Foundation; either version 2 10 * of the License, or (at your option) any later version. 11 * 12 * This program is distributed in the hope that it will be useful, 13 * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 * GNU General Public License for more details. 16 * 17 * You should have received a copy of the GNU General Public License 18 * along with this program; if not, write to the Free Software 19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 20 * 21 */ 22 23 /** 24 * This code is heavily based on the Pluto code base. Copyright below 25 */ 26 27 /* Tamed Pluto - Heavy-duty persistence for Lua 28 * Copyright (C) 2004 by Ben Sunshine-Hill, and released into the public 29 * domain. People making use of this software as part of an application 30 * are politely requested to email the author at sneftel@gmail.com 31 * with a brief description of the application, primarily to satisfy his 32 * curiosity. 33 * 34 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 35 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 36 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 37 * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 38 * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 39 * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 40 * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 41 * 42 * Instrumented by Stefan Reich (info@luaos.net) 43 * for Mobile Lua (http://luaos.net/pages/mobile-lua.php) 44 */ 45 46 #ifndef LUA_PERSISTENCE_H 47 #define LUA_PERSISTENCE_H 48 49 #include "lua.h" 50 51 52 namespace Common { 53 class WriteStream; 54 class ReadStream; 55 } 56 57 58 namespace Lua { 59 60 #define PERMANENT_TYPE 101 61 62 void persistLua(lua_State *luaState, Common::WriteStream *writeStream); 63 void unpersistLua(lua_State *luaState, Common::ReadStream *readStream); 64 65 } // End of namespace Lua 66 67 #endif 68