ILibraryAppletCreator.cs 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. using Ryujinx.HLE.HOS.Applets;
  2. using Ryujinx.HLE.HOS.Services.Am.AppletAE.AllSystemAppletProxiesService.LibraryAppletCreator;
  3. namespace Ryujinx.HLE.HOS.Services.Am.AppletAE.AllSystemAppletProxiesService.SystemAppletProxy
  4. {
  5. class ILibraryAppletCreator : IpcService
  6. {
  7. public ILibraryAppletCreator() { }
  8. [Command(0)]
  9. // CreateLibraryApplet(u32, u32) -> object<nn::am::service::ILibraryAppletAccessor>
  10. public ResultCode CreateLibraryApplet(ServiceCtx context)
  11. {
  12. AppletId appletId = (AppletId)context.RequestData.ReadInt32();
  13. int libraryAppletMode = context.RequestData.ReadInt32();
  14. MakeObject(context, new ILibraryAppletAccessor(appletId, context.Device.System));
  15. return ResultCode.Success;
  16. }
  17. [Command(10)]
  18. // CreateStorage(u64) -> object<nn::am::service::IStorage>
  19. public ResultCode CreateStorage(ServiceCtx context)
  20. {
  21. long size = context.RequestData.ReadInt64();
  22. MakeObject(context, new IStorage(new byte[size]));
  23. return ResultCode.Success;
  24. }
  25. [Command(11)]
  26. // CreateTransferMemoryStorage(b8, u64, handle<copy>) -> object<nn::am::service::IStorage>
  27. public ResultCode CreateTransferMemoryStorage(ServiceCtx context)
  28. {
  29. bool unknown = context.RequestData.ReadBoolean();
  30. long size = context.RequestData.ReadInt64();
  31. // NOTE: We don't support TransferMemory for now.
  32. MakeObject(context, new IStorage(new byte[size]));
  33. return ResultCode.Success;
  34. }
  35. }
  36. }