1 /* Please see man pages for details
2 
3 */
4 #ifndef NN_VOICESEL_CTR_VOICESEL_API_H_
5 #define NN_VOICESEL_CTR_VOICESEL_API_H_
6 
7 #include <nn/types.h>
8 #include <nn/fs.h>
9 #include <nn/applet.h>
10 
11 #ifdef  __cplusplus
12 
13 namespace nn { namespace voicesel { namespace CTR {
14 
15 
16 //
17 const u32  VERSION  = 0;
18 
19 
20 /* Please see man pages for details
21 
22 
23 
24 */
25 enum ReturnCode
26 {
27     //
28     RETURN_CODE_UNKNOWN                         = -1,
29 
30     //
31     RETURN_CODE_INVALID_CONFIG                  = -2,
32 
33     //
34     RETURN_CODE_OUT_OF_MEMORY                   = -3,
35 
36     //
37     RETURN_CODE_NONE                            = 0,
38 
39     //
40     RETURN_CODE_SUCCESS                         = 1,
41 
42     //
43     RETURN_CODE_HOME_BUTTON                     = 10,
44 
45     //
46     RETURN_CODE_SOFTWARE_RESET                  = 11,
47 
48     //
49     RETURN_CODE_POWER_BUTTON                    = 12,
50 
51     //
52     RETURN_CODE_PARENTAL_CONTROLS_SUCCESS       = 20,
53 
54     //
55     RETURN_CODE_PARENTAL_CONTROLS_FAILURE       = 21,
56 
57     RETURN_CODE_MAX_BIT = (s32)(1u << 31)
58 };
59 
60 
61 /* Please see man pages for details
62 
63 
64 
65 */
66 enum FilterFillType
67 {
68     //
69     FILTER_FILL_TYPE_ALL                        = 0,
70 
71     //
72     FILTER_FILL_TYPE_100_LT                     = 1,
73 
74     //
75     FILTER_FILL_TYPE_75_LT                      = 2,
76 
77     //
78     FILTER_FILL_TYPE_50_LT                      = 3,
79 
80     //
81     FILTER_FILL_TYPE_25_LT                      = 4
82 };
83 
84 
85 /* Please see man pages for details
86 
87 */
88 struct Config
89 {
90     //----------------------------------------
91     //
92     //
93 
94     /* Please see man pages for details
95 
96     */
97     bool                homeButton;
98 
99     /* Please see man pages for details
100 
101     */
102     bool                softwareReset;
103 
104     u8                  padding1[6];
105 
106     /* Please see man pages for details
107 
108     */
109     u8                  reserved[32-8];
110 
111     //
112 };
113 NN_STATIC_ASSERT( sizeof(Config) == 32 );
114 
115 
116 /* Please see man pages for details
117 
118 */
119 struct Input
120 {
121     //
122     static const std::size_t  MAX_TITLE_LENGTH  = 63;
123 
124     //----------------------------------------
125     //
126     //
127 
128     /* Please see man pages for details
129 
130     */
131     wchar_t             titleText[ MAX_TITLE_LENGTH+1 ];
132 
133     /* Please see man pages for details
134 
135     */
136     FilterFillType      filterFillType;
137 
138     /* Please see man pages for details
139 
140     */
141     u8                  reserved[ 256-sizeof(wchar_t)*(MAX_TITLE_LENGTH+1)-1 ];
142 
143     //
144 };
145 NN_STATIC_ASSERT( sizeof(Input) == 256 );
146 
147 
148 /* Please see man pages for details
149 
150 */
151 struct Output
152 {
153     //
154     static const std::size_t  MAX_FILE_PATH_LENGTH  = nn::fs::MAX_FILE_PATH_LENGTH;
155 
156     //----------------------------------------
157     //
158     //
159 
160     /* Please see man pages for details
161 
162 
163 
164 
165     */
166     ReturnCode          returnCode;
167 
168     /* Please see man pages for details
169 
170     */
171     wchar_t             filePath[ MAX_FILE_PATH_LENGTH+1 ];
172 
173     /* Please see man pages for details
174 
175     */
176     u8                  reserved[ 1024-4-sizeof(wchar_t)*(MAX_FILE_PATH_LENGTH+1)  ];
177 
178     //
179 };
180 NN_STATIC_ASSERT( sizeof(Output) == 1024 );
181 
182 
183 /* Please see man pages for details
184 
185 */
186 struct Parameter
187 {
188     /* Please see man pages for details
189 
190     */
191     u32     version;
192 
193     /* Please see man pages for details
194 
195     */
196     Config  config;
197 
198     /* Please see man pages for details
199 
200     */
201     Input   input;
202 
203     /* Please see man pages for details
204 
205     */
206     Output  output;
207 };
208 
209 
210 /* Please see man pages for details
211 
212 
213 
214 
215 */
216 extern void InitializeParameter( Parameter* pParameter );
217 extern bool PreloadVoiceSel();
218 extern bool CancelPreloadVoiceSel();
219 extern void WaitForPreloadVoiceSel();
220 extern bool IsRegisteredVoiceSel();
221 extern nn::applet::AppletWakeupState StartVoiceSel( Parameter* pParameter );
222 
223 
224 }}}
225 
226 #endif // __cplusplus
227 
228 #endif // ifndef NN_VOICESEL_CTR_VOICESEL_API_H_
229