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 #ifndef FC__SCRIPT_FCDB_H
15 #define FC__SCRIPT_FCDB_H
18 #include "support.h" /* fc__attribute() */
23 /* Return values of the freeciv database functions via luasql: */
24 #define SPECENUM_NAME fcdb_status
26 #define SPECENUM_VALUE0 FCDB_ERROR
27 /* - sql querry was successful and with a positive result */
28 #define SPECENUM_VALUE1 FCDB_SUCCESS_TRUE
29 /* - sql querry was successful but there is a negative result */
30 #define SPECENUM_VALUE2 FCDB_SUCCESS_FALSE
31 #include "specenum_gen.h"
33 /* fcdb script functions. */
34 bool script_fcdb_init(const char *fcdb_luafile
);
35 enum fcdb_status
script_fcdb_call(const char *func_name
, int nargs
, ...);
36 void script_fcdb_free(void);
38 bool script_fcdb_do_string(struct connection
*caller
, const char *str
);
40 #endif /* FC__SCRIPT_FCDB_H */