GameManager: Add functions to query progress

This commit is contained in:
Henrik Rydgård
2013-12-05 13:01:00 +01:00
parent 862de78c86
commit 8e658d628f
2 changed files with 48 additions and 9 deletions
+14 -1
View File
@@ -24,6 +24,8 @@
class GameManager {
public:
GameManager();
bool IsGameInstalled(std::string name);
// This starts off a background process.
@@ -34,10 +36,21 @@ public:
// main UI thread.
void Update();
// Returns false if no install is in progress.
bool IsInstallInProgress() const {
return installInProgress_;
}
float GetCurrentInstallProgress() const {
return installProgress_;
}
private:
void InstallGame(std::string zipfile);
bool InstallGame(std::string zipfile);
std::string GetTempFilename() const;
std::shared_ptr<http::Download> curDownload_;
bool installInProgress_;
float installProgress_;
};
extern GameManager g_GameManager;