Freeciv-3.3: /fast/freeciv/nightly/main/tools/fcmp/mpdb.h Source File

Freeciv-3.3

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
26 struct install_info
27{
28 char name[MAX_LEN_NAME];
29 enum modpack_type type;
30 char version[MAX_LEN_NAME];
31};
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 */
incite_cost
char * incite_cost
Definition comments.c:74
download.h
fc_types.h
MAX_LEN_NAME
#define MAX_LEN_NAME
Definition fc_types.h:66
type
GType type
Definition repodlgs.c:1313
name
const char * name
Definition inputfile.c:127
mpdb_installed_version
const char * mpdb_installed_version(const char *name, enum modpack_type type)
Definition mpdb.c:253
load_install_info_list
void load_install_info_list(const char *filename)
Definition mpdb.c:43
create_mpdb
void create_mpdb(const char *filename, bool scenario_db)
Definition mpdb.c:134
close_mpdbs
void close_mpdbs(void)
Definition mpdb.c:202
open_mpdb
void open_mpdb(const char *filename, bool scenario_db)
Definition mpdb.c:181
mpdb_update_modpack
bool mpdb_update_modpack(const char *name, enum modpack_type type, const char *version)
Definition mpdb.c:213
speclist.h
install_info
Definition mpdb.h:27
install_info::type
enum modpack_type type
Definition mpdb.h:29
install_info::name
char name[MAX_LEN_NAME]
Definition mpdb.h:28
install_info::version
char version[MAX_LEN_NAME]
Definition mpdb.h:30