1 /*---------------------------------------------------------------------------* 2 Project: Horizon 3 File: voicesel_Api.h 4 5 Copyright (C)2009-2012 Nintendo Co., Ltd. All rights reserved. 6 7 These coded instructions, statements, and computer programs contain 8 proprietary information of Nintendo of America Inc. and/or Nintendo 9 Company Ltd., and are protected by Federal copyright law. They may 10 not be disclosed to third parties or copied or duplicated in any form, 11 in whole or in part, without the prior written consent of Nintendo. 12 13 $Rev:$ 14 *---------------------------------------------------------------------------*/ 15 16 #ifndef NN_VOICESEL_CTR_VOICESEL_API_H_ 17 #define NN_VOICESEL_CTR_VOICESEL_API_H_ 18 19 /* Please see man pages for details 20 21 22 */ 23 24 #include <nn/types.h> 25 #include <nn/fs.h> 26 #include <nn/applet.h> 27 28 #ifdef __cplusplus 29 30 namespace nn { 31 namespace voicesel { 32 namespace CTR { 33 34 35 /* Please see man pages for details 36 37 */ 38 static const u32 VERSION = 0; 39 40 41 /* Please see man pages for details 42 43 44 45 */ 46 enum ReturnCode 47 { 48 // 49 RETURN_CODE_UNKNOWN = -1, 50 51 // 52 RETURN_CODE_INVALID_CONFIG = -2, 53 54 // 55 RETURN_CODE_OUT_OF_MEMORY = -3, 56 57 // 58 RETURN_CODE_NONE = 0, 59 60 // 61 RETURN_CODE_SUCCESS = 1, 62 63 // 64 RETURN_CODE_HOME_BUTTON = 10, 65 66 // 67 RETURN_CODE_SOFTWARE_RESET = 11, 68 69 // 70 RETURN_CODE_POWER_BUTTON = 12, 71 72 // 73 RETURN_CODE_MAX_BIT = static_cast<s32>(1u << 31) 74 }; 75 76 77 /* Please see man pages for details 78 79 80 81 82 83 */ 84 enum FilterFillType 85 { 86 // 87 FILTER_FILL_TYPE_ALL = 0, 88 89 // 90 FILTER_FILL_TYPE_100_LT = 1, 91 92 // 93 FILTER_FILL_TYPE_75_LT = 2, 94 95 // 96 FILTER_FILL_TYPE_50_LT = 3, 97 98 // 99 FILTER_FILL_TYPE_25_LT = 4 100 }; 101 102 103 /* Please see man pages for details 104 105 106 107 */ 108 struct Config 109 { 110 //---------------------------------------- 111 // 112 // 113 114 /* Please see man pages for details 115 116 */ 117 bool homeButton; 118 119 /* Please see man pages for details 120 121 */ 122 bool softwareReset; 123 124 u8 padding1[6]; 125 126 /* Please see man pages for details 127 128 129 130 */ 131 u8 reserved[32 - 8]; 132 133 // 134 }; 135 136 137 /* Please see man pages for details 138 139 140 141 */ 142 struct Input 143 { 144 // 145 static const size_t MAX_TITLE_LENGTH = 63; 146 147 //---------------------------------------- 148 // 149 // 150 151 /* Please see man pages for details 152 153 */ 154 wchar_t titleText[MAX_TITLE_LENGTH + 1]; 155 156 /* Please see man pages for details 157 158 */ 159 FilterFillType filterFillType; 160 161 /* Please see man pages for details 162 163 164 165 */ 166 u8 reserved[256 - sizeof(wchar_t) * (MAX_TITLE_LENGTH + 1) - 1]; 167 168 // 169 }; 170 171 172 /* Please see man pages for details 173 174 175 176 */ 177 struct Output 178 { 179 // 180 static const size_t MAX_FILE_PATH_LENGTH = nn::fs::MAX_FILE_PATH_LENGTH; 181 182 //---------------------------------------- 183 // 184 // 185 186 /* Please see man pages for details 187 188 189 190 191 */ 192 ReturnCode returnCode; 193 194 /* Please see man pages for details 195 196 */ 197 wchar_t filePath[MAX_FILE_PATH_LENGTH + 1]; 198 199 /* Please see man pages for details 200 201 202 203 */ 204 u8 reserved[1024 - 4 - sizeof(wchar_t) * (MAX_FILE_PATH_LENGTH + 1)]; 205 206 // 207 }; 208 209 210 /* Please see man pages for details 211 212 213 214 */ 215 struct Parameter 216 { 217 /* Please see man pages for details 218 219 */ 220 u32 version; 221 222 /* Please see man pages for details 223 224 */ 225 Config config; 226 227 /* Please see man pages for details 228 229 */ 230 Input input; 231 232 /* Please see man pages for details 233 234 */ 235 Output output; 236 }; 237 238 239 /* Please see man pages for details 240 241 242 243 244 */ 245 void InitializeParameter(Parameter* pParameter); 246 247 /* Please see man pages for details 248 249 */ 250 bool PreloadVoiceSel(); 251 252 /* Please see man pages for details 253 254 */ 255 bool CancelPreloadVoiceSel(); 256 257 /* Please see man pages for details 258 259 */ 260 void WaitForPreloadVoiceSel(); 261 262 /* Please see man pages for details 263 264 265 266 267 */ 268 bool IsRegisteredVoiceSel(); 269 270 /* Please see man pages for details 271 272 273 274 */ 275 nn::applet::AppletWakeupState StartVoiceSel(Parameter* pParameter); 276 277 278 } // end of namespace CTR 279 } // end of namespace voicesel 280 } // end of namespace nn 281 282 #endif /* __cplusplus */ 283 284 #endif /* NN_VOICESEL_CTR_VOICESEL_API_H_ */ 285