IManagerForSystemService.cs 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. namespace Ryujinx.HLE.HOS.Services.Account.Acc.AccountService
  2. {
  3. class IManagerForSystemService : IpcService
  4. {
  5. private ManagerServer _managerServer;
  6. public IManagerForSystemService(UserId userId)
  7. {
  8. _managerServer = new ManagerServer(userId);
  9. }
  10. [CommandHipc(0)]
  11. // CheckAvailability()
  12. public ResultCode CheckAvailability(ServiceCtx context)
  13. {
  14. return _managerServer.CheckAvailability(context);
  15. }
  16. [CommandHipc(1)]
  17. // GetAccountId() -> nn::account::NetworkServiceAccountId
  18. public ResultCode GetAccountId(ServiceCtx context)
  19. {
  20. return _managerServer.GetAccountId(context);
  21. }
  22. [CommandHipc(2)]
  23. // EnsureIdTokenCacheAsync() -> object<nn::account::detail::IAsyncContext>
  24. public ResultCode EnsureIdTokenCacheAsync(ServiceCtx context)
  25. {
  26. ResultCode resultCode = _managerServer.EnsureIdTokenCacheAsync(context, out IAsyncContext asyncContext);
  27. if (resultCode == ResultCode.Success)
  28. {
  29. MakeObject(context, asyncContext);
  30. }
  31. return resultCode;
  32. }
  33. [CommandHipc(3)]
  34. // LoadIdTokenCache() -> (u32 id_token_cache_size, buffer<bytes, 6>)
  35. public ResultCode LoadIdTokenCache(ServiceCtx context)
  36. {
  37. return _managerServer.LoadIdTokenCache(context);
  38. }
  39. }
  40. }