ISslService.cs 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. using Ryujinx.Common.Logging;
  2. using Ryujinx.HLE.HOS.Ipc;
  3. using System.Collections.Generic;
  4. namespace Ryujinx.HLE.HOS.Services.Ssl
  5. {
  6. class ISslService : IpcService
  7. {
  8. private Dictionary<int, ServiceProcessRequest> _commands;
  9. public override IReadOnlyDictionary<int, ServiceProcessRequest> Commands => _commands;
  10. public ISslService()
  11. {
  12. _commands = new Dictionary<int, ServiceProcessRequest>
  13. {
  14. { 0, CreateContext },
  15. { 5, SetInterfaceVersion }
  16. };
  17. }
  18. // CreateContext(nn::ssl::sf::SslVersion, u64, pid) -> object<nn::ssl::sf::ISslContext>
  19. public long CreateContext(ServiceCtx context)
  20. {
  21. int sslVersion = context.RequestData.ReadInt32();
  22. long unknown = context.RequestData.ReadInt64();
  23. Logger.PrintStub(LogClass.ServiceSsl, new { sslVersion, unknown });
  24. MakeObject(context, new ISslContext());
  25. return 0;
  26. }
  27. // SetInterfaceVersion(u32)
  28. public long SetInterfaceVersion(ServiceCtx context)
  29. {
  30. int version = context.RequestData.ReadInt32();
  31. Logger.PrintStub(LogClass.ServiceSsl, new { version });
  32. return 0;
  33. }
  34. }
  35. }