0
0
Fork 0
mirror of https://github.com/ryujinx-mirror/ryujinx.git synced 2024-12-24 17:45:45 +00:00
ryujinx-fork/Ryujinx.HLE/HOS/Services/Pctl/IParentalControlService.cs
Ac_K 4ad3936afd Refactoring result codes (#731)
* refactoring result codes

- Add a main enum who can handle some orphalin result codes and the default `ResultCode.Success` one.
- Add sub-enum by services when it's needed.
- Remove some empty line.
- Recast all service calls to ResultCode.
- Remove some unneeded static declaration.
- Delete unused `NvHelper` class.

* NvResult is back

* Fix
2019-07-14 16:04:38 -03:00

41 lines
No EOL
1 KiB
C#

using Ryujinx.Common.Logging;
namespace Ryujinx.HLE.HOS.Services.Pctl
{
class IParentalControlService : IpcService
{
private bool _initialized = false;
private bool _needInitialize;
public IParentalControlService(bool needInitialize = true)
{
_needInitialize = needInitialize;
}
[Command(1)] // 4.0.0+
// Initialize()
public ResultCode Initialize(ServiceCtx context)
{
if (_needInitialize && !_initialized)
{
_initialized = true;
}
else
{
Logger.PrintWarning(LogClass.ServicePctl, "Service is already initialized!");
}
return ResultCode.Success;
}
[Command(1001)]
// CheckFreeCommunicationPermission()
public ResultCode CheckFreeCommunicationPermission(ServiceCtx context)
{
Logger.PrintStub(LogClass.ServicePctl);
return ResultCode.Success;
}
}
}