wut  v1.7.0
Wii U Toolchain
userconfig.h
Go to the documentation of this file.
1 #pragma once
2 #include <wut.h>
3 #include <coreinit/ios.h>
4 
12 #ifdef __cplusplus
13 extern "C" {
14 #endif
15 
16 typedef int32_t UCError;
17 typedef int32_t UCHandle;
18 typedef struct UCSysConfig UCSysConfig;
19 typedef struct UCAsyncParams UCAsyncParams;
20 
21 typedef enum UCCommand
22 {
29 
30 typedef enum UCDataType
31 {
43 
44 typedef enum UCErrors
45 {
48  UC_ERROR_OTHER = -0x200001,
49  UC_ERROR_SYSTEM = -0x200002,
50  UC_ERROR_ALLOC = -0x200003,
51  UC_ERROR_OPCODE = -0x200004,
53  UC_ERROR_INVALID_TYPE = -0x200006,
54  UC_ERROR_UNSUPPORTED = -0x200007,
57  UC_ERROR_MODIFY = -0x20000A,
61  UC_ERROR_BAD_COMMENT = -0x20000E,
62  UC_ERROR_READ_ACCESS = -0x20000F,
63  UC_ERROR_WRITE_ACCESS = -0x200010,
68  UC_ERROR_FILE_OPEN = -0x200015,
69  UC_ERROR_FILE_STAT = -0x200016,
70  UC_ERROR_FILE_READ = -0x200017,
71  UC_ERROR_FILE_WRITE = -0x200018,
72  UC_ERROR_FILE_TOO_BIG = -0x200019,
73  UC_ERROR_FILE_REMOVE = -0x20001A,
74  UC_ERROR_FILE_RENAME = -0x20001B,
75  UC_ERROR_FILE_CLOSE = -0x20001C,
76  UC_ERROR_FILE_SEEK = -0x20001D,
77  UC_ERROR_FILE_CONFIRM = -0x20001E,
78  UC_ERROR_FILE_BACKUP = -0x20001F,
80  UC_ERROR_VERSION = -0x200021,
83  UC_ERROR_SYS_PROT = -0x200028,
85 
86 typedef enum UCFileSys
87 {
93 
94 #pragma pack(push, 1)
96 {
97  char name[64];
98  uint32_t access;
101  uint32_t dataSize;
102  void *data;
103 };
104 #pragma pack(pop)
105 WUT_CHECK_OFFSET(UCSysConfig, 0x00, name);
106 WUT_CHECK_OFFSET(UCSysConfig, 0x40, access);
107 WUT_CHECK_OFFSET(UCSysConfig, 0x44, dataType);
108 WUT_CHECK_OFFSET(UCSysConfig, 0x48, error);
109 WUT_CHECK_OFFSET(UCSysConfig, 0x4C, dataSize);
110 WUT_CHECK_OFFSET(UCSysConfig, 0x50, data);
111 WUT_CHECK_SIZE(UCSysConfig, 0x54);
112 
113 typedef void (*UCAsyncCallbackFn)(UCError result,
114  UCCommand command,
115  uint32_t count,
116  UCSysConfig *settings,
117  void *context);
118 #pragma pack(push, 1)
120 {
122  void *context;
124  uint32_t unk0x0C;
125  uint32_t count;
128 };
129 #pragma pack(pop)
130 WUT_CHECK_OFFSET(UCAsyncParams, 0x00, callback);
131 WUT_CHECK_OFFSET(UCAsyncParams, 0x04, context);
132 WUT_CHECK_OFFSET(UCAsyncParams, 0x08, command);
133 WUT_CHECK_OFFSET(UCAsyncParams, 0x0C, unk0x0C);
134 WUT_CHECK_OFFSET(UCAsyncParams, 0x10, count);
135 WUT_CHECK_OFFSET(UCAsyncParams, 0x14, settings);
136 WUT_CHECK_OFFSET(UCAsyncParams, 0x18, vecs);
137 WUT_CHECK_SIZE(UCAsyncParams, 0x1C);
138 
139 UCHandle
141 
142 UCError
144 
145 UCError
147  uint32_t count,
148  UCSysConfig *settings);
149 
150 UCError
152  uint32_t count,
153  UCSysConfig *settings,
154  UCAsyncParams *asyncParams);
155 
156 UCError
158  uint32_t count,
159  UCSysConfig *settings);
160 
161 UCError
163  uint32_t count,
164  UCSysConfig *settings,
165  UCAsyncParams *asyncParams);
166 
167 UCError
169  uint32_t count,
170  UCSysConfig *settings);
171 
172 UCError
174  uint32_t count,
175  UCSysConfig *settings,
176  UCAsyncParams *asyncParams);
177 
178 #ifdef __cplusplus
179 }
180 #endif
181 
Definition: ios.h:72
UCError error
Definition: userconfig.h:100
uint32_t access
Definition: userconfig.h:98
void * data
Definition: userconfig.h:102
uint32_t unk0x0C
Definition: userconfig.h:124
uint32_t count
Definition: userconfig.h:125
UCSysConfig * settings
Definition: userconfig.h:126
UCCommand command
Definition: userconfig.h:123
UCAsyncCallbackFn callback
Definition: userconfig.h:121
UCDataType dataType
Definition: userconfig.h:99
IOSVec * vecs
Definition: userconfig.h:127
char name[64]
Definition: userconfig.h:97
void * context
Definition: userconfig.h:122
uint32_t dataSize
Definition: userconfig.h:101
UCError UCClose(UCHandle handle)
UCFileSys
Definition: userconfig.h:87
UCError UCDeleteSysConfig(UCHandle handle, uint32_t count, UCSysConfig *settings)
UCError UCWriteSysConfig(UCHandle handle, uint32_t count, UCSysConfig *settings)
int32_t UCError
Definition: userconfig.h:16
UCDataType
Definition: userconfig.h:31
UCError UCDeleteSysConfigAsync(UCHandle handle, uint32_t count, UCSysConfig *settings, UCAsyncParams *asyncParams)
int32_t UCHandle
Definition: userconfig.h:17
void(* UCAsyncCallbackFn)(UCError result, UCCommand command, uint32_t count, UCSysConfig *settings, void *context)
Definition: userconfig.h:113
UCErrors
Definition: userconfig.h:45
UCCommand
Definition: userconfig.h:22
UCError UCWriteSysConfigAsync(UCHandle handle, uint32_t count, UCSysConfig *settings, UCAsyncParams *asyncParams)
UCError UCReadSysConfig(UCHandle handle, uint32_t count, UCSysConfig *settings)
UCError UCReadSysConfigAsync(UCHandle handle, uint32_t count, UCSysConfig *settings, UCAsyncParams *asyncParams)
UCHandle UCOpen()
@ UC_FILE_SYS_SYS
Definition: userconfig.h:89
@ UC_FILE_SYS_INVALID
Definition: userconfig.h:88
@ UC_FILE_SYS_SLC
Definition: userconfig.h:90
@ UC_FILE_SYS_RAM
Definition: userconfig.h:91
@ UC_DATATYPE_UNDEFINED
Definition: userconfig.h:32
@ UC_DATATYPE_UNSIGNED_BYTE
Definition: userconfig.h:33
@ UC_DATATYPE_INVALID
Definition: userconfig.h:41
@ UC_DATATYPE_COMPLEX
Definition: userconfig.h:40
@ UC_DATATYPE_UNSIGNED_INT
Definition: userconfig.h:35
@ UC_DATATYPE_STRING
Definition: userconfig.h:38
@ UC_DATATYPE_UNSIGNED_SHORT
Definition: userconfig.h:34
@ UC_DATATYPE_SIGNED_INT
Definition: userconfig.h:36
@ UC_DATATYPE_FLOAT
Definition: userconfig.h:37
@ UC_DATATYPE_HEXBINARY
Definition: userconfig.h:39
@ UC_ERROR_FILE_SYS_NAME
Definition: userconfig.h:65
@ UC_ERROR_FILE_SYS_INIT
Definition: userconfig.h:66
@ UC_ERROR_FILE_WRITE
Definition: userconfig.h:71
@ UC_ERROR_OPCODE
Definition: userconfig.h:51
@ UC_ERROR_WRITE_ACCESS
Definition: userconfig.h:63
@ UC_ERROR_SYS_PROT
Definition: userconfig.h:83
@ UC_ERROR_FILE_STAT
Definition: userconfig.h:69
@ UC_ERROR_FILE_BACKUP
Definition: userconfig.h:78
@ UC_ERROR_CREATE_ACCESS
Definition: userconfig.h:64
@ UC_ERROR_SYSTEM
Definition: userconfig.h:49
@ UC_ERROR_ALLOC
Definition: userconfig.h:50
@ UC_ERROR_NO_IPC_BUFFERS
Definition: userconfig.h:81
@ UC_ERROR_INVALID_TYPE
Definition: userconfig.h:53
@ UC_ERROR_FILE_CONFIRM
Definition: userconfig.h:77
@ UC_ERROR_MALFORMED_XML
Definition: userconfig.h:79
@ UC_ERROR_VERSION
Definition: userconfig.h:80
@ UC_ERROR_FILE_SEEK
Definition: userconfig.h:76
@ UC_ERROR_FILE_LOCK_NEEDED
Definition: userconfig.h:82
@ UC_ERROR_FILE_READ
Definition: userconfig.h:70
@ UC_ERROR_ERROR
Definition: userconfig.h:47
@ UC_ERROR_ROOT_KEYS_DIFFER
Definition: userconfig.h:59
@ UC_ERROR_OK
Definition: userconfig.h:46
@ UC_ERROR_INVALID_LOCATION
Definition: userconfig.h:60
@ UC_ERROR_MODIFY
Definition: userconfig.h:57
@ UC_ERROR_FILE_SYS_MOUNT
Definition: userconfig.h:67
@ UC_ERROR_FILE_OPEN
Definition: userconfig.h:68
@ UC_ERROR_BAD_COMMENT
Definition: userconfig.h:61
@ UC_ERROR_NON_LEAF_NODE
Definition: userconfig.h:55
@ UC_ERROR_READ_ACCESS
Definition: userconfig.h:62
@ UC_ERROR_FILE_REMOVE
Definition: userconfig.h:73
@ UC_ERROR_UNSUPPORTED
Definition: userconfig.h:54
@ UC_ERROR_FILE_CLOSE
Definition: userconfig.h:75
@ UC_ERROR_INVALID_PARAM
Definition: userconfig.h:52
@ UC_ERROR_KEY_NOT_FOUND
Definition: userconfig.h:56
@ UC_ERROR_FILE_TOO_BIG
Definition: userconfig.h:72
@ UC_ERROR_FILE_RENAME
Definition: userconfig.h:74
@ UC_ERROR_OTHER
Definition: userconfig.h:48
@ UC_ERROR_STRING_TOO_LONG
Definition: userconfig.h:58
@ UC_CMD_DELETE_SYS_CONFIG
Definition: userconfig.h:25
@ UC_CMD_WRITE_SYS_CONFIG
Definition: userconfig.h:24
@ UC_CMD_QUERY_SYS_CONFIG
Definition: userconfig.h:26
@ UC_CMD_READ_SYS_CONFIG
Definition: userconfig.h:23
@ UC_CMD_LIST_SYS_CONFIG
Definition: userconfig.h:27