IStorage.cs 717 B

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