IStorage.cs 731 B

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