Update year information of license boilerplate
[platform/core/uifw/multi-assistant-service.git] / plugins / wakeup-manager / inc / dependency_resolver.h
1 /*
2  * Copyright 2018-2019 Samsung Electronics Co., Ltd
3  *
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
7  *
8  * http://floralicense.org/license/
9  *
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.
15  */
16
17
18 #ifndef _DEPENDENCY_RESOLVER_H_
19 #define _DEPENDENCY_RESOLVER_H_
20
21 #include <tzplatform_config.h>
22 #include <multi_assistant_service.h>
23
24 #ifdef __cplusplus
25 extern "C" {
26 #endif
27
28 int dependency_resolver_initialize(mas_dependency_plugin_proxy_interface interface);
29 int dependency_resolver_deinitialize(void);
30 int dependency_resolver_set_error_callback(mas_error_cb callback, void* user_data);
31 int dependency_resolver_start_recording();
32 int dependency_resolver_stop_recording();
33 int dependency_resolver_set_recording_session(unsigned int);
34 int dependency_resolver_set_background_volume(double ratio);
35 int dependency_resolver_get_audio_format(int* rate, int* channel, int* audio_type);
36 int dependency_resolver_get_audio_source_type(char** type);
37 int dependency_resolver_process_wakeup_engine_command(const char* engine, const char* command);
38
39 /**************************************************************************************
40  *** Definitions for dependencies
41  *************************************************************************************/
42 #define MAS_DEPENDENCY_DEFAULT_PATH tzplatform_mkpath(tzplatform_getid("TZ_SYS_RO_SHARE"), "multiassistant/")
43 #define MAS_DEPENDENCY_DEFAULT_FILENAME "libma-dependency-default.so"
44 #define MAS_DEPENDENCY_MODULE_PATH "db/multi-assistant/dependency_module_path"
45
46 #define MAS_DEPENDENCY_FUNC_INITIALIZE "mas_dependency_initialize"
47 typedef int (*mas_dependency_initialize)(mas_dependency_plugin_proxy_interface interface, int *dependency_version);
48 #define MAS_DEPENDENCY_FUNC_DEINITIALIZE "mas_dependency_deinitialize"
49 typedef int (*mas_dependency_deinitialize)(void);
50 #define MAS_DEPENDENCY_FUNC_SET_ERROR_CALLBACK "mas_dependency_set_error_callback"
51 typedef int (*mas_dependency_set_error_callback)(mas_error_cb callback, void* user_data);
52 #define MAS_DEPENDENCY_FUNC_START_RECORDING "mas_dependency_start_recording"
53 typedef int (*mas_dependency_start_recording)(void);
54 #define MAS_DEPENDENCY_FUNC_STOP_RECORDING "mas_dependency_stop_recording"
55 typedef int (*mas_dependency_stop_recording)(void);
56 #define MAS_DEPENDENCY_FUNC_SET_RECORDING_SESSION "mas_dependency_set_recording_session"
57 typedef int (*mas_dependency_set_recording_session)(unsigned int);
58 #define MAS_DEPENDENCY_FUNC_SET_BACKGROUND_VOLUME "mas_dependency_set_background_volume"
59 typedef int (*mas_dependency_set_background_volume)(double ratio);
60 #define MAS_DEPENDENCY_FUNC_GET_AUDIO_FORMAT "mas_dependency_get_audio_format"
61 typedef int (*mas_dependency_get_audio_format)(int* rate, int* channel, int* audio_type);
62 #define MAS_DEPENDENCY_FUNC_GET_AUDIO_SOURCE_TYPE "mas_dependency_get_audio_source_type"
63 typedef int (*mas_dependency_get_audio_source_type)(char** type);
64 #define MAS_DEPENDENCY_FUNC_PROCESS_WAKEUP_ENGINE_COMMAND "mas_dependency_process_wakeup_engine_command"
65 typedef int (*mas_dependency_process_wakeup_engine_command)(const char* engine_name, const char* command);
66
67 typedef struct {
68         mas_dependency_initialize                                                               initialize;
69         mas_dependency_deinitialize                                                             deinitialize;
70         mas_dependency_set_error_callback                                               set_error_callback;
71         mas_dependency_start_recording                                                  start_recording;
72         mas_dependency_stop_recording                                                   stop_recording;
73         mas_dependency_set_recording_session                                    set_recording_session;
74         mas_dependency_set_background_volume                                    set_background_volume;
75         mas_dependency_get_audio_format                                                 get_audio_format;
76         mas_dependency_get_audio_source_type                                    get_audio_source_type;
77         mas_dependency_process_wakeup_engine_command                    process_wakeup_engine_command;
78 } mas_dependency_module_interface;
79
80 #ifdef __cplusplus
81 }
82 #endif
83
84 #endif /* _DEPENDENCY_RESOLVER_H_ */