Fix descriptions and Add documents for ACR-796
[platform/core/uifw/voice-control.git] / include / voice_control.h
1 /**
2  * Copyright (c) 2011-2016 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 Gets the system command list.
248  * @since_tizen 3.0
249  * @privlevel public
250  * @privilege %http://tizen.org/privilege/recorder
251  *
252  * @remarks In the system command list, there are system commands predefined by product manufacturers. Those commands have the highest priority.
253  *      Therefore, the user can not set any commands same with the system commands. \n
254  *      The @a vc_sys_cmd_list must be released using free() when it is no longer required.
255  *
256  * @param[out] vc_sys_cmd_list System command list handle
257  *
258  * @return 0 on success, otherwise a negative error value
259  * @retval #VC_ERROR_NONE Successful
260  * @retval #VC_ERROR_INVALID_PARAMETER Invalid parameter
261  * @retval #VC_ERROR_INVALID_STATE Invalid state
262  * @retval #VC_ERROR_PERMISSION_DENIED Permission denied
263  * @retval #VC_ERROR_NOT_SUPPORTED Not supported
264  *
265  * @pre The service state should be #VC_SERVICE_STATE_READY.
266  *
267  * @see vc_unset_command_list()
268  */
269 int vc_get_system_command_list(vc_cmd_list_h* vc_sys_cmd_list);
270
271 /**
272  * @brief Sets the invocation name.
273  * @since_tizen 3.0
274  * @privlevel public
275  * @privilege %http://tizen.org/privilege/recorder
276  *
277  * @remarks Invocation name is used to activate background commands. The invocation name can be the same as the application name or any other phrase.
278  *      For example, an application "Tizen Sample" has a background command, "Play music", and the invocation name of the application is set to "Tizen Sample".
279  *      In order to activate the background command, users can say "Tizen Sample, Play music".
280  *      The invocation name is dependent on the current language. For example, if the current language is "en_US"(English), the invocation name is also "en_US".
281  *      If the current language is "ja_JP"(Japanese) and the invocation name is "en_US", the invocation name will not be recognized.
282  *      This function should be called before vc_set_command_list().
283  *
284  * @param[in] name Invocation name that an application wants to be invoked by
285  *
286  * @return 0 on success, otherwise a negative error value
287  * @retval #VC_ERROR_NONE Successful
288  * @retval #VC_ERROR_INVALID_PARAMETER Invalid parameter
289  * @retval #VC_ERROR_INVALID_STATE Invalid state
290  * @retval #VC_ERROR_PERMISSION_DENIED Permission denied
291  * @retval #VC_ERROR_NOT_SUPPORTED Not supported
292  *
293  * @pre The state should be #VC_STATE_READY.
294  *
295  * @see vc_set_command_list()
296  */
297 int vc_set_invocation_name(const char* name);
298
299 /**
300  * @brief Requests to start the dialogue.
301  * @details Using this function, the developer can request starting the dialogue to the framework.
302  *      When the developer requests the dialogue, two types of texts, @a disp_text and @a utt_text, can be sent by this function.
303  *      @a disp_text is a text for displaying, and @a utt_text is that for uttering.
304  *      For example, if @a disp_text is "October 10th" and @a utt_text is "Today is October 10th.", "October 10th" will be displayed on the screen and "Today is October 10th." will be spoken.
305  *      Also, the developer can set whether the dialogue starts automatically or not, using @a auto_start.
306  *      If the developer sets @a auto_start as @c true, the framework will start to record next speech and continue the dialogue.
307  *
308  * @since_tizen 3.0
309  * @privlevel public
310  * @privilege %http://tizen.org/privilege/recorder
311  *
312  * @remarks If @a auto_start is @c true, the recognition will start again. In this case, it can be restarted up to 4 times.
313  *
314  * @param[in] disp_text Text to be displayed on the screen
315  * @param[in] utt_text Text to be spoken
316  * @param[in] auto_start A variable for setting whether the dialog session will be restarted automatically or not
317  *
318  * @return 0 on success, otherwise a negative error value
319  * @retval #VC_ERROR_NONE Successful
320  * @retval #VC_ERROR_INVALID_PARAMETER Invalid parameter
321  * @retval #VC_ERROR_INVALID_STATE Invalid state
322  * @retval #VC_ERROR_PERMISSION_DENIED Permission denied
323  * @retval #VC_ERROR_NOT_SUPPORTED Not supported
324  *
325  * @pre The service state should be #VC_SERVICE_STATE_READY.
326  */
327 int vc_request_dialog(const char* disp_text, const char* utt_text, bool auto_start);
328
329 /**
330  * @brief Sets command list.
331  * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif
332  * @privlevel public
333  * @privilege %http://tizen.org/privilege/recorder
334  *
335  * @remarks The command type is valid for #VC_COMMAND_TYPE_FOREGROUND or #VC_COMMAND_TYPE_BACKGROUND. \n
336  *      The matched commands of command list should be set and they should include type and command text at least.
337  *
338  * @param[in] vc_cmd_list Command list handle
339  * @param[in] type Command type
340  *
341  * @return 0 on success, otherwise a negative error value
342  * @retval #VC_ERROR_NONE Successful
343  * @retval #VC_ERROR_INVALID_PARAMETER Invalid parameter
344  * @retval #VC_ERROR_INVALID_STATE Invalid state
345  * @retval #VC_ERROR_PERMISSION_DENIED Permission denied
346  * @retval #VC_ERROR_NOT_SUPPORTED Not supported
347  *
348  * @pre The state should be #VC_STATE_READY.
349  *
350  * @see vc_unset_command_list()
351  */
352 int vc_set_command_list(vc_cmd_list_h vc_cmd_list, int type);
353
354 /**
355  * @brief Unsets command list.
356  * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif
357  * @privlevel public
358  * @privilege %http://tizen.org/privilege/recorder
359  *
360  * @param[in] type Command type
361  *
362  * @return 0 on success, otherwise a negative error value
363  * @retval #VC_ERROR_NONE Successful
364  * @retval #VC_ERROR_INVALID_PARAMETER Invalid parameter
365  * @retval #VC_ERROR_INVALID_STATE Invalid state
366  * @retval #VC_ERROR_PERMISSION_DENIED Permission denied
367  * @retval #VC_ERROR_NOT_SUPPORTED Not supported
368  *
369  * @pre The state should be #VC_STATE_READY.
370  *
371  * @see vc_set_command_list()
372  */
373 int vc_unset_command_list(int type);
374
375 /**
376  * @brief Gets the recognition result.
377  * @since_tizen 3.0
378  * @privlevel public
379  * @privilege %http://tizen.org/privilege/recorder
380  *
381  * @param[in] callback Callback function to get recognition result
382  * @param[in] user_data The user data to be passed to the callback function
383  *
384  * @return 0 on success, otherwise a negative error value
385  * @retval #VC_ERROR_NONE Successful
386  * @retval #VC_ERROR_INVALID_PARAMETER Invalid parameter
387  * @retval #VC_ERROR_INVALID_STATE Invalid state
388  * @retval #VC_ERROR_NOT_SUPPORTED Not supported
389  *
390  * @pre The state should be #VC_STATE_READY.
391  *
392  * @see vc_result_cb()
393  */
394 int vc_get_result(vc_result_cb callback, void* user_data);
395
396 /**
397  * @brief Registers a callback function for getting recognition result.
398  * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif
399  * @privlevel public
400  * @privilege %http://tizen.org/privilege/recorder
401  *
402  * @param[in] callback Callback function to register
403  * @param[in] user_data The user data to be passed to the callback function
404  *
405  * @return 0 on success, otherwise a negative error value
406  * @retval #VC_ERROR_NONE Successful
407  * @retval #VC_ERROR_INVALID_PARAMETER Invalid parameter
408  * @retval #VC_ERROR_INVALID_STATE Invalid state
409  * @retval #VC_ERROR_PERMISSION_DENIED Permission denied
410  * @retval #VC_ERROR_NOT_SUPPORTED Not supported
411  *
412  * @pre The state should be #VC_STATE_INITIALIZED.
413  *
414  * @see vc_result_cb()
415  * @see vc_unset_result_cb()
416  */
417 int vc_set_result_cb(vc_result_cb callback, void* user_data);
418
419 /**
420  * @brief Unregisters the callback function.
421  * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif
422  * @privlevel public
423  * @privilege %http://tizen.org/privilege/recorder
424  *
425  * @return 0 on success, otherwise a negative error value
426  * @retval #VC_ERROR_NONE Successful
427  * @retval #VC_ERROR_INVALID_STATE Invalid state
428  * @retval #VC_ERROR_NOT_SUPPORTED Not supported
429  *
430  * @pre The state should be #VC_STATE_INITIALIZED.
431  *
432  * @see vc_set_result_cb()
433  */
434 int vc_unset_result_cb(void);
435
436 /**
437  * @brief Registers a callback function to be called when state is changed.
438  * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif
439  * @privlevel public
440  * @privilege %http://tizen.org/privilege/recorder
441  *
442  * @param[in] callback Callback function to register
443  * @param[in] user_data The user data to be passed to the callback function
444  *
445  * @return 0 on success, otherwise a negative error value
446  * @retval #VC_ERROR_NONE Successful
447  * @retval #VC_ERROR_INVALID_PARAMETER Invalid parameter
448  * @retval #VC_ERROR_INVALID_STATE Invalid state
449  * @retval #VC_ERROR_PERMISSION_DENIED Permission denied
450  * @retval #VC_ERROR_NOT_SUPPORTED Not supported
451  *
452  * @pre The state should be #VC_STATE_INITIALIZED.
453  *
454  * @see vc_service_state_changed_cb()
455  * @see vc_unset_service_state_changed_cb()
456  */
457 int vc_set_service_state_changed_cb(vc_service_state_changed_cb callback, void* user_data);
458
459 /**
460  * @brief Unregisters the callback function.
461  * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif
462  * @privlevel public
463  * @privilege %http://tizen.org/privilege/recorder
464  *
465  * @return 0 on success, otherwise a negative error value
466  * @retval #VC_ERROR_NONE Successful
467  * @retval #VC_ERROR_INVALID_STATE Invalid state
468  * @retval #VC_ERROR_PERMISSION_DENIED Permission denied
469  * @retval #VC_ERROR_NOT_SUPPORTED Not supported
470  *
471  * @pre The state should be #VC_STATE_INITIALIZED.
472  *
473  * @see vc_set_service_state_changed_cb()
474  */
475 int vc_unset_service_state_changed_cb(void);
476
477 /**
478  * @brief Registers a callback function to be called when state is changed.
479  * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif
480  * @privlevel public
481  * @privilege %http://tizen.org/privilege/recorder
482  *
483  * @param[in] callback Callback function to register
484  * @param[in] user_data The user data to be passed to the callback function
485  *
486  * @return 0 on success, otherwise a negative error value
487  * @retval #VC_ERROR_NONE Successful
488  * @retval #VC_ERROR_INVALID_PARAMETER Invalid parameter
489  * @retval #VC_ERROR_INVALID_STATE Invalid state
490  * @retval #VC_ERROR_PERMISSION_DENIED Permission denied
491  * @retval #VC_ERROR_NOT_SUPPORTED Not supported
492  *
493  * @pre The state should be #VC_STATE_INITIALIZED.
494  *
495  * @see vc_state_changed_cb()
496  * @see vc_unset_state_changed_cb()
497  */
498 int vc_set_state_changed_cb(vc_state_changed_cb callback, void* user_data);
499
500 /**
501  * @brief Unregisters the callback function.
502  * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif
503  * @privlevel public
504  * @privilege %http://tizen.org/privilege/recorder
505  *
506  * @return 0 on success, otherwise a negative error value
507  * @retval #VC_ERROR_NONE Successful
508  * @retval #VC_ERROR_INVALID_STATE Invalid state
509  * @retval #VC_ERROR_PERMISSION_DENIED Permission denied
510  * @retval #VC_ERROR_NOT_SUPPORTED Not supported
511  *
512  * @pre The state should be #VC_STATE_INITIALIZED.
513  *
514  * @see vc_set_state_changed_cb()
515  */
516 int vc_unset_state_changed_cb(void);
517
518 /**
519  * @brief Registers a callback function to be called when current language is changed.
520  * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif
521  * @privlevel public
522  * @privilege %http://tizen.org/privilege/recorder
523  *
524  * @param[in] callback Callback function to register
525  * @param[in] user_data The user data to be passed to the callback function
526  *
527  * @return 0 on success, otherwise a negative error value
528  * @retval #VC_ERROR_NONE Successful
529  * @retval #VC_ERROR_INVALID_PARAMETER Invalid parameter
530  * @retval #VC_ERROR_INVALID_STATE Invalid state
531  * @retval #VC_ERROR_PERMISSION_DENIED Permission denied
532  * @retval #VC_ERROR_NOT_SUPPORTED Not supported
533  *
534  * @pre The state should be #VC_STATE_INITIALIZED.
535  *
536  * @see vc_current_language_changed_cb()
537  * @see vc_unset_current_language_changed_cb()
538  */
539 int vc_set_current_language_changed_cb(vc_current_language_changed_cb callback, void* user_data);
540
541 /**
542  * @brief Unregisters the callback function.
543  * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif
544  * @privlevel public
545  * @privilege %http://tizen.org/privilege/recorder
546  *
547  * @return 0 on success, otherwise a negative error value
548  * @retval #VC_ERROR_NONE Successful
549  * @retval #VC_ERROR_INVALID_STATE Invalid state
550  * @retval #VC_ERROR_PERMISSION_DENIED Permission denied
551  * @retval #VC_ERROR_NOT_SUPPORTED Not supported
552  *
553  * @pre The state should be #VC_STATE_INITIALIZED.
554  *
555  * @see vc_set_current_language_changed_cb()
556  */
557 int vc_unset_current_language_changed_cb(void);
558
559 /**
560  * @brief Registers a callback function to be called when an error occurred.
561  * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif
562  * @privlevel public
563  * @privilege %http://tizen.org/privilege/recorder
564  *
565  * @param[in] callback Callback function to register
566  * @param[in] user_data The user data to be passed to the callback function
567  *
568  * @return 0 on success, otherwise a negative error value
569  * @retval #VC_ERROR_NONE Successful
570  * @retval #VC_ERROR_INVALID_PARAMETER Invalid parameter
571  * @retval #VC_ERROR_INVALID_STATE Invalid state
572  * @retval #VC_ERROR_PERMISSION_DENIED Permission denied
573  * @retval #VC_ERROR_NOT_SUPPORTED Not supported
574  *
575  * @pre The state should be #VC_STATE_INITIALIZED.
576  *
577  * @see vc_error_cb()
578  * @see vc_unset_error_cb()
579  */
580 int vc_set_error_cb(vc_error_cb callback, void* user_data);
581
582 /**
583  * @brief Unregisters the callback function.
584  * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif
585  * @privlevel public
586  * @privilege %http://tizen.org/privilege/recorder
587  *
588  * @return 0 on success, otherwise a negative error value
589  * @retval #VC_ERROR_NONE Successful
590  * @retval #VC_ERROR_INVALID_STATE Invalid state
591  * @retval #VC_ERROR_PERMISSION_DENIED Permission denied
592  * @retval #VC_ERROR_NOT_SUPPORTED Not supported
593  *
594  * @pre The state should be #VC_STATE_INITIALIZED.
595  *
596  * @see vc_set_error_cb()
597  */
598 int vc_unset_error_cb(void);
599
600
601 #ifdef __cplusplus
602 }
603 #endif
604
605 /**
606  * @}@}
607  */
608
609 #endif /* __VOICE_CONTROL_H__ */