2 * Copyright 2018-2019 Samsung Electronics Co., Ltd
4 * Licensed under the Flora License, Version 1.1 (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://floralicense.org/license/
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 _DEPENDENCY_RESOLVER_H_
19 #define _DEPENDENCY_RESOLVER_H_
21 #include <tzplatform_config.h>
22 #include <multi_assistant_service.h>
28 /**************************************************************************************
29 *** Definitions for dependencies
30 *************************************************************************************/
31 #define MAS_DEPENDENCY_DEFAULT_PATH tzplatform_mkpath(tzplatform_getid("TZ_SYS_RO_SHARE"), "multiassistant/")
32 #define MAS_DEPENDENCY_DEFAULT_FILENAME "libma-dependency-default.so"
33 #define MAS_DEPENDENCY_MODULE_PATH "db/multi-assistant/dependency_module_path"
35 #define MAS_DEPENDENCY_FUNC_INITIALIZE "mas_dependency_initialize"
36 typedef int (*mas_dependency_initialize)(mas_dependency_plugin_proxy_interface interface, int *dependency_version);
37 #define MAS_DEPENDENCY_FUNC_DEINITIALIZE "mas_dependency_deinitialize"
38 typedef int (*mas_dependency_deinitialize)(void);
39 #define MAS_DEPENDENCY_FUNC_SET_ERROR_CALLBACK "mas_dependency_set_error_callback"
40 typedef int (*mas_dependency_set_error_callback)(mas_error_cb callback, void* user_data);
41 #define MAS_DEPENDENCY_FUNC_START_RECORDING "mas_dependency_start_recording"
42 typedef int (*mas_dependency_start_recording)(void);
43 #define MAS_DEPENDENCY_FUNC_STOP_RECORDING "mas_dependency_stop_recording"
44 typedef int (*mas_dependency_stop_recording)(void);
45 #define MAS_DEPENDENCY_FUNC_SET_RECORDING_SESSION "mas_dependency_set_recording_session"
46 typedef int (*mas_dependency_set_recording_session)(unsigned int);
47 #define MAS_DEPENDENCY_FUNC_SET_BACKGROUND_VOLUME "mas_dependency_set_background_volume"
48 typedef int (*mas_dependency_set_background_volume)(double ratio);
49 #define MAS_DEPENDENCY_FUNC_GET_AUDIO_FORMAT "mas_dependency_get_audio_format"
50 typedef int (*mas_dependency_get_audio_format)(int* rate, int* channel, int* audio_type);
51 #define MAS_DEPENDENCY_FUNC_GET_AUDIO_SOURCE_TYPE "mas_dependency_get_audio_source_type"
52 typedef int (*mas_dependency_get_audio_source_type)(char** type);
53 #define MAS_DEPENDENCY_FUNC_PROCESS_WAKEUP_ENGINE_COMMAND "mas_dependency_process_wakeup_engine_command"
54 typedef int (*mas_dependency_process_wakeup_engine_command)(const char* engine_name, const char* command);
55 #define MAS_DEPENDENCY_FUNC_PROCESS_WAKEUP_CANDIDATE "mas_dependency_process_wakeup_candidate"
56 typedef int (*mas_dependency_process_wakeup_candidate)(const mas_wakeup_event_info* info);
59 mas_dependency_initialize initialize;
60 mas_dependency_deinitialize deinitialize;
61 mas_dependency_set_error_callback set_error_callback;
62 mas_dependency_start_recording start_recording;
63 mas_dependency_stop_recording stop_recording;
64 mas_dependency_set_recording_session set_recording_session;
65 mas_dependency_set_background_volume set_background_volume;
66 mas_dependency_get_audio_format get_audio_format;
67 mas_dependency_get_audio_source_type get_audio_source_type;
68 mas_dependency_process_wakeup_engine_command process_wakeup_engine_command;
69 mas_dependency_process_wakeup_candidate process_wakeup_candidate;
70 } mas_dependency_module_interface;
72 int dependency_resolver_initialize(mas_dependency_plugin_proxy_interface interface);
73 int dependency_resolver_deinitialize(void);
74 int dependency_resolver_set_error_callback(mas_error_cb callback, void* user_data);
75 int dependency_resolver_start_recording();
76 int dependency_resolver_stop_recording();
77 int dependency_resolver_set_recording_session(unsigned int);
78 int dependency_resolver_set_background_volume(double ratio);
79 int dependency_resolver_get_audio_format(int* rate, int* channel, int* audio_type);
80 int dependency_resolver_get_audio_source_type(char** type);
81 int dependency_resolver_process_wakeup_engine_command(const char* engine, const char* command);
82 int dependency_resolver_process_wakeup_candidate(mas_wakeup_event_info* info);
84 mas_dependency_module_interface* dependency_resolver_get_interface();
90 #endif /* _DEPENDENCY_RESOLVER_H_ */