IAccountServiceForApplication.cs 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. using Ryujinx.Core.Logging;
  2. using Ryujinx.Core.OsHle.Ipc;
  3. using System.Collections.Generic;
  4. namespace Ryujinx.Core.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. { 3, ListOpenUsers },
  16. { 4, GetLastOpenedUser },
  17. { 5, GetProfile },
  18. { 100, InitializeApplicationInfo },
  19. { 101, GetBaasAccountManagerForApplication }
  20. };
  21. }
  22. public long GetUserCount(ServiceCtx Context)
  23. {
  24. Context.ResponseData.Write(0);
  25. Context.Ns.Log.PrintStub(LogClass.ServiceAcc, "Stubbed.");
  26. return 0;
  27. }
  28. public long ListOpenUsers(ServiceCtx Context)
  29. {
  30. Context.Ns.Log.PrintStub(LogClass.ServiceAcc, "Stubbed.");
  31. return 0;
  32. }
  33. public long GetLastOpenedUser(ServiceCtx Context)
  34. {
  35. Context.ResponseData.Write(0L);
  36. Context.ResponseData.Write(0L);
  37. Context.Ns.Log.PrintStub(LogClass.ServiceAcc, "Stubbed.");
  38. return 0;
  39. }
  40. public long GetProfile(ServiceCtx Context)
  41. {
  42. MakeObject(Context, new IProfile());
  43. return 0;
  44. }
  45. public long InitializeApplicationInfo(ServiceCtx Context)
  46. {
  47. Context.Ns.Log.PrintStub(LogClass.ServiceAcc, "Stubbed.");
  48. return 0;
  49. }
  50. public long GetBaasAccountManagerForApplication(ServiceCtx Context)
  51. {
  52. MakeObject(Context, new IManagerForApplication());
  53. return 0;
  54. }
  55. }
  56. }