Declares cover art cache persistence.
More...
#include <string>
#include <string_view>
#include <vector>
Go to the source code of this file.
Declares cover art cache persistence.
◆ build_cover_art_cache_key()
| 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.
- Parameters
-
| hostUuid | Host UUID when available. |
| hostAddress | Host address used as a fallback discriminator. |
| appId | Host application identifier. |
- Returns
- Stable cache key suitable for file-system storage.
◆ cover_art_exists()
Return whether cached cover art exists for a given key.
- Parameters
-
| cacheKey | Stable cover-art cache key. |
| cacheRoot | Cache root directory to inspect. |
- Returns
- true when cached art exists on disk.
◆ default_cover_art_cache_root()
| std::string startup::default_cover_art_cache_root |
( |
| ) |
|
Return the default root directory for cached cover art.
- Returns
- Default cover-art cache root path.
◆ delete_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.
- Parameters
-
| cacheKey | Stable cover-art cache key. |
| errorMessage | Optional output for deletion failures. |
| cacheRoot | Cache root directory containing the artifact. |
- Returns
- true when the artifact was deleted or was already absent.
◆ load_cover_art()
Load cached cover art bytes for a given key.
- Parameters
-
| cacheKey | Stable cover-art cache key. |
| cacheRoot | Cache root directory containing the artifact. |
- Returns
- Loaded cover-art bytes plus file-existence and error details.
◆ save_cover_art()
| 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.
- Parameters
-
| cacheKey | Stable cover-art cache key. |
| bytes | Cover art bytes to persist. |
| cacheRoot | Cache root directory where the artifact should be written. |
- Returns
- Save result including success state and error detail.