Use socket for IPC of focus APIs instead of the DBus
[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_SOUND_SERVER,
39         AUDIO_PROVIDER_DEVICE_MANAGER,
40         AUDIO_PROVIDER_STREAM_MANAGER,
41         AUDIO_PROVIDER_FOCUS_SERVER,
42         AUDIO_PROVIDER_AUDIO_CLIENT,
43         AUDIO_PROVIDER_MAX
44 } audio_provider_t;
45
46 typedef enum audio_method {
47         AUDIO_METHOD_TEST,
48         AUDIO_METHOD_PLAY_FILE_START_WITH_STREAM_INFO,
49         AUDIO_METHOD_PLAY_FILE_STOP,
50         AUDIO_METHOD_PLAY_DTMF_WITH_STREAM_INFO,
51         AUDIO_METHOD_GET_BT_A2DP_STATUS,
52         AUDIO_METHOD_SET_PATH_FOR_ACTIVE_DEVICE,
53         AUDIO_METHOD_GET_CONNECTED_DEVICE_LIST,
54         AUDIO_METHOD_GET_DEVICE_BY_ID,
55         AUDIO_METHOD_IS_STREAM_ON_DEVICE,
56         AUDIO_METHOD_GET_AUDIO_PATH,
57         AUDIO_METHOD_SET_VOLUME_LEVEL,
58
59         AUDIO_METHOD_ACQUIRE_FOCUS,
60         AUDIO_METHOD_RELEASE_FOCUS,
61         AUDIO_METHOD_UPDATE_STREAM_FOCUS_STATUS, /* It communicates with stream-manager to update focus status. */
62
63         AUDIO_METHOD_SET_FILTER,
64         AUDIO_METHOD_UNSET_FILTER,
65         AUDIO_METHOD_CONTROL_FILTER,
66
67         AUDIO_METHOD_MAX
68 } audio_method_t;
69
70 typedef enum audio_event {
71         AUDIO_EVENT_TEST,
72         AUDIO_EVENT_PLAY_FILE_END,
73         AUDIO_EVENT_VOLUME_CHANGED,
74         AUDIO_EVENT_DEVICE_CONNECTED,
75         AUDIO_EVENT_DEVICE_INFO_CHANGED,
76         AUDIO_EVENT_DEVICE_STATE_CHANGED,
77         AUDIO_EVENT_FOCUS_CHANGED,
78         AUDIO_EVENT_FOCUS_WATCH,
79         AUDIO_EVENT_CLIENT_SUBSCRIBED, /* Clients send this signal when they subscribed some signal. */
80         AUDIO_EVENT_CLIENT_HANDLED, /* Clients send this siganl when they handled some signal. */
81         AUDIO_EVENT_DEVICE_RUNNING_CHANGED,
82         AUDIO_EVENT_MAX
83 } audio_event_t;
84
85 #endif /* __MM_SOUND_INTF_H__  */