IStorage.cs 829 B

1234567891011121314151617181920212223242526272829303132333435
  1. using Ryujinx.OsHle.Ipc;
  2. using System.Collections.Generic;
  3. using static Ryujinx.OsHle.Objects.ObjHelper;
  4. namespace Ryujinx.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. IStorage Storage = Context.GetObject<IStorage>();
  22. MakeObject(Context, new IStorageAccessor(Storage));
  23. return 0;
  24. }
  25. }
  26. }