bcat: Add backend function for BCAT Indirect (launch parameter)

Returns the data that should be returned by PopLaunchParameter kind=ApplicationSpecific.
This commit is contained in:
Zach Hilman 2019-05-01 22:42:17 -04:00
parent ea17b294ea
commit b8ce87103d
2 changed files with 11 additions and 0 deletions

View file

@ -44,4 +44,10 @@ void NullBackend::SetPassphrase(u64 title_id, const Passphrase& passphrase) {
Common::HexArrayToString(passphrase));
}
std::optional<std::vector<u8>> NullBackend::GetLaunchParameter(TitleIDVersion title) {
LOG_DEBUG(Service_BCAT, "called, title_id={:016X}, build_id={:016X}", title.title_id,
title.build_id);
return std::nullopt;
}
} // namespace Service::BCAT

View file

@ -5,6 +5,7 @@
#pragma once
#include <functional>
#include <optional>
#include "common/common_types.h"
#include "core/file_sys/vfs_types.h"
@ -32,6 +33,8 @@ public:
virtual void SetPassphrase(u64 title_id, const Passphrase& passphrase) = 0;
virtual std::optional<std::vector<u8>> GetLaunchParameter(TitleIDVersion title) = 0;
protected:
DirectoryGetter dir_getter;
};
@ -48,6 +51,8 @@ public:
bool Clear(u64 title_id) override;
void SetPassphrase(u64 title_id, const Passphrase& passphrase) override;
std::optional<std::vector<u8>> GetLaunchParameter(TitleIDVersion title) override;
};
std::unique_ptr<Backend> CreateBackendFromSettings(DirectoryGetter getter);