libnx v4.9.0
Loading...
Searching...
No Matches
pctlauth.h
Go to the documentation of this file.
1/**
2 * @file pctlauth.h
3 * @brief Wrapper for using the Parental Controls authentication LibraryApplet. This applet is used by qlaunch.
4 * @author yellows8
5 * @copyright libnx Authors
6 */
7#pragma once
8#include "../types.h"
9
10/// Type values for PctlAuthArg::type.
11typedef enum {
12 PctlAuthType_Show = 0, ///< ShowParentalAuthentication
13 PctlAuthType_RegisterPasscode = 1, ///< RegisterParentalPasscode
14 PctlAuthType_ChangePasscode = 2, ///< ChangeParentalPasscode
16
17/// Input arg storage for the applet.
18typedef struct {
19 u32 unk_x0; ///< Always set to 0 by the user-process.
20 PctlAuthType type; ///< \ref PctlAuthType
21 u8 arg0; ///< Arg0
22 u8 arg1; ///< Arg1
23 u8 arg2; ///< Arg2
24 u8 pad; ///< Padding
26
27/**
28 * @brief Launches the applet.
29 * @note Should not be used if a PIN is not already registered. See \ref pctlIsRestrictionEnabled.
30 * @param flag Input flag. false = temporarily disable Parental Controls. true = validate the input PIN.
31 */
33
34/**
35 * @brief Launches the applet. Only available with [4.0.0+].
36 * @param arg0 Value for PctlAuthArg.arg0.
37 * @param arg1 Value for PctlAuthArg.arg1.
38 * @param arg2 Value for PctlAuthArg.arg2.
39 */
40Result pctlauthShowEx(u8 arg0, u8 arg1, u8 arg2);
41
42/**
43 * @brief Just calls: pctlauthShowEx(1, 0, 1). Launches the applet for checking the PIN, used when changing system-settings.
44 * @note Should not be used if a PIN is not already registered. See \ref pctlIsRestrictionEnabled.
45 */
47
48/**
49 * @brief Launches the applet for registering the Parental Controls PIN.
50 */
52
53/**
54 * @brief Launches the applet for changing the Parental Controls PIN.
55 * @note Should not be used if a PIN is not already registered. See \ref pctlIsRestrictionEnabled.
56 */
58
Result pctlauthShowForConfiguration(void)
Just calls: pctlauthShowEx(1, 0, 1).
Result pctlauthChangePasscode(void)
Launches the applet for changing the Parental Controls PIN.
Result pctlauthShow(bool flag)
Launches the applet.
Result pctlauthShowEx(u8 arg0, u8 arg1, u8 arg2)
Launches the applet.
Result pctlauthRegisterPasscode(void)
Launches the applet for registering the Parental Controls PIN.
PctlAuthType
Type values for PctlAuthArg::type.
Definition pctlauth.h:11
@ PctlAuthType_ChangePasscode
ChangeParentalPasscode.
Definition pctlauth.h:14
@ PctlAuthType_RegisterPasscode
RegisterParentalPasscode.
Definition pctlauth.h:13
@ PctlAuthType_Show
ShowParentalAuthentication.
Definition pctlauth.h:12
Input arg storage for the applet.
Definition pctlauth.h:18
u8 arg0
Arg0.
Definition pctlauth.h:21
u8 arg2
Arg2.
Definition pctlauth.h:23
u8 pad
Padding.
Definition pctlauth.h:24
u8 arg1
Arg1.
Definition pctlauth.h:22
PctlAuthType type
PctlAuthType
Definition pctlauth.h:20
u32 unk_x0
Always set to 0 by the user-process.
Definition pctlauth.h:19
uint8_t u8
8-bit unsigned integer.
Definition types.h:19
u32 Result
Function error code result type.
Definition types.h:44
uint32_t u32
32-bit unsigned integer.
Definition types.h:21