69 std::vector<std::string>
tags;
169 using AuthCallback = std::function<void(
bool success,
const std::string& message)>;
241 std::vector<GOGGameInfo>
getLibrary(
bool forceRefresh =
false);
254 std::optional<GOGGameInfo>
getGameInfo(
const std::string& gameId)
const;
281 bool installGame(
const std::string& gameId,
const std::filesystem::path& installPath = {},
289 const std::filesystem::path& installPath = {},
290 const std::string& platform =
"",
313 bool hasUpdate(
const std::string& gameId)
const;
329 bool importGame(
const std::string& gameId,
const std::filesystem::path& existingPath);
367 bool launchGame(
const std::string& gameId,
bool useProton =
false,
368 const std::string& protonVersion =
"");
399 std::unique_ptr<Impl> impl_;
402 std::vector<GOGGameInfo> fetchLibraryHeroicUnlocked();
403 std::vector<GOGGameInfo> getLibraryHeroic(
bool forceRefresh);
404 std::vector<GOGGameInfo> getLibraryGogdl(
bool forceRefresh);
405 bool installGameHeroic(
const std::string& gameId,
const std::filesystem::path& path,
407 bool installGameGogdl(
const std::string& gameId,
const std::filesystem::path& path,
411 std::vector<GOGGameInfo> parseHeroicLibrary()
const;
412 std::vector<GOGGameInfo> parseHeroicInstalled()
const;
413 std::filesystem::path getHeroicConfigPath()
const;
bool launchGame(const std::string &gameId, bool useProton=false, const std::string &protonVersion="")
Launch a game.
std::optional< GOGGameInfo > getGameInfo(const std::string &gameId) const
Get info for a specific game.
std::vector< GOGGameInfo > getLibrary(bool forceRefresh=false)
Get all games in GOG library.
bool syncCloudSaves(const std::string &gameId)
Sync cloud saves (bidirectional).
static bool isHeroicAvailable()
Check if Heroic Games Launcher is installed.
void cancelOperation()
Cancel ongoing operation.
GOGBackend getActiveBackend() const
Get which backend is being used.
bool uninstallGame(const std::string &gameId)
Uninstall a game.
bool verifyGame(const std::string &gameId, const ProgressCallback &progressCallback=nullptr)
Verify game files.
bool importGame(const std::string &gameId, const std::filesystem::path &existingPath)
Import existing game installation.
std::future< bool > installGameAsync(const std::string &gameId, const std::filesystem::path &installPath={}, const std::string &platform="", const ProgressCallback &progressCallback=nullptr)
Install a game asynchronously.
void setDefaultInstallPath(const std::filesystem::path &path)
Set default installation directory.
std::string getLaunchCommand(const std::string &gameId) const
Get launch command for a game.
bool hasUpdate(const std::string &gameId) const
Check if updates are available.
static bool isGogdlAvailable()
Check if gogdl CLI is installed.
bool isAvailable() const
Check if GOG integration is available.
void authenticate(const AuthCallback &callback=nullptr)
Start authentication flow.
Game toGame(const GOGGameInfo &gogGame) const
Convert GOG game to generic Game object.
bool updateGame(const std::string &gameId, const ProgressCallback &progressCallback=nullptr)
Update a game.
std::filesystem::path getDefaultInstallPath() const
Get default installation directory.
bool uploadCloudSaves(const std::string &gameId)
Upload local saves to cloud.
bool installGame(const std::string &gameId, const std::filesystem::path &installPath={}, const std::string &platform="", const ProgressCallback &progressCallback=nullptr)
Install a game.
std::vector< GOGGameInfo > getInstalledGames() const
Get all installed GOG games.
int syncLibrary()
Sync GOG library with game database.
bool isAuthenticated() const
Check if user is authenticated.
void setPreferredBackend(GOGBackend backend)
Set preferred backend.
GOGAuthStatus getAuthStatus() const
Get authentication status.
void logout()
Log out and clear credentials.
std::function< void(bool success, const std::string &message)> AuthCallback
std::function< void(const GOGProgress &)> ProgressCallback
bool downloadCloudSaves(const std::string &gameId)
Download cloud saves for a game.
Complete representation of a game in the library.
GOGBackend
Backend to use for GOG operations.
@ GOGDL
gogdl CLI (lightweight)
@ Heroic
Heroic Games Launcher (full-featured).
@ Direct
Direct GOG API (limited).
int progressCallback(void *userp, curl_off_t dltotal, curl_off_t, curl_off_t, curl_off_t)
GOG Galaxy authentication status.
bool isTokenExpired() const
std::chrono::system_clock::time_point tokenExpiry
Information about a GOG.com game.
std::string backgroundUrl
std::filesystem::path installPath
std::string baseGameId
If DLC, the base game ID.
std::string executable
Main executable name.
std::string gameId
GOG game ID (numeric string).
std::vector< std::string > dlcIds
std::vector< std::string > tags
std::string version
Installed version.
std::string slug
URL-friendly name.
std::string getFormattedSize() const
std::vector< std::string > genres
std::string title
Display title.
Progress information for GOG operations.
std::string getStateStr() const