IManagerForApplication.cs 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. using Ryujinx.Common.Logging;
  2. using Ryujinx.HLE.HOS.Ipc;
  3. using Ryujinx.HLE.Utilities;
  4. using System.Collections.Generic;
  5. namespace Ryujinx.HLE.HOS.Services.Acc
  6. {
  7. class IManagerForApplication : IpcService
  8. {
  9. private UInt128 _uuid;
  10. private Dictionary<int, ServiceProcessRequest> _commands;
  11. public override IReadOnlyDictionary<int, ServiceProcessRequest> Commands => _commands;
  12. public IManagerForApplication(UInt128 uuid)
  13. {
  14. _commands = new Dictionary<int, ServiceProcessRequest>
  15. {
  16. { 0, CheckAvailability },
  17. { 1, GetAccountId }
  18. };
  19. _uuid = uuid;
  20. }
  21. // CheckAvailability()
  22. public long CheckAvailability(ServiceCtx context)
  23. {
  24. Logger.PrintStub(LogClass.ServiceAcc);
  25. return 0;
  26. }
  27. // GetAccountId() -> nn::account::NetworkServiceAccountId
  28. public long GetAccountId(ServiceCtx context)
  29. {
  30. long networkServiceAccountId = 0xcafe;
  31. Logger.PrintStub(LogClass.ServiceAcc, new { networkServiceAccountId });
  32. context.ResponseData.Write(networkServiceAccountId);
  33. return 0;
  34. }
  35. }
  36. }