Add parameter to change system volume
[platform/core/uifw/voice-control.git] / include / voice_control_manager_internal.h
1 /*
2  * Copyright (c) 2011-2018 Samsung Electronics Co., Ltd All Rights Reserved
3  *
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
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
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 __VOICE_CONTROL_MANAGER_INTERNAL_H__
19 #define __VOICE_CONTROL_MANAGER_INTERNAL_H__
20
21 #include <voice_control_command.h>
22 #include <voice_control_command_expand.h>
23 #include <voice_control_common.h>
24
25 #ifdef __cplusplus
26 extern "C"
27 {
28 #endif
29
30 typedef enum {
31         VC_AUDIO_STREAMING_EVENT_FAIL = -1,             /**< Failed */
32         VC_AUDIO_STREAMING_EVENT_START = 1,             /**< Start event */
33         VC_AUDIO_STREAMING_EVENT_CONTINUE = 2,  /**< Continue event */
34         VC_AUDIO_STREAMING_EVENT_FINISH = 3             /**< Finish event */
35 } vc_audio_streaming_event_e;
36
37 typedef enum {
38         VC_AUDIO_STREAMING_MODE_VC_SERVICE = 0,                 /**< Use audio recording from vc service */
39         VC_AUDIO_STREAMING_MODE_MULTI_ASSISTANT = 1,    /**< Use audio streaming from multi-assistant */
40         VC_AUDIO_STREAMING_MODE_OUTSIDE = 2,                    /**< Use audio streaming from outside */
41 } vc_audio_streaming_mode_e;
42
43 typedef enum {
44         VC_SYSTEM_VOLUME_EVENT_CHANGE_FOR_NEARFIELD,
45         VC_SYSTEM_VOLUME_EVENT_CHANGE_FOR_FARFIELD,
46         VC_SYSTEM_VOLUME_EVENT_RECOVER
47 } vc_system_volume_event_e;
48
49 #define VC_SERVICE_STATE_UPDATING 5 /**< 'Updating' state */
50
51 /**
52  * @brief Sets demandable client list.
53  *
54  * @param[in] rule demandable client list rule path
55  *
56  * @return 0 on success, otherwise a negative error value
57  * @retval #VC_ERROR_NONE                Successful
58  * @retval #VC_ERROR_INVALID_PARAMETER   Invalid parameter
59  * @retval #VC_ERROR_INVALID_STATE       Invalid state
60  * @retval #VC_ERROR_OPERATION_FAILED    Operation failure
61  * @retval #VC_ERROR_PERMISSION_DENIED   Permission denied
62  * @retval #VC_ERROR_NOT_SUPPORTED       VC not supported
63  *
64  * @pre The state should be #VC_STATE_READY.
65  *
66  * @see vc_mgr_get_demandable_client_rule()
67  */
68 int vc_mgr_set_demandable_client_rule(const char* rule);
69
70 /**
71  * @brief Gets demandable client list.
72  *
73  * @return 0 on success, otherwise a negative error value
74  * @retval #VC_ERROR_NONE                Successful
75  * @retval #VC_ERROR_INVALID_STATE       Invalid state
76  * @retval #VC_ERROR_PERMISSION_DENIED   Permission denied
77  * @retval #VC_ERROR_NOT_SUPPORTED       VC not supported
78  *
79  * @pre The state should be #VC_STATE_READY.
80  *
81  * @see vc_mgr_set_demandable_client_rule()
82  */
83 int vc_mgr_unset_demandable_client_rule(void);
84
85 /**
86  * @brief Sets domain such as agent or device type.
87  * @since_tizen 5.0
88  *
89  * @param[in] domain Available agent or device type
90  *
91  * @return 0 on success, otherwise a negative error value
92  * @retval #VC_ERROR_NONE                Successful
93  * @retval #VC_ERROR_INVALID_PARAMETER   Invalid parameter
94  * @retval #VC_ERROR_INVALID_STATE       Invalid state
95  * @retval #VC_ERROR_PERMISSION_DENIED   Permission denied
96  * @retval #VC_ERROR_NOT_SUPPORTED       VC not supported
97  *
98  * @pre The service state should be #VC_SERVICE_STATE_READY.
99  */
100 int vc_mgr_set_domain(const char* domain);
101
102 /**
103  * @brief Sends audio streaming to the engine service.
104  * @since_tizen 5.0
105  *
106  */
107 int vc_mgr_send_audio_streaming(vc_audio_streaming_event_e event, unsigned char* buffer, unsigned int len);
108
109 int vc_mgr_set_audio_streaming_mode(vc_audio_streaming_mode_e streaming_mode);
110
111
112 /**
113  * @brief Changes system volume.
114  * @since_tizen 5.0
115  *
116  */
117 int vc_mgr_change_system_volume(vc_system_volume_event_e volume_event);
118
119 /**
120  * @brief Recover system volume.
121  * @since_tizen 5.0
122  *
123  */
124 int vc_mgr_recover_system_volume();
125
126 #ifdef __cplusplus
127 }
128 #endif
129
130 /**
131  * @}
132  */
133
134 #endif /* __VOICE_CONTROL_MANAGER_INTERNAL_H__ */
135