-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstartup_update_internal.h
More file actions
44 lines (34 loc) · 1.3 KB
/
startup_update_internal.h
File metadata and controls
44 lines (34 loc) · 1.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#pragma once
#include "app_types.h"
#include "mapInfo.h"
#include "runtime.h"
#include <cstdint>
#include <filesystem>
#include <string>
#include <vector>
namespace mapupdater::startup {
enum class DownloadKind { Map, Mpq };
enum DownloadOwnerFlags : uint32_t {
kDownloadOwnerNone = 0,
kDownloadOwnerDota = 1u << 0,
kDownloadOwnerLod = 1u << 1,
};
struct DownloadItem {
DownloadKind kind = DownloadKind::Map;
uint32_t owner_flags = kDownloadOwnerNone;
std::wstring display_name;
std::wstring url;
std::filesystem::path target_path;
uint64_t expected_size = 0;
std::string counter_map_name;
};
std::wstring SafeUtf8ToWide(const std::string &value);
void DebugLog(const AppConfig &config, const std::string &message);
void IncrementDownloadCounter(const MapInfo &info, const AppConfig &config);
void IncrementDownloadCounter(const std::string &map_name_utf8, const AppConfig &config);
std::vector<DownloadItem> BuildMissingDownloadItems(const runtime::RuntimeState &state,
const LatestMapsInfo &maps_info);
bool RunCustomOverlaySession(const std::vector<DownloadItem> &items,
const LatestMapsInfo &maps_info, const AppConfig &config,
bool autoupdate_mode);
} // namespace mapupdater::startup