![]() |
Moonlight-XboxOG latest
Moonlight Xbox OG is a port of the Moonlight Game Streaming client to the original Xbox console.
|
Implements cover art cache persistence. More...
#include "src/startup/cover_art_cache.h"#include <cerrno>#include <cstdint>#include <cstdio>#include <cstring>#include <string>#include <vector>#include "src/platform/error_utils.h"#include "src/platform/filesystem_utils.h"#include "src/startup/storage_paths.h"Functions | |
| std::string | startup::build_cover_art_cache_key (std::string_view hostUuid, std::string_view hostAddress, int appId) |
| Build a stable cache key for one host app's cover art. | |
| bool | startup::cover_art_exists (std::string_view cacheKey, const std::string &cacheRoot=default_cover_art_cache_root()) |
| Return whether cached cover art exists for a given key. | |
| std::string | startup::default_cover_art_cache_root () |
| Return the default root directory for cached cover art. | |
| bool | startup::delete_cover_art (std::string_view cacheKey, std::string *errorMessage=nullptr, const std::string &cacheRoot=default_cover_art_cache_root()) |
| Delete cached cover art for a given key. | |
| LoadCoverArtResult | startup::load_cover_art (std::string_view cacheKey, const std::string &cacheRoot=default_cover_art_cache_root()) |
| Load cached cover art bytes for a given key. | |
| SaveCoverArtResult | startup::save_cover_art (std::string_view cacheKey, const std::vector< unsigned char > &bytes, const std::string &cacheRoot=default_cover_art_cache_root()) |
| Save cover art bytes for a given cache key. | |
Implements cover art cache persistence.
| std::string startup::build_cover_art_cache_key | ( | std::string_view | hostUuid, |
| std::string_view | hostAddress, | ||
| int | appId ) |
Build a stable cache key for one host app's cover art.
| hostUuid | Host UUID when available. |
| hostAddress | Host address used as a fallback discriminator. |
| appId | Host application identifier. |
| bool startup::cover_art_exists | ( | std::string_view | cacheKey, |
| const std::string & | cacheRoot = default_cover_art_cache_root() ) |
Return whether cached cover art exists for a given key.
| cacheKey | Stable cover-art cache key. |
| cacheRoot | Cache root directory to inspect. |
| std::string startup::default_cover_art_cache_root | ( | ) |
Return the default root directory for cached cover art.
| bool startup::delete_cover_art | ( | std::string_view | cacheKey, |
| std::string * | errorMessage = nullptr, | ||
| const std::string & | cacheRoot = default_cover_art_cache_root() ) |
Delete cached cover art for a given key.
| cacheKey | Stable cover-art cache key. |
| errorMessage | Optional output for deletion failures. |
| cacheRoot | Cache root directory containing the artifact. |
| LoadCoverArtResult startup::load_cover_art | ( | std::string_view | cacheKey, |
| const std::string & | cacheRoot = default_cover_art_cache_root() ) |
Load cached cover art bytes for a given key.
| cacheKey | Stable cover-art cache key. |
| cacheRoot | Cache root directory containing the artifact. |
| SaveCoverArtResult startup::save_cover_art | ( | std::string_view | cacheKey, |
| const std::vector< unsigned char > & | bytes, | ||
| const std::string & | cacheRoot = default_cover_art_cache_root() ) |
Save cover art bytes for a given cache key.
| cacheKey | Stable cover-art cache key. |
| bytes | Cover art bytes to persist. |
| cacheRoot | Cache root directory where the artifact should be written. |