ISystemAppletProxy.cs 3.3 KB

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