Add parameter to change system volume
[platform/core/uifw/voice-control.git] / include / voice_control_manager.h
1 /**
2  * Copyright (c) 2011-2018 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_MANAGER_H__
19 #define __VOICE_CONTROL_MANAGER_H__
20
21 #include <voice_control_command.h>
22 #include <voice_control_common.h>
23
24 /**
25  * @addtogroup CAPI_UIX_VOICE_CONTROL_MANAGER_MODULE
26  * @{
27  */
28
29 #ifdef __cplusplus
30 extern "C"
31 {
32 #endif
33
34
35 /**
36  * @brief Definition of Bluetooth audio-in type.
37  * @since_tizen 5.0
38  */
39 #define VC_AUDIO_TYPE_BLUETOOTH         "VC_AUDIO_ID_BLUETOOTH"         /**< Bluetooth audio type */
40
41 /**
42  * @brief Definition of Wi-Fi audio-in type.
43  * @since_tizen 5.0
44  */
45 #define VC_AUDIO_TYPE_WIFI              "VC_AUDIO_ID_WIFI"              /**< Wi-Fi audio type */
46
47 /**
48  * @brief Definition for foreground command type.
49  * @since_tizen 5.0
50  */
51 #define VC_COMMAND_TYPE_FOREGROUND      1
52
53 /**
54  * @brief Definition for background command type.
55  * @since_tizen 5.0
56  */
57 #define VC_COMMAND_TYPE_BACKGROUND      2
58
59 /**
60  * @brief Definition for widget command type.
61  * @since_tizen 5.0
62  */
63 #define VC_COMMAND_TYPE_WIDGET          3
64
65 /**
66  * @brief Definition for system command type.
67  * @since_tizen 5.0
68  */
69 #define VC_COMMAND_TYPE_SYSTEM          4
70
71 /**
72  * @brief Definition for system background command type.
73  * @since_tizen 5.0
74  */
75 #define VC_COMMAND_TYPE_SYSTEM_BACKGROUND       5
76
77 /**
78  * @brief Definition for exclusive command type.
79  * @since_tizen 5.0
80  */
81 #define VC_COMMAND_TYPE_EXCLUSIVE       6
82
83 /**
84  * @brief Definition for none message.
85  * @since_tizen 5.0
86  */
87 #define VC_RESULT_MESSAGE_NONE                  "vc.result.message.none"
88
89 /**
90  * @brief Definition for failed recognition because the speech is too loud to listen.
91  * @since_tizen 5.0
92  */
93 #define VC_RESULT_MESSAGE_ERROR_TOO_LOUD        "vc.result.message.error.too.loud"
94
95 /**
96  * @brief Enumeration of recognition mode.
97  * @since_tizen 5.0
98  */
99 typedef enum {
100         VC_RECOGNITION_MODE_STOP_BY_SILENCE,            /**< Default mode */
101         VC_RECOGNITION_MODE_RESTART_AFTER_REJECT,       /**< Restart recognition after rejected result */
102         VC_RECOGNITION_MODE_RESTART_CONTINUOUSLY,       /**< Continuously restart recognition - not support yet*/
103         VC_RECOGNITION_MODE_MANUAL                                      /**< Start and stop manually without silence */
104 } vc_recognition_mode_e;
105
106 /**
107  * @brief Enumeration of send event type.
108  * @since_tizen 5.0
109  */
110 typedef enum {
111         VC_SEND_EVENT_TYPE_TEXT,                        /**< Send text event to VC engine */
112         VC_SEND_EVENT_TYPE_LIST_EVENT,          /**< Send list event to VC engine */
113         VC_SEND_EVENT_TYPE_HAPTIC_EVENT         /**< Send haptic event to VC engine */
114 } vc_send_event_type_e;
115
116 /**
117  * @brief Enumeration of pre result event.
118  * @since_tizen 5.0
119  */
120 typedef enum {
121         VC_PRE_RESULT_EVENT_FINAL_RESULT = 0,   /**< Pre-result event for final result */
122         VC_PRE_RESULT_EVENT_PARTIAL_RESULT,             /**< Pre-result event for partial result */
123         VC_PRE_RESULT_EVENT_ERROR                               /**< Pre-result event for error */
124 } vc_pre_result_event_e;
125
126 /**
127  * @brief Called when client gets the all recognition results from voice control service.
128  * @since_tizen 5.0
129  *
130  * @remarks The @a vc_cmd_list should not be released. It is managed by the platform and will be released when invoking this callback is finished. \n
131  *      The @a result and @a msg are also managed by the platform and will be released when invoking this callback is finished.
132  *
133  * @param[in] event         The result event
134  * @param[in] vc_cmd_list   Command list handle
135  * @param[in] result        Command text
136  * @param[in] msg           Engine message (e.g. #VC_RESULT_MESSAGE_NONE, #VC_RESULT_MESSAGE_ERROR_TOO_LOUD)
137  * @param[in] user_data     The user data passed from the callback registration function
138  *
139  * @return @c true to release command to client, \n @c false to wait for selecting command.
140  * @pre An application registers callback function using vc_mgr_set_all_result_cb().
141  *
142  * @see vc_mgr_set_all_result_cb()
143  * @see vc_mgr_unset_all_result_cb()
144  */
145 typedef bool (*vc_mgr_all_result_cb)(vc_result_event_e event, vc_cmd_list_h vc_cmd_list,
146                                 const char *result, const char *msg, void *user_data);
147
148 /**
149  * @brief Called when client gets the pre recognition results (partial ASR) from voice control service.
150  * @since_tizen 5.0
151  *
152  * @remarks The @a result is managed by the platform and will be released when invoking this callback is finished.
153  *
154  * @param[in] event       The pre result event
155  * @param[in] result      ASR text
156  * @param[in] user_data   The user data passed from the callback registration function
157  *
158  * @pre An application registers callback function using vc_mgr_set_pre_result_cb().
159  *
160  * @see vc_mgr_set_pre_result_cb()
161  * @see vc_mgr_unset_pre_result_cb()
162  */
163 typedef void (*vc_mgr_pre_result_cb)(vc_pre_result_event_e event, const char *result, void *user_data);
164
165 /**
166 * @brief Called when client gets the specific engine's result from vc-service.
167 * @since_tizen 5.0
168 *
169 * @param[in] engine_app_id The specific engine's app id
170 * @param[in] event The specific engine event type
171 * @param[in] result The specific engine result
172 * @param[in] user_data The user data passed from the callback registration function
173 *
174 * @pre An application registers callback function using vc_mgr_set_specific_engine_result_cb().
175 *
176 * @see vc_mgr_set_specific_engine_result_cb()
177 * @see vc_mgr_unset_specific_engine_result_cb()
178 */
179 typedef void (*vc_mgr_specific_engine_result_cb)(const char* engine_app_id, const char* event, const char* result, void *user_data);
180
181 /**
182  * @brief Called when user speaking is detected.
183  * @since_tizen 5.0
184  *
185  * @param[in] user_data   The user data passed from the callback registration function
186  *
187  * @pre An application registers callback function using vc_mgr_set_speech_detected_cb().
188  *
189  * @see vc_mgr_set_speech_detected_cb()
190  * @see vc_mgr_unset_speech_detected_cb()
191  */
192 typedef void (*vc_mgr_begin_speech_detected_cb)(void *user_data);
193
194
195 /**
196  * @brief Called when an application (VC client) requests dialog.
197  * @since_tizen 5.0
198  *
199  * @remarks The @a disp_text and @a utt_text are managed by the platform and will be released when invoking this callback is finished.
200  *
201  * @param[in] pid          Pid of VC client to request dialog
202  * @param[in] disp_text    Text requested to be displayed
203  * @param[in] utt_text     Text requested to be spoken
204  * @param[in] continuous   Continue dialog session
205  * @param[in] user_data    The user data passed from the callback registration function
206  *
207  * @pre An application registers callback function using vc_mgr_set_dialog_request_cb().
208  *
209  * @see vc_mgr_set_dialog_request_cb()
210  * @see vc_mgr_unset_dialog_request_cb()
211  */
212 typedef void (*vc_mgr_dialog_request_cb)(int pid, const char *disp_text, const char *utt_text, bool continuous, void *user_data);
213
214 /**
215  * @brief Called when engine sets private data to manager client.
216  * @since_tizen 5.0
217  *
218  * @remarks The @a key and @a data are managed by the platform and will be released when invoking this callback is finished.
219  *
220  * @param[in] key         Private key
221  * @param[in] data        Private data
222  * @param[in] user_data   The user data passed from the callback registration function
223  *
224  * @pre An application registers callback function using vc_mgr_set_private_data_set_cb().
225  *
226  * @see vc_mgr_set_private_data_set_cb()
227  * @see vc_mgr_unset_private_data_set_cb()
228  */
229 typedef int (*vc_mgr_private_data_set_cb)(const char *key, const char *data, void *user_data);
230
231 /**
232  * @brief Called when engine requests private data from manager client.
233  * @since_tizen 5.0
234  *
235  * @remarks The @a data should not be released. The @a data and @a key are managed by the platform and will be released when invoking this callback is finished.
236  *
237  * @param[in]  key         Private key
238  * @param[out] data        Private data
239  * @param[in]  user_data   The user data passed from the callback registration function
240  *
241  * @pre An application registers callback function using vc_mgr_set_private_data_requested_cb().
242  *
243  * @see vc_mgr_set_private_data_requested_cb()
244  * @see vc_mgr_unset_private_data_requested_cb()
245  */
246 typedef int (*vc_mgr_private_data_requested_cb)(const char *key, char **data, void *user_data);
247
248 /* for TTS feedback */
249 /**
250  * @brief Called when engine sends audio formats necessary for playing TTS feedback 
251  * @since_tizen 5.0
252  *
253  * @param[in] rate Audio sampling rate
254  * @param[in] channel Audio channel (e.g. #VC_AUDIO_CHANNEL_MONO, #VC_AUDIO_CHANNEL_STEREO)
255  * @param[in] audio_type Audio type (e.g. #VC_AUDIO_TYPE_PCM_S16_LE, #VC_AUDIO_TYPE_PCM_U8)
256  * @param[in] user_data The user data passed from the callback registration function
257  *
258  * @pre An application registers callback function using vc_mgr_set_feedback_audio_format_cb().
259  *
260  * @see vc_mgr_set_feedback_audio_format_cb()
261  * @see vc_mgr_unset_feedback_audio_format_cb()
262  */
263 typedef void (*vc_mgr_feedback_audio_format_cb)(int rate, vc_audio_channel_e channel, vc_audio_type_e audio_type, void *user_data);
264
265 /**
266  * @brief Called when engine sends audio streaming for TTS feedback
267  * @since_tizen 5.0
268  *
269  * @remarks The @a buffer must be released with free() by you when you no longer need it.
270  *
271  * @param[in] event TTS feedback event (e.g. #VC_FEEDBACK_EVENT_START, #VC_FEEDBACK_EVENT_CONTINUE)
272  * @param[in] buffer Audio streaming data
273  * @param[in] len Length of the audio streaming data
274  * @param[in] user_data The user data passed from the callback registration function
275  *
276  * @pre An application registers callback function using vc_mgr_set_feedback_streaming_cb().
277  *
278  * @see vc_mgr_set_feedback_streaming_cb()
279  * @see vc_mgr_unset_feedback_streaming_cb()
280  */
281 typedef void (*vc_mgr_feedback_streaming_cb)(vc_feedback_event_e event, char* buffer, int len, void *user_data);
282
283 /**
284  * @brief Called when the vc client sends audio streaming for TTS feedback
285  * @since_tizen 5.0
286  *
287  * @remarks The @a buffer must be released with free() by you when you no longer need it.
288  *
289  * @param[in] pid The process id of the vc client
290  * @param[in] utt_id The utterance id
291  * @param[in] event TTS feedback event (e.g. #VC_FEEDBACK_EVENT_START, #VC_FEEDBACK_EVENT_CONTINUE)
292  * @param[in] buffer Audio streaming data
293  * @param[in] len Length of the audio streaming data
294  * @param[in] user_data The user data passed from the callback registration function
295  *
296  * @pre An application registers callback function using vc_mgr_set_vc_tts_streaming_cb().
297  *
298  * @see vc_mgr_set_vc_tts_streaming_cb()
299  * @see vc_mgr_unset_vc_tts_streaming_cb()
300  */
301 typedef void (*vc_mgr_vc_tts_streaming_cb)(int pid, int utt_id, vc_feedback_event_e event, char* buffer, int len, void *user_data);
302
303 /**
304  * @platform
305  * @brief Initializes the voice control manager.
306  * @since_tizen 5.0
307  *
308  * @privlevel public
309  * @privilege %http://tizen.org/privilege/recorder
310  *
311  * @privlevel platform
312  * @privilege %http://tizen.org/privilege/voicecontrol.manager
313  *
314  * @remarks If the function succeeds, VC manager must be released with vc_mgr_deinitialize().
315  *
316  * @return 0 on success, otherwise a negative error value
317  * @retval #VC_ERROR_NONE                Successful
318  * @retval #VC_ERROR_OUT_OF_MEMORY       Out of memory
319  * @retval #VC_ERROR_OPERATION_FAILED    Operation fail
320  * @retval #VC_ERROR_PERMISSION_DENIED   Permission denied
321  * @retval #VC_ERROR_NOT_SUPPORTED       VC not supported
322  *
323  * @pre The state should be #VC_STATE_NONE.
324  * @post If this function is called, the state will be #VC_STATE_INITIALIZED.
325  *
326  * @see vc_mgr_deinitialize()
327  */
328 int vc_mgr_initialize(void);
329
330 /**
331  * @platform
332  * @brief Deinitializes the voice control manager.
333  * @since_tizen 5.0
334  *
335  * @privlevel platform
336  * @privilege %http://tizen.org/privilege/voicecontrol.manager
337  *
338  * @return 0 on success, otherwise a negative error value
339  * @retval #VC_ERROR_NONE                Successful
340  * @retval #VC_ERROR_INVALID_STATE       Invalid state
341  * @retval #VC_ERROR_PERMISSION_DENIED   Permission denied
342  * @retval #VC_ERROR_NOT_SUPPORTED       VC not supported
343  *
344  * @post If this function is called, the state will be #VC_STATE_NONE.
345  *
346  * @see vc_mgr_initialize()
347  */
348 int vc_mgr_deinitialize(void);
349
350 /**
351  * @platform
352  * @brief Connects the voice control service.
353  * @since_tizen 5.0
354  *
355  * @privlevel platform
356  * @privilege %http://tizen.org/privilege/voicecontrol.manager
357  *
358  * @return 0 on success, otherwise a negative error value
359  * @retval #VC_ERROR_NONE                Successful
360  * @retval #VC_ERROR_INVALID_STATE       Invalid state
361  * @retval #VC_ERROR_PERMISSION_DENIED   Permission denied
362  * @retval #VC_ERROR_NOT_SUPPORTED       VC not supported
363  *
364  * @pre The state should be #VC_STATE_INITIALIZED.
365  * @post If this function is called, the state will be #VC_STATE_READY.
366  *
367  * @see vc_mgr_unprepare()
368  */
369 int vc_mgr_prepare(void);
370
371 /**
372  * @platform
373  * @brief Disconnects the voice control service.
374  * @since_tizen 5.0
375  *
376  * @privlevel platform
377  * @privilege %http://tizen.org/privilege/voicecontrol.manager
378  *
379  * @return 0 on success, otherwise a negative error value
380  * @retval #VC_ERROR_NONE                Successful
381  * @retval #VC_ERROR_INVALID_STATE       Invalid state
382  * @retval #VC_ERROR_PERMISSION_DENIED   Permission denied
383  * @retval #VC_ERROR_NOT_SUPPORTED       VC not supported
384  *
385  * @pre The state should be #VC_STATE_READY.
386  * @post If this function is called, the state will be #VC_STATE_INITIALIZED.
387  *
388  * @see vc_mgr_prepare()
389  */
390 int vc_mgr_unprepare(void);
391
392 /**
393  * @platform
394  * @brief Retrieves all supported languages using callback function.
395  * @since_tizen 5.0
396  *
397  * @privlevel platform
398  * @privilege %http://tizen.org/privilege/voicecontrol.manager
399  *
400  * @param[in] callback    Callback function to invoke
401  * @param[in] user_data   The user data to be passed to the callback function
402  *
403  * @return 0 on success, otherwise a negative error value
404  * @retval #VC_ERROR_NONE                Successful
405  * @retval #VC_ERROR_INVALID_PARAMETER   Invalid parameter
406  * @retval #VC_ERROR_OPERATION_FAILED    Operation failure
407  * @retval #VC_ERROR_INVALID_STATE       Invalid state
408  * @retval #VC_ERROR_PERMISSION_DENIED   Permission denied
409  * @retval #VC_ERROR_NOT_SUPPORTED       VC not supported
410  *
411  * @pre The state should NOT be #VC_SERVICE_STATE_NONE.
412  * @post This function invokes vc_supported_language_cb() for each supported language.
413  *
414  * @see vc_supported_language_cb()
415  * @see vc_mgr_get_current_language()
416  */
417 int vc_mgr_foreach_supported_languages(vc_supported_language_cb callback, void *user_data);
418
419 /**
420  * @platform
421  * @brief Gets the current language set by user.
422  * @since_tizen 5.0
423  *
424  * @privlevel platform
425  * @privilege %http://tizen.org/privilege/voicecontrol.manager
426  *
427  * @remarks If the function succeeds, @a language must be released with free() by you when you no longer need it.
428  *
429  * @param[out] language   A language is specified as an ISO 3166 alpha-2 two letter country-code \n
430  *      followed by ISO 639-1 for the two-letter language code. \n
431  *      For example, "ko_KR" for Korean, "en_US" for American English.
432  *
433  * @return 0 on success, otherwise a negative error value
434  * @retval #VC_ERROR_NONE                Successful
435  * @retval #VC_ERROR_INVALID_PARAMETER   Invalid parameter
436  * @retval #VC_ERROR_OUT_OF_MEMORY       Out of memory
437  * @retval #VC_ERROR_OPERATION_FAILED    Operation failure
438  * @retval #VC_ERROR_INVALID_STATE       Invalid state
439  * @retval #VC_ERROR_PERMISSION_DENIED   Permission denied
440  * @retval #VC_ERROR_NOT_SUPPORTED       VC not supported
441  *
442  * @pre The state should NOT be #VC_SERVICE_STATE_NONE.
443  *
444  * @see vc_mgr_foreach_supported_languages()
445  */
446 int vc_mgr_get_current_language(char **language);
447
448 /**
449  * @platform
450  * @brief Gets the current state of voice control manager.
451  * @since_tizen 5.0
452  *
453  * @privlevel platform
454  * @privilege %http://tizen.org/privilege/voicecontrol.manager
455  *
456  * @param[out] state   The current state
457  *
458  * @return 0 on success, otherwise a negative error value
459  * @retval #VC_ERROR_NONE                Successful
460  * @retval #VC_ERROR_INVALID_PARAMETER   Invalid parameter
461  * @retval #VC_ERROR_INVALID_STATE       Invalid state
462  * @retval #VC_ERROR_PERMISSION_DENIED   Permission denied
463  * @retval #VC_ERROR_NOT_SUPPORTED       VC not supported
464  *
465  * @pre The state should NOT be #VC_SERVICE_STATE_NONE.
466  *
467  * @see vc_state_changed_cb()
468  * @see vc_set_state_changed_cb()
469  */
470 int vc_mgr_get_state(vc_state_e *state);
471
472 /**
473  * @platform
474  * @brief Gets the current state of voice control service.
475  * @since_tizen 5.0
476  *
477  * @privlevel platform
478  * @privilege %http://tizen.org/privilege/voicecontrol.manager
479  *
480  * @param[out] state   The current state
481  *
482  * @return 0 on success, otherwise a negative error value
483  * @retval #VC_ERROR_NONE                Successful
484  * @retval #VC_ERROR_INVALID_PARAMETER   Invalid parameter
485  * @retval #VC_ERROR_INVALID_STATE       Invalid state
486  * @retval #VC_ERROR_OPERATION_FAILED    Operation failure
487  * @retval #VC_ERROR_PERMISSION_DENIED   Permission denied
488  * @retval #VC_ERROR_NOT_SUPPORTED       VC not supported
489  *
490  * @pre The state should be #VC_STATE_READY.
491  *
492  * @see vc_mgr_start()
493  * @see vc_mgr_stop()
494  * @see vc_mgr_cancel()
495  * @see vc_set_service_state_changed_cb()
496  * @see vc_unset_service_state_changed_cb()
497  */
498 int vc_mgr_get_service_state(vc_service_state_e *state);
499
500 /**
501  * @platform
502  * @brief Checks whether the command format is supported.
503  * @since_tizen 5.0
504  *
505  * @privlevel platform
506  * @privilege %http://tizen.org/privilege/voicecontrol.manager
507  *
508  * @remarks The command formats are defined in @ref CAPI_UIX_VOICE_CONTROL_COMMAND_MODULE. (e.g. #VC_COMMAND_FORMAT_FIXED, #VC_COMMAND_FORMAT_FIXED_AND_NONFIXED, and so on). Please refer to @ref CAPI_UIX_VOICE_CONTROL_COMMAND_MODULE.
509  *
510  * @param[in]  format    The command format
511  * @param[out] support   The result status @c true = supported, @c false = not supported
512  *
513  * @return 0 on success, otherwise a negative error value
514  * @retval #VC_ERROR_NONE                Successful
515  * @retval #VC_ERROR_INVALID_PARAMETER   Invalid parameter
516  * @retval #VC_ERROR_INVALID_STATE       Invalid state
517  * @retval #VC_ERROR_PERMISSION_DENIED   Permission denied
518  * @retval #VC_ERROR_NOT_SUPPORTED       VC not supported
519  *
520  * @pre The state should be #VC_STATE_READY.
521  */
522 int vc_mgr_is_command_format_supported(int format, bool *support);
523
524 /**
525  * @platform
526  * @brief Sets all types of commands.
527  * @since_tizen 5.0
528  *
529  * @privlevel platform
530  * @privilege %http://tizen.org/privilege/voicecontrol.manager
531  *
532  * @remarks VC manager client can register all types of commands.
533  *      The commands should include type, command text, format.
534  *
535  * @param[in] vc_cmd_list   The command list handle
536  *
537  * @return 0 on success, otherwise a negative error value
538  * @retval #VC_ERROR_NONE                Successful
539  * @retval #VC_ERROR_INVALID_PARAMETER   Invalid parameter
540  * @retval #VC_ERROR_INVALID_STATE       Invalid state
541  * @retval #VC_ERROR_PERMISSION_DENIED   Permission denied
542  * @retval #VC_ERROR_NOT_SUPPORTED       VC not supported
543  *
544  * @pre The state should be #VC_STATE_READY.
545  *
546  * @see vc_mgr_unset_command_list()
547  */
548 int vc_mgr_set_command_list(vc_cmd_list_h vc_cmd_list);
549
550 /**
551  * @platform
552  * @brief Unsets all types of commands.
553  * @since_tizen 5.0
554  *
555  * @privlevel platform
556  * @privilege %http://tizen.org/privilege/voicecontrol.manager
557  *
558  * @remarks All previously registered commands will be unset.
559  *
560  * @return 0 on success, otherwise a negative error value
561  * @retval #VC_ERROR_NONE                Successful
562  * @retval #VC_ERROR_INVALID_STATE       Invalid state
563  * @retval #VC_ERROR_PERMISSION_DENIED   Permission denied
564  * @retval #VC_ERROR_NOT_SUPPORTED       VC not supported
565  *
566  * @pre The state should be #VC_STATE_READY.
567  *
568  * @see vc_mgr_set_command_list()
569  */
570 int vc_mgr_unset_command_list(void);
571
572 /**
573  * @platform
574  * @brief Sets commands from file.
575  * @since_tizen 5.0
576  *
577  * @privlevel platform
578  * @privilege %http://tizen.org/privilege/voicecontrol.manager
579  *
580  * @remarks The commands should include type, command text, format.
581  *
582  * @param[in] file_path   The directory of a file which has command list
583  * @param[in] type          The command type (e.g. #VC_COMMAND_TYPE_FOREGROUND, #VC_COMMAND_TYPE_BACKGROUND, #VC_COMMAND_TYPE_WIDGET, #VC_COMMAND_TYPE_SYSTEM, #VC_COMMAND_TYPE_SYSTEM_BACKGROUND, #VC_COMMAND_TYPE_EXCLUSIVE)
584  *
585  * @return 0 on success, otherwise a negative error value
586  * @retval #VC_ERROR_NONE                Successful
587  * @retval #VC_ERROR_INVALID_PARAMETER   Invalid parameter
588  * @retval #VC_ERROR_INVALID_STATE       Invalid state
589  * @retval #VC_ERROR_OPERATION_FAILED    Operation failure
590  * @retval #VC_ERROR_PERMISSION_DENIED   Permission denied
591  * @retval #VC_ERROR_NOT_SUPPORTED       VC not supported
592  *
593  * @pre The state should be #VC_STATE_READY.
594  *
595  * @see vc_mgr_unset_command_list()
596  */
597 int vc_mgr_set_command_list_from_file(const char *file_path, int type);
598
599 /**
600  * @platform
601  * @brief Sets background commands of preloaded app from file.
602  * @since_tizen 5.0
603  *
604  * @privlevel platform
605  * @privilege %http://tizen.org/privilege/voicecontrol.manager
606  *
607  * @remarks The command type is valid for #VC_COMMAND_TYPE_BACKGROUND.
608  *      The commands should include type, command text, format.
609  *
610  * @param[in] file_path   The directory of a file which has command list
611  *
612  * @return 0 on success, otherwise a negative error value
613  * @retval #VC_ERROR_NONE                Successful
614  * @retval #VC_ERROR_INVALID_PARAMETER   Invalid parameter
615  * @retval #VC_ERROR_INVALID_STATE       Invalid state
616  * @retval #VC_ERROR_OPERATION_FAILED    Operation failure
617  * @retval #VC_ERROR_PERMISSION_DENIED   Permission denied
618  * @retval #VC_ERROR_NOT_SUPPORTED       VC not supported
619  *
620  * @pre The state should be #VC_STATE_READY.
621  *
622  * @see vc_mgr_unset_command_list()
623  */
624 int vc_mgr_set_preloaded_commands_from_file(const char *file_path);
625
626 /**
627  * @platform
628  * @brief Retrieves all available commands.
629  * @since_tizen 5.0
630  *
631  * @privlevel platform
632  * @privilege %http://tizen.org/privilege/voicecontrol.manager
633  *
634  * @remarks If the function succeeds, @a vc_cmd_list must be released with vc_cmd_list_destroy(vc_cmd_list, true).
635  *
636  * @param[in] vc_cmd_list   The command list
637  *
638  * @return 0 on success, otherwise a negative error value
639  * @retval #VC_ERROR_NONE                Successful
640  * @retval #VC_ERROR_INVALID_PARAMETER   Invalid parameter
641  * @retval #VC_ERROR_INVALID_STATE       Invalid state
642  * @retval #VC_ERROR_OPERATION_FAILED    Operation failure
643  * @retval #VC_ERROR_PERMISSION_DENIED   Permission denied
644  * @retval #VC_ERROR_NOT_SUPPORTED       VC not supported
645  *
646  * @pre The state should be #VC_STATE_READY and the service state should be #VC_SERVICE_STATE_READY.
647  */
648 int vc_mgr_get_current_commands(vc_cmd_list_h *vc_cmd_list);
649
650 /**
651  * @platform
652  * @brief Sets a type of audio-in.
653  * @since_tizen 5.0
654  *
655  * @privlevel platform
656  * @privilege %http://tizen.org/privilege/voicecontrol.manager
657  *
658  * @param[in] audio_id   The audio type (e.g. #VC_AUDIO_TYPE_BLUETOOTH or USB device ID)
659  *
660  * @return 0 on success, otherwise a negative error value
661  * @retval #VC_ERROR_NONE                Successful
662  * @retval #VC_ERROR_INVALID_PARAMETER   Invalid parameter
663  * @retval #VC_ERROR_INVALID_STATE       Invalid state
664  * @retval #VC_ERROR_OPERATION_FAILED    Operation failure
665  * @retval #VC_ERROR_PERMISSION_DENIED   Permission denied
666  * @retval #VC_ERROR_NOT_SUPPORTED       VC not supported
667  *
668  * @pre The state should be #VC_STATE_READY and the service state should be #VC_SERVICE_STATE_READY.
669  *
670  * @see vc_mgr_get_audio_type()
671  */
672 int vc_mgr_set_audio_type(const char *audio_id);
673
674 /**
675  * @platform
676  * @brief Gets a type of audio-in.
677  * @since_tizen 5.0
678  *
679  * @privlevel platform
680  * @privilege %http://tizen.org/privilege/voicecontrol.manager
681  *
682  * @remarks audio_id must be released using free() when it is no longer required.
683  *
684  * @param[out] audio_id   The audio id (e.g. #VC_AUDIO_TYPE_BLUETOOTH or USB device ID)
685  *
686  * @return 0 on success, otherwise a negative error value
687  * @retval #VC_ERROR_NONE                Successful
688  * @retval #VC_ERROR_INVALID_PARAMETER   Invalid parameter
689  * @retval #VC_ERROR_INVALID_STATE       Invalid state
690  * @retval #VC_ERROR_PERMISSION_DENIED   Permission denied
691  * @retval #VC_ERROR_NOT_SUPPORTED       VC not supported
692  *
693  * @pre The state should be #VC_STATE_READY and the service state should be #VC_SERVICE_STATE_READY.
694  *
695  * @see vc_mgr_set_audio_type()
696  */
697 int vc_mgr_get_audio_type(char **audio_id);
698
699 /**
700  * @platform
701  * @brief Sets recognition mode.
702  * @since_tizen 5.0
703  *
704  * @privlevel platform
705  * @privilege %http://tizen.org/privilege/voicecontrol.manager
706  *
707  * @param[in] mode   Recognition mode (e.g. #VC_RECOGNITION_MODE_STOP_BY_SILENCE is default value)
708  *
709  * @return 0 on success, otherwise a negative error value
710  * @retval #VC_ERROR_NONE                Successful
711  * @retval #VC_ERROR_INVALID_PARAMETER   Invalid parameter
712  * @retval #VC_ERROR_INVALID_STATE       Invalid state
713  * @retval #VC_ERROR_PERMISSION_DENIED   Permission denied
714  * @retval #VC_ERROR_NOT_SUPPORTED       VC not supported
715  *
716  * @pre The state should be #VC_STATE_READY and the service state should be #VC_SERVICE_STATE_READY.
717  *
718  * @see vc_mgr_set_recognition_mode()
719  */
720 int vc_mgr_set_recognition_mode(vc_recognition_mode_e mode);
721
722 /**
723  * @platform
724  * @brief Gets recognition mode.
725  * @since_tizen 5.0
726  *
727  * @privlevel platform
728  * @privilege %http://tizen.org/privilege/voicecontrol.manager
729  *
730  * @param[out] mode   Recognition mode
731  *
732  * @return 0 on success, otherwise a negative error value
733  * @retval #VC_ERROR_NONE                Successful
734  * @retval #VC_ERROR_INVALID_PARAMETER   Invalid parameter
735  * @retval #VC_ERROR_INVALID_STATE       Invalid state
736  * @retval #VC_ERROR_PERMISSION_DENIED   Permission denied
737  * @retval #VC_ERROR_NOT_SUPPORTED       VC not supported
738  *
739  * @pre The state should be #VC_STATE_READY.
740  *
741  * @see vc_mgr_get_recognition_mode()
742  */
743 int vc_mgr_get_recognition_mode(vc_recognition_mode_e *mode);
744
745 /**
746  * @platform
747  * @brief Sets private data to VC engine.
748  * @since_tizen 5.0
749  *
750  * @privlevel platform
751  * @privilege %http://tizen.org/privilege/voicecontrol.manager
752  *
753  * @remarks VC manager client can set private data to VC engine using this function.
754  *
755  * @param[in] key    Private key
756  * @param[in] data   Private data
757  *
758  * @return 0 on success, otherwise a negative error value
759  * @retval #VC_ERROR_NONE                Successful
760  * @retval #VC_ERROR_OUT_OF_MEMORY       Not enough memory
761  * @retval #VC_ERROR_INVALID_PARAMETER   Invalid parameter
762  * @retval #VC_ERROR_INVALID_STATE       Invalid state
763  * @retval #VC_ERROR_PERMISSION_DENIED   Permission denied
764  * @retval #VC_ERROR_NOT_SUPPORTED       VC not supported
765  *
766  * @pre The service state should be #VC_SERVICE_STATE_READY.
767  */
768 int vc_mgr_set_private_data(const char *key, const char *data);
769
770 /**
771  * @platform
772  * @brief Gets private data from VC engine.
773  * @since_tizen 5.0
774  *
775  * @privlevel platform
776  * @privilege %http://tizen.org/privilege/voicecontrol.manager
777  *
778  * @remarks VC manager client can get private data from VC engine using this function.
779  *      @a data must be released using free() when it is no longer required.
780  *
781  * @param[in]  key    Private key
782  * @param[out] data   Private data
783  *
784  * @return 0 on success, otherwise a negative error value
785  * @retval #VC_ERROR_NONE                Successful
786  * @retval #VC_ERROR_OUT_OF_MEMORY       Not enough memory
787  * @retval #VC_ERROR_INVALID_PARAMETER   Invalid parameter
788  * @retval #VC_ERROR_INVALID_STATE       Invalid state
789  * @retval #VC_ERROR_PERMISSION_DENIED   Permission denied
790  * @retval #VC_ERROR_NOT_SUPPORTED       VC not supported
791  *
792  * @pre The service state should be #VC_SERVICE_STATE_READY.
793  */
794 int vc_mgr_get_private_data(const char *key, char **data);
795
796 /**
797  * @platform
798  * @brief Requests to do action as if utterance is spoken.
799  * @since_tizen 5.0
800  *
801  * @privlevel platform
802  * @privilege %http://tizen.org/privilege/voicecontrol.manager
803  *
804  * @param[in] type         Event type
805  * @param[in] send_event   The string for send event
806  *
807  * @return 0 on success, otherwise a negative error value
808  * @retval #VC_ERROR_NONE                Successful
809  * @retval #VC_ERROR_OUT_OF_MEMORY       Not enough memory
810  * @retval #VC_ERROR_INVALID_STATE       Invalid state
811  * @retval #VC_ERROR_INVALID_PARAMETER   Invalid parameter
812  * @retval #VC_ERROR_PERMISSION_DENIED   Permission denied
813  * @retval #VC_ERROR_NOT_SUPPORTED       VC not supported
814  *
815  * @pre The service state should be #VC_SERVICE_STATE_READY.
816  */
817 int vc_mgr_do_action(vc_send_event_type_e type, char *send_event);
818
819 /**
820 * @platform
821 * @brief Sends the specific engine request to the vc-service.
822 * @since_tizen 5.0
823 *
824 * @privlevel platform
825 * @privilege %http://tizen.org/privilege/voicecontrol.manager
826 *
827 * @param[in] engine_app_id A specific engine's app id
828 * @param[in] event A engine service user request event
829 * @param[in] request A engine service user request text
830 *
831 * @return 0 on success, otherwise a negative error value
832 * @retval #VC_ERROR_NONE Successful
833 * @retval #VC_ERROR_OUT_OF_MEMORY Not enough memory
834 * @retval #VC_ERROR_INVALID_STATE Invalid state
835 * @retval #VC_ERROR_INVALID_PARAMETER Invalid parameter
836 * @retval #VC_ERROR_OPERATION_FAILED Operation failure
837 * @retval #VC_ERROR_PERMISSION_DENIED Permission denied
838 * @retval #VC_ERROR_NOT_SUPPORTED       VC not supported
839 */
840 int vc_mgr_send_specific_engine_request(const char* engine_app_id, const char* event, const char* request);
841
842 /**
843  * @platform
844  * @brief Starts recognition.
845  * @since_tizen 5.0
846  *
847  * @privlevel platform
848  * @privilege %http://tizen.org/privilege/voicecontrol.manager
849  *
850  * @remarks The default recognition mode is #VC_RECOGNITION_MODE_STOP_BY_SILENCE. \n
851  *      If you want to use other mode, you can set mode with vc_mgr_set_recognition_mode().
852  *
853  * @param[in] exclusive_command_option   Exclusive command option
854  *
855  * @return 0 on success, otherwise a negative error value
856  * @retval #VC_ERROR_NONE                       Successful
857  * @retval #VC_ERROR_INVALID_PARAMETER          Invalid parameter.
858  * @retval #VC_ERROR_INVALID_STATE              Invalid state
859  * @retval #VC_ERROR_OPERATION_FAILED           Operation failure
860  * @retval #VC_ERROR_IN_PROGRESS_TO_RECORDING   In progress to recording
861  * @retval #VC_ERROR_PERMISSION_DENIED          Permission denied
862  * @retval #VC_ERROR_NOT_SUPPORTED              VC not supported
863  *
864  * @pre The state should be #VC_STATE_READY and the service state should be #VC_SERVICE_STATE_READY.
865  * @post It will invoke vc_service_state_changed_cb(), if you register a callback with vc_service_state_changed_cb(). \n
866  *      If this function succeeds, the service state will be #VC_SERVICE_STATE_RECORDING.
867  *
868  * @see vc_mgr_stop()
869  * @see vc_mgr_cancel()
870  * @see vc_service_state_changed_cb()
871  * @see vc_mgr_set_recognition_mode()
872  * @see vc_mgr_get_recognition_mode()
873  */
874 int vc_mgr_start(bool exclusive_command_option);
875
876 /**
877  * @platform
878  * @brief Stops recognition.
879  * @since_tizen 5.0
880  *
881  * @privlevel platform
882  * @privilege %http://tizen.org/privilege/voicecontrol.manager
883  *
884  * @return 0 on success, otherwise a negative error value
885  * @retval #VC_ERROR_NONE                        Successful
886  * @retval #VC_ERROR_INVALID_STATE               Invalid state
887  * @retval #VC_ERROR_OPERATION_FAILED            Operation failure
888  * @retval #VC_ERROR_IN_PROGRESS_TO_READY        In progress to ready
889  * @retval #VC_ERROR_IN_PROGRESS_TO_RECORDING    In progress to recording
890  * @retval #VC_ERROR_IN_PROGRESS_TO_PROCESSING   In progress to processing
891  * @retval #VC_ERROR_PERMISSION_DENIED           Permission denied
892  * @retval #VC_ERROR_NOT_SUPPORTED               VC not supported
893  *
894  * @pre The service state should be #VC_SERVICE_STATE_RECORDING.
895  * @post It will invoke vc_service_state_changed_cb(), if you register a callback with vc_service_state_changed_cb(). \n
896  *      If this function succeeds, the service state will be #VC_SERVICE_STATE_PROCESSING.
897  *
898  * @see vc_mgr_start()
899  * @see vc_mgr_cancel()
900  * @see vc_service_state_changed_cb()
901  * @see vc_mgr_result_cb()
902  */
903 int vc_mgr_stop(void);
904
905 /**
906  * @platform
907  * @brief Cancels recognition.
908  * @since_tizen 5.0
909  *
910  * @privlevel platform
911  * @privilege %http://tizen.org/privilege/voicecontrol.manager
912  *
913  * @return 0 on success, otherwise a negative error value
914  * @retval #VC_ERROR_NONE                        Successful
915  * @retval #VC_ERROR_OUT_OF_MEMORY               Not enough memory
916  * @retval #VC_ERROR_INVALID_STATE               Invalid state
917  * @retval #VC_ERROR_OPERATION_FAILED            Operation failure
918  * @retval #VC_ERROR_IN_PROGRESS_TO_READY        In progress to ready
919  * @retval #VC_ERROR_IN_PROGRESS_TO_RECORDING    In progress to recording
920  * @retval #VC_ERROR_IN_PROGRESS_TO_PROCESSING   In progress to processing
921  * @retval #VC_ERROR_PERMISSION_DENIED           Permission denied
922  * @retval #VC_ERROR_NOT_SUPPORTED               VC not supported
923  *
924  * @pre The service state should be #VC_SERVICE_STATE_RECORDING or #VC_SERVICE_STATE_PROCESSING.
925  * @post It will invoke vc_service_state_changed_cb(), if you register a callback with vc_service_state_changed_cb(). \n
926  *      If this function succeeds, the service state will be #VC_SERVICE_STATE_READY.
927  *
928  * @see vc_mgr_start()
929  * @see vc_mgr_stop()
930  * @see vc_service_state_changed_cb()
931  */
932 int vc_mgr_cancel(void);
933
934 /**
935  * @platform
936  * @brief Gets the microphone volume during recording.
937  * @since_tizen 5.0
938  *
939  * @privlevel platform
940  * @privilege %http://tizen.org/privilege/voicecontrol.manager
941  *
942  * @param[out] volume   Recording volume
943  *
944  * @return 0 on success, otherwise a negative error value
945  * @retval #VC_ERROR_NONE                Successful
946  * @retval #VC_ERROR_INVALID_PARAMETER   Invalid parameter
947  * @retval #VC_ERROR_INVALID_STATE       Invalid state
948  * @retval #VC_ERROR_PERMISSION_DENIED   Permission denied
949  * @retval #VC_ERROR_NOT_SUPPORTED       VC not supported
950  *
951  * @pre The service state should be #VC_SERVICE_STATE_RECORDING.
952  *
953  * @see vc_mgr_start()
954  */
955 int vc_mgr_get_recording_volume(float *volume);
956
957 /**
958  * @platform
959  * @brief Selects valid results from all results.
960  * @since_tizen 5.0
961  *
962  * @privlevel platform
963  * @privilege %http://tizen.org/privilege/voicecontrol.manager
964  *
965  * @remarks This function should be called in vc_mgr_all_result_cb().
966  *      The @a vc_cmd_list can be NULL, in that case the function does nothing.
967  * @param[in] vc_cmd_list   The valid result list
968  *
969  * @return 0 on success, otherwise a negative error value
970  * @retval #VC_ERROR_NONE                Successful
971  * @retval #VC_ERROR_INVALID_STATE       Invalid state
972  * @retval #VC_ERROR_PERMISSION_DENIED   Permission denied
973  * @retval #VC_ERROR_NOT_SUPPORTED       VC not supported
974  *
975  * @pre vc_mgr_all_result_cb() should be called
976  *
977  * @see vc_mgr_all_result_cb()
978  */
979 int vc_mgr_set_selected_results(vc_cmd_list_h vc_cmd_list);
980
981
982 /**
983  * @platform
984  * @brief Sets a callback function for getting recognition result.
985  * @since_tizen 5.0
986  *
987  * @privlevel platform
988  * @privilege %http://tizen.org/privilege/voicecontrol.manager
989  *
990  * @param[in] callback    Callback function to register
991  * @param[in] user_data   The user data to be passed to the callback function
992  *
993  * @return 0 on success, otherwise a negative error value
994  * @retval #VC_ERROR_NONE                Successful
995  * @retval #VC_ERROR_INVALID_PARAMETER   Invalid parameter
996  * @retval #VC_ERROR_INVALID_STATE       Invalid state
997  * @retval #VC_ERROR_PERMISSION_DENIED   Permission denied
998  * @retval #VC_ERROR_NOT_SUPPORTED       VC not supported
999  *
1000  * @pre The state should be #VC_STATE_INITIALIZED.
1001  *
1002  * @see vc_mgr_all_result_cb()
1003  * @see vc_mgr_unset_all_result_cb()
1004  */
1005 int vc_mgr_set_all_result_cb(vc_mgr_all_result_cb callback, void *user_data);
1006
1007 /**
1008  * @platform
1009  * @brief Unsets the recognition result callback function.
1010  * @since_tizen 5.0
1011  *
1012  * @privlevel platform
1013  * @privilege %http://tizen.org/privilege/voicecontrol.manager
1014  *
1015  * @return 0 on success, otherwise a negative error value
1016  * @retval #VC_ERROR_NONE                Successful
1017  * @retval #VC_ERROR_INVALID_STATE       Invalid state
1018  * @retval #VC_ERROR_PERMISSION_DENIED   Permission denied
1019  * @retval #VC_ERROR_NOT_SUPPORTED       VC not supported
1020  *
1021  * @pre The state should be #VC_STATE_INITIALIZED.
1022  *
1023  * @see vc_mgr_set_all_result_cb()
1024  */
1025 int vc_mgr_unset_all_result_cb(void);
1026
1027 /**
1028  * @platform
1029  * @brief Sets a callback function for getting pre recognition result.
1030  * @since_tizen 5.0
1031  *
1032  * @privlevel platform
1033  * @privilege %http://tizen.org/privilege/voicecontrol.manager
1034  *
1035  * @param[in] callback    Callback function to register
1036  * @param[in] user_data   The user data to be passed to the callback function
1037  *
1038  * @return 0 on success, otherwise a negative error value
1039  * @retval #VC_ERROR_NONE                Successful
1040  * @retval #VC_ERROR_INVALID_PARAMETER   Invalid parameter
1041  * @retval #VC_ERROR_INVALID_STATE       Invalid state
1042  * @retval #VC_ERROR_PERMISSION_DENIED   Permission denied
1043  * @retval #VC_ERROR_NOT_SUPPORTED       VC not supported
1044  *
1045  * @pre The state should be #VC_STATE_INITIALIZED.
1046  *
1047  * @see vc_mgr_pre_result_cb()
1048  * @see vc_mgr_unset_pre_result_cb()
1049  */
1050 int vc_mgr_set_pre_result_cb(vc_mgr_pre_result_cb callback, void *user_data);
1051
1052 /**
1053  * @platform
1054  * @brief Unsets the pre recognition result callback function.
1055  * @since_tizen 5.0
1056  *
1057  * @privlevel platform
1058  * @privilege %http://tizen.org/privilege/voicecontrol.manager
1059  *
1060  * @return 0 on success, otherwise a negative error value
1061  * @retval #VC_ERROR_NONE                Successful
1062  * @retval #VC_ERROR_INVALID_STATE       Invalid state
1063  * @retval #VC_ERROR_PERMISSION_DENIED   Permission denied
1064  * @retval #VC_ERROR_NOT_SUPPORTED       VC not supported
1065  *
1066  * @pre The state should be #VC_STATE_INITIALIZED.
1067  *
1068  * @see vc_mgr_set_pre_result_cb()
1069  */
1070 int vc_mgr_unset_pre_result_cb(void);
1071
1072 /**
1073 * @brief Registers a callback function for getting specific engine result.
1074 * @since_tizen 5.0
1075 *
1076 * @param[in] callback Callback function to register
1077 * @param[in] user_data The user data to be passed to the callback function
1078 *
1079 * @return 0 on success, otherwise a negative error value
1080 * @retval #VC_ERROR_NONE Successful
1081 * @retval #VC_ERROR_INVALID_PARAMETER Invalid parameter
1082 * @retval #VC_ERROR_INVALID_STATE Invalid state
1083 * @retval #VC_ERROR_PERMISSION_DENIED Permission denied
1084 * @retval #VC_ERROR_NOT_SUPPORTED Not supported
1085 *
1086 * @pre The state should be #VC_STATE_INITIALIZED.
1087 *
1088 * @see vc_mgr_unset_specific_engine_result_cb()
1089 */
1090 int vc_mgr_set_specific_engine_result_cb(vc_mgr_specific_engine_result_cb callback, void* user_data);
1091
1092 /**
1093 * @brief Unregisters the specific engine result callback function.
1094 * @since_tizen 5.0
1095 *
1096 * @return 0 on success, otherwise a negative error value
1097 * @retval #VC_ERROR_NONE Successful
1098 * @retval #VC_ERROR_INVALID_STATE Invalid state
1099 * @retval #VC_ERROR_PERMISSION_DENIED Permission denied
1100 * @retval #VC_ERROR_NOT_SUPPORTED Not supported
1101 *
1102 * @pre The state should be #VC_STATE_INITIALIZED.
1103 *
1104 * @see vc_mgr_set_specific_engine_result_cb()
1105 */
1106 int vc_mgr_unset_specific_engine_result_cb(void);
1107
1108 /**
1109  * @platform
1110  * @brief Sets a callback function for getting all types of recognition results.
1111  * @since_tizen 5.0
1112  *
1113  * @privlevel platform
1114  * @privilege %http://tizen.org/privilege/voicecontrol.manager
1115  *
1116  * @param[in] callback    Callback function to register
1117  * @param[in] user_data   The user data to be passed to the callback function
1118  *
1119  * @return 0 on success, otherwise a negative error value
1120  * @retval #VC_ERROR_NONE                Successful
1121  * @retval #VC_ERROR_INVALID_PARAMETER   Invalid parameter
1122  * @retval #VC_ERROR_INVALID_STATE       Invalid state
1123  * @retval #VC_ERROR_PERMISSION_DENIED   Permission denied
1124  * @retval #VC_ERROR_NOT_SUPPORTED       VC not supported
1125  *
1126  * @pre The state should be #VC_STATE_INITIALIZED.
1127  *
1128  * @see vc_result_cb()
1129  * @see vc_mgr_unset_result_cb()
1130  */
1131 int vc_mgr_set_result_cb(vc_result_cb callback, void *user_data);
1132
1133 /**
1134  * @platform
1135  * @brief Unsets the callback function for getting all types of recognition results.
1136  * @since_tizen 5.0
1137  *
1138  * @privlevel platform
1139  * @privilege %http://tizen.org/privilege/voicecontrol.manager
1140  *
1141  * @return 0 on success, otherwise a negative error value
1142  * @retval #VC_ERROR_NONE                Successful
1143  * @retval #VC_ERROR_INVALID_STATE       Invalid state
1144  * @retval #VC_ERROR_PERMISSION_DENIED   Permission denied
1145  * @retval #VC_ERROR_NOT_SUPPORTED       VC not supported
1146  *
1147  * @pre The state should be #VC_STATE_INITIALIZED.
1148  *
1149  * @see vc_mgr_set_result_cb()
1150  */
1151 int vc_mgr_unset_result_cb(void);
1152
1153 /**
1154  * @platform
1155  * @brief Sets a callback function to be called when state is changed.
1156  * @since_tizen 5.0
1157  *
1158  * @privlevel platform
1159  * @privilege %http://tizen.org/privilege/voicecontrol.manager
1160  *
1161  * @param[in] callback    Callback function to register
1162  * @param[in] user_data   The user data to be passed to the callback function
1163  *
1164  * @return 0 on success, otherwise a negative error value
1165  * @retval #VC_ERROR_NONE                Successful
1166  * @retval #VC_ERROR_INVALID_PARAMETER   Invalid parameter
1167  * @retval #VC_ERROR_INVALID_STATE       Invalid state
1168  * @retval #VC_ERROR_PERMISSION_DENIED   Permission denied
1169  * @retval #VC_ERROR_NOT_SUPPORTED       VC not supported
1170  *
1171  * @pre The state should be #VC_STATE_INITIALIZED.
1172  *
1173  * @see vc_state_changed_cb()
1174  * @see vc_mgr_unset_state_changed_cb()
1175  */
1176 int vc_mgr_set_state_changed_cb(vc_state_changed_cb callback, void *user_data);
1177
1178 /**
1179  * @platform
1180  * @brief Unsets the state changed callback function.
1181  * @since_tizen 5.0
1182  *
1183  * @privlevel platform
1184  * @privilege %http://tizen.org/privilege/voicecontrol.manager
1185  *
1186  * @return 0 on success, otherwise a negative error value
1187  * @retval #VC_ERROR_NONE                Successful
1188  * @retval #VC_ERROR_INVALID_STATE       Invalid state
1189  * @retval #VC_ERROR_PERMISSION_DENIED   Permission denied
1190  * @retval #VC_ERROR_NOT_SUPPORTED       VC not supported
1191  *
1192  * @pre The state should be #VC_STATE_INITIALIZED.
1193  *
1194  * @see vc_mgr_set_state_changed_cb()
1195  */
1196 int vc_mgr_unset_state_changed_cb(void);
1197
1198 /**
1199  * @platform
1200  * @brief Sets a callback function to be called when service state is changed.
1201  * @since_tizen 5.0
1202  *
1203  * @privlevel platform
1204  * @privilege %http://tizen.org/privilege/voicecontrol.manager
1205  *
1206  * @param[in] callback    Callback function to register
1207  * @param[in] user_data   The user data to be passed to the callback function
1208  *
1209  * @return 0 on success, otherwise a negative error value
1210  * @retval #VC_ERROR_NONE                Successful
1211  * @retval #VC_ERROR_INVALID_PARAMETER   Invalid parameter
1212  * @retval #VC_ERROR_INVALID_STATE       Invalid state
1213  * @retval #VC_ERROR_PERMISSION_DENIED   Permission denied
1214  * @retval #VC_ERROR_NOT_SUPPORTED       VC not supported
1215  *
1216  * @pre The state should be #VC_STATE_INITIALIZED.
1217  *
1218  * @see vc_service_state_changed_cb()
1219  * @see vc_mgr_unset_service_state_changed_cb()
1220  */
1221 int vc_mgr_set_service_state_changed_cb(vc_service_state_changed_cb callback, void *user_data);
1222
1223 /**
1224  * @platform
1225  * @brief Unsets the service state changed callback function.
1226  * @since_tizen 5.0
1227  *
1228  * @privlevel platform
1229  * @privilege %http://tizen.org/privilege/voicecontrol.manager
1230  *
1231  * @return 0 on success, otherwise a negative error value
1232  * @retval #VC_ERROR_NONE                Successful
1233  * @retval #VC_ERROR_INVALID_STATE       Invalid state
1234  * @retval #VC_ERROR_PERMISSION_DENIED   Permission denied
1235  * @retval #VC_ERROR_NOT_SUPPORTED       VC not supported
1236  *
1237  * @pre The state should be #VC_STATE_INITIALIZED.
1238  *
1239  * @see vc_mgr_set_service_state_changed_cb()
1240  */
1241 int vc_mgr_unset_service_state_changed_cb(void);
1242
1243 /**
1244  * @platform
1245  * @brief Sets a callback function to be called when begin of speech is detected.
1246  * @since_tizen 5.0
1247  *
1248  * @privlevel platform
1249  * @privilege %http://tizen.org/privilege/voicecontrol.manager
1250  *
1251  * @param[in] callback    Callback function to register
1252  * @param[in] user_data   The user data to be passed to the callback function
1253  *
1254  * @return 0 on success, otherwise a negative error value
1255  * @retval #VC_ERROR_NONE                Successful
1256  * @retval #VC_ERROR_INVALID_PARAMETER   Invalid parameter
1257  * @retval #VC_ERROR_INVALID_STATE       Invalid state
1258  * @retval #VC_ERROR_PERMISSION_DENIED   Permission denied
1259  * @retval #VC_ERROR_NOT_SUPPORTED       VC not supported
1260  *
1261  * @pre The state should be #VC_STATE_INITIALIZED.
1262  *
1263  * @see vc_mgr_begin_speech_detected_cb()
1264  * @see vc_mgr_unset_speech_detected_cb()
1265  */
1266 int vc_mgr_set_speech_detected_cb(vc_mgr_begin_speech_detected_cb callback, void *user_data);
1267
1268 /**
1269  * @platform
1270  * @brief Unsets the speech detected callback function.
1271  * @since_tizen 5.0
1272  *
1273  * @privlevel platform
1274  * @privilege %http://tizen.org/privilege/voicecontrol.manager
1275  *
1276  * @return 0 on success, otherwise a negative error value
1277  * @retval #VC_ERROR_NONE                Successful
1278  * @retval #VC_ERROR_INVALID_STATE       Invalid state
1279  * @retval #VC_ERROR_PERMISSION_DENIED   Permission denied
1280  * @retval #VC_ERROR_NOT_SUPPORTED       VC not supported
1281  *
1282  * @pre The state should be #VC_STATE_INITIALIZED.
1283  *
1284  * @see vc_mgr_set_speech_detected_cb()
1285  */
1286 int vc_mgr_unset_speech_detected_cb(void);
1287
1288 /**
1289  * @platform
1290  * @brief Sets a callback function to be called when current language is changed.
1291  * @since_tizen 5.0
1292  *
1293  * @privlevel platform
1294  * @privilege %http://tizen.org/privilege/voicecontrol.manager
1295  *
1296  * @param[in] callback    Callback function to register
1297  * @param[in] user_data   The user data to be passed to the callback function
1298  *
1299  * @return 0 on success, otherwise a negative error value
1300  * @retval #VC_ERROR_NONE                Successful
1301  * @retval #VC_ERROR_INVALID_PARAMETER   Invalid parameter
1302  * @retval #VC_ERROR_INVALID_STATE       Invalid state
1303  * @retval #VC_ERROR_PERMISSION_DENIED   Permission denied
1304  * @retval #VC_ERROR_NOT_SUPPORTED       VC not supported
1305  *
1306  * @pre The state should be #VC_STATE_INITIALIZED.
1307  *
1308  * @see vc_current_language_changed_cb()
1309  * @see vc_mgr_unset_current_language_changed_cb()
1310  */
1311 int vc_mgr_set_current_language_changed_cb(vc_current_language_changed_cb callback, void *user_data);
1312
1313 /**
1314  * @platform
1315  * @brief Unsets the current language changed callback function.
1316  * @since_tizen 5.0
1317  *
1318  * @privlevel platform
1319  * @privilege %http://tizen.org/privilege/voicecontrol.manager
1320  *
1321  * @return 0 on success, otherwise a negative error value
1322  * @retval #VC_ERROR_NONE                Successful
1323  * @retval #VC_ERROR_INVALID_STATE       Invalid state
1324  * @retval #VC_ERROR_PERMISSION_DENIED   Permission denied
1325  * @retval #VC_ERROR_NOT_SUPPORTED       VC not supported
1326  *
1327  * @pre The state should be #VC_STATE_INITIALIZED.
1328  *
1329  * @see vc_mgr_set_current_language_changed_cb()
1330  */
1331 int vc_mgr_unset_current_language_changed_cb(void);
1332
1333 /**
1334  * @platform
1335  * @brief Gets the current error message.
1336  * @since_tizen 5.0
1337  *
1338  * @privlevel platform
1339  * @privilege %http://tizen.org/privilege/voicecontrol.manager
1340  *
1341  * @remarks This function should be called during as vc error callback. If not, the error as operation failure will be returned. \n
1342  *      If the function succeeds, @a err_msg must be released using free() when it is no longer required.
1343  *
1344  * @param[out] err_msg   The current error message
1345  *
1346  * @return 0 on success, otherwise a negative error value
1347  * @retval #VC_ERROR_NONE                Successful
1348  * @retval #VC_ERROR_INVALID_PARAMETER   Invalid parameter
1349  * @retval #VC_ERROR_INVALID_STATE       Invalid state
1350  * @retval $VC_ERROR_OPERATION_FAILED    Operation failure
1351  * @retval #VC_ERROR_OUT_OF_MEMORY       Out of memory
1352  * @retval #VC_ERROR_PERMISSION_DENIED   Permission denied
1353  * @retval #VC_ERROR_NOT_SUPPORTED       VC not supported
1354  *
1355  * @see vc_error_cb()
1356  */
1357 int vc_mgr_get_error_message(char **err_msg);
1358
1359 /**
1360  * @platform
1361  * @brief Sets a callback function to be called when an error occurred.
1362  * @since_tizen 5.0
1363  *
1364  * @privlevel platform
1365  * @privilege %http://tizen.org/privilege/voicecontrol.manager
1366  *
1367  * @param[in] callback    Callback function to register
1368  * @param[in] user_data   The user data to be passed to the callback function
1369  *
1370  * @return 0 on success, otherwise a negative error value
1371  * @retval #VC_ERROR_NONE                Successful
1372  * @retval #VC_ERROR_INVALID_PARAMETER   Invalid parameter
1373  * @retval #VC_ERROR_INVALID_STATE       Invalid state
1374  * @retval #VC_ERROR_PERMISSION_DENIED   Permission denied
1375  * @retval #VC_ERROR_NOT_SUPPORTED       VC not supported
1376  *
1377  * @pre The state should be #VC_STATE_INITIALIZED.
1378  *
1379  * @see vc_error_cb()
1380  * @see vc_mgr_unset_error_cb()
1381  */
1382 int vc_mgr_set_error_cb(vc_error_cb callback, void *user_data);
1383
1384 /**
1385  * @platform
1386  * @brief Unsets the callback function to be called when an error occurred.
1387  * @since_tizen 5.0
1388  *
1389  * @privlevel platform
1390  * @privilege %http://tizen.org/privilege/voicecontrol.manager
1391  *
1392  * @return 0 on success, otherwise a negative error value
1393  * @retval #VC_ERROR_NONE                Successful
1394  * @retval #VC_ERROR_INVALID_STATE       Invalid state
1395  * @retval #VC_ERROR_PERMISSION_DENIED   Permission denied
1396  * @retval #VC_ERROR_NOT_SUPPORTED       VC not supported
1397  *
1398  * @pre The state should be #VC_STATE_INITIALIZED.
1399  *
1400  * @see vc_mgr_set_error_cb()
1401  */
1402 int vc_mgr_unset_error_cb(void);
1403
1404
1405 /**
1406  * @platform
1407  * @brief Sets a callback function to be called when dialog requests.
1408  * @since_tizen 5.0
1409  *
1410  * @privlevel platform
1411  * @privilege %http://tizen.org/privilege/voicecontrol.manager
1412  *
1413  * @param[in] callback    Callback function to register
1414  * @param[in] user_data   The user data to be passed to the callback function
1415  *
1416  * @return 0 on success, otherwise a negative error value
1417  * @retval #VC_ERROR_NONE                Successful
1418  * @retval #VC_ERROR_INVALID_PARAMETER   Invalid parameter
1419  * @retval #VC_ERROR_INVALID_STATE       Invalid state
1420  * @retval #VC_ERROR_PERMISSION_DENIED   Permission denied
1421  * @retval #VC_ERROR_NOT_SUPPORTED       VC not supported
1422  *
1423  * @pre The state should be #VC_STATE_INITIALIZED.
1424  *
1425  * @see vc_mgr_unset_dialog_request_cb()
1426  */
1427 int vc_mgr_set_dialog_request_cb(vc_mgr_dialog_request_cb callback, void *user_data);
1428
1429 /**
1430  * @platform
1431  * @brief Unsets the callback function to be called when dialog requests.
1432  * @since_tizen 5.0
1433  *
1434  * @privlevel platform
1435  * @privilege %http://tizen.org/privilege/voicecontrol.manager
1436  *
1437  * @return 0 on success, otherwise a negative error value
1438  * @retval #VC_ERROR_NONE                Successful
1439  * @retval #VC_ERROR_INVALID_STATE       Invalid state
1440  * @retval #VC_ERROR_PERMISSION_DENIED   Permission denied
1441  * @retval #VC_ERROR_NOT_SUPPORTED       VC not supported
1442  *
1443  * @pre The state should be #VC_STATE_INITIALIZED.
1444  *
1445  * @see vc_mgr_set_dialog_request_cb()
1446  */
1447 int vc_mgr_unset_dialog_request_cb(void);
1448
1449 /**
1450  * @platform
1451  * @brief Enables command type as candidate command.
1452  * @since_tizen 5.0
1453  *
1454  * @privlevel platform
1455  * @privilege %http://tizen.org/privilege/voicecontrol.manager
1456  *
1457  * @param[in] cmd_type   The command type (e.g. #VC_COMMAND_TYPE_FOREGROUND, #VC_COMMAND_TYPE_BACKGROUND, #VC_COMMAND_TYPE_WIDGET, #VC_COMMAND_TYPE_SYSTEM, #VC_COMMAND_TYPE_SYSTEM_BACKGROUND, #VC_COMMAND_TYPE_EXCLUSIVE)
1458  *
1459  * @return 0 on success, otherwise a negative error value
1460  * @retval #VC_ERROR_NONE                Successful
1461  * @retval #VC_ERROR_INVALID_STATE       Invalid state
1462  * @retval #VC_ERROR_INVALID_PARAMETER   Invalid parameter
1463  * @retval #VC_ERROR_PERMISSION_DENIED   Permission denied
1464  * @retval #VC_ERROR_NOT_SUPPORTED       VC not supported
1465  *
1466  * @pre The state should be #VC_STATE_READY.
1467  *
1468  * @see vc_mgr_disable_command_type()
1469  */
1470 int vc_mgr_enable_command_type(int cmd_type);
1471
1472 /**
1473  * @platform
1474  * @brief Disables command type as candidate command.
1475  * @since_tizen 5.0
1476  *
1477  * @privlevel platform
1478  * @privilege %http://tizen.org/privilege/voicecontrol.manager
1479  *
1480  * @param[in] cmd_type   The command type (e.g. #VC_COMMAND_TYPE_FOREGROUND, #VC_COMMAND_TYPE_BACKGROUND, #VC_COMMAND_TYPE_WIDGET, #VC_COMMAND_TYPE_SYSTEM, #VC_COMMAND_TYPE_SYSTEM_BACKGROUND, #VC_COMMAND_TYPE_EXCLUSIVE)
1481  *
1482  * @return 0 on success, otherwise a negative error value
1483  * @retval #VC_ERROR_NONE                Successful
1484  * @retval #VC_ERROR_INVALID_STATE       Invalid state
1485  * @retval #VC_ERROR_INVALID_PARAMETER   Invalid parameter
1486  * @retval #VC_ERROR_PERMISSION_DENIED   Permission denied
1487  * @retval #VC_ERROR_NOT_SUPPORTED       VC not supported
1488  *
1489  * @pre The state should be #VC_STATE_READY.
1490  *
1491  * @see vc_mgr_enable_command_type()
1492  */
1493 int vc_mgr_disable_command_type(int cmd_type);
1494
1495 /**
1496  * @platform
1497  * @brief Sets a callback function to be called when engine set private data.
1498  * @since_tizen 5.0
1499  *
1500  * @privlevel platform
1501  * @privilege %http://tizen.org/privilege/voicecontrol.manager
1502  *
1503  * @param[in] callback    Callback function to register
1504  * @param[in] user_data   The user data to be passed to the callback function
1505  *
1506  * @return 0 on success, otherwise a negative error value
1507  * @retval #VC_ERROR_NONE                Successful
1508  * @retval #VC_ERROR_INVALID_PARAMETER   Invalid parameter
1509  * @retval #VC_ERROR_INVALID_STATE       Invalid state
1510  * @retval #VC_ERROR_PERMISSION_DENIED   Permission denied
1511  * @retval #VC_ERROR_NOT_SUPPORTED       VC not supported
1512  *
1513  * @pre The state should be #VC_STATE_INITIALIZED.
1514  *
1515  * @see vc_private_data_set_cb()
1516  * @see vc_mgr_unset_private_data_set_cb()
1517  */
1518 int vc_mgr_set_private_data_set_cb(vc_mgr_private_data_set_cb callback, void *user_data);
1519
1520 /**
1521  * @platform
1522  * @brief Unsets the callback function to be called when engine set private data.
1523  * @since_tizen 5.0
1524  *
1525  * @privlevel platform
1526  * @privilege %http://tizen.org/privilege/voicecontrol.manager
1527  *
1528  * @return 0 on success, otherwise a negative error value
1529  * @retval #VC_ERROR_NONE                Successful
1530  * @retval #VC_ERROR_INVALID_STATE       Invalid state
1531  * @retval #VC_ERROR_PERMISSION_DENIED   Permission denied
1532  * @retval #VC_ERROR_NOT_SUPPORTED       VC not supported
1533  *
1534  * @pre The state should be #VC_STATE_INITIALIZED.
1535  *
1536  * @see vc_mgr_set_private_data_set_cb()
1537  */
1538 int vc_mgr_unset_private_data_set_cb(void);
1539
1540 /**
1541  * @platform
1542  * @brief Sets a callback function to be called when engine request private data.
1543  * @since_tizen 5.0
1544  *
1545  * @privlevel platform
1546  * @privilege %http://tizen.org/privilege/voicecontrol.manager
1547  *
1548  * @param[in] callback    Callback function to register
1549  * @param[in] user_data   The user data to be passed to the callback function
1550  *
1551  * @return 0 on success, otherwise a negative error value
1552  * @retval #VC_ERROR_NONE                Successful
1553  * @retval #VC_ERROR_INVALID_PARAMETER   Invalid parameter
1554  * @retval #VC_ERROR_INVALID_STATE       Invalid state
1555  * @retval #VC_ERROR_PERMISSION_DENIED   Permission denied
1556  * @retval #VC_ERROR_NOT_SUPPORTED       VC not supported
1557  *
1558  * @pre The state should be #VC_STATE_INITIALIZED.
1559  *
1560  * @see vc_private_data_requested_cb()
1561  * @see vc_mgr_unset_private_data_requested_cb()
1562  */
1563 int vc_mgr_set_private_data_requested_cb(vc_mgr_private_data_requested_cb callback, void *user_data);
1564
1565 /**
1566  * @platform
1567  * @brief Unsets the callback function to be called when engine request private data.
1568  * @since_tizen 5.0
1569  *
1570  * @privlevel platform
1571  * @privilege %http://tizen.org/privilege/voicecontrol.manager
1572  *
1573  * @return 0 on success, otherwise a negative error value
1574  * @retval #VC_ERROR_NONE                Successful
1575  * @retval #VC_ERROR_INVALID_STATE       Invalid state
1576  * @retval #VC_ERROR_PERMISSION_DENIED   Permission denied
1577  * @retval #VC_ERROR_NOT_SUPPORTED       VC not supported
1578  *
1579  * @pre The state should be #VC_STATE_INITIALIZED.
1580  *
1581  * @see vc_mgr_set_private_data_requested_cb()
1582  */
1583 int vc_mgr_unset_private_data_requested_cb(void);
1584
1585 /* for TTS feedback */
1586 /**
1587 * @platform
1588 * @brief Sets a callback function to be called when engine sends audio formats necessary for playing TTS feedback.
1589 * @since_tizen 5.0
1590 *
1591 * @param[in] callback Callback function to set
1592 * @param[in] user_data The user data to be passed to the callback function
1593 *
1594 * @privlevel platform
1595 * @privilege %http://tizen.org/privilege/voicecontrol.manager
1596 *
1597 * @return 0 on success, otherwise a negative error value
1598 * @retval #VC_ERROR_NONE Successful
1599 * @retval #VC_ERROR_INVALID_PARAMETER Invalid parameter
1600 * @retval #VC_ERROR_INVALID_STATE Invalid state
1601 * @retval #VC_ERROR_PERMISSION_DENIED Permission denied
1602 * @retval #VC_ERROR_NOT_SUPPORTED       VC not supported
1603 *
1604 * @pre The state should be #VC_STATE_INITIALIZED.
1605 *
1606 * @see vc_mgr_feedback_audio_format_cb()
1607 * @see vc_mgr_unset_feedback_audio_format_cb()
1608 */
1609 int vc_mgr_set_feedback_audio_format_cb(vc_mgr_feedback_audio_format_cb callback, void* user_data);
1610
1611 /**
1612 * @platform
1613 * @brief Unsets a callback function to be called when engine sends audio formats necessary for playing TTS feedback.
1614 * @since_tizen 5.0
1615 *
1616 * @privlevel platform
1617 * @privilege %http://tizen.org/privilege/voicecontrol.manager
1618 *
1619 * @return 0 on success, otherwise a negative error value
1620 * @retval #VC_ERROR_NONE Successful
1621 * @retval #VC_ERROR_INVALID_STATE Invalid state
1622 * @retval #VC_ERROR_PERMISSION_DENIED Permission denied
1623 * @retval #VC_ERROR_NOT_SUPPORTED       VC not supported
1624 *
1625 * @pre The state should be #VC_STATE_INITIALIZED.
1626 *
1627 * @see vc_mgr_feedback_audio_format_cb()
1628 * @see vc_mgr_set_feedback_audio_format_cb()
1629 */
1630 int vc_mgr_unset_feedback_audio_format_cb(void);
1631
1632 /**
1633 * @platform
1634 * @brief Sets a callback function to be called when engine sends audio streaming for TTS feedback.
1635 * @since_tizen 5.0
1636 *
1637 * @param[in] callback Callback function to set
1638 * @param[in] user_data The user data to be passed to the callback function
1639 *
1640 * @privlevel platform
1641 * @privilege %http://tizen.org/privilege/voicecontrol.manager
1642 *
1643 * @return 0 on success, otherwise a negative error value
1644 * @retval #VC_ERROR_NONE Successful
1645 * @retval #VC_ERROR_INVALID_PARAMETER Invalid parameter
1646 * @retval #VC_ERROR_INVALID_STATE Invalid state
1647 * @retval #VC_ERROR_PERMISSION_DENIED Permission denied
1648 * @retval #VC_ERROR_NOT_SUPPORTED       VC not supported
1649 *
1650 * @pre The state should be #VC_STATE_INITIALIZED.
1651 *
1652 * @see vc_mgr_feedback_streaming_cb()
1653 * @see vc_mgr_unset_feedback_streaming_cb()
1654 */
1655 int vc_mgr_set_feedback_streaming_cb(vc_mgr_feedback_streaming_cb callback, void* user_data);
1656
1657 /**
1658 * @platform
1659 * @brief Unsets a callback function to be called when engine sends audio streaming for TTS feedback.
1660 * @since_tizen 5.0
1661 *
1662 * @privlevel platform
1663 * @privilege %http://tizen.org/privilege/voicecontrol.manager
1664 *
1665 * @return 0 on success, otherwise a negative error value
1666 * @retval #VC_ERROR_NONE Successful
1667 * @retval #VC_ERROR_INVALID_STATE Invalid state
1668 * @retval #VC_ERROR_PERMISSION_DENIED Permission denied
1669 * @retval #VC_ERROR_NOT_SUPPORTED       VC not supported
1670 *
1671 * @pre The state should be #VC_STATE_INITIALIZED.
1672 *
1673 * @see vc_mgr_feedback_streaming_cb()
1674 * @see vc_mgr_set_feedback_streaming_cb()
1675 */
1676 int vc_mgr_unset_feedback_streaming_cb(void);
1677
1678 /**
1679 * @platform
1680 * @brief Starts getting TTS feedback streaming data from the buffer.
1681 * @since_tizen 5.0
1682 *
1683 * @remarks In order to get TTS feedback streaming data, the application should set 'vc_mgr_feedback_streaming_cb()' using vc_mgr_set_feedback_streaming_cb().
1684 *
1685 * @privlevel platform
1686 * @privilege %http://tizen.org/privilege/voicecontrol.manager
1687 *
1688 * @return 0 on success, otherwise a negative error value
1689 * @retval #VC_ERROR_NONE Successful
1690 * @retval #VC_ERROR_INVALID_STATE Invalid state
1691 * @retval #VC_ERROR_PERMISSION_DENIED Permission denied
1692 * @retval #VC_ERROR_NOT_SUPPORTED       VC not supported
1693 *
1694 * @pre The state should be #VC_STATE_READY. \n
1695 *      'vc_mgr_feedback_streaming_cb()' should be registered.
1696 *
1697 * @see vc_mgr_feedback_streaming_cb()
1698 * @see vc_mgr_set_feedback_streaming_cb()
1699 * @see vc_mgr_unset_feedback_streaming_cb()
1700 * @see vc_mgr_stop_feedback()
1701 */
1702 int vc_mgr_start_feedback(void);
1703
1704 /**
1705 * @platform
1706 * @brief Stops getting and removes TTS feedback streaming data from the buffer.
1707 * @since_tizen 5.0
1708 *
1709 * @privlevel platform
1710 * @privilege %http://tizen.org/privilege/voicecontrol.manager
1711 *
1712 * @return 0 on success, otherwise a negative error value
1713 * @retval #VC_ERROR_NONE Successful
1714 * @retval #VC_ERROR_INVALID_STATE Invalid state
1715 * @retval #VC_ERROR_PERMISSION_DENIED Permission denied
1716 * @retval #VC_ERROR_NOT_SUPPORTED       VC not supported
1717 *
1718 * @pre The state should be #VC_STATE_READY.
1719 *
1720 * @see vc_mgr_feedback_streaming_cb()
1721 * @see vc_mgr_set_feedback_streaming_cb()
1722 * @see vc_mgr_unset_feedback_streaming_cb()
1723 * @see vc_mgr_start_feedback()
1724 */
1725 int vc_mgr_stop_feedback(void);
1726
1727 /**
1728  * @brief Sets TTS streaming callback function.
1729  * @since_tizen 5.0
1730  *
1731  * @param[in] callback The callback function
1732  * @param[in] user_data The user data to be passed to the callback function
1733  *
1734  * @return 0 on success, otherwise a negative error value
1735  * @retval #VC_ERROR_NONE Successful
1736  * @retval #VC_ERROR_INVALID_STATE Invalid state
1737  * @retval #VC_ERROR_INVALID_PARAMETER Invalid parameter
1738  *
1739  * @pre The state should be #VC_STATE_INITIALIZED.
1740  *
1741  * @see vc_mgr_vc_tts_streaming_cb()
1742  * @see vc_mgr_unset_vc_tts_streaming_cb()
1743  */
1744 int vc_mgr_set_vc_tts_streaming_cb(vc_mgr_vc_tts_streaming_cb callback, void* user_data);
1745
1746 /**
1747  * @brief Unsets TTS streaming callback function.
1748  * @since_tizen 5.0
1749  *
1750  * @return 0 on success, otherwise a negative error value
1751  * @retval #VC_ERROR_NONE Successful
1752  * @retval #VC_ERROR_INVALID_STATE Invalid state
1753  *
1754  * @pre The state should be #VC_STATE_INITIALIZED.
1755  *
1756  * @see vc_mgr_vc_tts_streaming_cb()
1757  * @see vc_mgr_set_vc_tts_streaming_cb()
1758  */
1759 int vc_mgr_unset_vc_tts_streaming_cb(void);
1760
1761
1762 #ifdef __cplusplus
1763 }
1764 #endif
1765
1766 /**
1767  * @}
1768  */
1769
1770 #endif /* __VOICE_CONTROL_MANAGER_H__ */
1771