Update dialog and api
[platform/core/uifw/voice-control.git] / include / voice_control.h
1 /*
2 * Copyright (c) 2011-2015 Samsung Electronics Co., Ltd All Rights Reserved
3 *
4 * Licensed under the Apache License, Version 2.0 (the License);
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an AS IS BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17
18 #ifndef __VOICE_CONTROL_H__
19 #define __VOICE_CONTROL_H__
20
21 #include <voice_control_command.h>
22 #include <voice_control_common.h>
23
24 /**
25 * @addtogroup CAPI_UIX_VOICE_CONTROL_MODULE
26 * @{
27 */
28
29 #ifdef __cplusplus
30 extern "C"
31 {
32 #endif
33
34 /**
35 * @file voice_control.h
36 * @brief This file contains the voice control client API and related callback definitions and enums.
37 */
38
39 /**
40 * @file voice_control_command.h
41 * @brief This file contains the command list and command API and related handle definitions and enums.
42 */
43
44 /**
45 * @file voice_control_common.h
46 * @brief This file contains the callback function definitions and enums.
47 */
48
49 /**
50 * @brief Definitions for foreground command type.
51 * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif
52 */
53 #define VC_COMMAND_TYPE_FOREGROUND      1
54
55 /**
56 * @brief Definitions for background command type.
57 * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif
58 */
59 #define VC_COMMAND_TYPE_BACKGROUND      2
60
61 /**
62 * @brief Definitions for ended dialog.
63 * @since_tizen 3.0
64 */
65 #define VC_DIALOG_END           0
66
67 /**
68 * @brief Definitions for continued dialog.
69 * @since_tizen 3.0
70 */
71 #define VC_DIALOG_CONTINUE      1
72
73
74 /**
75 * @brief Initializes voice control.
76 * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif
77 * @privlevel public
78 * @privilege %http://tizen.org/privilege/recorder
79 *
80 * @remarks If the function succeeds, @a vc must be released with vc_deinitialize().
81 *
82 * @return 0 on success, otherwise a negative error value
83 * @retval #VC_ERROR_NONE Successful
84 * @retval #VC_ERROR_OUT_OF_MEMORY Out of memory
85 * @retval #VC_ERROR_OPERATION_FAILED Operation failure
86 * @retval #VC_ERROR_PERMISSION_DENIED Permission denied
87 * @retval #VC_ERROR_NOT_SUPPORTED Not supported
88 *
89 * @post If this function is called, the state will be #VC_STATE_INITIALIZED.
90 *
91 * @see vc_deinitialize()
92 */
93 int vc_initialize(void);
94
95 /**
96 * @brief Deinitializes voice control.
97 * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif
98 * @privlevel public
99 * @privilege %http://tizen.org/privilege/recorder
100 *
101 * @return 0 on success, otherwise a negative error value
102 * @retval #VC_ERROR_NONE Successful
103 * @retval #VC_ERROR_INVALID_STATE Invalid state
104 * @retval #VC_ERROR_OPERATION_FAILED Operation failure
105 * @retval #VC_ERROR_PERMISSION_DENIED Permission denied
106 * @retval #VC_ERROR_NOT_SUPPORTED Not supported
107 *
108 * @see vc_deinitialize()
109 */
110 int vc_deinitialize(void);
111
112 /**
113 * @brief Connects the voice control service.
114 * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif
115 * @privlevel public
116 * @privilege %http://tizen.org/privilege/recorder
117 *
118 * @return 0 on success, otherwise a negative error value
119 * @retval #VC_ERROR_NONE Successful
120 * @retval #VC_ERROR_INVALID_STATE Invalid state
121 * @retval #VC_ERROR_OPERATION_FAILED Operation failure
122 * @retval #VC_ERROR_PERMISSION_DENIED Permission denied
123 * @retval #VC_ERROR_NOT_SUPPORTED Not supported
124 *
125 * @pre The state should be #VC_STATE_INITIALIZED.
126 * @post If this function is called, the state will be #VC_STATE_READY.
127 *
128 * @see vc_unprepare()
129 */
130 int vc_prepare(void);
131
132 /**
133 * @brief Disconnects the voice control service.
134 * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif
135 * @privlevel public
136 * @privilege %http://tizen.org/privilege/recorder
137 *
138 * @return 0 on success, otherwise a negative error value
139 * @retval #VC_ERROR_NONE Successful
140 * @retval #VC_ERROR_INVALID_STATE Invalid state
141 * @retval #VC_ERROR_PERMISSION_DENIED Permission denied
142 * @retval #VC_ERROR_NOT_SUPPORTED Not supported
143 *
144 * @pre The state should be #VC_STATE_READY.
145 * @post If this function is called, the state will be #VC_STATE_INITIALIZED.
146 *
147 * @see vc_prepare()
148 */
149 int vc_unprepare(void);
150
151 /**
152 * @brief Retrieves all supported languages using callback function.
153 * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif
154 * @privlevel public
155 * @privilege %http://tizen.org/privilege/recorder
156 *
157 * @param[in] callback Callback function to invoke
158 * @param[in] user_data The user data to be passed to the callback function
159 *
160 * @return 0 on success, otherwise a negative error value
161 * @retval #VC_ERROR_NONE Successful
162 * @retval #VC_ERROR_INVALID_PARAMETER Invalid parameter
163 * @retval #VC_ERROR_OPERATION_FAILED Operation failure
164 * @retval #VC_ERROR_INVALID_STATE Invalid state
165 * @retval #VC_ERROR_PERMISSION_DENIED Permission denied
166 * @retval #VC_ERROR_NOT_SUPPORTED Not supported
167 *
168 * @pre The state should be #VC_STATE_INITIALIZED or #VC_STATE_READY.
169 * @post This function invokes vc_supported_language_cb() repeatedly for getting languages.
170 *
171 * @see vc_supported_language_cb()
172 * @see vc_get_current_language()
173 */
174 int vc_foreach_supported_languages(vc_supported_language_cb callback, void* user_data);
175
176 /**
177 * @brief Gets current language.
178 * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif
179 * @privlevel public
180 * @privilege %http://tizen.org/privilege/recorder
181 *
182 * @remark If the function succeeds, @a language must be released with free() by you when you no longer need it.
183 *
184 * @param[out] language A language is specified as an ISO 3166 alpha-2 two letter country-code \n
185 *                       followed by ISO 639-1 for the two-letter language code. \n
186 *                       For example, "ko_KR" for Korean, "en_US" for American English.
187 *
188 * @return 0 on success, otherwise a negative error value
189 * @retval #VC_ERROR_NONE Successful
190 * @retval #VC_ERROR_INVALID_PARAMETER Invalid parameter
191 * @retval #VC_ERROR_OUT_OF_MEMORY Out of memory
192 * @retval #VC_ERROR_OPERATION_FAILED Operation failure
193 * @retval #VC_ERROR_INVALID_STATE Invalid state
194 * @retval #VC_ERROR_PERMISSION_DENIED Permission denied
195 * @retval #VC_ERROR_NOT_SUPPORTED Not supported
196 *
197 * @pre The state should be #VC_STATE_INITIALIZED or #VC_STATE_READY.
198 *
199 * @see vc_foreach_supported_languages()
200 */
201 int vc_get_current_language(char** language);
202
203 /**
204 * @brief Gets current state of voice control client.
205 * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif
206 * @privlevel public
207 * @privilege %http://tizen.org/privilege/recorder
208 *
209 * @param[out] state The current state
210 *
211 * @return 0 on success, otherwise a negative error value
212 * @retval #VC_ERROR_NONE Successful
213 * @retval #VC_ERROR_INVALID_PARAMETER Invalid parameter
214 * @retval #VC_ERROR_PERMISSION_DENIED Permission denied
215 * @retval #VC_ERROR_NOT_SUPPORTED Not supported
216 *
217 * @see vc_state_changed_cb()
218 * @see vc_set_state_changed_cb()
219 */
220 int vc_get_state(vc_state_e* state);
221
222 /**
223 * @brief Gets current state of voice control service.
224 * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif
225 * @privlevel public
226 * @privilege %http://tizen.org/privilege/recorder
227 *
228 * @param[out] state The current state
229 *
230 * @return 0 on success, otherwise a negative error value
231 * @retval #VC_ERROR_NONE Successful
232 * @retval #VC_ERROR_INVALID_PARAMETER Invalid parameter
233 * @retval #VC_ERROR_PERMISSION_DENIED Permission denied
234 * @retval #VC_ERROR_NOT_SUPPORTED Not supported
235 *
236 * @pre The state should be #VC_STATE_READY.
237 *
238 * @see vc_request_start()
239 * @see vc_request_stop()
240 * @see vc_request_cancel()
241 * @see vc_set_service_state_changed_cb()
242 * @see vc_unset_service_state_changed_cb()
243 */
244 int vc_get_service_state(vc_service_state_e* state);
245
246 /**
247 * @brief Get system command list.
248 * @since_tizen 3.0
249 * @privlevel public
250 * @privilege %http://tizen.org/privilege/recorder
251 *
252 * @remarks If system command is set by system voice app, the system command list can be retreived.
253 *
254 * @param[out] vc_sys_cmd_list System command list handle
255 *
256 * @return 0 on success, otherwise a negative error value
257 * @retval #VC_ERROR_NONE Successful
258 * @retval #VC_ERROR_INVALID_PARAMETER Invalid parameter
259 * @retval #VC_ERROR_INVALID_STATE Invalid state
260 * @retval #VC_ERROR_PERMISSION_DENIED Permission denied
261 * @retval #VC_ERROR_NOT_SUPPORTED Not supported
262 *
263 * @pre The service state should be #VC_SERVICE_STATE_READY.
264 *
265 * @see vc_unset_command_list()
266 */
267 int vc_get_system_command_list(vc_cmd_list_h* vc_sys_cmd_list);
268
269 /**
270 * @brief Sets invocation name.
271 * @since_tizen 3.0
272 * @privlevel public
273 * @privilege %http://tizen.org/privilege/recorder
274 *
275 * @remarks The invocation name will be combined with background command.
276 *               This function should be called before vc_set_command_list() or vc_set_command_list_from_file().
277 *
278 * @param[in] name App name that wants to be invoked
279 *
280 * @return 0 on success, otherwise a negative error value
281 * @retval #VC_ERROR_NONE Successful
282 * @retval #VC_ERROR_INVALID_PARAMETER Invalid parameter
283 * @retval #VC_ERROR_INVALID_STATE Invalid state
284 * @retval #VC_ERROR_PERMISSION_DENIED Permission denied
285 * @retval #VC_ERROR_NOT_SUPPORTED Not supported
286 *
287 * @pre The state should be #VC_STATE_READY.
288 *
289 * @see vc_set_command_list()
290 * @see vc_set_command_list_from_file()
291 */
292 int vc_set_invocation_name(const char* name);
293
294 /**
295 * @brief Request to display text and to speak text what app want.
296 * @since_tizen 3.0
297 * @privlevel public
298 * @privilege %http://tizen.org/privilege/recorder
299 *
300 * @remarks If continue is true, the recognition will start again. In this case, 4 times can be restarted. 
301 *
302 * @param[in] disp_text Text hat wants to be displayed
303 * @param[in] utt_text Text that wants to be spoken
304 * @param[in] continue Continue dialog session 
305 *
306 * @return 0 on success, otherwise a negative error value
307 * @retval #VC_ERROR_NONE Successful
308 * @retval #VC_ERROR_INVALID_PARAMETER Invalid parameter
309 * @retval #VC_ERROR_INVALID_STATE Invalid state
310 * @retval #VC_ERROR_PERMISSION_DENIED Permission denied
311 * @retval #VC_ERROR_NOT_SUPPORTED Not supported
312 *
313 * @pre The service state should be #VC_SERVICE_STATE_READY.
314 */
315 int vc_dialog(const char* disp_text, const char* utt_text, bool auto_start);
316
317 /**
318 * @brief Sets command list.
319 * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif
320 * @privlevel public
321 * @privilege %http://tizen.org/privilege/recorder
322 *
323 * @remarks The command type is valid for #VC_COMMAND_TYPE_FOREGROUND or #VC_COMMAND_TYPE_BACKGROUND. \n
324 *       The matched commands of command list should be set and they should include type and command text at least.
325 *
326 * @param[in] vc_cmd_list Command list handle
327 * @param[in] type Command type
328 *
329 * @return 0 on success, otherwise a negative error value
330 * @retval #VC_ERROR_NONE Successful
331 * @retval #VC_ERROR_INVALID_PARAMETER Invalid parameter
332 * @retval #VC_ERROR_INVALID_STATE Invalid state
333 * @retval #VC_ERROR_PERMISSION_DENIED Permission denied
334 * @retval #VC_ERROR_NOT_SUPPORTED Not supported
335 *
336 * @pre The state should be #VC_STATE_READY.
337 *
338 * @see vc_unset_command_list()
339 */
340 int vc_set_command_list(vc_cmd_list_h vc_cmd_list, int type);
341
342 /**
343 * @brief Sets command list from file.
344 * @since_tizen 3.0
345 * @privlevel public
346 * @privilege %http://tizen.org/privilege/recorder
347 *
348 * @remarks The command type is valid for #VC_COMMAND_TYPE_FOREGROUND or #VC_COMMAND_TYPE_BACKGROUND. \n
349 *       The matched commands of command list should be set and they should include type and command text at least.
350 *
351 * @param[in] file_path The file path including commands
352 * @param[in] type Command type
353 *
354 * @return 0 on success, otherwise a negative error value
355 * @retval #VC_ERROR_NONE Successful
356 * @retval #VC_ERROR_INVALID_PARAMETER Invalid parameter
357 * @retval #VC_ERROR_INVALID_STATE Invalid state
358 * @retval #VC_ERROR_PERMISSION_DENIED Permission denied
359 * @retval #VC_ERROR_NOT_SUPPORTED Not supported
360 *
361 * @pre The state should be #VC_STATE_READY.
362 *
363 * @see vc_unset_command_list()
364 */
365 int vc_set_command_list_from_file(const char* file_path, int type);
366
367 /**
368 * @brief Unsets command list.
369 * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif
370 * @privlevel public
371 * @privilege %http://tizen.org/privilege/recorder
372 *
373 * @param[in] type Command type
374 *
375 * @return 0 on success, otherwise a negative error value
376 * @retval #VC_ERROR_NONE Successful
377 * @retval #VC_ERROR_INVALID_PARAMETER Invalid parameter
378 * @retval #VC_ERROR_INVALID_STATE Invalid state
379 * @retval #VC_ERROR_PERMISSION_DENIED Permission denied
380 * @retval #VC_ERROR_NOT_SUPPORTED Not supported
381 *
382 * @pre The state should be #VC_STATE_READY.
383 *
384 * @see vc_set_command_list()
385 * @see vc_set_command_list_from_file
386 */
387 int vc_unset_command_list(int type);
388
389 /**
390 * @brief Get recognition result using a callback function.
391 * @since_tizen 3.0
392 * @privlevel public
393 * @privilege %http://tizen.org/privilege/recorder
394 *
395 * @param[in] callback Callback function to get recognition result
396 * @param[in] user_data The user data to be passed to the callback function
397 *
398 * @return 0 on success, otherwise a negative error value
399 * @retval #VC_ERROR_NONE Successful
400 * @retval #VC_ERROR_INVALID_PARAMETER Invalid parameter
401 * @retval #VC_ERROR_INVALID_STATE Invalid state
402 * @retval #VC_ERROR_NOT_SUPPORTED Not supported
403 *
404 * @pre The state should be #VC_STATE_READY.
405 *
406 * @see vc_result_cb()
407 */
408 int vc_get_result(vc_result_cb callback, void* user_data);
409
410 /**
411 * @brief Registers a callback function for getting recognition result.
412 * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif
413 * @privlevel public
414 * @privilege %http://tizen.org/privilege/recorder
415 *
416 * @param[in] callback Callback function to register
417 * @param[in] user_data The user data to be passed to the callback function
418 *
419 * @return 0 on success, otherwise a negative error value
420 * @retval #VC_ERROR_NONE Successful
421 * @retval #VC_ERROR_INVALID_PARAMETER Invalid parameter
422 * @retval #VC_ERROR_INVALID_STATE Invalid state
423 * @retval #VC_ERROR_PERMISSION_DENIED Permission denied
424 * @retval #VC_ERROR_NOT_SUPPORTED Not supported
425 *
426 * @pre The state should be #VC_STATE_INITIALIZED.
427 *
428 * @see vc_result_cb()
429 * @see vc_unset_result_cb()
430 */
431 int vc_set_result_cb(vc_result_cb callback, void* user_data);
432
433 /**
434 * @brief Unregisters the callback function.
435 * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif
436 * @privlevel public
437 * @privilege %http://tizen.org/privilege/recorder
438 *
439 * @return 0 on success, otherwise a negative error value
440 * @retval #VC_ERROR_NONE Successful
441 * @retval #VC_ERROR_INVALID_STATE Invalid state
442 * @retval #VC_ERROR_NOT_SUPPORTED Not supported
443 *
444 * @pre The state should be #VC_STATE_INITIALIZED.
445 *
446 * @see vc_set_result_cb()
447 */
448 int vc_unset_result_cb(void);
449
450 /**
451 * @brief Registers a callback function to be called when state is changed.
452 * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif
453 * @privlevel public
454 * @privilege %http://tizen.org/privilege/recorder
455 *
456 * @param[in] callback Callback function to register
457 * @param[in] user_data The user data to be passed to the callback function
458 *
459 * @return 0 on success, otherwise a negative error value
460 * @retval #VC_ERROR_NONE Successful
461 * @retval #VC_ERROR_INVALID_PARAMETER Invalid parameter
462 * @retval #VC_ERROR_INVALID_STATE Invalid state
463 * @retval #VC_ERROR_PERMISSION_DENIED Permission denied
464 * @retval #VC_ERROR_NOT_SUPPORTED Not supported
465 *
466 * @pre The state should be #VC_STATE_INITIALIZED.
467 *
468 * @see vc_service_state_changed_cb()
469 * @see vc_unset_service_state_changed_cb()
470 */
471 int vc_set_service_state_changed_cb(vc_service_state_changed_cb callback, void* user_data);
472
473 /**
474 * @brief Unregisters the callback function.
475 * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif
476 * @privlevel public
477 * @privilege %http://tizen.org/privilege/recorder
478 *
479 * @return 0 on success, otherwise a negative error value
480 * @retval #VC_ERROR_NONE Successful
481 * @retval #VC_ERROR_INVALID_STATE Invalid state
482 * @retval #VC_ERROR_PERMISSION_DENIED Permission denied
483 * @retval #VC_ERROR_NOT_SUPPORTED Not supported
484 *
485 * @pre The state should be #VC_STATE_INITIALIZED.
486 *
487 * @see vc_set_service_state_changed_cb()
488 */
489 int vc_unset_service_state_changed_cb(void);
490
491 /**
492 * @brief Registers a callback function to be called when state is changed.
493 * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif
494 * @privlevel public
495 * @privilege %http://tizen.org/privilege/recorder
496 *
497 * @param[in] callback Callback function to register
498 * @param[in] user_data The user data to be passed to the callback function
499 *
500 * @return 0 on success, otherwise a negative error value
501 * @retval #VC_ERROR_NONE Successful
502 * @retval #VC_ERROR_INVALID_PARAMETER Invalid parameter
503 * @retval #VC_ERROR_INVALID_STATE Invalid state
504 * @retval #VC_ERROR_PERMISSION_DENIED Permission denied
505 * @retval #VC_ERROR_NOT_SUPPORTED Not supported
506 *
507 * @pre The state should be #VC_STATE_INITIALIZED.
508 *
509 * @see vc_state_changed_cb()
510 * @see vc_unset_state_changed_cb()
511 */
512 int vc_set_state_changed_cb(vc_state_changed_cb callback, void* user_data);
513
514 /**
515 * @brief Unregisters the callback function.
516 * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif
517 * @privlevel public
518 * @privilege %http://tizen.org/privilege/recorder
519 *
520 * @return 0 on success, otherwise a negative error value
521 * @retval #VC_ERROR_NONE Successful
522 * @retval #VC_ERROR_INVALID_STATE Invalid state
523 * @retval #VC_ERROR_PERMISSION_DENIED Permission denied
524 * @retval #VC_ERROR_NOT_SUPPORTED Not supported
525 *
526 * @pre The state should be #VC_STATE_INITIALIZED.
527 *
528 * @see vc_set_state_changed_cb()
529 */
530 int vc_unset_state_changed_cb(void);
531
532 /**
533 * @brief Registers a callback function to be called when current language is changed.
534 * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif
535 * @privlevel public
536 * @privilege %http://tizen.org/privilege/recorder
537 *
538 * @param[in] callback Callback function to register
539 * @param[in] user_data The user data to be passed to the callback function
540 *
541 * @return 0 on success, otherwise a negative error value
542 * @retval #VC_ERROR_NONE Successful
543 * @retval #VC_ERROR_INVALID_PARAMETER Invalid parameter
544 * @retval #VC_ERROR_INVALID_STATE Invalid state
545 * @retval #VC_ERROR_PERMISSION_DENIED Permission denied
546 * @retval #VC_ERROR_NOT_SUPPORTED Not supported
547 *
548 * @pre The state should be #VC_STATE_INITIALIZED.
549 *
550 * @see vc_current_language_changed_cb()
551 * @see vc_unset_current_language_changed_cb()
552 */
553 int vc_set_current_language_changed_cb(vc_current_language_changed_cb callback, void* user_data);
554
555 /**
556 * @brief Unregisters the callback function.
557 * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif
558 * @privlevel public
559 * @privilege %http://tizen.org/privilege/recorder
560 *
561 * @return 0 on success, otherwise a negative error value
562 * @retval #VC_ERROR_NONE Successful
563 * @retval #VC_ERROR_INVALID_STATE Invalid state
564 * @retval #VC_ERROR_PERMISSION_DENIED Permission denied
565 * @retval #VC_ERROR_NOT_SUPPORTED Not supported
566 *
567 * @pre The state should be #VC_STATE_INITIALIZED.
568 *
569 * @see vc_set_current_language_changed_cb()
570 */
571 int vc_unset_current_language_changed_cb(void);
572
573 /**
574 * @brief Registers a callback function to be called when an error occurred.
575 * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif
576 * @privlevel public
577 * @privilege %http://tizen.org/privilege/recorder
578 *
579 * @param[in] callback Callback function to register
580 * @param[in] user_data The user data to be passed to the callback function
581 *
582 * @return 0 on success, otherwise a negative error value
583 * @retval #VC_ERROR_NONE Successful
584 * @retval #VC_ERROR_INVALID_PARAMETER Invalid parameter
585 * @retval #VC_ERROR_INVALID_STATE Invalid state
586 * @retval #VC_ERROR_PERMISSION_DENIED Permission denied
587 * @retval #VC_ERROR_NOT_SUPPORTED Not supported
588 *
589 * @pre The state should be #VC_STATE_INITIALIZED.
590 *
591 * @see vc_error_cb()
592 * @see vc_unset_error_cb()
593 */
594 int vc_set_error_cb(vc_error_cb callback, void* user_data);
595
596 /**
597 * @brief Unregisters the callback function.
598 * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif
599 * @privlevel public
600 * @privilege %http://tizen.org/privilege/recorder
601 *
602 * @return 0 on success, otherwise a negative error value
603 * @retval #VC_ERROR_NONE Successful
604 * @retval #VC_ERROR_INVALID_STATE Invalid state
605 * @retval #VC_ERROR_PERMISSION_DENIED Permission denied
606 * @retval #VC_ERROR_NOT_SUPPORTED Not supported
607 *
608 * @pre The state should be #VC_STATE_INITIALIZED.
609 *
610 * @see vc_set_error_cb()
611 */
612 int vc_unset_error_cb(void);
613
614
615 #ifdef __cplusplus
616 }
617 #endif
618
619 /**
620  * @}@}
621  */
622
623 #endif /* __VOICE_CONTROL_H__ */