IStorage.cs 778 B

123456789101112131415161718192021222324252627282930313233
  1. using Ryujinx.Core.OsHle.Ipc;
  2. using System.Collections.Generic;
  3. using static Ryujinx.Core.OsHle.Objects.ObjHelper;
  4. namespace Ryujinx.Core.OsHle.Objects.Am
  5. {
  6. class IStorage : IIpcInterface
  7. {
  8. private Dictionary<int, ServiceProcessRequest> m_Commands;
  9. public IReadOnlyDictionary<int, ServiceProcessRequest> Commands => m_Commands;
  10. public byte[] Data { get; private set; }
  11. public IStorage(byte[] Data)
  12. {
  13. m_Commands = new Dictionary<int, ServiceProcessRequest>()
  14. {
  15. { 0, Open }
  16. };
  17. this.Data = Data;
  18. }
  19. public long Open(ServiceCtx Context)
  20. {
  21. MakeObject(Context, new IStorageAccessor(this));
  22. return 0;
  23. }
  24. }
  25. }