-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathmain.cpp
45 lines (32 loc) · 1.17 KB
/
main.cpp
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
45
#include <iostream>
#include <fstream>
#include <git2.h>
#include "play_manager.h"
#include "discord_state.h"
#include "telegram_state.h"
#include "win10_store_manager.h"
#include "win10_versiondb_manager.h"
#include "job_manager.h"
int main() {
std::cout << "Starting up!" << std::endl;
git_libgit2_init();
JobManager jobManager;
jobManager.startTimeOutThread();
PlayManager playManager;
ApkManager apkManager (playManager, jobManager);
// apkManager.downloadAndProcessApk(playManager.getBetaDeviceARM(), 943160055, false);
Win10StoreManager win10Manager;
win10Manager.init();
Win10VersionDBManager win10VdbManager;
win10VdbManager.addWin10StoreMgr(win10Manager);
static DiscordState* discordState = new DiscordState(playManager, apkManager);
discordState->addWin10StoreMgr(win10Manager);
TelegramState telegramState(apkManager);
apkManager.startChecking();
win10Manager.startChecking();
signal(SIGINT, [](int signo) { discordState->storeSessionInfo(); exit(0); });
signal(SIGTERM, [](int signo) { discordState->storeSessionInfo(); exit(0); });
discordState->loop();
delete discordState;
return 0;
}