Cavoke  1.1.0
A Platform for creating and hosting multiplayer turn-based board games
Loading...
Searching...
No Matches
cache_manager.h
1#ifndef CLIENT_PROTOTYPE_CACHE_MANAGER_H
2#define CLIENT_PROTOTYPE_CACHE_MANAGER_H
3
4#include <QDir>
5#include <QStandardPaths>
6#include <QString>
7#include <QUrl>
8
9namespace cache_manager {
10const QDir CACHE_DIR =
11 QDir(QStandardPaths::writableLocation(QStandardPaths::AppLocalDataLocation))
12 .filePath("cavoke-client");
13const QDir APPS_DIR = CACHE_DIR.filePath("apps");
14const int BUFFER_SIZE = 1'000'000;
15
16QUrl get_cached_app_path(const QString &gameId);
17
18QUrl save_zip_to_cache(const QFile *archive,
19 const QString &gameId = "local-qml");
20
21void unzip_to_folder(const QFile &archive, const QDir &dest);
22
23} // namespace cache_manager
24
25#endif // CLIENT_PROTOTYPE_CACHE_MANAGER_H