CheatMenuSA/src/updater.h

41 lines
963 B
C
Raw Normal View History

2021-03-10 16:10:59 -05:00
#pragma once
2022-01-04 17:33:07 -05:00
/*
Update class
Checks for menu updates and provides a way to update the menu.
*/
2021-06-18 12:49:11 -04:00
class Updater
2021-03-10 16:10:59 -05:00
{
2022-01-04 17:33:07 -05:00
private:
2022-01-07 03:18:00 -05:00
enum class States
{
IDLE,
CHECKING,
FOUND
};
static inline States curState = States::IDLE;
static inline std::string latestVer;
2021-03-10 16:10:59 -05:00
public:
2021-06-18 12:49:11 -04:00
2022-01-07 03:18:00 -05:00
Updater() = delete;
Updater(const Updater&) = delete;
2022-01-04 17:33:07 -05:00
2022-01-07 03:18:00 -05:00
static void CheckUpdate();
static std::string GetUpdateVersion();
static bool IsUpdateAvailable();
2022-01-04 17:33:07 -05:00
2022-03-14 02:04:58 -04:00
/*
2022-03-18 03:23:43 -04:00
Just downloading counter.info file from GitHub repository
Initial plan was to add google analytics but people will freak
out about that (though every site has it in some form)
Pretty barebones but this shouldn't raise any concerns (i hope)
2022-03-14 02:04:58 -04:00
*/
static void IncrementDailyUsageCounter();
2022-01-07 03:18:00 -05:00
// Needs to run in it's own thread to prevent the game from freezing
static void Process();
static void ResetUpdaterState();
2021-03-10 16:10:59 -05:00
};