1 /*****************************************************************************
2 Freeciv - Copyright (C) 2005 - The Freeciv Project
3 This program is free software; you can redistribute it and/or modify
4 it under the terms of the GNU General Public License as published by
5 the Free Software Foundation; either version 2, or (at your option)
8 This program is distributed in the hope that it will be useful,
9 but WITHOUT ANY WARRANTY; without even the implied warranty of
10 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 GNU General Public License for more details.
12 *****************************************************************************/
14 /*****************************************************************************
15 ADVERTISEMENT: do not attempt to change the name of the API functions.
16 They *must* be compatible between the minor Freeciv versions within the
17 same major version. If you really like to change a function name, be sure
18 to keep also the old one running.
19 *****************************************************************************/
22 $#include <fc_config.h>
25 /* common/scriptcore */
26 $#include "luascript_types.h"
28 /* server/scripting */
29 $#include "api_fcdb_auth.h"
30 $#include "api_fcdb_base.h"
31 $#include "script_fcdb.h"
33 /* Authentication module. */
35 const char *api_auth_get_username
36 @ get_username(lua_State *L, Connection *pconn);
37 const char *api_auth_get_ipaddr
38 @ get_ipaddr(lua_State *L, Connection *pconn);
39 bool api_auth_set_password
40 @ set_password(lua_State *L, Connection *pconn, const char *password);
41 const char *api_auth_get_password
42 @ get_password(lua_State *L, Connection *pconn);
45 /* Freeciv database (fcdb) module. */
50 FCDB_SUCCESS_TRUE @ TRUE,
51 FCDB_SUCCESS_FALSE @ FALSE
55 const char *api_fcdb_option
56 @ option(lua_State *L, const char *name);
60 -- Definitions for backward compatibility with Freeciv 2.4.
61 -- Old database.lua scripts might pass fcdb.param.USER etc to fcdb.option(),
62 -- but it's deprecated in favour of literal strings, and the strings listed
63 -- here are only conventional.
68 PASSWORD = "password",
69 DATABASE = "database",
70 TABLE_USER = "table_user",
71 TABLE_LOG = "table_log",