IManagerForApplication.cs 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. namespace Ryujinx.HLE.HOS.Services.Account.Acc.AccountService
  2. {
  3. class IManagerForApplication : IpcService
  4. {
  5. private ManagerServer _managerServer;
  6. public IManagerForApplication(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. [CommandHipc(130)]
  40. // GetNintendoAccountUserResourceCacheForApplication() -> (nn::account::NintendoAccountId, nn::account::nas::NasUserBaseForApplication, buffer<bytes, 6>)
  41. public ResultCode GetNintendoAccountUserResourceCacheForApplication(ServiceCtx context)
  42. {
  43. return _managerServer.GetNintendoAccountUserResourceCacheForApplication(context);
  44. }
  45. [CommandHipc(160)] // 5.0.0+
  46. // StoreOpenContext()
  47. public ResultCode StoreOpenContext(ServiceCtx context)
  48. {
  49. return _managerServer.StoreOpenContext(context);
  50. }
  51. }
  52. }