IParentalControlServiceFactory.cs 962 B

1234567891011121314151617181920212223242526272829303132333435
  1. using Ryujinx.HLE.OsHle.Ipc;
  2. using System.Collections.Generic;
  3. namespace Ryujinx.HLE.OsHle.Services.Pctl
  4. {
  5. class IParentalControlServiceFactory : IpcService
  6. {
  7. private Dictionary<int, ServiceProcessRequest> m_Commands;
  8. public override IReadOnlyDictionary<int, ServiceProcessRequest> Commands => m_Commands;
  9. public IParentalControlServiceFactory()
  10. {
  11. m_Commands = new Dictionary<int, ServiceProcessRequest>()
  12. {
  13. { 0, CreateService },
  14. { 1, CreateServiceWithoutInitialize }
  15. };
  16. }
  17. public long CreateService(ServiceCtx Context)
  18. {
  19. MakeObject(Context, new IParentalControlService());
  20. return 0;
  21. }
  22. public long CreateServiceWithoutInitialize(ServiceCtx Context)
  23. {
  24. MakeObject(Context, new IParentalControlService(false));
  25. return 0;
  26. }
  27. }
  28. }