libnx v4.9.0
Loading...
Searching...
No Matches
mii_la.h
Go to the documentation of this file.
1/**
2 * @file mii_la.h
3 * @brief Wrapper for using the MiiEdit LibraryApplet.
4 * @author yellows8
5 * @copyright libnx Authors
6 */
7#pragma once
8#include "../types.h"
9#include "../services/mii.h"
10
11/// AppletMode
12typedef enum {
13 MiiLaAppletMode_ShowMiiEdit = 0, ///< ShowMiiEdit
14 MiiLaAppletMode_AppendMii = 1, ///< AppendMii
15 MiiLaAppletMode_AppendMiiImage = 2, ///< AppendMiiImage
16 MiiLaAppletMode_UpdateMiiImage = 3, ///< UpdateMiiImage
17 MiiLaAppletMode_CreateMii = 4, ///< [10.2.0+] CreateMii
18 MiiLaAppletMode_EditMii = 5, ///< [10.2.0+] EditMii
20
21/// AppletInput
22typedef struct {
23 s32 version; ///< Version
24 u32 mode; ///< \ref MiiLaAppletMode
25 s32 special_key_code; ///< \ref MiiSpecialKeyCode
26 union {
27 Uuid valid_uuid_array[8]; ///< ValidUuidArray. Only used with \ref MiiLaAppletMode ::NfpLaMiiLaAppletMode_AppendMiiImage / ::NfpLaMiiLaAppletMode_UpdateMiiImage.
28 struct {
29 MiiCharInfo char_info; ///< \ref MiiCharInfo
30 u8 unused_x64[0x28]; ///< Unused
31 } char_info;
32 };
33 Uuid used_uuid; ///< UsedUuid. Only used with \ref MiiLaAppletMode ::NfpLaMiiLaAppletMode_UpdateMiiImage.
34 u8 unk_x9C[0x64]; ///< Unused
36
37/// AppletOutput
38typedef struct {
39 u32 res; ///< Result: 0 = Success, 1 = Cancel.
40 s32 index; ///< Index. Only set when Result is Success, where \ref MiiLaAppletMode isn't ::NfpLaMiiLaAppletMode_ShowMiiEdit.
41 u8 unk_x8[0x18]; ///< Unused
43
44/// AppletOutputForCharInfoEditing
45typedef struct {
46 u32 res; ///< MiiLaAppletOutput::res
47 MiiCharInfo char_info; ///< \ref MiiCharInfo
48 u8 unused[0x24]; ///< Unused
50
51/**
52 * @brief Launches the applet for ShowMiiEdit.
53 * @param[in] special_key_code \ref MiiSpecialKeyCode
54 */
56
57/**
58 * @brief Launches the applet for AppendMii.
59 * @param[in] special_key_code \ref MiiSpecialKeyCode
60 * @param[out] index Output Index.
61 */
62Result miiLaAppendMii(MiiSpecialKeyCode special_key_code, s32 *index);
63
64/**
65 * @brief Launches the applet for AppendMiiImage.
66 * @param[in] special_key_code \ref MiiSpecialKeyCode
67 * @param[in] valid_uuid_array Input array of Uuid.
68 * @param[in] count Total entries for the valid_uuid_array. Must be 0-8.
69 * @param[out] index Output Index.
70 */
71Result miiLaAppendMiiImage(MiiSpecialKeyCode special_key_code, const Uuid *valid_uuid_array, s32 count, s32 *index);
72
73/**
74 * @brief Launches the applet for UpdateMiiImage.
75 * @param[in] special_key_code \ref MiiSpecialKeyCode
76 * @param[in] valid_uuid_array Input array of Uuid.
77 * @param[in] count Total entries for the valid_uuid_array. Must be 0-8.
78 * @param[in] used_uuid UsedUuid
79 * @param[out] index Output Index.
80 */
81Result miiLaUpdateMiiImage(MiiSpecialKeyCode special_key_code, const Uuid *valid_uuid_array, s32 count, Uuid used_uuid, s32 *index);
82
83/**
84 * @brief Launches the applet for CreateMii.
85 * @note This creates a Mii and returns it, without saving it in the database.
86 * @note Only available on [10.2.0+].
87 * @param[in] special_key_code \ref MiiSpecialKeyCode
88 * @param[out] out_char \ref MiiCharInfo
89 */
91
92/**
93 * @brief Launches the applet for EditMii.
94 * @note This edits the specified Mii and returns it, without saving it in the database.
95 * @note Only available on [10.2.0+].
96 * @param[in] special_key_code \ref MiiSpecialKeyCode
97 * @param[in] in_char \ref MiiCharInfo
98 * @param[out] out_char \ref MiiCharInfo
99 */
100Result miiLaEditMii(MiiSpecialKeyCode special_key_code, const MiiCharInfo *in_char, MiiCharInfo *out_char);
101
MiiSpecialKeyCode
Definition mii.h:47
Result miiLaUpdateMiiImage(MiiSpecialKeyCode special_key_code, const Uuid *valid_uuid_array, s32 count, Uuid used_uuid, s32 *index)
Launches the applet for UpdateMiiImage.
Result miiLaEditMii(MiiSpecialKeyCode special_key_code, const MiiCharInfo *in_char, MiiCharInfo *out_char)
Launches the applet for EditMii.
Result miiLaCreateMii(MiiSpecialKeyCode special_key_code, MiiCharInfo *out_char)
Launches the applet for CreateMii.
Result miiLaAppendMiiImage(MiiSpecialKeyCode special_key_code, const Uuid *valid_uuid_array, s32 count, s32 *index)
Launches the applet for AppendMiiImage.
Result miiLaShowMiiEdit(MiiSpecialKeyCode special_key_code)
Launches the applet for ShowMiiEdit.
MiiLaAppletMode
AppletMode.
Definition mii_la.h:12
@ MiiLaAppletMode_EditMii
[10.2.0+] EditMii
Definition mii_la.h:18
@ MiiLaAppletMode_AppendMii
AppendMii.
Definition mii_la.h:14
@ MiiLaAppletMode_CreateMii
[10.2.0+] CreateMii
Definition mii_la.h:17
@ MiiLaAppletMode_UpdateMiiImage
UpdateMiiImage.
Definition mii_la.h:16
@ MiiLaAppletMode_ShowMiiEdit
ShowMiiEdit.
Definition mii_la.h:13
@ MiiLaAppletMode_AppendMiiImage
AppendMiiImage.
Definition mii_la.h:15
Result miiLaAppendMii(MiiSpecialKeyCode special_key_code, s32 *index)
Launches the applet for AppendMii.
Definition mii.h:62
AppletInput.
Definition mii_la.h:22
Uuid used_uuid
UsedUuid. Only used with MiiLaAppletMode ::NfpLaMiiLaAppletMode_UpdateMiiImage.
Definition mii_la.h:33
s32 version
Version.
Definition mii_la.h:23
s32 special_key_code
MiiSpecialKeyCode
Definition mii_la.h:25
MiiCharInfo char_info
MiiCharInfo
Definition mii_la.h:29
u32 mode
MiiLaAppletMode
Definition mii_la.h:24
AppletOutputForCharInfoEditing.
Definition mii_la.h:45
u32 res
MiiLaAppletOutput::res.
Definition mii_la.h:46
MiiCharInfo char_info
MiiCharInfo
Definition mii_la.h:47
AppletOutput.
Definition mii_la.h:38
s32 index
Index. Only set when Result is Success, where MiiLaAppletMode isn't ::NfpLaMiiLaAppletMode_ShowMiiEdi...
Definition mii_la.h:40
u32 res
Result: 0 = Success, 1 = Cancel.
Definition mii_la.h:39
Definition types.h:48
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