sdmc_factory.h 763 B

123456789101112131415161718192021222324252627282930313233343536
  1. // Copyright 2018 yuzu emulator team
  2. // Licensed under GPLv2 or any later version
  3. // Refer to the license.txt file included.
  4. #pragma once
  5. #include <memory>
  6. #include "core/file_sys/vfs.h"
  7. #include "core/hle/result.h"
  8. namespace FileSys {
  9. class RegisteredCache;
  10. class PlaceholderCache;
  11. /// File system interface to the SDCard archive
  12. class SDMCFactory {
  13. public:
  14. explicit SDMCFactory(VirtualDir dir);
  15. ~SDMCFactory();
  16. ResultVal<VirtualDir> Open();
  17. VirtualDir GetSDMCContentDirectory() const;
  18. RegisteredCache* GetSDMCContents() const;
  19. PlaceholderCache* GetSDMCPlaceholder() const;
  20. private:
  21. VirtualDir dir;
  22. std::unique_ptr<RegisteredCache> contents;
  23. std::unique_ptr<PlaceholderCache> placeholder;
  24. };
  25. } // namespace FileSys