summaryrefslogtreecommitdiffstats
path: root/src/core/hle/service/am/am.h
blob: 9bc2ca3058fa0b297c8b7b45602428ffc48b36df (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
// Copyright 2015 Citra Emulator Project
// Licensed under GPLv2 or any later version
// Refer to the license.txt file included.

#pragma once

namespace Service {

class Interface;

namespace AM {

/**
 * AM::GetNumPrograms service function
 * Gets the number of installed titles in the requested media type
 *  Inputs:
 *      0 : Command header (0x00010040)
 *      1 : Media type to load the titles from
 *  Outputs:
 *      1 : Result, 0 on success, otherwise error code
 *      2 : The number of titles in the requested media type
 */
void GetNumPrograms(Service::Interface* self);

/**
 * AM::FindContentInfos service function
 *  Inputs:
 *      1 : MediaType
 *    2-3 : u64, Title ID
 *      4 : Content count
 *      6 : Content IDs pointer
 *      8 : Content Infos pointer
 *  Outputs:
 *      1 : Result, 0 on success, otherwise error code
 */
void FindContentInfos(Service::Interface* self);

/**
 * AM::ListContentInfos service function
 *  Inputs:
 *      1 : Content count
 *      2 : MediaType
 *    3-4 : u64, Title ID
 *      5 : Start Index
 *      7 : Content Infos pointer
 *  Outputs:
 *      1 : Result, 0 on success, otherwise error code
 *      2 : Number of content infos returned
 */
void ListContentInfos(Service::Interface* self);

/**
 * AM::DeleteContents service function
 *  Inputs:
 *      1 : MediaType
 *    2-3 : u64, Title ID
 *      4 : Content count
 *      6 : Content IDs pointer
 *  Outputs:
 *      1 : Result, 0 on success, otherwise error code
 */
void DeleteContents(Service::Interface* self);

/**
 * AM::GetProgramList service function
 * Loads information about the desired number of titles from the desired media type into an array
 *  Inputs:
 *      1 : Title count
 *      2 : Media type to load the titles from
 *      4 : Title IDs output pointer
 *  Outputs:
 *      1 : Result, 0 on success, otherwise error code
 *      2 : The number of titles loaded from the requested media type
 */
void GetProgramList(Service::Interface* self);

/**
 * AM::GetProgramInfos service function
 *  Inputs:
 *      1 : u8 Mediatype
 *      2 : Total titles
 *      4 : TitleIDList pointer
 *      6 : TitleList pointer
 *  Outputs:
 *      1 : Result, 0 on success, otherwise error code
 */
void GetProgramInfos(Service::Interface* self);

/**
 * AM::GetDataTitleInfos service function
 * Wrapper for AM::GetProgramInfos
 *  Inputs:
 *      1 : u8 Mediatype
 *      2 : Total titles
 *      4 : TitleIDList pointer
 *      6 : TitleList pointer
 *  Outputs:
 *      1 : Result, 0 on success, otherwise error code
 */
void GetDataTitleInfos(Service::Interface* self);

/**
 * AM::ListDataTitleTicketInfos service function
 *  Inputs:
 *      1 : Ticket count
 *    2-3 : u64, Title ID
 *      4 : Start Index?
 *      5 : (TicketCount * 24) << 8 | 0x4
 *      6 : Ticket Infos pointer
 *  Outputs:
 *      1 : Result, 0 on success, otherwise error code
 *      2 : Number of ticket infos returned
 */
void ListDataTitleTicketInfos(Service::Interface* self);

/**
 * AM::GetNumContentInfos service function
 *  Inputs:
 *      0 : Command header (0x100100C0)
 *      1 : MediaType
 *    2-3 : u64, Title ID
 *  Outputs:
 *      1 : Result, 0 on success, otherwise error code
 *      2 : Number of content infos plus one
 */
void GetNumContentInfos(Service::Interface* self);

/**
 * AM::DeleteTicket service function
 *  Inputs:
 *    1-2 : u64, Title ID
 *  Outputs:
 *      1 : Result, 0 on success, otherwise error code
 */
void DeleteTicket(Service::Interface* self);

/**
 * AM::GetNumTickets service function
 *  Outputs:
 *      1 : Result, 0 on success, otherwise error code
 *      2 : Number of tickets
 */
void GetNumTickets(Service::Interface* self);

/**
 * AM::GetTicketList service function
 *  Inputs:
 *      1 : Number of TicketList
 *      2 : Number to skip
 *      4 : TicketList pointer
 *  Outputs:
 *      1 : Result, 0 on success, otherwise error code
 *      2 : Total TicketList
 */
void GetTicketList(Service::Interface* self);

/// Initialize AM service
void Init();

/// Shutdown AM service
void Shutdown();

} // namespace AM
} // namespace Service