am.h 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164
  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. namespace Service {
  6. class Interface;
  7. namespace AM {
  8. /**
  9. * AM::GetNumPrograms service function
  10. * Gets the number of installed titles in the requested media type
  11. * Inputs:
  12. * 0 : Command header (0x00010040)
  13. * 1 : Media type to load the titles from
  14. * Outputs:
  15. * 1 : Result, 0 on success, otherwise error code
  16. * 2 : The number of titles in the requested media type
  17. */
  18. void GetNumPrograms(Service::Interface* self);
  19. /**
  20. * AM::FindContentInfos service function
  21. * Inputs:
  22. * 1 : MediaType
  23. * 2-3 : u64, Title ID
  24. * 4 : Content count
  25. * 6 : Content IDs pointer
  26. * 8 : Content Infos pointer
  27. * Outputs:
  28. * 1 : Result, 0 on success, otherwise error code
  29. */
  30. void FindContentInfos(Service::Interface* self);
  31. /**
  32. * AM::ListContentInfos service function
  33. * Inputs:
  34. * 1 : Content count
  35. * 2 : MediaType
  36. * 3-4 : u64, Title ID
  37. * 5 : Start Index
  38. * 7 : Content Infos pointer
  39. * Outputs:
  40. * 1 : Result, 0 on success, otherwise error code
  41. * 2 : Number of content infos returned
  42. */
  43. void ListContentInfos(Service::Interface* self);
  44. /**
  45. * AM::DeleteContents service function
  46. * Inputs:
  47. * 1 : MediaType
  48. * 2-3 : u64, Title ID
  49. * 4 : Content count
  50. * 6 : Content IDs pointer
  51. * Outputs:
  52. * 1 : Result, 0 on success, otherwise error code
  53. */
  54. void DeleteContents(Service::Interface* self);
  55. /**
  56. * AM::GetProgramList service function
  57. * Loads information about the desired number of titles from the desired media type into an array
  58. * Inputs:
  59. * 1 : Title count
  60. * 2 : Media type to load the titles from
  61. * 4 : Title IDs output pointer
  62. * Outputs:
  63. * 1 : Result, 0 on success, otherwise error code
  64. * 2 : The number of titles loaded from the requested media type
  65. */
  66. void GetProgramList(Service::Interface* self);
  67. /**
  68. * AM::GetProgramInfos service function
  69. * Inputs:
  70. * 1 : u8 Mediatype
  71. * 2 : Total titles
  72. * 4 : TitleIDList pointer
  73. * 6 : TitleList pointer
  74. * Outputs:
  75. * 1 : Result, 0 on success, otherwise error code
  76. */
  77. void GetProgramInfos(Service::Interface* self);
  78. /**
  79. * AM::GetDataTitleInfos service function
  80. * Wrapper for AM::GetProgramInfos
  81. * Inputs:
  82. * 1 : u8 Mediatype
  83. * 2 : Total titles
  84. * 4 : TitleIDList pointer
  85. * 6 : TitleList pointer
  86. * Outputs:
  87. * 1 : Result, 0 on success, otherwise error code
  88. */
  89. void GetDataTitleInfos(Service::Interface* self);
  90. /**
  91. * AM::ListDataTitleTicketInfos service function
  92. * Inputs:
  93. * 1 : Ticket count
  94. * 2-3 : u64, Title ID
  95. * 4 : Start Index?
  96. * 5 : (TicketCount * 24) << 8 | 0x4
  97. * 6 : Ticket Infos pointer
  98. * Outputs:
  99. * 1 : Result, 0 on success, otherwise error code
  100. * 2 : Number of ticket infos returned
  101. */
  102. void ListDataTitleTicketInfos(Service::Interface* self);
  103. /**
  104. * AM::GetNumContentInfos service function
  105. * Inputs:
  106. * 0 : Command header (0x100100C0)
  107. * 1 : MediaType
  108. * 2-3 : u64, Title ID
  109. * Outputs:
  110. * 1 : Result, 0 on success, otherwise error code
  111. * 2 : Number of content infos plus one
  112. */
  113. void GetNumContentInfos(Service::Interface* self);
  114. /**
  115. * AM::DeleteTicket service function
  116. * Inputs:
  117. * 1-2 : u64, Title ID
  118. * Outputs:
  119. * 1 : Result, 0 on success, otherwise error code
  120. */
  121. void DeleteTicket(Service::Interface* self);
  122. /**
  123. * AM::GetNumTickets service function
  124. * Outputs:
  125. * 1 : Result, 0 on success, otherwise error code
  126. * 2 : Number of tickets
  127. */
  128. void GetNumTickets(Service::Interface* self);
  129. /**
  130. * AM::GetTicketList service function
  131. * Inputs:
  132. * 1 : Number of TicketList
  133. * 2 : Number to skip
  134. * 4 : TicketList pointer
  135. * Outputs:
  136. * 1 : Result, 0 on success, otherwise error code
  137. * 2 : Total TicketList
  138. */
  139. void GetTicketList(Service::Interface* self);
  140. /// Initialize AM service
  141. void Init();
  142. /// Shutdown AM service
  143. void Shutdown();
  144. } // namespace AM
  145. } // namespace Service