IParentalControlServiceFactory.cs 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. using Ryujinx.HLE.HOS.Ipc;
  2. using System.Collections.Generic;
  3. namespace Ryujinx.HLE.HOS.Services.Pctl
  4. {
  5. [Service("pctl")]
  6. [Service("pctl:a")]
  7. [Service("pctl:r")]
  8. [Service("pctl:s")]
  9. class IParentalControlServiceFactory : IpcService
  10. {
  11. private Dictionary<int, ServiceProcessRequest> _commands;
  12. public override IReadOnlyDictionary<int, ServiceProcessRequest> Commands => _commands;
  13. public IParentalControlServiceFactory(ServiceCtx context)
  14. {
  15. _commands = new Dictionary<int, ServiceProcessRequest>
  16. {
  17. { 0, CreateService },
  18. { 1, CreateServiceWithoutInitialize }
  19. };
  20. }
  21. public long CreateService(ServiceCtx context)
  22. {
  23. MakeObject(context, new IParentalControlService());
  24. return 0;
  25. }
  26. public long CreateServiceWithoutInitialize(ServiceCtx context)
  27. {
  28. MakeObject(context, new IParentalControlService(false));
  29. return 0;
  30. }
  31. }
  32. }