loader: add SetExternalContentSource extension

This commit is contained in:
misson20000
2018-10-25 12:52:01 -07:00
committed by SciresM
parent 18f51e9b2e
commit 5c147e5188
9 changed files with 132 additions and 4 deletions

View File

@@ -39,4 +39,24 @@ class ContentManagement {
static bool ShouldReplaceWithHBL(u64 tid);
static bool ShouldOverrideContents(u64 tid);
/* SetExternalContentSource extension */
class ExternalContentSource {
public:
static void GenerateMountpointName(u64 tid, char *out, size_t max_length);
ExternalContentSource(u64 tid, const char *mountpoint);
~ExternalContentSource();
ExternalContentSource(const ExternalContentSource &other) = delete;
ExternalContentSource(ExternalContentSource &&other) = delete;
ExternalContentSource &operator=(const ExternalContentSource &other) = delete;
ExternalContentSource &operator=(ExternalContentSource &&other) = delete;
const u64 tid;
char mountpoint[32];
};
static ExternalContentSource *GetExternalContentSource(u64 tid); /* returns nullptr if no ECS is set */
static Result SetExternalContentSource(u64 tid, FsFileSystem filesystem); /* takes ownership of filesystem */
static void ClearExternalContentSource(u64 tid);
};