2 * Copyright (c) 2011-2016 Samsung Electronics Co., Ltd All Rights Reserved
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
8 * http://www.apache.org/licenses/LICENSE-2.0
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.
18 #ifndef __VOICE_CONTROL_INTERNAL_H__
19 #define __VOICE_CONTROL_INTERNAL_H__
30 * @brief Called when client gets the asr recognition result from vc-daemon.
32 * @param[in] event The result event
33 * @param[in] result ASR text
34 * @param[in] user_data The user data passed from the callback registration function
36 * @return @c true when asr result is consumed \n @c false to propagate.
38 * @pre An application registers callback function using vc_mgr_set_pre_result_cb().
40 * @see vc_widget_set_asr_result_cb()
41 * @see vc_widget_unset_asr_result_cb()
43 typedef bool (*vc_asr_result_cb)(vc_result_event_e event, const char* result, void *user_data);
46 * @brief Sets command list from file.
49 * @privilege %http://tizen.org/privilege/recorder
51 * @remarks The command type is valid for #VC_COMMAND_TYPE_FOREGROUND and #VC_COMMAND_TYPE_BACKGROUND.
52 * Therefore, @a type is either #VC_COMMAND_TYPE_FOREGROUND or #VC_COMMAND_TYPE_BACKGROUND.
53 * In the file corresponding to @a file_path, there must be commands and command types.
55 * @param[in] file_path The command file path (absolute or relative)
56 * @param[in] type Command type
58 * @return 0 on success, otherwise a negative error value
59 * @retval #VC_ERROR_NONE Successful
60 * @retval #VC_ERROR_INVALID_PARAMETER Invalid parameter
61 * @retval #VC_ERROR_INVALID_STATE Invalid state
62 * @retval #VC_ERROR_PERMISSION_DENIED Permission denied
63 * @retval #VC_ERROR_NOT_SUPPORTED Not supported
65 * @pre The state should be #VC_STATE_READY.
67 * @see vc_unset_command_list()
69 int vc_set_command_list_from_file(const char* file_path, int type);
72 * @brief Connects the voice control service synchronously.
75 * @privilege %http://tizen.org/privilege/recorder
76 * @return @c 0 on success,
77 * otherwise a negative error value
78 * @retval #VC_ERROR_NONE Successful
79 * @retval #VC_ERROR_INVALID_STATE Invalid state
80 * @retval #VC_ERROR_OPERATION_FAILED Operation failure
81 * @retval #VC_ERROR_PERMISSION_DENIED Permission denied
82 * @retval #VC_ERROR_NOT_SUPPORTED Not supported
83 * @pre The state should be #VC_STATE_INITIALIZED.
84 * @post If this function is called, the state will be #VC_STATE_READY.
87 int vc_prepare_sync(void);
98 #endif /* __VOICE_CONTROL_INTERNAL_H__ */