-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add GameDownloader class for managing game downloads and updates
- Loading branch information
1 parent
484bff5
commit 63430ca
Showing
3 changed files
with
56 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#include "GameDownloader.hpp" | ||
|
||
using namespace Flakkari::Internals; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
/************************************************************************** | ||
* Flakkari Library v0.5.0 | ||
* | ||
* Flakkari Library is a C++ Library for Network. | ||
* @file GameDownloader.hpp | ||
* @brief GameDownloader is a class that downloads games from the remote | ||
* repository and stores them in the Games folder. | ||
* It also updates the games if they are already present and removes them | ||
* if they are not present in the remote repository. | ||
* | ||
* Flakkari Library is under MIT License. | ||
* https://opensource.org/licenses/MIT | ||
* © 2023 @MasterLaplace | ||
* @version 0.5.0 | ||
* @date 2024-12-09 | ||
**************************************************************************/ | ||
|
||
#ifndef GAMEDOWNLOADER_HPP_ | ||
#define GAMEDOWNLOADER_HPP_ | ||
|
||
#include <cstdio> | ||
#include <cstdlib> | ||
#include <regex> | ||
|
||
#include "../Game/GameManager.hpp" | ||
#include "config.h.in" | ||
|
||
|
||
namespace Flakkari::Internals { | ||
|
||
class GameDownloader { | ||
public: | ||
/** | ||
* @brief Construct a new Game Downloader object | ||
* | ||
*/ | ||
GameDownloader(const std::string &gameDir) : _gameDir(gameDir) {} | ||
|
||
/** | ||
* @brief Destroy the Game Downloader object | ||
* | ||
*/ | ||
~GameDownloader() = default; | ||
|
||
private: | ||
std::string _gameDir; | ||
}; | ||
|
||
} // namespace Flakkari::Internals | ||
|
||
#endif /* !GAMEDOWNLOADER_HPP_ */ |