![]() |
Freeciv21
Develop your civilization from humble roots to a global empire
|
#include "mpdb.h"#include "capability.h"#include "fcintl.h"#include "registry.h"#include "registry_ini.h"#include <QDir>#include <QFileInfo>#include <sqlite3.h>
Include dependency graph for mpdb.cpp:Go to the source code of this file.
Macros | |
| #define | MPDB_CAPSTR "+mpdb" |
| #define | MPDB_FORMAT_VERSION "1" |
Functions | |
| static int | mpdb_query (sqlite3 *handle, const char *query) |
| SQL query to database. More... | |
| void | load_install_info_list (const char *filename) |
| Construct install info list from file. More... | |
| void | create_mpdb (const char *filename, bool scenario_db) |
| Create modpack database. More... | |
| void | open_mpdb (const char *filename, bool scenario_db) |
| Open existing database. More... | |
| void | close_mpdbs () |
| Close open databases. More... | |
| bool | mpdb_update_modpack (const char *name, enum modpack_type type, const char *version) |
| Update modpack information in database. More... | |
| const char * | mpdb_installed_version (const char *name, enum modpack_type type) |
| Return version of modpack. More... | |
Variables | |
| static sqlite3 * | main_handle = nullptr |
| static sqlite3 * | scenario_handle = nullptr |
| void close_mpdbs | ( | ) |
| void create_mpdb | ( | const char * | filename, |
| bool | scenario_db | ||
| ) |
Create modpack database.
Definition at line 132 of file mpdb.cpp.
Referenced by load_install_info_lists().
| void load_install_info_list | ( | const char * | filename | ) |
Construct install info list from file.
Definition at line 39 of file mpdb.cpp.
Referenced by load_install_info_lists().
| const char* mpdb_installed_version | ( | const char * | name, |
| enum modpack_type | type | ||
| ) |
Return version of modpack.
The caller is responsible to free the returned string.
Definition at line 251 of file mpdb.cpp.
Referenced by download_modpack(), mpgui::refresh_list_versions(), mpgui::setup_list(), and setup_modpack_list().
|
static |
SQL query to database.
Definition at line 106 of file mpdb.cpp.
Referenced by create_mpdb(), and 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 209 of file mpdb.cpp.
Referenced by download_modpack(), and load_install_info_list().
| void open_mpdb | ( | const char * | filename, |
| bool | scenario_db | ||
| ) |
Open existing database.
Definition at line 177 of file mpdb.cpp.
Referenced by load_install_info_lists().
|
static |
Definition at line 31 of file mpdb.cpp.
Referenced by close_mpdbs(), create_mpdb(), mpdb_installed_version(), mpdb_update_modpack(), and open_mpdb().
|
static |
Definition at line 32 of file mpdb.cpp.
Referenced by close_mpdbs(), create_mpdb(), mpdb_installed_version(), mpdb_update_modpack(), and open_mpdb().