31#define MPDB_CAPSTR "+mpdb"
33#define MPDB_FORMAT_VERSION "1"
61 log_error(
"MPDB %s missing capability information", filename);
67 log_error(
"Incompatible mpdb file %s:", filename);
168 "create table modpacks (name VARCHAR(60) NOT NULL, type VARCHAR(32), version VARCHAR(32) NOT NULL);");
232 "update modpacks set type = '%q', version = '%q' where name is '%q';",
238 "insert into modpacks values ('%q', '%q', '%q');",
268 "select * from modpacks where name is '%q';",
bool has_capabilities(const char *us, const char *them)
#define log_debug(message,...)
#define log_error(message,...)
#define MPDB_FORMAT_VERSION
const char * mpdb_installed_version(const char *name, enum modpack_type type)
static sqlite3 * main_handle
static sqlite3 * scenario_handle
void load_install_info_list(const char *filename)
void create_mpdb(const char *filename, bool scenario_db)
void open_mpdb(const char *filename, bool scenario_db)
bool mpdb_update_modpack(const char *name, enum modpack_type type, const char *version)
static int mpdb_query(sqlite3 *handle, const char *query)
struct section_file * secfile_load(const char *filename, bool allow_duplicates)
void secfile_destroy(struct section_file *secfile)
const char * secfile_lookup_str(const struct section_file *secfile, const char *path,...)
const char * secfile_lookup_str_default(const struct section_file *secfile, const char *def, const char *path,...)
bool make_dir(const char *pathname, int mode)
#define DIR_SEPARATOR_CHAR
int fc_snprintf(char *str, size_t n, const char *format,...)
int fc_strcasecmp(const char *str0, const char *str1)