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 __VC_CONFIG_MANAGER_H_
19 #define __VC_CONFIG_MANAGER_H_
22 #include <voice_control_common.h>
29 VC_CONFIG_ERROR_NONE = TIZEN_ERROR_NONE, /**< Success, No error */
30 VC_CONFIG_ERROR_OUT_OF_MEMORY = TIZEN_ERROR_OUT_OF_MEMORY, /**< Out of Memory */
31 VC_CONFIG_ERROR_IO_ERROR = TIZEN_ERROR_IO_ERROR, /**< I/O error */
32 VC_CONFIG_ERROR_INVALID_PARAMETER = TIZEN_ERROR_INVALID_PARAMETER, /**< Invalid parameter */
33 VC_CONFIG_ERROR_INVALID_STATE = TIZEN_ERROR_VOICE_CONTROL | 0x011, /**< Invalid state */
34 VC_CONFIG_ERROR_INVALID_LANGUAGE = TIZEN_ERROR_VOICE_CONTROL | 0x012, /**< Invalid voice */
35 VC_CONFIG_ERROR_ENGINE_NOT_FOUND = TIZEN_ERROR_VOICE_CONTROL | 0x013, /**< No available VC-engine */
36 VC_CONFIG_ERROR_OPERATION_FAILED = TIZEN_ERROR_VOICE_CONTROL | 0x014 /**< Operation failed */
40 typedef void (*vc_config_lang_changed_cb)(const char* before_lang, const char* current_lang);
42 typedef void (*vc_config_foreground_changed_cb)(int previous, int current);
44 typedef void (*vc_config_enabled_cb)(bool enable);
47 int vc_config_mgr_initialize(int uid);
49 int vc_config_mgr_finalize(int uid);
52 /* Set / Unset callback */
53 int vc_config_mgr_set_lang_cb(int uid, vc_config_lang_changed_cb lang_cb);
55 int vc_config_mgr_unset_lang_cb(int uid);
57 int vc_config_mgr_set_foreground_cb(int uid, vc_config_foreground_changed_cb foreground_cb);
59 int vc_config_mgr_unset_foreground_cb(int uid);
61 int vc_config_mgr_set_enabled_cb(int uid, vc_config_enabled_cb enabled_cb);
63 int vc_config_mgr_unset_enabled_cb(int uid);
66 int vc_config_mgr_get_auto_language(bool* value);
68 int vc_config_mgr_set_auto_language(bool value);
70 int vc_config_mgr_get_language_list(vc_supported_language_cb callback, void* user_data);
72 int vc_config_mgr_get_default_language(char** language);
74 int vc_config_mgr_set_default_language(const char* language);
76 int vc_config_mgr_get_enabled(bool* value);
78 int vc_config_mgr_set_enabled(bool value);
81 int vc_config_mgr_get_nonfixed_support(bool* value);
83 bool vc_config_check_default_language_is_valid(const char* language);
85 int vc_config_convert_error_code(vc_config_error_e code);
88 int vc_config_mgr_set_foreground(int pid, bool value);
90 int vc_config_mgr_get_foreground(int* pid);
97 #endif /* __VC_CONFIG_MANAGER_H_ */