iw4x-client/src/Components/Modules/News.hpp

37 lines
710 B
C++
Raw Normal View History

2017-01-20 08:36:52 -05:00
#pragma once
2017-01-19 16:23:59 -05:00
namespace Components
{
class News : public Component
{
public:
News();
~News();
#if defined(DEBUG) || defined(FORCE_UNIT_TESTS)
2017-01-20 08:36:52 -05:00
const char* getName() override { return "News"; };
2017-01-19 16:23:59 -05:00
#endif
void preDestroy() override;
2017-01-20 08:36:52 -05:00
bool unitTest() override;
2017-01-19 16:23:59 -05:00
static void LaunchUpdater(std::string params);
static bool Updating();
2017-01-19 16:23:59 -05:00
private:
static std::string UpdaterArgs;
static std::string UpdaterHash;
2017-01-19 16:23:59 -05:00
static std::thread Thread;
2017-02-28 13:55:22 -05:00
static std::mutex UpdaterMutex;
2017-01-19 16:23:59 -05:00
static bool Terminate;
static bool GetLatestUpdater();
static bool DownloadUpdater();
2017-01-19 16:23:59 -05:00
static void CheckForUpdate();
static void ExitProcessStub(unsigned int exitCode);
static const char* GetNewsText();
};
}