keysound: skip hard frequent request of keysound playback
[platform/core/multimedia/libmm-sound.git] / include / mm_sound_intf.h
1 /*
2  * libmm-sound
3  *
4  * Copyright (c) 2000 - 2016 Samsung Electronics Co., Ltd. All rights reserved.
5  *
6  * Contact: Seungbae Shin <seungbae.shin@samsung.com>
7  *
8  * Licensed under the Apache License, Version 2.0 (the "License");
9  * you may not use this file except in compliance with the License.
10  * You may obtain a copy of the License at
11  *
12  * http://www.apache.org/licenses/LICENSE-2.0
13  *
14  * Unless required by applicable law or agreed to in writing, software
15  * distributed under the License is distributed on an "AS IS" BASIS,
16  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17  * See the License for the specific language governing permissions and
18  * limitations under the License.
19  *
20  */
21
22 /**
23  * @file                mm_sound_intf.h
24  * @brief               Internal audio interfaces for audio module.
25  * @date
26  * @version             Release
27  *
28  * Internal audio interfaces for audio module.
29  * Client or Service providers can request(or handle) services,
30  * or be notified events.
31  */
32
33 #ifndef __MM_SOUND_INTF_H__
34 #define __MM_SOUND_INTF_H__
35
36 /* audio service(methods, signals) providers */
37 typedef enum audio_provider {
38         AUDIO_PROVIDER_DEVICE_MANAGER,
39         AUDIO_PROVIDER_STREAM_MANAGER,
40         AUDIO_PROVIDER_FOCUS_SERVER,
41         AUDIO_PROVIDER_AUDIO_CLIENT,
42         AUDIO_PROVIDER_MAX
43 } audio_provider_t;
44
45 typedef enum audio_method {
46         AUDIO_METHOD_TEST,
47         AUDIO_METHOD_GET_BT_A2DP_STATUS,
48         AUDIO_METHOD_SET_PATH_FOR_ACTIVE_DEVICE,
49         AUDIO_METHOD_GET_CONNECTED_DEVICE_LIST,
50         AUDIO_METHOD_GET_DEVICE_BY_ID,
51         AUDIO_METHOD_IS_STREAM_ON_DEVICE,
52         AUDIO_METHOD_GET_AUDIO_PATH,
53         AUDIO_METHOD_SET_VOLUME_LEVEL,
54         AUDIO_METHOD_SET_MUTE,
55
56         AUDIO_METHOD_ACQUIRE_FOCUS,
57         AUDIO_METHOD_RELEASE_FOCUS,
58         AUDIO_METHOD_UPDATE_STREAM_FOCUS_STATUS, /* It communicates with stream-manager to update focus status. */
59
60         AUDIO_METHOD_SET_FILTER,
61         AUDIO_METHOD_UNSET_FILTER,
62         AUDIO_METHOD_CONTROL_FILTER,
63
64         AUDIO_METHOD_MAX
65 } audio_method_t;
66
67 typedef enum audio_event {
68         AUDIO_EVENT_TEST,
69         AUDIO_EVENT_VOLUME_CHANGED,
70         AUDIO_EVENT_DEVICE_CONNECTED,
71         AUDIO_EVENT_DEVICE_INFO_CHANGED,
72         AUDIO_EVENT_DEVICE_STATE_CHANGED,
73         AUDIO_EVENT_FOCUS_CHANGED,
74         AUDIO_EVENT_FOCUS_WATCH,
75         AUDIO_EVENT_CLIENT_SUBSCRIBED, /* Clients send this signal when they subscribed a signal. */
76         AUDIO_EVENT_CLIENT_HANDLED, /* Clients send this signal when they handled a signal. */
77         AUDIO_EVENT_DEVICE_RUNNING_CHANGED,
78         AUDIO_EVENT_DUCKING_STATE_CHANGED,
79         AUDIO_EVENT_MAX
80 } audio_event_t;
81
82 #endif /* __MM_SOUND_INTF_H__  */