diff options
| author | Zach Hilman <zachhilman@gmail.com> | 2019-04-28 18:46:46 -0400 |
|---|---|---|
| committer | Zach Hilman <zachhilman@gmail.com> | 2019-09-30 17:21:53 -0400 |
| commit | 2c0b75a7448ab3878d159548858b397e1bcc305b (patch) | |
| tree | 75dcee9d42250068541f9a448a1a255a7c7e025a /src/core/hle/service/bcat/backend/backend.cpp | |
| parent | 647992e666617d287a06b4ffbd1db9ab6cbd524d (diff) | |
bcat: Add backend class to generify the functions of BCAT
Provides the most abstract simplified functions of BCAT as functions. Also includes a NullBackend class which is just a no-op.
Diffstat (limited to 'src/core/hle/service/bcat/backend/backend.cpp')
| -rw-r--r-- | src/core/hle/service/bcat/backend/backend.cpp | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/src/core/hle/service/bcat/backend/backend.cpp b/src/core/hle/service/bcat/backend/backend.cpp new file mode 100644 index 000000000..aefa2208d --- /dev/null +++ b/src/core/hle/service/bcat/backend/backend.cpp @@ -0,0 +1,47 @@ +// Copyright 2019 yuzu emulator team +// Licensed under GPLv2 or any later version +// Refer to the license.txt file included. + +#include "common/hex_util.h" +#include "common/logging/log.h" +#include "core/hle/service/bcat/backend/backend.h" + +namespace Service::BCAT { + +Backend::Backend(DirectoryGetter getter) : dir_getter(std::move(getter)) {} + +Backend::~Backend() = default; + +NullBackend::NullBackend(const DirectoryGetter& getter) : Backend(std::move(getter)) {} + +NullBackend::~NullBackend() = default; + +bool NullBackend::Synchronize(TitleIDVersion title, CompletionCallback callback) { + LOG_DEBUG(Service_BCAT, "called, title_id={:016X}, build_id={:016X}", title.title_id, + title.build_id); + + callback(true); + return true; +} + +bool NullBackend::SynchronizeDirectory(TitleIDVersion title, std::string name, + CompletionCallback callback) { + LOG_DEBUG(Service_BCAT, "called, title_id={:016X}, build_id={:016X}, name={}", title.title_id, + title.build_id, name); + + callback(true); + return true; +} + +bool NullBackend::Clear(u64 title_id) { + LOG_DEBUG(Service_BCAT, "called, title_id={:016X}"); + + return true; +} + +void NullBackend::SetPassphrase(u64 title_id, const Passphrase& passphrase) { + LOG_DEBUG(Service_BCAT, "called, title_id={:016X}, passphrase = {}", title_id, + Common::HexArrayToString(passphrase)); +} + +} // namespace Service::BCAT |
