IParentalControlService.cs 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. using Ryujinx.Common.Logging;
  2. namespace Ryujinx.HLE.HOS.Services.Pctl
  3. {
  4. class IParentalControlService : IpcService
  5. {
  6. private bool _initialized = false;
  7. private bool _needInitialize;
  8. public IParentalControlService(bool needInitialize = true)
  9. {
  10. _needInitialize = needInitialize;
  11. }
  12. [Command(1)] // 4.0.0+
  13. // Initialize()
  14. public ResultCode Initialize(ServiceCtx context)
  15. {
  16. if (_needInitialize && !_initialized)
  17. {
  18. _initialized = true;
  19. }
  20. else
  21. {
  22. Logger.PrintWarning(LogClass.ServicePctl, "Service is already initialized!");
  23. }
  24. return ResultCode.Success;
  25. }
  26. [Command(1001)]
  27. // CheckFreeCommunicationPermission()
  28. public ResultCode CheckFreeCommunicationPermission(ServiceCtx context)
  29. {
  30. Logger.PrintStub(LogClass.ServicePctl);
  31. return ResultCode.Success;
  32. }
  33. }
  34. }