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_ENGINE_AGENT_H_
19 #define __VCD_ENGINE_AGENT_H_
28 * Constants & Structures
31 #define ENGINE_PATH_SIZE 256
33 /** Init engine agent */
34 int vcd_engine_agent_init();
36 /** Release engine agent */
37 int vcd_engine_agent_release();
39 bool vcd_engine_is_available_engine();
41 /** load current engine */
42 int vcd_engine_agent_load_current_engine(vce_request_callback_s* callback);
44 /** Unload current engine */
45 int vcd_engine_agent_unload_current_engine();
48 int vcd_engine_get_audio_format(const char* audio_id, vce_audio_type_e* types, int* rate, int* channels);
50 int vcd_engine_supported_langs(GList** lang_list);
52 int vcd_engine_get_current_language(char** lang);
54 int vcd_engine_set_current_language(const char* language);
56 int vcd_engine_set_commands();
58 /* normal recognition */
59 int vcd_engine_recognize_start(bool silence);
61 int vcd_engine_recognize_audio(const void* data, unsigned int length, vce_speech_detect_e* speech_detected);
63 int vcd_engine_recognize_stop();
65 int vcd_engine_recognize_cancel();
67 int vcd_engine_set_audio_type(const char* audio);
69 int vcd_engine_set_domain(int pid, const char* domain);
71 int vcd_engine_get_nlu_base_info(int pid, const char* key, char** value);
73 int vcd_engine_set_private_data(int pid, const char* key, const char* data);
75 int vcd_engine_get_private_data(int pid, const char* key, char** data);
77 int vcd_engine_process_text(int pid, const char* text);
79 int vcd_engine_process_list_event(int pid, const char* event);
81 int vcd_engine_process_haptic_event(int pid, const char* event);
83 /* for engine service */
84 int vcd_engine_agent_get_foreach_command(vce_cmd_h vce_command, vce_command_cb callback, void* user_data);
86 int vcd_engine_agent_get_command_count(vce_cmd_h vce_command);
88 int vcd_engine_agent_get_audio_type(char** audio_type);
90 int vcd_engine_agent_set_private_data(const char* key, const char* data);
92 int vcd_engine_agent_get_private_data(const char* key, char** data);
94 int vcd_engine_agent_start_recording();
96 int vcd_engine_agent_stop_recording();
98 int vcd_engine_agent_set_private_data_set_cb(vce_private_data_set_cb callback_func);
100 int vcd_engine_agent_set_private_data_requested_cb(vce_private_data_requested_cb callback_func);
102 int vcd_engine_agent_set_nlu_base_info_requested_cb(vce_nlu_base_info_requested_cb callback_func);
109 #endif /* __VCD_ENGINE_AGENT_H_ */