2019-09-18 17:45:11 -07:00
|
|
|
using Ryujinx.HLE.HOS.Services.Am.AppletAE.AllSystemAppletProxiesService.SystemAppletProxy;
|
|
|
|
using Ryujinx.HLE.HOS.Services.Am.AppletOE.ApplicationProxyService.ApplicationProxy;
|
|
|
|
|
|
|
|
namespace Ryujinx.HLE.HOS.Services.Am.AppletOE.ApplicationProxyService
|
2018-02-09 16:14:55 -08:00
|
|
|
{
|
2018-03-19 11:58:46 -07:00
|
|
|
class IApplicationProxy : IpcService
|
2018-02-09 16:14:55 -08:00
|
|
|
{
|
2022-02-09 12:18:07 -08:00
|
|
|
private readonly ulong _pid;
|
2020-12-01 15:23:43 -08:00
|
|
|
|
2022-02-09 12:18:07 -08:00
|
|
|
public IApplicationProxy(ulong pid)
|
2020-12-01 15:23:43 -08:00
|
|
|
{
|
|
|
|
_pid = pid;
|
|
|
|
}
|
2018-02-09 16:14:55 -08:00
|
|
|
|
2021-04-13 15:01:24 -07:00
|
|
|
[CommandHipc(0)]
|
2019-07-11 18:13:43 -07:00
|
|
|
// GetCommonStateGetter() -> object<nn::am::service::ICommonStateGetter>
|
2019-07-14 12:04:38 -07:00
|
|
|
public ResultCode GetCommonStateGetter(ServiceCtx context)
|
2018-02-09 16:14:55 -08:00
|
|
|
{
|
2020-11-08 12:00:54 -08:00
|
|
|
MakeObject(context, new ICommonStateGetter(context));
|
2018-02-09 16:14:55 -08:00
|
|
|
|
2019-07-14 12:04:38 -07:00
|
|
|
return ResultCode.Success;
|
2018-02-09 16:14:55 -08:00
|
|
|
}
|
|
|
|
|
2021-04-13 15:01:24 -07:00
|
|
|
[CommandHipc(1)]
|
2019-07-11 18:13:43 -07:00
|
|
|
// GetSelfController() -> object<nn::am::service::ISelfController>
|
2019-07-14 12:04:38 -07:00
|
|
|
public ResultCode GetSelfController(ServiceCtx context)
|
2018-02-09 16:14:55 -08:00
|
|
|
{
|
2021-06-28 11:54:45 -07:00
|
|
|
MakeObject(context, new ISelfController(context, _pid));
|
2018-02-09 16:14:55 -08:00
|
|
|
|
2019-07-14 12:04:38 -07:00
|
|
|
return ResultCode.Success;
|
2018-02-09 16:14:55 -08:00
|
|
|
}
|
|
|
|
|
2021-04-13 15:01:24 -07:00
|
|
|
[CommandHipc(2)]
|
2019-07-11 18:13:43 -07:00
|
|
|
// GetWindowController() -> object<nn::am::service::IWindowController>
|
2019-07-14 12:04:38 -07:00
|
|
|
public ResultCode GetWindowController(ServiceCtx context)
|
2018-02-09 16:14:55 -08:00
|
|
|
{
|
2020-12-01 15:23:43 -08:00
|
|
|
MakeObject(context, new IWindowController(_pid));
|
2018-02-09 16:14:55 -08:00
|
|
|
|
2019-07-14 12:04:38 -07:00
|
|
|
return ResultCode.Success;
|
2018-02-09 16:14:55 -08:00
|
|
|
}
|
|
|
|
|
2021-04-13 15:01:24 -07:00
|
|
|
[CommandHipc(3)]
|
2019-07-11 18:13:43 -07:00
|
|
|
// GetAudioController() -> object<nn::am::service::IAudioController>
|
2019-07-14 12:04:38 -07:00
|
|
|
public ResultCode GetAudioController(ServiceCtx context)
|
2018-02-09 16:14:55 -08:00
|
|
|
{
|
2018-12-06 03:16:24 -08:00
|
|
|
MakeObject(context, new IAudioController());
|
2018-02-09 16:14:55 -08:00
|
|
|
|
2019-07-14 12:04:38 -07:00
|
|
|
return ResultCode.Success;
|
2018-02-09 16:14:55 -08:00
|
|
|
}
|
|
|
|
|
2021-04-13 15:01:24 -07:00
|
|
|
[CommandHipc(4)]
|
2019-07-11 18:13:43 -07:00
|
|
|
// GetDisplayController() -> object<nn::am::service::IDisplayController>
|
2019-07-14 12:04:38 -07:00
|
|
|
public ResultCode GetDisplayController(ServiceCtx context)
|
2018-02-09 16:14:55 -08:00
|
|
|
{
|
2021-06-28 11:54:45 -07:00
|
|
|
MakeObject(context, new IDisplayController(context));
|
2018-02-09 16:14:55 -08:00
|
|
|
|
2019-07-14 12:04:38 -07:00
|
|
|
return ResultCode.Success;
|
2018-02-09 16:14:55 -08:00
|
|
|
}
|
|
|
|
|
2021-04-13 15:01:24 -07:00
|
|
|
[CommandHipc(11)]
|
2019-07-11 18:13:43 -07:00
|
|
|
// GetLibraryAppletCreator() -> object<nn::am::service::ILibraryAppletCreator>
|
2019-07-14 12:04:38 -07:00
|
|
|
public ResultCode GetLibraryAppletCreator(ServiceCtx context)
|
2018-02-09 16:14:55 -08:00
|
|
|
{
|
2018-12-06 03:16:24 -08:00
|
|
|
MakeObject(context, new ILibraryAppletCreator());
|
2018-02-09 16:14:55 -08:00
|
|
|
|
2019-07-14 12:04:38 -07:00
|
|
|
return ResultCode.Success;
|
2018-02-09 16:14:55 -08:00
|
|
|
}
|
|
|
|
|
2021-04-13 15:01:24 -07:00
|
|
|
[CommandHipc(20)]
|
2019-07-11 18:13:43 -07:00
|
|
|
// GetApplicationFunctions() -> object<nn::am::service::IApplicationFunctions>
|
2019-07-14 12:04:38 -07:00
|
|
|
public ResultCode GetApplicationFunctions(ServiceCtx context)
|
2018-02-09 16:14:55 -08:00
|
|
|
{
|
2019-09-19 21:42:32 -07:00
|
|
|
MakeObject(context, new IApplicationFunctions(context.Device.System));
|
2018-02-09 16:14:55 -08:00
|
|
|
|
2019-07-14 12:04:38 -07:00
|
|
|
return ResultCode.Success;
|
2018-02-09 16:14:55 -08:00
|
|
|
}
|
|
|
|
|
2021-04-13 15:01:24 -07:00
|
|
|
[CommandHipc(1000)]
|
2019-07-11 18:13:43 -07:00
|
|
|
// GetDebugFunctions() -> object<nn::am::service::IDebugFunctions>
|
2019-07-14 12:04:38 -07:00
|
|
|
public ResultCode GetDebugFunctions(ServiceCtx context)
|
2018-02-09 16:14:55 -08:00
|
|
|
{
|
2018-12-06 03:16:24 -08:00
|
|
|
MakeObject(context, new IDebugFunctions());
|
2018-02-09 16:14:55 -08:00
|
|
|
|
2019-07-14 12:04:38 -07:00
|
|
|
return ResultCode.Success;
|
2018-02-09 16:14:55 -08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|