IAccountServiceForApplication.cs 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. using Ryujinx.HLE.Logging;
  2. using Ryujinx.HLE.OsHle.Ipc;
  3. using System.Collections.Generic;
  4. namespace Ryujinx.HLE.OsHle.Services.Acc
  5. {
  6. class IAccountServiceForApplication : IpcService
  7. {
  8. private Dictionary<int, ServiceProcessRequest> m_Commands;
  9. public override IReadOnlyDictionary<int, ServiceProcessRequest> Commands => m_Commands;
  10. public IAccountServiceForApplication()
  11. {
  12. m_Commands = new Dictionary<int, ServiceProcessRequest>()
  13. {
  14. { 0, GetUserCount },
  15. { 1, GetUserExistence },
  16. { 2, ListAllUsers },
  17. { 3, ListOpenUsers },
  18. { 4, GetLastOpenedUser },
  19. { 5, GetProfile },
  20. { 100, InitializeApplicationInfo },
  21. { 101, GetBaasAccountManagerForApplication }
  22. };
  23. }
  24. public long GetUserCount(ServiceCtx Context)
  25. {
  26. Context.ResponseData.Write(0);
  27. Context.Ns.Log.PrintStub(LogClass.ServiceAcc, "Stubbed.");
  28. return 0;
  29. }
  30. public long GetUserExistence(ServiceCtx Context)
  31. {
  32. Context.ResponseData.Write(1);
  33. Context.Ns.Log.PrintStub(LogClass.ServiceAcc, "Stubbed.");
  34. return 0;
  35. }
  36. public long ListAllUsers(ServiceCtx Context)
  37. {
  38. Context.Ns.Log.PrintStub(LogClass.ServiceAcc, "Stubbed.");
  39. return 0;
  40. }
  41. public long ListOpenUsers(ServiceCtx Context)
  42. {
  43. Context.Ns.Log.PrintStub(LogClass.ServiceAcc, "Stubbed.");
  44. return 0;
  45. }
  46. public long GetLastOpenedUser(ServiceCtx Context)
  47. {
  48. Context.ResponseData.Write(1L);
  49. Context.ResponseData.Write(0L);
  50. Context.Ns.Log.PrintStub(LogClass.ServiceAcc, "Stubbed.");
  51. return 0;
  52. }
  53. public long GetProfile(ServiceCtx Context)
  54. {
  55. MakeObject(Context, new IProfile());
  56. return 0;
  57. }
  58. public long InitializeApplicationInfo(ServiceCtx Context)
  59. {
  60. Context.Ns.Log.PrintStub(LogClass.ServiceAcc, "Stubbed.");
  61. return 0;
  62. }
  63. public long GetBaasAccountManagerForApplication(ServiceCtx Context)
  64. {
  65. MakeObject(Context, new IManagerForApplication());
  66. return 0;
  67. }
  68. }
  69. }