Freeciv21
Develop your civilization from humble roots to a global empire
netfile.h File Reference
#include <functional>
+ Include dependency graph for netfile.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Typedefs

using nf_errmsg = std::function< void(const QString &message)>
 

Functions

QJsonDocument netfile_get_json_file (const QUrl &url, const nf_errmsg &cb)
 Fetch a JSON file from the net. More...
 
section_filenetfile_get_section_file (const QUrl &url, const nf_errmsg &cb)
 Fetch section file from net. More...
 
bool netfile_download_file (const QUrl &url, const char *filename, const nf_errmsg &cb)
 Fetch file from given URL and save as given filename. More...
 

Typedef Documentation

◆ nf_errmsg

using nf_errmsg = std::function<void(const QString &message)>

Definition at line 23 of file netfile.h.

Function Documentation

◆ netfile_download_file()

bool netfile_download_file ( const QUrl &  url,
const char *  filename,
const nf_errmsg cb 
)

Fetch file from given URL and save as given filename.

Definition at line 139 of file netfile.cpp.

Referenced by download_modpack().

◆ netfile_get_json_file()

QJsonDocument netfile_get_json_file ( const QUrl &  url,
const nf_errmsg cb 
)

Fetch a JSON file from the net.

Definition at line 98 of file netfile.cpp.

Referenced by download_modpack(), and download_modpack_list().

◆ netfile_get_section_file()

section_file* netfile_get_section_file ( const QUrl &  url,
const nf_errmsg cb 
)

Fetch section file from net.

Definition at line 122 of file netfile.cpp.