Freeciv-3.1: /fast/freeciv/nightly/S3_1/tools/fcmp/mpdb.h File Reference

Freeciv-3.1

Loading...
Searching...
No Matches
Data Structures | Macros | Functions
mpdb.h File Reference
`#include "fc_types.h"`
`#include "download.h"`
`#include "speclist.h"`

Go to the source code of this file.

## Data Structures

struct | install_info

## Macros

#define | SPECLIST_TAG install_info
#define | SPECLIST_TYPE struct install_info
#define | install_info_list_iterate(ii_list, item) TYPED_LIST_ITERATE(struct install_info, ii_list, item)
#define | install_info_list_iterate_end LIST_ITERATE_END

## Functions

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)
void | close_mpdbs (void)
bool | mpdb_update_modpack (const char *name, enum modpack_type type, const char *version)
const char * | mpdb_installed_version (const char *name, enum modpack_type type)

## Macro Definition Documentation

## ◆ install_info_list_iterate

#define install_info_list_iterate | ( |  | ii_list,
|  |  | item
| ) |  | TYPED_LIST_ITERATE(struct install_info, ii_list, item)

Definition at line 37 of file mpdb.h.

## ◆ install_info_list_iterate_end

#define install_info_list_iterate_end LIST_ITERATE_END

Definition at line 39 of file mpdb.h.

## ◆ SPECLIST_TAG

#define SPECLIST_TAG install_info

Definition at line 33 of file mpdb.h.

## ◆ SPECLIST_TYPE

#define SPECLIST_TYPE struct install_info

Definition at line 34 of file mpdb.h.

## Function Documentation

## ◆ close_mpdbs()

void close_mpdbs | ( | void |  | ) |

Close open databases

Definition at line 202 of file mpdb.c.

Referenced by main(), and main().

## ◆ create_mpdb()

void create_mpdb | ( | const char * | filename,
|  | bool | scenario_db
| ) |  |

Create modpack database

Definition at line 134 of file mpdb.c.

Referenced by load_install_info_lists().

## ◆ load_install_info_list()

void load_install_info_list | ( | const char * | filename | ) |

Construct install info list from file.

Definition at line 43 of file mpdb.c.

Referenced by load_install_info_lists().

## ◆ mpdb_installed_version()

const char * mpdb_installed_version | ( | const char * | name,
|  | enum modpack_type | type
| ) |  |

Return version of modpack.

Definition at line 253 of file mpdb.c.

Referenced by download_modpack_recursive(), mpgui::refresh_list_versions(), mpgui::setup_list(), setup_modpack_list(), setup_modpack_list(), setup_modpack_list(), versionlist_update_main_thread(), and versionlist_update_main_thread().

## ◆ mpdb_update_modpack()

bool mpdb_update_modpack | ( | const char * | name,
|  | enum modpack_type | type,
|  | const char * | version
| ) |  |

Update modpack information in database

Definition at line 213 of file mpdb.c.

Referenced by download_modpack_recursive(), and load_install_info_list().

## ◆ open_mpdb()

void open_mpdb | ( | const char * | filename,
|  | bool | scenario_db
| ) |  |

Open existing database

Definition at line 181 of file mpdb.c.

Referenced by load_install_info_lists().