ILibraryAppletProxy.cs 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  1. using Ryujinx.HLE.HOS.Services.Am.AppletAE.AllSystemAppletProxiesService.LibraryAppletProxy;
  2. using Ryujinx.HLE.HOS.Services.Am.AppletAE.AllSystemAppletProxiesService.SystemAppletProxy;
  3. namespace Ryujinx.HLE.HOS.Services.Am.AppletAE.AllSystemAppletProxiesService
  4. {
  5. class ILibraryAppletProxy : IpcService
  6. {
  7. private readonly long _pid;
  8. public ILibraryAppletProxy(long pid)
  9. {
  10. _pid = pid;
  11. }
  12. [CommandHipc(0)]
  13. // GetCommonStateGetter() -> object<nn::am::service::ICommonStateGetter>
  14. public ResultCode GetCommonStateGetter(ServiceCtx context)
  15. {
  16. MakeObject(context, new ICommonStateGetter(context));
  17. return ResultCode.Success;
  18. }
  19. [CommandHipc(1)]
  20. // GetSelfController() -> object<nn::am::service::ISelfController>
  21. public ResultCode GetSelfController(ServiceCtx context)
  22. {
  23. MakeObject(context, new ISelfController(context, _pid));
  24. return ResultCode.Success;
  25. }
  26. [CommandHipc(2)]
  27. // GetWindowController() -> object<nn::am::service::IWindowController>
  28. public ResultCode GetWindowController(ServiceCtx context)
  29. {
  30. MakeObject(context, new IWindowController(_pid));
  31. return ResultCode.Success;
  32. }
  33. [CommandHipc(3)]
  34. // GetAudioController() -> object<nn::am::service::IAudioController>
  35. public ResultCode GetAudioController(ServiceCtx context)
  36. {
  37. MakeObject(context, new IAudioController());
  38. return ResultCode.Success;
  39. }
  40. [CommandHipc(4)]
  41. // GetDisplayController() -> object<nn::am::service::IDisplayController>
  42. public ResultCode GetDisplayController(ServiceCtx context)
  43. {
  44. MakeObject(context, new IDisplayController(context));
  45. return ResultCode.Success;
  46. }
  47. [CommandHipc(10)]
  48. // GetProcessWindingController() -> object<nn::am::service::IProcessWindingController>
  49. public ResultCode GetProcessWindingController(ServiceCtx context)
  50. {
  51. MakeObject(context, new IProcessWindingController());
  52. return ResultCode.Success;
  53. }
  54. [CommandHipc(11)]
  55. // GetLibraryAppletCreator() -> object<nn::am::service::ILibraryAppletCreator>
  56. public ResultCode GetLibraryAppletCreator(ServiceCtx context)
  57. {
  58. MakeObject(context, new ILibraryAppletCreator());
  59. return ResultCode.Success;
  60. }
  61. [CommandHipc(20)]
  62. // OpenLibraryAppletSelfAccessor() -> object<nn::am::service::ILibraryAppletSelfAccessor>
  63. public ResultCode OpenLibraryAppletSelfAccessor(ServiceCtx context)
  64. {
  65. MakeObject(context, new ILibraryAppletSelfAccessor(context));
  66. return ResultCode.Success;
  67. }
  68. [CommandHipc(21)]
  69. // GetAppletCommonFunctions() -> object<nn::am::service::IAppletCommonFunctions>
  70. public ResultCode GetAppletCommonFunctions(ServiceCtx context)
  71. {
  72. MakeObject(context, new IAppletCommonFunctions());
  73. return ResultCode.Success;
  74. }
  75. [CommandHipc(1000)]
  76. // GetDebugFunctions() -> object<nn::am::service::IDebugFunctions>
  77. public ResultCode GetDebugFunctions(ServiceCtx context)
  78. {
  79. MakeObject(context, new IDebugFunctions());
  80. return ResultCode.Success;
  81. }
  82. }
  83. }