2021-12-06 21:15:31 -05:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <memory>
|
|
|
|
|
|
|
|
#include "launchercore.h"
|
|
|
|
|
|
|
|
#if defined(Q_OS_LINUX)
|
2022-08-15 11:14:37 -04:00
|
|
|
#include "gameparser.h"
|
2021-12-06 21:15:31 -05:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#include <QSystemTrayIcon>
|
|
|
|
|
|
|
|
class Watchdog : public QObject {
|
|
|
|
Q_OBJECT
|
|
|
|
public:
|
2022-07-21 21:38:26 -04:00
|
|
|
Watchdog(LauncherCore& core) : core(core), QObject(&core) {}
|
2021-12-06 21:15:31 -05:00
|
|
|
|
2022-09-05 15:59:00 -04:00
|
|
|
void launchGame(const ProfileSettings& settings, const LoginAuth& auth);
|
2021-12-06 21:15:31 -05:00
|
|
|
|
|
|
|
private:
|
|
|
|
LauncherCore& core;
|
|
|
|
QSystemTrayIcon* icon = nullptr;
|
|
|
|
|
|
|
|
int processWindowId = -1;
|
|
|
|
|
|
|
|
#if defined(Q_OS_LINUX)
|
|
|
|
GameParseResult lastResult;
|
|
|
|
#endif
|
|
|
|
|
|
|
|
std::unique_ptr<GameParser> parser;
|
|
|
|
};
|