libnx v4.9.0
Loading...
Searching...
No Matches
pdm.h
Go to the documentation of this file.
1/**
2 * @file pdm.h
3 * @brief PDM (pdm:*) service IPC wrapper.
4 * @author yellows8
5 * @copyright libnx Authors
6 */
7#pragma once
8#include "../types.h"
9#include "../sf/service.h"
10#include "../services/acc.h"
11#include "../kernel/event.h"
12
13/// PlayEventType
14typedef enum {
15 PdmPlayEventType_Applet = 0, ///< Applet
16 PdmPlayEventType_Account = 1, ///< Account
17 PdmPlayEventType_PowerStateChange = 2, ///< PowerStateChange
18 PdmPlayEventType_OperationModeChange = 3, ///< OperationModeChange
19 PdmPlayEventType_Initialize = 4, ///< Initialize. Used for the very first PlayEvent entry in the log.
21
22/// AppletEventType
23typedef enum {
24 PdmAppletEventType_Launch = 0, ///< "launch"
25 PdmAppletEventType_Exit = 1, ///< "exit"
26 PdmAppletEventType_InFocus = 2, ///< "in_focus"
27 PdmAppletEventType_OutOfFocus = 3, ///< "out_of_focus"
28 PdmAppletEventType_OutOfFocus4 = 4, ///< "out_of_focus"
29 PdmAppletEventType_Exit5 = 5, ///< "exit"
30 PdmAppletEventType_Exit6 = 6, ///< "exit"
32
33/// PlayLogPolicy
34typedef enum {
35 PdmPlayLogPolicy_All = 0, ///< All pdm:qry commands which require ::PdmPlayEventType_Applet and AppletId = Application will only return the entry when PlayLogPolicy matches this value.
36 PdmPlayLogPolicy_LogOnly = 1, ///< The above commands will filter out the entry with this.
37 PdmPlayLogPolicy_None = 2, ///< The pdm:ntfy commands which handle ::PdmPlayEventType_Applet logging will immediately return 0 when the input param matches this value.
38 PdmPlayLogPolicy_Unknown3 = 3, ///< [10.0.0+] The cmds which require ::PdmPlayLogPolicy_All, now also allow value 3 if the cmd input flag is set.
40
41/// AppletEventV1. AppletEvent for [1.0.0-15.0.1], converted to \ref PdmAppletEvent when needed.
42/// Timestamp format, converted from PosixTime: total minutes since epoch UTC 1999/12/31 00:00:00.
43/// See \ref pdmPlayTimestampToPosix.
44typedef struct {
45 u64 program_id; ///< ProgramId.
46 u32 entry_index; ///< Entry index.
47 u32 timestamp_user; ///< See PdmPlayEvent::timestamp_user, with the above timestamp format.
48 u32 timestamp_network; ///< See PdmPlayEvent::timestamp_network, with the above timestamp format.
49 u8 event_type; ///< \ref PdmAppletEventType
50 u8 pad[3]; ///< Padding.
52
53/// AppletEvent. AppletEvent for [16.0.0+], converted from \ref PdmAppletEventV1 on [1.0.0-15.0.1].
54typedef struct {
55 u64 program_id; ///< ProgramId.
56 u32 entry_index; ///< Entry index.
57 u32 pad; ///< Padding
58 u64 timestamp_user; ///< See PdmPlayEvent::timestamp_user.
59 u64 timestamp_network; ///< See PdmPlayEvent::timestamp_network.
60 u8 event_type; ///< \ref PdmAppletEventType
61 u8 pad2[7]; ///< Padding.
63
64/// PlayStatisticsV1. PlayStatistics for [1.0.0-15.0.1], converted to \ref PdmPlayStatistics when needed.
65typedef struct {
66 u64 program_id; ///< ProgramId.
67
68 u32 first_entry_index; ///< Entry index for the first time the program was played.
69 u32 first_timestamp_user; ///< See PdmAppletEventV1::timestamp_user. This is for the first time the program was played.
70 u32 first_timestamp_network; ///< See PdmAppletEventV1::timestamp_network. This is for the first time the program was played.
71
72 u32 last_entry_index; ///< Entry index for the last time the program was played.
73 u32 last_timestamp_user; ///< See PdmAppletEventV1::timestamp_user. This is for the last time the program was played.
74 u32 last_timestamp_network; ///< See PdmAppletEventV1::timestamp_network. This is for the last time the program was played.
75
76 u32 playtime_minutes; ///< Total play-time in minutes.
77 u32 total_launches; ///< Total times the program was launched.
79
80/// PlayStatistics. PlayStatistics for [16.0.0+], converted from \ref PdmPlayStatisticsV1 on [1.0.0-15.0.1].
81typedef struct {
82 u64 program_id; ///< ProgramId.
83
84 u32 first_entry_index; ///< Entry index for the first time the program was played.
85 u32 pad; ///< Padding
86 u64 first_timestamp_user; ///< See PdmAppletEvent::timestamp_user. This is for the first time the program was played, in PosixTime.
87 u64 first_timestamp_network; ///< See PdmAppletEvent::timestamp_network. This is for the first time the program was played, in PosixTime.
88
89 u32 last_entry_index; ///< Entry index for the last time the program was played.
90 u32 pad2; ///< Padding
91 u64 last_timestamp_user; ///< See PdmAppletEvent::timestamp_user. This is for the last time the program was played, in PosixTime.
92 u64 last_timestamp_network; ///< See PdmAppletEvent::timestamp_network. This is for the last time the program was played, in PosixTime.
93
94 u64 playtime; ///< Total play-time in nanoseconds.
95 u32 total_launches; ///< Total times the program was launched.
96 u32 pad3; ///< Padding
98
99/// LastPlayTime.
100/// This contains data from the last time the application was played.
101typedef struct {
102 u64 application_id; ///< ApplicationId.
103 u32 timestamp_user; ///< See PdmAppletEventV1::timestamp_user.
104 u32 timestamp_network; ///< See PdmAppletEventV1::timestamp_network.
105 u32 last_played_minutes; ///< Total minutes since the application was last played.
106 u8 flag; ///< Flag indicating whether the above field is set.
107 u8 pad[3]; ///< Padding.
109
110/// PlayEvent.
111/// This is the raw entry struct directly read from FS, without any entry filtering.
112typedef struct {
113 union {
114 struct {
115 u32 program_id[2]; ///< ProgramId.
116
117 union {
118 struct {
119 u32 version; ///< Application version.
120 } application; ///< For AppletId == ::AppletId_application.
121
122 struct {
123 u8 flag; ///< Set to 0x1 by pdm:ntfy cmd8, indicating that the below field is set to an input param.
124 u8 mode; ///< Input value from pdm:ntfy cmd8, see \ref LibAppletMode.
125 u8 pad[2]; ///< Padding.
126 } applet; ///< For AppletId != ::AppletId_application.
127
128 u32 data;
129 } unk_x8;
130
131 u8 applet_id; ///< \ref AppletId
132 u8 storage_id; ///< \ref NcmStorageId
133 u8 log_policy; ///< \ref PdmPlayLogPolicy
134 u8 event_type; ///< \ref PdmAppletEventType
135 u8 unused[0xc]; ///< Unused.
136 } applet;
137
138 struct {
139 u32 uid[4]; ///< userId.
140 u32 application_id[2]; ///< ApplicationId, see below.
141 u8 type; ///< 0-1 to be listed by \ref pdmqryQueryAccountEvent, or 2 to include the above ApplicationId.
142 } account;
143
144 struct {
145 u8 value; ///< Input value from the pdm:ntfy command.
146 u8 unused[0x1b]; ///< Unused.
147 } power_state_change;
148
149 struct {
150 u8 value; ///< Input value from the pdm:ntfy command.
151 u8 unused[0x1b]; ///< Unused.
152 } operation_mode_change;
153
154 u8 data[0x1c];
155 } event_data; ///< ProgramId/ApplicationId/userId stored within here have the u32 low/high swapped in each u64.
156
157 u8 play_event_type; ///< \ref PdmPlayEventType. Controls which struct in the above event_data is used. ::PdmPlayEventType_Initialize doesn't use event_data.
158 u8 pad[3]; ///< Padding.
159
160 u64 timestamp_user; ///< PosixTime timestamp from StandardUserSystemClock.
161 u64 timestamp_network; ///< PosixTime timestamp from StandardNetworkSystemClock.
162 u64 timestamp_steady; ///< Timestamp in seconds derived from StandardSteadyClock.
164
165/// AccountEventV3. AccountEvent for [3.0.0-9.2.0], converted to \ref PdmAccountEvent when needed.
166typedef struct {
167 AccountUid uid; ///< \ref AccountUid
168 u32 entry_index; ///< Entry index.
169 u8 pad[4]; ///< Padding.
170 u64 timestamp_user; ///< See PdmPlayEvent::timestamp_user.
171 u64 timestamp_network; ///< See PdmPlayEvent::timestamp_network.
172 u64 timestamp_steady; ///< See PdmPlayEvent::timestamp_steady.
173 u8 type; ///< See PdmPlayEvent::event_data::account::type.
174 u8 pad2[7]; ///< Padding.
176
177/// AccountEventV10. AccountEvent for [10.0.0-15.0.1], converted to \ref PdmAccountEvent when needed.
178typedef struct {
179 AccountUid uid; ///< \ref AccountUid
180 u64 program_id; ///< ProgramId
181 u32 entry_index; ///< Entry index.
182 u8 pad[4]; ///< Padding.
183 u64 timestamp_user; ///< See PdmPlayEvent::timestamp_user.
184 u64 timestamp_network; ///< See PdmPlayEvent::timestamp_network.
185 u64 timestamp_steady; ///< See PdmPlayEvent::timestamp_steady.
186 u8 type; ///< See PdmPlayEvent::event_data::account::type.
187 u8 pad2[7]; ///< Padding.
189
190/// AccountEvent. AccountEvent for [16.0.0+], converted from the older structs when needed.
191typedef struct {
192 AccountUid uid; ///< \ref AccountUid
193 u64 program_id; ///< [10.0.0+] ProgramId
194 u32 entry_index; ///< Entry index.
195 u8 pad[4]; ///< Padding.
196 u64 timestamp_user; ///< See PdmPlayEvent::timestamp_user.
197 u64 timestamp_network; ///< See PdmPlayEvent::timestamp_network.
198 u8 type; ///< See PdmPlayEvent::event_data::account::type.
199 u8 pad2[7]; ///< Padding.
201
202/// AccountPlayEvent.
203/// This is the raw entry struct directly read from FS, without any entry filtering. This is separate from \ref PdmPlayEvent.
204typedef struct {
205 u8 unk_x0[4]; ///< Unknown.
206 u32 application_id[2]; ///< ApplicationId, with the u32 low/high words swapped.
207 u8 unk_xc[0xc]; ///< Unknown.
208 u64 timestamp0; ///< POSIX timestamp.
209 u64 timestamp1; ///< POSIX timestamp.
211
212/// ApplicationPlayStatistics
213typedef struct {
214 u64 application_id; ///< ApplicationId.
215 u64 playtime; ///< Total play-time in nanoseconds.
216 u64 total_launches; ///< Total times the application was launched.
218
219/// Initialize pdm:qry.
221
222/// Exit pdm:qry.
223void pdmqryExit(void);
224
225/// Gets the Service object for the actual pdm:qry service session.
227
228/**
229 * @brief Gets a list of \ref PdmAppletEvent.
230 * @param[in] entry_index Start entry index.
231 * @param[in] flag [10.0.0+] Whether to additionally allow using entries with ::PdmPlayLogPolicy_Unknown3.
232 * @param[out] events Output \ref PdmAppletEvent array.
233 * @param[in] count Max entries in the output array.
234 * @param[out] total_out Total output entries.
235 */
236Result pdmqryQueryAppletEvent(s32 entry_index, bool flag, PdmAppletEvent *events, s32 count, s32 *total_out);
237
238/**
239 * @brief Gets \ref PdmPlayStatistics for the specified ApplicationId.
240 * @param[in] application_id ApplicationId
241 * @param[in] flag [10.0.0+] Whether to additionally allow using entries with ::PdmPlayLogPolicy_Unknown3.
242 * @param[out] stats \ref PdmPlayStatistics
243 */
245
246/**
247 * @brief Gets \ref PdmPlayStatistics for the specified ApplicationId and account userId.
248 * @param[in] application_id ApplicationId
249 * @param[in] uid \ref AccountUid
250 * @param[in] flag [10.0.0+] Whether to additionally allow using entries with ::PdmPlayLogPolicy_Unknown3.
251 * @param[out] stats \ref PdmPlayStatistics
252 */
254
255/**
256 * @brief Gets \ref PdmLastPlayTime for the specified applications.
257 * @param[in] flag [10.0.0+] Whether to additionally allow using entries with ::PdmPlayLogPolicy_Unknown3.
258 * @param[out] playtimes Output \ref PdmLastPlayTime array.
259 * @param[in] application_ids Input ApplicationIds array.
260 * @param[in] count Total entries in the input/output arrays.
261 * @param[out] total_out Total output entries.
262 */
263Result pdmqryQueryLastPlayTime(bool flag, PdmLastPlayTime *playtimes, const u64 *application_ids, s32 count, s32 *total_out);
264
265/**
266 * @brief Gets a list of \ref PdmPlayEvent.
267 * @param[in] entry_index Start entry index.
268 * @param[out] events Output \ref PdmPlayEvent array.
269 * @param[in] count Max entries in the output array.
270 * @param[out] total_out Total output entries.
271 */
272Result pdmqryQueryPlayEvent(s32 entry_index, PdmPlayEvent *events, s32 count, s32 *total_out);
273
274/**
275 * @brief Gets range fields which can then be used with the other pdmqry funcs, except for \ref pdmqryQueryAccountPlayEvent.
276 * @param[out] total_entries Total entries.
277 * @param[out] start_entry_index Start entry index.
278 * @param[out] end_entry_index End entry index.
279 */
280Result pdmqryGetAvailablePlayEventRange(s32 *total_entries, s32 *start_entry_index, s32 *end_entry_index);
281
282/**
283 * @brief Gets a list of \ref PdmAccountEvent.
284 * @note Only available with [3.0.0+].
285 * @param[in] entry_index Start entry index.
286 * @param[out] events Output \ref PdmAccountEvent array.
287 * @param[in] count Max entries in the output array.
288 * @param[out] total_out Total output entries.
289 */
290Result pdmqryQueryAccountEvent(s32 entry_index, PdmAccountEvent *events, s32 count, s32 *total_out);
291
292/**
293 * @brief Gets a list of \ref PdmAccountPlayEvent.
294 * @note Only available with [4.0.0+].
295 * @param[in] entry_index Start entry index.
296 * @param[in] uid \ref AccountUid
297 * @param[out] events Output \ref PdmAccountPlayEvent array.
298 * @param[in] count Max entries in the output array.
299 * @param[out] total_out Total output entries.
300 */
301Result pdmqryQueryAccountPlayEvent(s32 entry_index, AccountUid uid, PdmAccountPlayEvent *events, s32 count, s32 *total_out);
302
303/**
304 * @brief Gets range fields which can then be used with \ref pdmqryQueryAccountPlayEvent.
305 * @param[in] uid \ref AccountUid
306 * @param[out] total_entries Total entries.
307 * @param[out] start_entry_index Start entry index.
308 * @param[out] end_entry_index End entry index.
309 */
310Result pdmqryGetAvailableAccountPlayEventRange(AccountUid uid, s32 *total_entries, s32 *start_entry_index, s32 *end_entry_index);
311
312/**
313 * @brief Gets a list of applications played by the specified user.
314 * @note Only available with [6.0.0-14.1.2].
315 * @param[in] uid \ref AccountUid
316 * @param[in] flag [10.0.0+] Whether to additionally allow using entries with ::PdmPlayLogPolicy_Unknown3.
317 * @param[out] application_ids Output ApplicationIds array.
318 * @param[in] count Max entries in the output array.
319 * @param[out] total_out Total output entries.
320 */
321Result pdmqryQueryRecentlyPlayedApplication(AccountUid uid, bool flag, u64 *application_ids, s32 count, s32 *total_out);
322
323/**
324 * @brief Gets an Event which is signaled when logging a new \ref PdmPlayEvent which would be available via \ref pdmqryQueryAccountEvent, where PdmPlayEvent::event_data::account::type is 0.
325 * @note Only available with [6.0.0-14.1.2].
326 * @note The Event must be closed by the user once finished with it.
327 * @param[out] out_event Output Event with autoclear=false.
328 */
330
331/**
332 * @brief Helper function which converts a Play timestamp from the Pdm*Event structs to POSIX.
333 * @param[in] timestamp Input timestamp.
334 */
335static inline u64 pdmPlayTimestampToPosix(u32 timestamp) {
336 return ((u64)timestamp) * 60 + 946598400;
337}
338
Result pdmqryInitialize(void)
Initialize pdm:qry.
PdmPlayEventType
PlayEventType.
Definition pdm.h:14
@ PdmPlayEventType_Account
Account.
Definition pdm.h:16
@ PdmPlayEventType_PowerStateChange
PowerStateChange.
Definition pdm.h:17
@ PdmPlayEventType_Applet
Applet.
Definition pdm.h:15
@ PdmPlayEventType_Initialize
Initialize. Used for the very first PlayEvent entry in the log.
Definition pdm.h:19
@ PdmPlayEventType_OperationModeChange
OperationModeChange.
Definition pdm.h:18
static u64 pdmPlayTimestampToPosix(u32 timestamp)
Helper function which converts a Play timestamp from the Pdm*Event structs to POSIX.
Definition pdm.h:335
Result pdmqryQueryRecentlyPlayedApplication(AccountUid uid, bool flag, u64 *application_ids, s32 count, s32 *total_out)
Gets a list of applications played by the specified user.
Result pdmqryQueryPlayStatisticsByApplicationId(u64 application_id, bool flag, PdmPlayStatistics *stats)
Gets PdmPlayStatistics for the specified ApplicationId.
Result pdmqryQueryAccountPlayEvent(s32 entry_index, AccountUid uid, PdmAccountPlayEvent *events, s32 count, s32 *total_out)
Gets a list of PdmAccountPlayEvent.
Result pdmqryQueryPlayStatisticsByApplicationIdAndUserAccountId(u64 application_id, AccountUid uid, bool flag, PdmPlayStatistics *stats)
Gets PdmPlayStatistics for the specified ApplicationId and account userId.
Service * pdmqryGetServiceSession(void)
Gets the Service object for the actual pdm:qry service session.
Result pdmqryQueryLastPlayTime(bool flag, PdmLastPlayTime *playtimes, const u64 *application_ids, s32 count, s32 *total_out)
Gets PdmLastPlayTime for the specified applications.
Result pdmqryQueryPlayEvent(s32 entry_index, PdmPlayEvent *events, s32 count, s32 *total_out)
Gets a list of PdmPlayEvent.
Result pdmqryGetAvailablePlayEventRange(s32 *total_entries, s32 *start_entry_index, s32 *end_entry_index)
Gets range fields which can then be used with the other pdmqry funcs, except for pdmqryQueryAccountPl...
Result pdmqryQueryAppletEvent(s32 entry_index, bool flag, PdmAppletEvent *events, s32 count, s32 *total_out)
Gets a list of PdmAppletEvent.
Result pdmqryQueryAccountEvent(s32 entry_index, PdmAccountEvent *events, s32 count, s32 *total_out)
Gets a list of PdmAccountEvent.
void pdmqryExit(void)
Exit pdm:qry.
Result pdmqryGetRecentlyPlayedApplicationUpdateEvent(Event *out_event)
Gets an Event which is signaled when logging a new PdmPlayEvent which would be available via pdmqryQu...
Result pdmqryGetAvailableAccountPlayEventRange(AccountUid uid, s32 *total_entries, s32 *start_entry_index, s32 *end_entry_index)
Gets range fields which can then be used with pdmqryQueryAccountPlayEvent.
PdmPlayLogPolicy
PlayLogPolicy.
Definition pdm.h:34
@ PdmPlayLogPolicy_All
All pdm:qry commands which require PdmPlayEventType_Applet and AppletId = Application will only retur...
Definition pdm.h:35
@ PdmPlayLogPolicy_Unknown3
[10.0.0+] The cmds which require PdmPlayLogPolicy_All, now also allow value 3 if the cmd input flag i...
Definition pdm.h:38
@ PdmPlayLogPolicy_LogOnly
The above commands will filter out the entry with this.
Definition pdm.h:36
@ PdmPlayLogPolicy_None
The pdm:ntfy commands which handle PdmPlayEventType_Applet logging will immediately return 0 when the...
Definition pdm.h:37
PdmAppletEventType
AppletEventType.
Definition pdm.h:23
@ PdmAppletEventType_Exit5
"exit"
Definition pdm.h:29
@ PdmAppletEventType_OutOfFocus4
"out_of_focus"
Definition pdm.h:28
@ PdmAppletEventType_Exit6
"exit"
Definition pdm.h:30
@ PdmAppletEventType_Launch
"launch"
Definition pdm.h:24
@ PdmAppletEventType_Exit
"exit"
Definition pdm.h:25
@ PdmAppletEventType_InFocus
"in_focus"
Definition pdm.h:26
@ PdmAppletEventType_OutOfFocus
"out_of_focus"
Definition pdm.h:27
Account UserId.
Definition acc.h:25
Kernel-mode event structure.
Definition event.h:13
AccountEventV10. AccountEvent for [10.0.0-15.0.1], converted to PdmAccountEvent when needed.
Definition pdm.h:178
u8 type
See PdmPlayEvent::event_data::account::type.
Definition pdm.h:186
u32 entry_index
Entry index.
Definition pdm.h:181
u64 program_id
ProgramId.
Definition pdm.h:180
u64 timestamp_steady
See PdmPlayEvent::timestamp_steady.
Definition pdm.h:185
u64 timestamp_network
See PdmPlayEvent::timestamp_network.
Definition pdm.h:184
AccountUid uid
AccountUid
Definition pdm.h:179
u64 timestamp_user
See PdmPlayEvent::timestamp_user.
Definition pdm.h:183
AccountEventV3. AccountEvent for [3.0.0-9.2.0], converted to PdmAccountEvent when needed.
Definition pdm.h:166
AccountUid uid
AccountUid
Definition pdm.h:167
u64 timestamp_steady
See PdmPlayEvent::timestamp_steady.
Definition pdm.h:172
u64 timestamp_network
See PdmPlayEvent::timestamp_network.
Definition pdm.h:171
u8 type
See PdmPlayEvent::event_data::account::type.
Definition pdm.h:173
u32 entry_index
Entry index.
Definition pdm.h:168
u64 timestamp_user
See PdmPlayEvent::timestamp_user.
Definition pdm.h:170
AccountEvent. AccountEvent for [16.0.0+], converted from the older structs when needed.
Definition pdm.h:191
u64 timestamp_network
See PdmPlayEvent::timestamp_network.
Definition pdm.h:197
u32 entry_index
Entry index.
Definition pdm.h:194
u8 type
See PdmPlayEvent::event_data::account::type.
Definition pdm.h:198
u64 timestamp_user
See PdmPlayEvent::timestamp_user.
Definition pdm.h:196
u64 program_id
[10.0.0+] ProgramId
Definition pdm.h:193
AccountUid uid
AccountUid
Definition pdm.h:192
AccountPlayEvent.
Definition pdm.h:204
u64 timestamp1
POSIX timestamp.
Definition pdm.h:209
u64 timestamp0
POSIX timestamp.
Definition pdm.h:208
AppletEventV1.
Definition pdm.h:44
u64 program_id
ProgramId.
Definition pdm.h:45
u32 timestamp_user
See PdmPlayEvent::timestamp_user, with the above timestamp format.
Definition pdm.h:47
u32 timestamp_network
See PdmPlayEvent::timestamp_network, with the above timestamp format.
Definition pdm.h:48
u32 entry_index
Entry index.
Definition pdm.h:46
u8 event_type
PdmAppletEventType
Definition pdm.h:49
AppletEvent. AppletEvent for [16.0.0+], converted from PdmAppletEventV1 on [1.0.0-15....
Definition pdm.h:54
u64 timestamp_user
See PdmPlayEvent::timestamp_user.
Definition pdm.h:58
u8 event_type
PdmAppletEventType
Definition pdm.h:60
u32 pad
Padding.
Definition pdm.h:57
u64 timestamp_network
See PdmPlayEvent::timestamp_network.
Definition pdm.h:59
u32 entry_index
Entry index.
Definition pdm.h:56
u64 program_id
ProgramId.
Definition pdm.h:55
ApplicationPlayStatistics.
Definition pdm.h:213
u64 total_launches
Total times the application was launched.
Definition pdm.h:216
u64 playtime
Total play-time in nanoseconds.
Definition pdm.h:215
u64 application_id
ApplicationId.
Definition pdm.h:214
LastPlayTime.
Definition pdm.h:101
u8 flag
Flag indicating whether the above field is set.
Definition pdm.h:106
u64 application_id
ApplicationId.
Definition pdm.h:102
u32 timestamp_network
See PdmAppletEventV1::timestamp_network.
Definition pdm.h:104
u32 timestamp_user
See PdmAppletEventV1::timestamp_user.
Definition pdm.h:103
u32 last_played_minutes
Total minutes since the application was last played.
Definition pdm.h:105
PlayEvent.
Definition pdm.h:112
u64 timestamp_network
PosixTime timestamp from StandardNetworkSystemClock.
Definition pdm.h:161
u32 version
Application version.
Definition pdm.h:119
u8 play_event_type
PdmPlayEventType. Controls which struct in the above event_data is used. PdmPlayEventType_Initialize ...
Definition pdm.h:157
u8 type
0-1 to be listed by pdmqryQueryAccountEvent, or 2 to include the above ApplicationId.
Definition pdm.h:141
u8 log_policy
PdmPlayLogPolicy
Definition pdm.h:133
u8 mode
Input value from pdm:ntfy cmd8, see LibAppletMode.
Definition pdm.h:124
u8 applet_id
AppletId
Definition pdm.h:131
u8 value
Input value from the pdm:ntfy command.
Definition pdm.h:145
u8 event_type
PdmAppletEventType
Definition pdm.h:134
u8 storage_id
NcmStorageId
Definition pdm.h:132
u64 timestamp_steady
Timestamp in seconds derived from StandardSteadyClock.
Definition pdm.h:162
u64 timestamp_user
PosixTime timestamp from StandardUserSystemClock.
Definition pdm.h:160
u8 flag
Set to 0x1 by pdm:ntfy cmd8, indicating that the below field is set to an input param.
Definition pdm.h:123
PlayStatisticsV1. PlayStatistics for [1.0.0-15.0.1], converted to PdmPlayStatistics when needed.
Definition pdm.h:65
u32 first_timestamp_network
See PdmAppletEventV1::timestamp_network. This is for the first time the program was played.
Definition pdm.h:70
u64 program_id
ProgramId.
Definition pdm.h:66
u32 first_entry_index
Entry index for the first time the program was played.
Definition pdm.h:68
u32 total_launches
Total times the program was launched.
Definition pdm.h:77
u32 last_timestamp_user
See PdmAppletEventV1::timestamp_user. This is for the last time the program was played.
Definition pdm.h:73
u32 last_timestamp_network
See PdmAppletEventV1::timestamp_network. This is for the last time the program was played.
Definition pdm.h:74
u32 last_entry_index
Entry index for the last time the program was played.
Definition pdm.h:72
u32 playtime_minutes
Total play-time in minutes.
Definition pdm.h:76
u32 first_timestamp_user
See PdmAppletEventV1::timestamp_user. This is for the first time the program was played.
Definition pdm.h:69
PlayStatistics. PlayStatistics for [16.0.0+], converted from PdmPlayStatisticsV1 on [1....
Definition pdm.h:81
u32 last_entry_index
Entry index for the last time the program was played.
Definition pdm.h:89
u64 last_timestamp_user
See PdmAppletEvent::timestamp_user. This is for the last time the program was played,...
Definition pdm.h:91
u32 total_launches
Total times the program was launched.
Definition pdm.h:95
u64 playtime
Total play-time in nanoseconds.
Definition pdm.h:94
u32 pad
Padding.
Definition pdm.h:85
u32 first_entry_index
Entry index for the first time the program was played.
Definition pdm.h:84
u64 first_timestamp_network
See PdmAppletEvent::timestamp_network. This is for the first time the program was played,...
Definition pdm.h:87
u32 pad2
Padding.
Definition pdm.h:90
u32 pad3
Padding.
Definition pdm.h:96
u64 program_id
ProgramId.
Definition pdm.h:82
u64 last_timestamp_network
See PdmAppletEvent::timestamp_network. This is for the last time the program was played,...
Definition pdm.h:92
u64 first_timestamp_user
See PdmAppletEvent::timestamp_user. This is for the first time the program was played,...
Definition pdm.h:86
Service object structure.
Definition service.h:14
uint64_t u64
64-bit unsigned integer.
Definition types.h:22
uint8_t u8
8-bit unsigned integer.
Definition types.h:19
u32 Result
Function error code result type.
Definition types.h:44
int32_t s32
32-bit signed integer.
Definition types.h:27
uint32_t u32
32-bit unsigned integer.
Definition types.h:21