Ryujinx-uplift/Ryujinx.HLE/HOS/Services/Pctl/IParentalControlService.cs
Ac_K 560ccbeb2d Refactoring commands handling (#728)
* Refactoring commands handling

- Use Reflection to handle commands ID.
- Add all symbols (from SwIPC so not all time accurate).
- Re-sort some services commands methods.
- Some cleanup.
- Keep some empty constructor for consistency.

* Fix order in IProfile
2019-07-11 22:13:43 -03:00

41 lines
992 B
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 long Initialize(ServiceCtx context)
{
if (_needInitialize && !_initialized)
{
_initialized = true;
}
else
{
Logger.PrintWarning(LogClass.ServicePctl, "Service is already initialized!");
}
return 0;
}
[Command(1001)]
// CheckFreeCommunicationPermission()
public long CheckFreeCommunicationPermission(ServiceCtx context)
{
Logger.PrintStub(LogClass.ServicePctl);
return 0;
}
}
}