frd.h 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  1. // Copyright 2015 Citra Emulator Project
  2. // Licensed under GPLv2 or any later version
  3. // Refer to the license.txt file included.
  4. #pragma once
  5. #include "common/common_types.h"
  6. namespace Service {
  7. class Interface;
  8. namespace FRD {
  9. struct FriendKey {
  10. u32 friend_id;
  11. u32 unknown;
  12. u64 friend_code;
  13. };
  14. struct MyPresence {
  15. u8 unknown[0x12C];
  16. };
  17. struct Profile {
  18. u8 region;
  19. u8 country;
  20. u8 area;
  21. u8 language;
  22. u32 unknown;
  23. };
  24. /**
  25. * FRD::GetMyPresence service function
  26. * Inputs:
  27. * 64 : sizeof (MyPresence) << 14 | 2
  28. * 65 : Address of MyPresence structure
  29. * Outputs:
  30. * 1 : Result of function, 0 on success, otherwise error code
  31. */
  32. void GetMyPresence(Service::Interface* self);
  33. /**
  34. * FRD::GetFriendKeyList service function
  35. * Inputs:
  36. * 1 : Unknown
  37. * 2 : Max friends count
  38. * 65 : Address of FriendKey List
  39. * Outputs:
  40. * 1 : Result of function, 0 on success, otherwise error code
  41. * 2 : FriendKey count filled
  42. */
  43. void GetFriendKeyList(Service::Interface* self);
  44. /**
  45. * FRD::GetFriendProfile service function
  46. * Inputs:
  47. * 1 : Friends count
  48. * 2 : Friends count << 18 | 2
  49. * 3 : Address of FriendKey List
  50. * 64 : (count * sizeof (Profile)) << 10 | 2
  51. * 65 : Address of Profiles List
  52. * Outputs:
  53. * 1 : Result of function, 0 on success, otherwise error code
  54. */
  55. void GetFriendProfile(Service::Interface* self);
  56. /**
  57. * FRD::GetFriendAttributeFlags service function
  58. * Inputs:
  59. * 1 : Friends count
  60. * 2 : Friends count << 18 | 2
  61. * 3 : Address of FriendKey List
  62. * 65 : Address of AttributeFlags
  63. * Outputs:
  64. * 1 : Result of function, 0 on success, otherwise error code
  65. */
  66. void GetFriendAttributeFlags(Service::Interface* self);
  67. /**
  68. * FRD::GetMyFriendKey service function
  69. * Inputs:
  70. * none
  71. * Outputs:
  72. * 1 : Result of function, 0 on success, otherwise error code
  73. * 2-5 : FriendKey
  74. */
  75. void GetMyFriendKey(Service::Interface* self);
  76. /**
  77. * FRD::GetMyScreenName service function
  78. * Outputs:
  79. * 1 : Result of function, 0 on success, otherwise error code
  80. * 2 : UTF16 encoded name (max 11 symbols)
  81. */
  82. void GetMyScreenName(Service::Interface* self);
  83. /**
  84. * FRD::SetClientSdkVersion service function
  85. * Inputs:
  86. * 1 : Used SDK Version
  87. * Outputs:
  88. * 1 : Result of function, 0 on success, otherwise error code
  89. */
  90. void SetClientSdkVersion(Service::Interface* self);
  91. /// Initialize FRD service(s)
  92. void Init();
  93. /// Shutdown FRD service(s)
  94. void Shutdown();
  95. } // namespace FRD
  96. } // namespace Service