libnx  v4.2.0
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
14 typedef 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
23 typedef 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
34 typedef 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 /// AppletEvent.
42 /// Timestamp format, converted from PosixTime: total minutes since epoch UTC 1999/12/31 00:00:00.
43 /// See \ref pdmPlayTimestampToPosix.
44 typedef struct {
45  u64 program_id; ///< ProgramId.
46  u32 entry_index; ///< Entry index.
47  u32 timestampUser; ///< See PdmPlayEvent::timestampUser, with the above timestamp format.
48  u32 timestampNetwork; ///< See PdmPlayEvent::timestampNetwork, with the above timestamp format.
49  u8 eventType; ///< \ref PdmAppletEventType
50  u8 pad[3]; ///< Padding.
52 
53 /// PlayStatistics
54 typedef struct {
55  u64 application_id; ///< ApplicationId.
56 
57  u32 first_entry_index; ///< Entry index for the first time the application was played.
58  u32 first_timestampUser; ///< See PdmAppletEvent::timestampUser. This is for the first time the application was played.
59  u32 first_timestampNetwork; ///< See PdmAppletEvent::timestampNetwork. This is for the first time the application was played.
60 
61  u32 last_entry_index; ///< Entry index for the last time the application was played.
62  u32 last_timestampUser; ///< See PdmAppletEvent::timestampUser. This is for the last time the application was played.
63  u32 last_timestampNetwork; ///< See PdmAppletEvent::timestampNetwork. This is for the last time the application was played.
64 
65  u32 playtimeMinutes; ///< Total play-time in minutes.
66  u32 totalLaunches; ///< Total times the application was launched.
68 
69 /// LastPlayTime.
70 /// This contains data from the last time the application was played.
71 typedef struct {
72  u64 application_id; ///< ApplicationId.
73  u32 timestampUser; ///< See PdmAppletEvent::timestampUser.
74  u32 timestampNetwork; ///< See PdmAppletEvent::timestampNetwork.
75  u32 lastPlayedMinutes; ///< Total minutes since the application was last played.
76  u8 flag; ///< Flag indicating whether the above field is set.
77  u8 pad[3]; ///< Padding.
79 
80 /// PlayEvent.
81 /// This is the raw entry struct directly read from FS, without any entry filtering.
82 typedef struct {
83  union {
84  struct {
85  u32 program_id[2]; ///< ProgramId.
86 
87  union {
88  struct {
89  u32 version; ///< Application version.
90  } application; ///< For AppletId == ::AppletId_application.
91 
92  struct {
93  u8 flag; ///< Set to 0x1 by pdm:ntfy cmd8, indicating that the below field is set to an input param.
94  u8 mode; ///< Input value from pdm:ntfy cmd8, see \ref LibAppletMode.
95  u8 pad[2]; ///< Padding.
96  } applet; ///< For AppletId != ::AppletId_application.
97 
98  u32 data;
99  } unk_x8;
100 
101  u8 appletId; ///< \ref AppletId
102  u8 storageId; ///< \ref NcmStorageId
103  u8 logPolicy; ///< \ref PdmPlayLogPolicy
104  u8 eventType; ///< \ref PdmAppletEventType
105  u8 unused[0xc]; ///< Unused.
106  } applet;
107 
108  struct {
109  u32 uid[4]; ///< userId.
110  u32 application_id[2]; ///< ApplicationId, see below.
111  u8 type; ///< 0-1 to be listed by \ref pdmqryQueryAccountEvent, or 2 to include the above ApplicationId.
112  } account;
113 
114  struct {
115  u8 value; ///< Input value from the pdm:ntfy command.
116  u8 unused[0x1b]; ///< Unused.
117  } powerStateChange;
118 
119  struct {
120  u8 value; ///< Input value from the pdm:ntfy command.
121  u8 unused[0x1b]; ///< Unused.
122  } operationModeChange;
123 
124  u8 data[0x1c];
125  } eventData; ///< ProgramId/ApplicationId/userId stored within here have the u32 low/high swapped in each u64.
126 
127  u8 playEventType; ///< \ref PdmPlayEventType. Controls which struct in the above eventData is used. ::PdmPlayEventType_Initialize doesn't use eventData.
128  u8 pad[3]; ///< Padding.
129 
130  u64 timestampUser; ///< PosixTime timestamp from StandardUserSystemClock.
131  u64 timestampNetwork; ///< PosixTime timestamp from StandardNetworkSystemClock.
132  u64 timestampSteady; ///< Timestamp in seconds derived from StandardSteadyClock.
133 } PdmPlayEvent;
134 
135 /// AccountEvent
136 typedef struct {
137  AccountUid uid; ///< \ref AccountUid
138  u32 entry_index; ///< Entry index.
139  u8 pad[4]; ///< Padding.
140  u64 timestampUser; ///< See PdmPlayEvent::timestampUser.
141  u64 timestampNetwork; ///< See PdmPlayEvent::timestampNetwork.
142  u64 timestampSteady; ///< See PdmPlayEvent::timestampSteady.
143  u8 type; ///< See PdmPlayEvent::eventData::account::type.
144  u8 pad_x31[7]; ///< Padding.
146 
147 /// AccountPlayEvent.
148 /// This is the raw entry struct directly read from FS, without any entry filtering. This is separate from \ref PdmPlayEvent.
149 typedef struct {
150  u8 unk_x0[4]; ///< Unknown.
151  u32 application_id[2]; ///< ApplicationId, with the u32 low/high words swapped.
152  u8 unk_xc[0xc]; ///< Unknown.
153  u64 timestamp0; ///< POSIX timestamp.
154  u64 timestamp1; ///< POSIX timestamp.
156 
157 /// ApplicationPlayStatistics
158 typedef struct {
159  u64 application_id; ///< ApplicationId.
160  u64 totalPlayTime; ///< Total play-time in nanoseconds.
161  u64 totalLaunches; ///< Total times the application was launched.
163 
164 /// Initialize pdm:qry.
166 
167 /// Exit pdm:qry.
168 void pdmqryExit(void);
169 
170 /// Gets the Service object for the actual pdm:qry service session.
172 
173 /**
174  * @brief Gets a list of \ref PdmAppletEvent.
175  * @param[in] entry_index Start entry index.
176  * @param[in] flag [10.0.0+] Whether to additionally allow using entries with ::PdmPlayLogPolicy_Unknown3.
177  * @param[out] events Output \ref PdmAppletEvent array.
178  * @param[in] count Max entries in the output array.
179  * @param[out] total_out Total output entries.
180  */
181 Result pdmqryQueryAppletEvent(s32 entry_index, bool flag, PdmAppletEvent *events, s32 count, s32 *total_out);
182 
183 /**
184  * @brief Gets \ref PdmPlayStatistics for the specified ApplicationId.
185  * @param[in] application_id ApplicationId
186  * @param[in] flag [10.0.0+] Whether to additionally allow using entries with ::PdmPlayLogPolicy_Unknown3.
187  * @param[out] stats \ref PdmPlayStatistics
188  */
189 Result pdmqryQueryPlayStatisticsByApplicationId(u64 application_id, bool flag, PdmPlayStatistics *stats);
190 
191 /**
192  * @brief Gets \ref PdmPlayStatistics for the specified ApplicationId and account userId.
193  * @param[in] application_id ApplicationId
194  * @param[in] uid \ref AccountUid
195  * @param[in] flag [10.0.0+] Whether to additionally allow using entries with ::PdmPlayLogPolicy_Unknown3.
196  * @param[out] stats \ref PdmPlayStatistics
197  */
199 
200 /**
201  * @brief Gets \ref PdmLastPlayTime for the specified applications.
202  * @param[in] flag [10.0.0+] Whether to additionally allow using entries with ::PdmPlayLogPolicy_Unknown3.
203  * @param[out] playtimes Output \ref PdmLastPlayTime array.
204  * @param[in] application_ids Input ApplicationIds array.
205  * @param[in] count Total entries in the input/output arrays.
206  * @param[out] total_out Total output entries.
207  */
208 Result pdmqryQueryLastPlayTime(bool flag, PdmLastPlayTime *playtimes, const u64 *application_ids, s32 count, s32 *total_out);
209 
210 /**
211  * @brief Gets a list of \ref PdmPlayEvent.
212  * @param[in] entry_index Start entry index.
213  * @param[out] events Output \ref PdmPlayEvent array.
214  * @param[in] count Max entries in the output array.
215  * @param[out] total_out Total output entries.
216  */
217 Result pdmqryQueryPlayEvent(s32 entry_index, PdmPlayEvent *events, s32 count, s32 *total_out);
218 
219 /**
220  * @brief Gets range fields which can then be used with the other pdmqry funcs, except for \ref pdmqryQueryAccountPlayEvent.
221  * @param[out] total_entries Total entries.
222  * @param[out] start_entry_index Start entry index.
223  * @param[out] end_entry_index End entry index.
224  */
225 Result pdmqryGetAvailablePlayEventRange(s32 *total_entries, s32 *start_entry_index, s32 *end_entry_index);
226 
227 /**
228  * @brief Gets a list of \ref PdmAccountEvent.
229  * @param[in] entry_index Start entry index.
230  * @param[out] events Output \ref PdmAccountEvent array.
231  * @param[in] count Max entries in the output array.
232  * @param[out] total_out Total output entries.
233  */
234 Result pdmqryQueryAccountEvent(s32 entry_index, PdmAccountEvent *events, s32 count, s32 *total_out);
235 
236 /**
237  * @brief Gets a list of \ref PdmAccountPlayEvent.
238  * @note Only available with [4.0.0+].
239  * @param[in] entry_index Start entry index.
240  * @param[in] uid \ref AccountUid
241  * @param[out] events Output \ref PdmAccountPlayEvent array.
242  * @param[in] count Max entries in the output array.
243  * @param[out] total_out Total output entries.
244  */
245 Result pdmqryQueryAccountPlayEvent(s32 entry_index, AccountUid uid, PdmAccountPlayEvent *events, s32 count, s32 *total_out);
246 
247 /**
248  * @brief Gets range fields which can then be used with \ref pdmqryQueryAccountPlayEvent.
249  * @param[in] uid \ref AccountUid
250  * @param[out] total_entries Total entries.
251  * @param[out] start_entry_index Start entry index.
252  * @param[out] end_entry_index End entry index.
253  */
254 Result pdmqryGetAvailableAccountPlayEventRange(AccountUid uid, s32 *total_entries, s32 *start_entry_index, s32 *end_entry_index);
255 
256 /**
257  * @brief Gets a list of applications played by the specified user.
258  * @note Only available with [6.0.0+].
259  * @param[in] uid \ref AccountUid
260  * @param[in] flag [10.0.0+] Whether to additionally allow using entries with ::PdmPlayLogPolicy_Unknown3.
261  * @param[out] application_ids Output ApplicationIds array.
262  * @param[in] count Max entries in the output array.
263  * @param[out] total_out Total output entries.
264  */
265 Result pdmqryQueryRecentlyPlayedApplication(AccountUid uid, bool flag, u64 *application_ids, s32 count, s32 *total_out);
266 
267 /**
268  * @brief Gets an Event which is signaled when logging a new \ref PdmPlayEvent which would be available via \ref pdmqryQueryAccountEvent, where PdmPlayEvent::eventData::account::type is 0.
269  * @note Only available with [6.0.0+].
270  * @note The Event must be closed by the user once finished with it.
271  * @param[out] out_event Output Event with autoclear=false.
272  */
274 
275 /**
276  * @brief Helper function which converts a Play timestamp from the Pdm*Event structs to POSIX.
277  * @param[in] timestamp Input timestamp.
278  */
279 static inline u64 pdmPlayTimestampToPosix(u32 timestamp) {
280  return ((u64)timestamp) * 60 + 946598400;
281 }
282 
PdmPlayLogPolicy
PdmPlayLogPolicy
PlayLogPolicy.
Definition: pdm.h:34
PdmAccountEvent::timestampUser
u64 timestampUser
See PdmPlayEvent::timestampUser.
Definition: pdm.h:140
PdmAppletEventType_Exit6
@ PdmAppletEventType_Exit6
"exit"
Definition: pdm.h:30
pdmPlayTimestampToPosix
static u64 pdmPlayTimestampToPosix(u32 timestamp)
Helper function which converts a Play timestamp from the Pdm*Event structs to POSIX.
Definition: pdm.h:279
PdmAppletEvent::program_id
u64 program_id
ProgramId.
Definition: pdm.h:45
PdmPlayEvent::appletId
u8 appletId
AppletId
Definition: pdm.h:101
PdmAppletEventType_Launch
@ PdmAppletEventType_Launch
"launch"
Definition: pdm.h:24
PdmAccountPlayEvent::timestamp0
u64 timestamp0
POSIX timestamp.
Definition: pdm.h:153
PdmAppletEvent::entry_index
u32 entry_index
Entry index.
Definition: pdm.h:46
PdmApplicationPlayStatistics::application_id
u64 application_id
ApplicationId.
Definition: pdm.h:159
pdmqryGetRecentlyPlayedApplicationUpdateEvent
Result pdmqryGetRecentlyPlayedApplicationUpdateEvent(Event *out_event)
Gets an Event which is signaled when logging a new PdmPlayEvent which would be available via pdmqryQu...
PdmPlayEvent::type
u8 type
0-1 to be listed by pdmqryQueryAccountEvent, or 2 to include the above ApplicationId.
Definition: pdm.h:111
PdmPlayEvent::version
u32 version
Application version.
Definition: pdm.h:89
u8
uint8_t u8
8-bit unsigned integer.
Definition: types.h:19
Event
Kernel-mode event structure.
Definition: event.h:13
PdmAccountEvent::timestampNetwork
u64 timestampNetwork
See PdmPlayEvent::timestampNetwork.
Definition: pdm.h:141
PdmAppletEventType_OutOfFocus4
@ PdmAppletEventType_OutOfFocus4
"out_of_focus"
Definition: pdm.h:28
PdmPlayStatistics::last_timestampNetwork
u32 last_timestampNetwork
See PdmAppletEvent::timestampNetwork. This is for the last time the application was played.
Definition: pdm.h:63
PdmAppletEvent::timestampNetwork
u32 timestampNetwork
See PdmPlayEvent::timestampNetwork, with the above timestamp format.
Definition: pdm.h:48
pdmqryQueryLastPlayTime
Result pdmqryQueryLastPlayTime(bool flag, PdmLastPlayTime *playtimes, const u64 *application_ids, s32 count, s32 *total_out)
Gets PdmLastPlayTime for the specified applications.
PdmLastPlayTime::application_id
u64 application_id
ApplicationId.
Definition: pdm.h:72
AccountUid
Account UserId.
Definition: acc.h:25
pdmqryInitialize
Result pdmqryInitialize(void)
Initialize pdm:qry.
pdmqryQueryPlayEvent
Result pdmqryQueryPlayEvent(s32 entry_index, PdmPlayEvent *events, s32 count, s32 *total_out)
Gets a list of PdmPlayEvent.
s32
int32_t s32
32-bit signed integer.
Definition: types.h:27
PdmPlayStatistics
PlayStatistics.
Definition: pdm.h:54
PdmPlayLogPolicy_LogOnly
@ PdmPlayLogPolicy_LogOnly
The above commands will filter out the entry with this.
Definition: pdm.h:36
PdmLastPlayTime::timestampUser
u32 timestampUser
See PdmAppletEvent::timestampUser.
Definition: pdm.h:73
PdmPlayStatistics::application_id
u64 application_id
ApplicationId.
Definition: pdm.h:55
PdmPlayEventType_Applet
@ PdmPlayEventType_Applet
Applet.
Definition: pdm.h:15
PdmPlayStatistics::totalLaunches
u32 totalLaunches
Total times the application was launched.
Definition: pdm.h:66
PdmPlayEvent::eventType
u8 eventType
PdmAppletEventType
Definition: pdm.h:104
PdmPlayStatistics::first_entry_index
u32 first_entry_index
Entry index for the first time the application was played.
Definition: pdm.h:57
PdmAppletEvent
AppletEvent.
Definition: pdm.h:44
PdmLastPlayTime
LastPlayTime.
Definition: pdm.h:71
PdmPlayStatistics::last_entry_index
u32 last_entry_index
Entry index for the last time the application was played.
Definition: pdm.h:61
PdmAppletEventType_Exit5
@ PdmAppletEventType_Exit5
"exit"
Definition: pdm.h:29
u32
uint32_t u32
32-bit unsigned integer.
Definition: types.h:21
PdmPlayEvent::timestampNetwork
u64 timestampNetwork
PosixTime timestamp from StandardNetworkSystemClock.
Definition: pdm.h:131
PdmPlayStatistics::first_timestampUser
u32 first_timestampUser
See PdmAppletEvent::timestampUser. This is for the first time the application was played.
Definition: pdm.h:58
PdmPlayEvent::value
u8 value
Input value from the pdm:ntfy command.
Definition: pdm.h:115
PdmAppletEvent::eventType
u8 eventType
PdmAppletEventType
Definition: pdm.h:49
PdmAppletEventType_InFocus
@ PdmAppletEventType_InFocus
"in_focus"
Definition: pdm.h:26
PdmPlayEventType_OperationModeChange
@ PdmPlayEventType_OperationModeChange
OperationModeChange.
Definition: pdm.h:18
PdmPlayLogPolicy_Unknown3
@ 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
PdmPlayEvent::playEventType
u8 playEventType
PdmPlayEventType. Controls which struct in the above eventData is used. PdmPlayEventType_Initialize d...
Definition: pdm.h:127
PdmApplicationPlayStatistics::totalLaunches
u64 totalLaunches
Total times the application was launched.
Definition: pdm.h:161
u64
uint64_t u64
64-bit unsigned integer.
Definition: types.h:22
PdmAccountEvent
AccountEvent.
Definition: pdm.h:136
Result
u32 Result
Function error code result type.
Definition: types.h:44
PdmPlayEvent::mode
u8 mode
Input value from pdm:ntfy cmd8, see LibAppletMode.
Definition: pdm.h:94
PdmAppletEvent::timestampUser
u32 timestampUser
See PdmPlayEvent::timestampUser, with the above timestamp format.
Definition: pdm.h:47
pdmqryQueryPlayStatisticsByApplicationId
Result pdmqryQueryPlayStatisticsByApplicationId(u64 application_id, bool flag, PdmPlayStatistics *stats)
Gets PdmPlayStatistics for the specified ApplicationId.
PdmAppletEventType_OutOfFocus
@ PdmAppletEventType_OutOfFocus
"out_of_focus"
Definition: pdm.h:27
pdmqryGetServiceSession
Service * pdmqryGetServiceSession(void)
Gets the Service object for the actual pdm:qry service session.
PdmPlayStatistics::last_timestampUser
u32 last_timestampUser
See PdmAppletEvent::timestampUser. This is for the last time the application was played.
Definition: pdm.h:62
PdmLastPlayTime::lastPlayedMinutes
u32 lastPlayedMinutes
Total minutes since the application was last played.
Definition: pdm.h:75
PdmPlayEventType
PdmPlayEventType
PlayEventType.
Definition: pdm.h:14
PdmApplicationPlayStatistics
ApplicationPlayStatistics.
Definition: pdm.h:158
PdmPlayLogPolicy_All
@ PdmPlayLogPolicy_All
All pdm:qry commands which require PdmPlayEventType_Applet and AppletId = Application will only retur...
Definition: pdm.h:35
PdmPlayLogPolicy_None
@ PdmPlayLogPolicy_None
The pdm:ntfy commands which handle PdmPlayEventType_Applet logging will immediately return 0 when the...
Definition: pdm.h:37
PdmPlayEvent::flag
u8 flag
Set to 0x1 by pdm:ntfy cmd8, indicating that the below field is set to an input param.
Definition: pdm.h:93
pdmqryQueryPlayStatisticsByApplicationIdAndUserAccountId
Result pdmqryQueryPlayStatisticsByApplicationIdAndUserAccountId(u64 application_id, AccountUid uid, bool flag, PdmPlayStatistics *stats)
Gets PdmPlayStatistics for the specified ApplicationId and account userId.
pdmqryQueryAccountPlayEvent
Result pdmqryQueryAccountPlayEvent(s32 entry_index, AccountUid uid, PdmAccountPlayEvent *events, s32 count, s32 *total_out)
Gets a list of PdmAccountPlayEvent.
PdmLastPlayTime::flag
u8 flag
Flag indicating whether the above field is set.
Definition: pdm.h:76
PdmAccountPlayEvent::timestamp1
u64 timestamp1
POSIX timestamp.
Definition: pdm.h:154
pdmqryGetAvailableAccountPlayEventRange
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.
PdmPlayEventType_Initialize
@ PdmPlayEventType_Initialize
Initialize. Used for the very first PlayEvent entry in the log.
Definition: pdm.h:19
PdmPlayEvent
PlayEvent.
Definition: pdm.h:82
PdmPlayEvent::logPolicy
u8 logPolicy
PdmPlayLogPolicy
Definition: pdm.h:103
pdmqryQueryAppletEvent
Result pdmqryQueryAppletEvent(s32 entry_index, bool flag, PdmAppletEvent *events, s32 count, s32 *total_out)
Gets a list of PdmAppletEvent.
PdmPlayEventType_PowerStateChange
@ PdmPlayEventType_PowerStateChange
PowerStateChange.
Definition: pdm.h:17
PdmApplicationPlayStatistics::totalPlayTime
u64 totalPlayTime
Total play-time in nanoseconds.
Definition: pdm.h:160
pdmqryQueryAccountEvent
Result pdmqryQueryAccountEvent(s32 entry_index, PdmAccountEvent *events, s32 count, s32 *total_out)
Gets a list of PdmAccountEvent.
PdmAccountEvent::timestampSteady
u64 timestampSteady
See PdmPlayEvent::timestampSteady.
Definition: pdm.h:142
PdmAppletEventType
PdmAppletEventType
AppletEventType.
Definition: pdm.h:23
Service
Service object structure.
Definition: service.h:13
PdmLastPlayTime::timestampNetwork
u32 timestampNetwork
See PdmAppletEvent::timestampNetwork.
Definition: pdm.h:74
PdmPlayEvent::timestampUser
u64 timestampUser
PosixTime timestamp from StandardUserSystemClock.
Definition: pdm.h:130
PdmPlayEventType_Account
@ PdmPlayEventType_Account
Account.
Definition: pdm.h:16
PdmAppletEventType_Exit
@ PdmAppletEventType_Exit
"exit"
Definition: pdm.h:25
PdmAccountEvent::type
u8 type
See PdmPlayEvent::eventData::account::type.
Definition: pdm.h:143
PdmAccountEvent::entry_index
u32 entry_index
Entry index.
Definition: pdm.h:138
pdmqryExit
void pdmqryExit(void)
Exit pdm:qry.
PdmPlayEvent::timestampSteady
u64 timestampSteady
Timestamp in seconds derived from StandardSteadyClock.
Definition: pdm.h:132
PdmPlayEvent::storageId
u8 storageId
NcmStorageId
Definition: pdm.h:102
PdmAccountPlayEvent
AccountPlayEvent.
Definition: pdm.h:149
pdmqryQueryRecentlyPlayedApplication
Result pdmqryQueryRecentlyPlayedApplication(AccountUid uid, bool flag, u64 *application_ids, s32 count, s32 *total_out)
Gets a list of applications played by the specified user.
pdmqryGetAvailablePlayEventRange
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...
PdmPlayStatistics::first_timestampNetwork
u32 first_timestampNetwork
See PdmAppletEvent::timestampNetwork. This is for the first time the application was played.
Definition: pdm.h:59
PdmAccountEvent::uid
AccountUid uid
AccountUid
Definition: pdm.h:137
PdmPlayStatistics::playtimeMinutes
u32 playtimeMinutes
Total play-time in minutes.
Definition: pdm.h:65