libnx
v4.7.0
|
PDM (pdm:*) service IPC wrapper. More...
#include "../types.h"
#include "../sf/service.h"
#include "../services/acc.h"
#include "../kernel/event.h"
Go to the source code of this file.
Data Structures | |
struct | PdmAppletEventV1 |
AppletEventV1. More... | |
struct | PdmAppletEvent |
AppletEvent. AppletEvent for [16.0.0+], converted from PdmAppletEventV1 on [1.0.0-15.0.1]. More... | |
struct | PdmPlayStatisticsV1 |
PlayStatisticsV1. PlayStatistics for [1.0.0-15.0.1], converted to PdmPlayStatistics when needed. More... | |
struct | PdmPlayStatistics |
PlayStatistics. PlayStatistics for [16.0.0+], converted from PdmPlayStatisticsV1 on [1.0.0-15.0.1]. More... | |
struct | PdmLastPlayTime |
LastPlayTime. More... | |
struct | PdmPlayEvent |
PlayEvent. More... | |
struct | PdmAccountEventV3 |
AccountEventV3. AccountEvent for [3.0.0-9.2.0], converted to PdmAccountEvent when needed. More... | |
struct | PdmAccountEventV10 |
AccountEventV10. AccountEvent for [10.0.0-15.0.1], converted to PdmAccountEvent when needed. More... | |
struct | PdmAccountEvent |
AccountEvent. AccountEvent for [16.0.0+], converted from the older structs when needed. More... | |
struct | PdmAccountPlayEvent |
AccountPlayEvent. More... | |
struct | PdmApplicationPlayStatistics |
ApplicationPlayStatistics. More... | |
Enumerations | |
enum | PdmPlayEventType { PdmPlayEventType_Applet = 0 , PdmPlayEventType_Account = 1 , PdmPlayEventType_PowerStateChange = 2 , PdmPlayEventType_OperationModeChange = 3 , PdmPlayEventType_Initialize = 4 } |
PlayEventType. More... | |
enum | PdmAppletEventType { PdmAppletEventType_Launch = 0 , PdmAppletEventType_Exit = 1 , PdmAppletEventType_InFocus = 2 , PdmAppletEventType_OutOfFocus = 3 , PdmAppletEventType_OutOfFocus4 = 4 , PdmAppletEventType_Exit5 = 5 , PdmAppletEventType_Exit6 = 6 } |
AppletEventType. More... | |
enum | PdmPlayLogPolicy { PdmPlayLogPolicy_All = 0 , PdmPlayLogPolicy_LogOnly = 1 , PdmPlayLogPolicy_None = 2 , PdmPlayLogPolicy_Unknown3 = 3 } |
PlayLogPolicy. More... | |
Functions | |
Result | pdmqryInitialize (void) |
Initialize pdm:qry. | |
void | pdmqryExit (void) |
Exit pdm:qry. | |
Service * | pdmqryGetServiceSession (void) |
Gets the Service object for the actual pdm:qry service session. | |
Result | pdmqryQueryAppletEvent (s32 entry_index, bool flag, PdmAppletEvent *events, s32 count, s32 *total_out) |
Gets a list of PdmAppletEvent. More... | |
Result | pdmqryQueryPlayStatisticsByApplicationId (u64 application_id, bool flag, PdmPlayStatistics *stats) |
Gets PdmPlayStatistics for the specified ApplicationId. More... | |
Result | pdmqryQueryPlayStatisticsByApplicationIdAndUserAccountId (u64 application_id, AccountUid uid, bool flag, PdmPlayStatistics *stats) |
Gets PdmPlayStatistics for the specified ApplicationId and account userId. More... | |
Result | pdmqryQueryLastPlayTime (bool flag, PdmLastPlayTime *playtimes, const u64 *application_ids, s32 count, s32 *total_out) |
Gets PdmLastPlayTime for the specified applications. More... | |
Result | pdmqryQueryPlayEvent (s32 entry_index, PdmPlayEvent *events, s32 count, s32 *total_out) |
Gets a list of PdmPlayEvent. More... | |
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 pdmqryQueryAccountPlayEvent. More... | |
Result | pdmqryQueryAccountEvent (s32 entry_index, PdmAccountEvent *events, s32 count, s32 *total_out) |
Gets a list of PdmAccountEvent. More... | |
Result | pdmqryQueryAccountPlayEvent (s32 entry_index, AccountUid uid, PdmAccountPlayEvent *events, s32 count, s32 *total_out) |
Gets a list of PdmAccountPlayEvent. More... | |
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. More... | |
Result | pdmqryQueryRecentlyPlayedApplication (AccountUid uid, bool flag, u64 *application_ids, s32 count, s32 *total_out) |
Gets a list of applications played by the specified user. More... | |
Result | pdmqryGetRecentlyPlayedApplicationUpdateEvent (Event *out_event) |
Gets an Event which is signaled when logging a new PdmPlayEvent which would be available via pdmqryQueryAccountEvent, where PdmPlayEvent::event_data::account::type is 0. More... | |
static u64 | pdmPlayTimestampToPosix (u32 timestamp) |
Helper function which converts a Play timestamp from the Pdm*Event structs to POSIX. More... | |
PDM (pdm:*) service IPC wrapper.
enum PdmAppletEventType |
enum PdmPlayEventType |
enum PdmPlayLogPolicy |
PlayLogPolicy.
Enumerator | |
---|---|
PdmPlayLogPolicy_All | All pdm:qry commands which require PdmPlayEventType_Applet and AppletId = Application will only return the entry when PlayLogPolicy matches this value. |
PdmPlayLogPolicy_LogOnly | The above commands will filter out the entry with this. |
PdmPlayLogPolicy_None | The pdm:ntfy commands which handle PdmPlayEventType_Applet logging will immediately return 0 when the input param matches this value. |
PdmPlayLogPolicy_Unknown3 | [10.0.0+] The cmds which require PdmPlayLogPolicy_All, now also allow value 3 if the cmd input flag is set. |
Helper function which converts a Play timestamp from the Pdm*Event structs to POSIX.
[in] | timestamp | Input timestamp. |
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.
[in] | uid | AccountUid |
[out] | total_entries | Total entries. |
[out] | start_entry_index | Start entry index. |
[out] | end_entry_index | End entry index. |
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 pdmqryQueryAccountPlayEvent.
[out] | total_entries | Total entries. |
[out] | start_entry_index | Start entry index. |
[out] | end_entry_index | End entry index. |
Gets an Event which is signaled when logging a new PdmPlayEvent which would be available via pdmqryQueryAccountEvent, where PdmPlayEvent::event_data::account::type is 0.
[out] | out_event | Output Event with autoclear=false. |
Result pdmqryQueryAccountEvent | ( | s32 | entry_index, |
PdmAccountEvent * | events, | ||
s32 | count, | ||
s32 * | total_out | ||
) |
Gets a list of PdmAccountEvent.
[in] | entry_index | Start entry index. |
[out] | events | Output PdmAccountEvent array. |
[in] | count | Max entries in the output array. |
[out] | total_out | Total output entries. |
Result pdmqryQueryAccountPlayEvent | ( | s32 | entry_index, |
AccountUid | uid, | ||
PdmAccountPlayEvent * | events, | ||
s32 | count, | ||
s32 * | total_out | ||
) |
Gets a list of PdmAccountPlayEvent.
[in] | entry_index | Start entry index. |
[in] | uid | AccountUid |
[out] | events | Output PdmAccountPlayEvent array. |
[in] | count | Max entries in the output array. |
[out] | total_out | Total output entries. |
Result pdmqryQueryAppletEvent | ( | s32 | entry_index, |
bool | flag, | ||
PdmAppletEvent * | events, | ||
s32 | count, | ||
s32 * | total_out | ||
) |
Gets a list of PdmAppletEvent.
[in] | entry_index | Start entry index. |
[in] | flag | [10.0.0+] Whether to additionally allow using entries with PdmPlayLogPolicy_Unknown3. |
[out] | events | Output PdmAppletEvent array. |
[in] | count | Max entries in the output array. |
[out] | total_out | Total output entries. |
Result pdmqryQueryLastPlayTime | ( | bool | flag, |
PdmLastPlayTime * | playtimes, | ||
const u64 * | application_ids, | ||
s32 | count, | ||
s32 * | total_out | ||
) |
Gets PdmLastPlayTime for the specified applications.
[in] | flag | [10.0.0+] Whether to additionally allow using entries with PdmPlayLogPolicy_Unknown3. |
[out] | playtimes | Output PdmLastPlayTime array. |
[in] | application_ids | Input ApplicationIds array. |
[in] | count | Total entries in the input/output arrays. |
[out] | total_out | Total output entries. |
Result pdmqryQueryPlayEvent | ( | s32 | entry_index, |
PdmPlayEvent * | events, | ||
s32 | count, | ||
s32 * | total_out | ||
) |
Gets a list of PdmPlayEvent.
[in] | entry_index | Start entry index. |
[out] | events | Output PdmPlayEvent array. |
[in] | count | Max entries in the output array. |
[out] | total_out | Total output entries. |
Result pdmqryQueryPlayStatisticsByApplicationId | ( | u64 | application_id, |
bool | flag, | ||
PdmPlayStatistics * | stats | ||
) |
Gets PdmPlayStatistics for the specified ApplicationId.
[in] | application_id | ApplicationId |
[in] | flag | [10.0.0+] Whether to additionally allow using entries with PdmPlayLogPolicy_Unknown3. |
[out] | stats | PdmPlayStatistics |
Result pdmqryQueryPlayStatisticsByApplicationIdAndUserAccountId | ( | u64 | application_id, |
AccountUid | uid, | ||
bool | flag, | ||
PdmPlayStatistics * | stats | ||
) |
Gets PdmPlayStatistics for the specified ApplicationId and account userId.
[in] | application_id | ApplicationId |
[in] | uid | AccountUid |
[in] | flag | [10.0.0+] Whether to additionally allow using entries with PdmPlayLogPolicy_Unknown3. |
[out] | stats | PdmPlayStatistics |
Result pdmqryQueryRecentlyPlayedApplication | ( | AccountUid | uid, |
bool | flag, | ||
u64 * | application_ids, | ||
s32 | count, | ||
s32 * | total_out | ||
) |
Gets a list of applications played by the specified user.
[in] | uid | AccountUid |
[in] | flag | [10.0.0+] Whether to additionally allow using entries with PdmPlayLogPolicy_Unknown3. |
[out] | application_ids | Output ApplicationIds array. |
[in] | count | Max entries in the output array. |
[out] | total_out | Total output entries. |