wut  v1.5.0
Wii U Toolchain
client_cpp.h
Go to the documentation of this file.
1 #pragma once
2 #include <wut.h>
3 #include <nn/result.h>
4 #include <nn/ffl/miidata.h>
5 
13 #ifdef __cplusplus
14 
15 namespace nn {
16 
17 namespace act {
18 
19 //https://github.com/decaf-emu/decaf-emu/blob/master/src/libdecaf/src/nn/act/nn_act_types.h
20 
21 using ACTLoadOption = uint32_t;
22 using SlotNo = uint8_t;
23 using LocalFriendCode = uint64_t;
24 using PersistentId = uint32_t;
25 using PrincipalId = uint32_t;
26 using SimpleAddressId = uint32_t;
27 using TransferrableId = uint64_t;
28 
29 static constexpr size_t AccountIdSize = 17;
30 static constexpr size_t DeviceHashSize = 8;
31 static constexpr size_t NfsPasswordSize = 17;
32 static constexpr size_t MiiNameSize = 11;
33 static constexpr size_t UuidSize = 16;
34 
35 //https://github.com/decaf-emu/decaf-emu/blob/master/src/libdecaf/src/cafe/libraries/nn_act/nn_act_client.cpp
36 
39  asm("Initialize__Q2_2nn3actFv");
40 
42 Finalize(void)
43  asm("Finalize__Q2_2nn3actFv");
44 
45 //https://github.com/decaf-emu/decaf-emu/blob/master/src/libdecaf/src/cafe/libraries/nn_act/nn_act_clientstandardservice.cpp
46 
48 GetAccountId(char outAccountId[AccountIdSize])
49  asm("GetAccountId__Q2_2nn3actFPc");
50 
52 GetAccountIdEx(char outAccountId[AccountIdSize], SlotNo slot)
53  asm("GetAccountIdEx__Q2_2nn3actFPcUc");
54 
56 GetBirthday(uint16_t* outYear, uint8_t* outMonth, uint8_t* outDay)
57  asm("GetBirthday__Q2_2nn3actFPUsPUcT2");
58 
60 GetBirthdayEx(uint16_t* outYear, uint8_t* outMonth, uint8_t* outDay, SlotNo slot)
61  asm("GetBirthdayEx__Q2_2nn3actFPUsPUcT2Uc");
62 
63 SlotNo
65  asm("GetDefaultAccount__Q2_2nn3actFv");
66 
69  asm("GetDeviceHash__Q2_2nn3actFPUL");
70 
72 LoadConsoleAccount(SlotNo slot, ACTLoadOption unk1, char const * unk2, bool unk3)
73  asm("LoadConsoleAccount__Q2_2nn3actFUc13ACTLoadOptionPCcb");
74 
77  asm("GetMii__Q2_2nn3actFP12FFLStoreData");
78 
81  asm("GetMiiEx__Q2_2nn3actFP12FFLStoreDataUc");
82 
84 GetMiiImageEx(size_t* outImageSize, void* buffer, size_t bufferSize, int unk, SlotNo slot)
85  asm("GetMiiImageEx__Q2_2nn3actFPUiPvUi15ACTMiiImageTypeUc");
86 
88 GetMiiName(int16_t outName[MiiNameSize])
89  asm("GetMiiName__Q2_2nn3actFPw");
90 
92 GetMiiNameEx(int16_t outName[MiiNameSize], SlotNo slot)
93  asm("GetMiiNameEx__Q2_2nn3actFPwUc");
94 
96 GetNfsPassword(char outPassword[NfsPasswordSize])
97  asm("GetNfsPassword__Q2_2nn3actFPc");
98 
100 GetNfsPasswordEx(char outPassword[NfsPasswordSize], SlotNo slot)
101  asm("GetNfsPasswordEx__Q2_2nn3actFPcUc");
102 
103 uint8_t
105  asm("GetNumOfAccounts__Q2_2nn3actFv");
106 
107 SlotNo
109  asm("GetParentalControlSlotNo__Q2_2nn3actFv");
110 
113  asm("GetParentalControlSlotNoEx__Q2_2nn3actFPUcUc");
114 
117  asm("GetPersistentId__Q2_2nn3actFv");
118 
121  asm("GetPersistentIdEx__Q2_2nn3actFUc");
122 
125  asm("GetPrincipalId__Q2_2nn3actFv");
126 
129  asm("GetPrincipalIdEx__Q2_2nn3actFPUiUc");
130 
133  asm("GetSimpleAddressId__Q2_2nn3actFv");
134 
137  asm("GetSimpleAddressIdEx__Q2_2nn3actFPUiUc");
138 
139 SlotNo
141  asm("GetSlotNo__Q2_2nn3actFv");
142 
144 GetTransferableId(uint32_t unk1)
145  asm("GetTransferableId__Q2_2nn3actFUi");
146 
148 GetTransferableIdEx(TransferrableId* outId, uint32_t unk1, SlotNo slot)
149  asm("GetTransferableIdEx__Q2_2nn3actFPULUiUc");
150 
152 GetUuidEx(char outUuid[UuidSize], SlotNo slot, int32_t unk1)
153  asm("GetUuidEx__Q2_2nn3actFP7ACTUuidUcUi");
154 
156 GetUuidEx(char outUuid[UuidSize], SlotNo slot)
157  asm("GetUuidEx__Q2_2nn3actFP7ACTUuidUc");
158 
160 GetUuid(char outUuid[UuidSize], int32_t unk1)
161  asm("GetUuid__Q2_2nn3actFP7ACTUuidUi");
162 
164 GetUuid(char outUuid[UuidSize])
165  asm("GetUuid__Q2_2nn3actFP7ACTUuid");
166 
167 BOOL
169  asm("HasNfsAccount__Q2_2nn3actFv");
170 
171 BOOL
173  asm("IsCommitted__Q2_2nn3actFv");
174 
175 BOOL
177  asm("IsCommittedEx__Q2_2nn3actFUc");
178 
179 BOOL
181  asm("IsPasswordCacheEnabled__Q2_2nn3actFv");
182 
183 BOOL
185  asm("IsPasswordCacheEnabledEx__Q2_2nn3actFUc");
186 
187 BOOL
189  asm("IsNetworkAccount__Q2_2nn3actFv");
190 
191 BOOL
193  asm("IsNetworkAccountEx__Q2_2nn3actFUc");
194 
195 BOOL
197  asm("IsServerAccountActive__Q2_2nn3actFv");
198 
199 BOOL
201  asm("IsServerAccountActiveEx__Q2_2nn3actFUc");
202 
203 BOOL
205  asm("IsServerAccountDeleted__Q2_2nn3actFv");
206 
207 BOOL
209  asm("IsServerAccountDeletedEx__Q2_2nn3actFUc");
210 
211 BOOL
213  asm("IsSlotOccupied__Q2_2nn3actFUc");
214 
215 } //namespace act
216 
217 } //namespace nn
218 
219 #endif //__cplusplus
220 
Result value type used by nn libraries.
Definition: result.h:68
BOOL IsCommitted(void) asm("IsCommitted__Q2_2nn3actFv")
uint32_t PrincipalId
Definition: client_cpp.h:25
uint64_t LocalFriendCode
Definition: client_cpp.h:23
PrincipalId GetPrincipalId(void) asm("GetPrincipalId__Q2_2nn3actFv")
nn::Result GetMii(FFLStoreData *mii) asm("GetMii__Q2_2nn3actFP12FFLStoreData")
uint32_t ACTLoadOption
Definition: client_cpp.h:21
uint64_t TransferrableId
Definition: client_cpp.h:27
nn::Result GetMiiEx(FFLStoreData *mii, SlotNo slot) asm("GetMiiEx__Q2_2nn3actFP12FFLStoreDataUc")
static constexpr size_t AccountIdSize
Definition: client_cpp.h:29
nn::Result GetBirthday(uint16_t *outYear, uint8_t *outMonth, uint8_t *outDay) asm("GetBirthday__Q2_2nn3actFPUsPUcT2")
BOOL IsNetworkAccountEx(SlotNo slot) asm("IsNetworkAccountEx__Q2_2nn3actFUc")
uint32_t PersistentId
Definition: client_cpp.h:24
static constexpr size_t NfsPasswordSize
Definition: client_cpp.h:31
nn::Result GetUuid(char outUuid[UuidSize], int32_t unk1) asm("GetUuid__Q2_2nn3actFP7ACTUuidUi")
BOOL IsServerAccountActive(void) asm("IsServerAccountActive__Q2_2nn3actFv")
nn::Result GetAccountId(char outAccountId[AccountIdSize]) asm("GetAccountId__Q2_2nn3actFPc")
nn::Result LoadConsoleAccount(SlotNo slot, ACTLoadOption unk1, char const *unk2, bool unk3) asm("LoadConsoleAccount__Q2_2nn3actFUc13ACTLoadOptionPCcb")
BOOL HasNfsAccount(void) asm("HasNfsAccount__Q2_2nn3actFv")
nn::Result GetNfsPassword(char outPassword[NfsPasswordSize]) asm("GetNfsPassword__Q2_2nn3actFPc")
nn::Result GetAccountIdEx(char outAccountId[AccountIdSize], SlotNo slot) asm("GetAccountIdEx__Q2_2nn3actFPcUc")
nn::Result GetUuidEx(char outUuid[UuidSize], SlotNo slot, int32_t unk1) asm("GetUuidEx__Q2_2nn3actFP7ACTUuidUcUi")
uint8_t GetNumOfAccounts(void) asm("GetNumOfAccounts__Q2_2nn3actFv")
nn::Result GetNfsPasswordEx(char outPassword[NfsPasswordSize], SlotNo slot) asm("GetNfsPasswordEx__Q2_2nn3actFPcUc")
nn::Result GetDeviceHash(char outHash[DeviceHashSize]) asm("GetDeviceHash__Q2_2nn3actFPUL")
nn::Result GetTransferableIdEx(TransferrableId *outId, uint32_t unk1, SlotNo slot) asm("GetTransferableIdEx__Q2_2nn3actFPULUiUc")
BOOL IsNetworkAccount(void) asm("IsNetworkAccount__Q2_2nn3actFv")
SlotNo GetDefaultAccount(void) asm("GetDefaultAccount__Q2_2nn3actFv")
SlotNo GetSlotNo(void) asm("GetSlotNo__Q2_2nn3actFv")
uint8_t SlotNo
Definition: client_cpp.h:22
static constexpr size_t DeviceHashSize
Definition: client_cpp.h:30
nn::Result GetParentalControlsSlotNoEx(SlotNo *outSlotNo, SlotNo slot) asm("GetParentalControlSlotNoEx__Q2_2nn3actFPUcUc")
static constexpr size_t MiiNameSize
Definition: client_cpp.h:32
uint32_t SimpleAddressId
Definition: client_cpp.h:26
BOOL IsPasswordCacheEnabled(void) asm("IsPasswordCacheEnabled__Q2_2nn3actFv")
nn::Result GetMiiImageEx(size_t *outImageSize, void *buffer, size_t bufferSize, int unk, SlotNo slot) asm("GetMiiImageEx__Q2_2nn3actFPUiPvUi15ACTMiiImageTypeUc")
PersistentId GetPersistentId(void) asm("GetPersistentId__Q2_2nn3actFv")
SimpleAddressId GetSimpleAddressId(void) asm("GetSimpleAddressId__Q2_2nn3actFv")
BOOL IsCommittedEx(SlotNo slot) asm("IsCommittedEx__Q2_2nn3actFUc")
BOOL IsPasswordCacheEnabledEx(SlotNo slot) asm("IsPasswordCacheEnabledEx__Q2_2nn3actFUc")
nn::Result GetMiiName(int16_t outName[MiiNameSize]) asm("GetMiiName__Q2_2nn3actFPw")
nn::Result GetPrincipalIdEx(PrincipalId *outId, SlotNo slot) asm("GetPrincipalIdEx__Q2_2nn3actFPUiUc")
BOOL IsServerAccountDeletedEx(SlotNo slot) asm("IsServerAccountDeletedEx__Q2_2nn3actFUc")
nn::Result Finalize(void) asm("Finalize__Q2_2nn3actFv")
BOOL IsSlotOccupied(SlotNo slot) asm("IsSlotOccupied__Q2_2nn3actFUc")
TransferrableId GetTransferableId(uint32_t unk1) asm("GetTransferableId__Q2_2nn3actFUi")
static constexpr size_t UuidSize
Definition: client_cpp.h:33
nn::Result Initialize(void) asm("Initialize__Q2_2nn3actFv")
nn::Result GetBirthdayEx(uint16_t *outYear, uint8_t *outMonth, uint8_t *outDay, SlotNo slot) asm("GetBirthdayEx__Q2_2nn3actFPUsPUcT2Uc")
SlotNo GetParentalControlsSlotNo(void) asm("GetParentalControlSlotNo__Q2_2nn3actFv")
BOOL IsServerAccountActiveEx(SlotNo slot) asm("IsServerAccountActiveEx__Q2_2nn3actFUc")
PersistentId GetPersistentIdEx(SlotNo slot) asm("GetPersistentIdEx__Q2_2nn3actFUc")
BOOL IsServerAccountDeleted(void) asm("IsServerAccountDeleted__Q2_2nn3actFv")
nn::Result GetMiiNameEx(int16_t outName[MiiNameSize], SlotNo slot) asm("GetMiiNameEx__Q2_2nn3actFPwUc")
Definition: ac_cpp.h:15
int32_t BOOL
Definition: wut_types.h:7