/*MinetestCopyright (C) 2013 celeron55, Perttu Ahola <celeron55@gmail.com>This program is free software; you can redistribute it and/or modifyit under the terms of the GNU Lesser General Public License as published bythe Free Software Foundation; either version 2.1 of the License, or(at your option) any later version.This program is distributed in the hope that it will be useful,but WITHOUT ANY WARRANTY; without even the implied warranty ofMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See theGNU Lesser General Public License for more details.You should have received a copy of the GNU Lesser General Public License alongwith this program; if not, write to the Free Software Foundation, Inc.,51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.*/#pragma once#include"lua_api/l_base.h"class AsyncEngine;class ModApiUtil :public ModApiBase
{private:/* NOTE: The functions in this module are available in the in-game API as well as in the mainmenu API. All functions that don't require either a Server or GUIEngine instance should be in here. */// log([level,] text)// Writes a line to the logger.// The one-argument version logs to LL_NONE.// The two-argument version accepts a log level.static intl_log(lua_State *L);// get us precision timestatic intl_get_us_time(lua_State *L);// parse_json(str[, nullvalue])static intl_parse_json(lua_State *L);// write_json(data[, styled])static intl_write_json(lua_State *L);// get_dig_params(groups, tool_capabilities[, time_from_last_punch])static intl_get_dig_params(lua_State *L);// get_hit_params(groups, tool_capabilities[, time_from_last_punch])static intl_get_hit_params(lua_State *L);// check_password_entry(name, entry, password)static intl_check_password_entry(lua_State *L);// get_password_hash(name, raw_password)static intl_get_password_hash(lua_State *L);// is_yes(arg)static intl_is_yes(lua_State *L);// get_builtin_path()static intl_get_builtin_path(lua_State *L);// compress(data, method, ...)static intl_compress(lua_State *L);// decompress(data, method, ...)static intl_decompress(lua_State *L);// mkdir(path)static intl_mkdir(lua_State *L);// get_dir_list(path, is_dir)static intl_get_dir_list(lua_State *L);// safe_file_write(path, content)static intl_safe_file_write(lua_State *L);// request_insecure_environment()static intl_request_insecure_environment(lua_State *L);// encode_base64(string)static intl_encode_base64(lua_State *L);// decode_base64(string)static intl_decode_base64(lua_State *L);// get_version()static intl_get_version(lua_State *L);// sha1(string, raw)static intl_sha1(lua_State *L);public:static voidInitialize(lua_State *L,int top);static voidInitializeAsync(lua_State *L,int top);static voidInitializeClient(lua_State *L,int top);static voidInitializeAsync(AsyncEngine &engine);};