IProfileEditor.cs 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. namespace Ryujinx.HLE.HOS.Services.Account.Acc.AccountService
  2. {
  3. class IProfileEditor : IpcService
  4. {
  5. private ProfileServer _profileServer;
  6. public IProfileEditor(UserProfile profile)
  7. {
  8. _profileServer = new ProfileServer(profile);
  9. }
  10. [CommandHipc(0)]
  11. // Get() -> (nn::account::profile::ProfileBase, buffer<nn::account::profile::UserData, 0x1a>)
  12. public ResultCode Get(ServiceCtx context)
  13. {
  14. return _profileServer.Get(context);
  15. }
  16. [CommandHipc(1)]
  17. // GetBase() -> nn::account::profile::ProfileBase
  18. public ResultCode GetBase(ServiceCtx context)
  19. {
  20. return _profileServer.GetBase(context);
  21. }
  22. [CommandHipc(10)]
  23. // GetImageSize() -> u32
  24. public ResultCode GetImageSize(ServiceCtx context)
  25. {
  26. return _profileServer.GetImageSize(context);
  27. }
  28. [CommandHipc(11)]
  29. // LoadImage() -> (u32, buffer<bytes, 6>)
  30. public ResultCode LoadImage(ServiceCtx context)
  31. {
  32. return _profileServer.LoadImage(context);
  33. }
  34. [CommandHipc(100)]
  35. // Store(nn::account::profile::ProfileBase, buffer<nn::account::profile::UserData, 0x19>)
  36. public ResultCode Store(ServiceCtx context)
  37. {
  38. return _profileServer.Store(context);
  39. }
  40. [CommandHipc(101)]
  41. // StoreWithImage(nn::account::profile::ProfileBase, buffer<nn::account::profile::UserData, 0x19>, buffer<bytes, 5>)
  42. public ResultCode StoreWithImage(ServiceCtx context)
  43. {
  44. return _profileServer.StoreWithImage(context);
  45. }
  46. }
  47. }