2 * Copyright (c) 2011-2015 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 __VCD_SERVER_H_
19 #define __VCD_SERVER_H_
22 #include "vcd_client_data.h"
33 int vcd_initialize(vce_request_callback_s *callback);
37 Eina_Bool vcd_cleanup_client_all(void *data);
39 int vcd_server_get_service_state();
41 int vcd_server_get_foreground();
47 int vcd_server_mgr_initialize(int pid);
49 int vcd_server_mgr_finalize(int pid);
51 int vcd_server_mgr_set_command(int pid);
53 int vcd_server_mgr_unset_command(int pid);
55 int vcd_server_mgr_set_demandable_client(int pid);
57 int vcd_server_mgr_set_audio_type(int pid, const char* audio_type);
59 int vcd_server_mgr_get_audio_type(int pid, char** audio_type);
61 int vcd_server_mgr_set_client_info(int pid);
63 int vcd_server_mgr_start(vcd_recognition_mode_e recognition_mode, bool exclusive_cmd, bool start_by_client);
65 int vcd_server_mgr_stop();
67 int vcd_server_mgr_cancel();
69 int vcd_server_mgr_result_select();
71 int vcd_server_mgr_set_domain(int pid, const char* domain);
73 int vcd_server_mgr_set_private_data(int pid, const char* key, const char* data);
75 int vcd_server_mgr_get_private_data(int pid, const char* key, char** data);
77 int vcd_server_mgr_do_action(int pid, int type, const char* action);
79 int vcd_server_mgr_enable_command_type(int pid, int cmd_type);
81 int vcd_server_mgr_disable_command_type(int pid, int cmd_type);
86 int vcd_server_initialize(int pid);
88 int vcd_server_finalize(int pid);
90 int vcd_server_set_command(int pid, vc_cmd_type_e cmd_type);
92 int vcd_server_unset_command(int pid, vc_cmd_type_e cmd_type);
94 int vcd_server_set_foreground(int pid, bool value);
96 int vcd_server_dialog(int pid, const char* disp_text, const char* utt_text, int continuous);
98 int vcd_server_is_system_command_valid(int pid, int* is_sys_cmd_valid);
101 int vcd_server_set_exclusive_command(int pid, bool value);
103 int vcd_server_request_start(int pid, bool stop_by_silence);
105 int vcd_server_request_stop(int pid);
107 int vcd_server_request_cancel(int pid);
113 int vcd_server_widget_initialize(int pid);
115 int vcd_server_widget_finalize(int pid);
117 int vcd_server_widget_start_recording(int pid, bool widget_command);
119 int vcd_server_widget_start(int pid, bool stop_by_silence);
121 int vcd_server_widget_stop(int pid);
123 int vcd_server_widget_cancel(int pid);
125 int vcd_server_widget_enable_asr_result(int pid, bool enable);
127 int vcd_server_set_language(const char* language);
132 int vcd_send_result(vce_result_event_e event, int* result_id, int count, const char* all_result, const char* non_fixed_result, const char* nlu_result, const char* msg, int* user_info, void *user_data);
134 int vcd_send_asr_result(vce_asr_result_event_e event, const char* asr_result, void *user_data);
136 int vcd_send_nlg_result(const char* nlg_result, void *user_data);
138 int vcd_send_error(vce_error_e error, const char* msg, void *user_data);
140 int vcd_get_foreach_command(vce_cmd_h vce_command, vce_command_cb callback, void* user_data);
142 int vcd_get_command_count(vce_cmd_h vce_command);
144 int vcd_get_audio_type(char** audio_type);
146 int vcd_set_private_data(const char* key, const char* data);
148 int vcd_get_private_data(const char* key, char** data);
150 int vcd_start_recording();
152 int vcd_stop_recording();
154 int vcd_set_private_data_set_cb(vce_private_data_set_cb callback_func);
156 int vcd_set_private_data_requested_cb(vce_private_data_requested_cb callback_func);
158 int vcd_set_nlu_base_info_requested_cb(vce_nlu_base_info_requested_cb callback_func);
165 #endif /* __VCD_SERVER_H_ */