major: initial release

* initial development

* pipeline

* pipeline

* pipeline

* pipeline

* pipeline

* pipeline

* pipeline

* pipeline

* pipeline

* pipeline

* pipeline

* pipeline

* pipeline

* pipeline

* ci/cd

* ci/cd

* ci/cd

* ci/cd

* ci/cd

* ci/cd

* ci/cd

* pokemon

* pokemon

* pokemon

* pokemon

* pokemon

* pokemon

* improvements

* improvements

* ci/cd

* ci/cd

* improvements

* improvements

* improvements

* improvements

* improvements

* improvements

* improvements

* improvements

* improvements

---------

Co-authored-by: sdine <sdine@sdine.com>
This commit is contained in:
Sebastian Dine
2026-05-09 11:05:47 +02:00
committed by GitHub
co-authored by sdine
parent 13262fa015
commit 55ace147bc
149 changed files with 12611 additions and 0 deletions
@@ -0,0 +1,37 @@
#pragma once
// LocalImageStore: stores card images under
// `<dataStorage>/<game>/images/<filename>`.
// Implements IImageStore, used by ImageService.
#include "ccm/games/IGameModule.hpp"
#include "ccm/ports/IFileSystem.hpp"
#include "ccm/ports/IImageStore.hpp"
#include "ccm/services/ConfigService.hpp"
#include <functional>
#include <string>
namespace ccm {
class LocalImageStore final : public IImageStore {
public:
using DirNameFn = std::function<std::string(Game)>;
LocalImageStore(IFileSystem& fs, ConfigService& config, DirNameFn dirName);
Result<std::string> copyIn(Game game,
const std::filesystem::path& srcPath,
const std::string& targetName) override;
Result<void> remove(Game game, const std::string& imageName) override;
std::filesystem::path resolvePath(Game game, const std::string& imageName) const override;
private:
IFileSystem& fs_;
ConfigService& config_;
DirNameFn dirName_;
[[nodiscard]] std::filesystem::path gameImageDir(Game game) const;
};
} // namespace ccm