backend.cpp 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. // Copyright 2019 yuzu emulator team
  2. // Licensed under GPLv2 or any later version
  3. // Refer to the license.txt file included.
  4. #include "common/hex_util.h"
  5. #include "common/logging/log.h"
  6. #include "core/hle/service/bcat/backend/backend.h"
  7. namespace Service::BCAT {
  8. Backend::Backend(DirectoryGetter getter) : dir_getter(std::move(getter)) {}
  9. Backend::~Backend() = default;
  10. NullBackend::NullBackend(const DirectoryGetter& getter) : Backend(std::move(getter)) {}
  11. NullBackend::~NullBackend() = default;
  12. bool NullBackend::Synchronize(TitleIDVersion title, CompletionCallback callback) {
  13. LOG_DEBUG(Service_BCAT, "called, title_id={:016X}, build_id={:016X}", title.title_id,
  14. title.build_id);
  15. callback(true);
  16. return true;
  17. }
  18. bool NullBackend::SynchronizeDirectory(TitleIDVersion title, std::string name,
  19. CompletionCallback callback) {
  20. LOG_DEBUG(Service_BCAT, "called, title_id={:016X}, build_id={:016X}, name={}", title.title_id,
  21. title.build_id, name);
  22. callback(true);
  23. return true;
  24. }
  25. bool NullBackend::Clear(u64 title_id) {
  26. LOG_DEBUG(Service_BCAT, "called, title_id={:016X}");
  27. return true;
  28. }
  29. void NullBackend::SetPassphrase(u64 title_id, const Passphrase& passphrase) {
  30. LOG_DEBUG(Service_BCAT, "called, title_id={:016X}, passphrase = {}", title_id,
  31. Common::HexArrayToString(passphrase));
  32. }
  33. } // namespace Service::BCAT