2 * Copyright (c) 2011-2018 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__
31 * @brief Called when client gets the asr recognition result from vc-daemon.
33 * @param[in] event The result event
34 * @param[in] result ASR text
35 * @param[in] user_data The user data passed from the callback registration function
37 * @return @c true when asr result is consumed \n @c false to propagate.
39 * @pre An application registers callback function using vc_mgr_set_pre_result_cb().
41 * @see vc_widget_set_asr_result_cb()
42 * @see vc_widget_unset_asr_result_cb()
44 typedef bool (*vc_asr_result_cb)(vc_result_event_e event, const char* result, void *user_data);
47 * @brief Sets command list from file.
50 * @privilege %http://tizen.org/privilege/recorder
52 * @remarks The command type is valid for #VC_COMMAND_TYPE_FOREGROUND and #VC_COMMAND_TYPE_BACKGROUND.
53 * Therefore, @a type is either #VC_COMMAND_TYPE_FOREGROUND or #VC_COMMAND_TYPE_BACKGROUND.
54 * In the file corresponding to @a file_path, there must be commands and command types.
56 * @param[in] file_path The command file path (absolute or relative)
57 * @param[in] type Command type
59 * @return 0 on success, otherwise a negative error value
60 * @retval #VC_ERROR_NONE Successful
61 * @retval #VC_ERROR_INVALID_PARAMETER Invalid parameter
62 * @retval #VC_ERROR_INVALID_STATE Invalid state
63 * @retval #VC_ERROR_PERMISSION_DENIED Permission denied
64 * @retval #VC_ERROR_NOT_SUPPORTED Not supported
66 * @pre The state should be #VC_STATE_READY.
68 * @see vc_unset_command_list()
70 int vc_set_command_list_from_file(const char* file_path, int type);
73 * @brief Connects the voice control service synchronously.
76 * @privilege %http://tizen.org/privilege/recorder
77 * @return @c 0 on success,
78 * otherwise a negative error value
79 * @retval #VC_ERROR_NONE Successful
80 * @retval #VC_ERROR_INVALID_STATE Invalid state
81 * @retval #VC_ERROR_OPERATION_FAILED Operation failure
82 * @retval #VC_ERROR_PERMISSION_DENIED Permission denied
83 * @retval #VC_ERROR_NOT_SUPPORTED Not supported
84 * @pre The state should be #VC_STATE_INITIALIZED.
85 * @post If this function is called, the state will be #VC_STATE_READY.
88 int vc_prepare_sync(void);
99 #endif /* __VOICE_CONTROL_INTERNAL_H__ */