IApplicationProxy.cs 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. using Ryujinx.HLE.HOS.Services.Am.AppletAE.AllSystemAppletProxiesService.SystemAppletProxy;
  2. using Ryujinx.HLE.HOS.Services.Am.AppletOE.ApplicationProxyService.ApplicationProxy;
  3. namespace Ryujinx.HLE.HOS.Services.Am.AppletOE.ApplicationProxyService
  4. {
  5. class IApplicationProxy : IpcService
  6. {
  7. private readonly long _pid;
  8. public IApplicationProxy(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(11)]
  48. // GetLibraryAppletCreator() -> object<nn::am::service::ILibraryAppletCreator>
  49. public ResultCode GetLibraryAppletCreator(ServiceCtx context)
  50. {
  51. MakeObject(context, new ILibraryAppletCreator());
  52. return ResultCode.Success;
  53. }
  54. [CommandHipc(20)]
  55. // GetApplicationFunctions() -> object<nn::am::service::IApplicationFunctions>
  56. public ResultCode GetApplicationFunctions(ServiceCtx context)
  57. {
  58. MakeObject(context, new IApplicationFunctions(context.Device.System));
  59. return ResultCode.Success;
  60. }
  61. [CommandHipc(1000)]
  62. // GetDebugFunctions() -> object<nn::am::service::IDebugFunctions>
  63. public ResultCode GetDebugFunctions(ServiceCtx context)
  64. {
  65. MakeObject(context, new IDebugFunctions());
  66. return ResultCode.Success;
  67. }
  68. }
  69. }