Freeciv-3.2
Loading...
Searching...
No Matches
mpdb.h
Go to the documentation of this file.
1/***********************************************************************
2 Freeciv - Copyright (C) 1996 - A Kjeldberg, L Gregersen, P Unold
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)
6 any later version.
7
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***********************************************************************/
13#ifndef FC__MPDB_H
14#define FC__MPDB_H
15
16#ifdef __cplusplus
17extern "C" {
18#endif /* __cplusplus */
19
20/* common */
21#include "fc_types.h"
22
23/* modinst */
24#include "download.h"
25
32
33#define SPECLIST_TAG install_info
34#define SPECLIST_TYPE struct install_info
35#include "speclist.h"
36
37#define install_info_list_iterate(ii_list, item) \
38 TYPED_LIST_ITERATE(struct install_info, ii_list, item)
39#define install_info_list_iterate_end LIST_ITERATE_END
40
41/* Backward compatibility to pre-sqlite database versions */
42void load_install_info_list(const char *filename);
43
44void create_mpdb(const char *filename, bool scenario_db);
45void open_mpdb(const char *filename, bool scenario_db);
46void close_mpdbs(void);
47
48bool mpdb_update_modpack(const char *name, enum modpack_type type,
49 const char *version);
50const char *mpdb_installed_version(const char *name,
51 enum modpack_type type);
52
53#ifdef __cplusplus
54}
55#endif /* __cplusplus */
56
57#endif /* FC__MPDB_H */
char * incite_cost
Definition comments.c:75
#define MAX_LEN_NAME
Definition fc_types.h:66
GType type
Definition repodlgs.c:1313
const char * name
Definition inputfile.c:127
const char * mpdb_installed_version(const char *name, enum modpack_type type)
Definition mpdb.c:253
void load_install_info_list(const char *filename)
Definition mpdb.c:43
void create_mpdb(const char *filename, bool scenario_db)
Definition mpdb.c:134
void close_mpdbs(void)
Definition mpdb.c:202
void open_mpdb(const char *filename, bool scenario_db)
Definition mpdb.c:181
bool mpdb_update_modpack(const char *name, enum modpack_type type, const char *version)
Definition mpdb.c:213
enum modpack_type type
Definition mpdb.h:29
char name[MAX_LEN_NAME]
Definition mpdb.h:28
char version[MAX_LEN_NAME]
Definition mpdb.h:30