Let's start tizen audio 3.0
[platform/core/multimedia/libmm-sound.git] / include / mm_sound_utils.h
1 /*
2  * libmm-sound
3  *
4  * Copyright (c) 2000 - 2011 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_utils.h
24  * @brief               Internal utility library for sound module.
25  * @date
26  * @version             Release
27  *
28  * Internal utility library for sound module.
29  */
30
31 #ifndef __MM_SOUND_UTILS_H__
32 #define __MM_SOUND_UTILS_H__
33
34 #include <mm_types.h>
35 #include <mm_error.h>
36 #include <unistd.h>
37
38 #include "../include/mm_sound.h"
39
40 #ifdef __cplusplus
41         extern "C" {
42 #endif
43
44 int mm_sound_util_get_valid_route_list(mm_sound_route **route_list);
45 bool mm_sound_util_is_route_valid(mm_sound_route route);
46 void mm_sound_util_get_devices_from_route(mm_sound_route route, mm_sound_device_in *device_in, mm_sound_device_out *device_out);
47 int mm_sound_util_volume_add_callback(volume_type_t type, void *func, void* user_data);
48 int mm_sound_util_volume_remove_callback(volume_type_t type, void *func);
49 int mm_sound_util_volume_get_value_by_type(volume_type_t type, unsigned int *value);
50 int mm_sound_util_volume_set_value_by_type(volume_type_t type, unsigned int value);
51 int mm_sound_util_get_earjack_type(int* type);
52 int mm_sound_util_get_dock_type (int *type);
53
54 bool mm_sound_util_is_recording (void);
55 bool mm_sound_util_is_mute_policy (void);
56
57 bool mm_sound_util_is_process_alive(pid_t pid);
58
59 #ifdef __cplusplus
60 }
61 #endif
62
63 #endif /* __MM_SOUND_UTILS_H__ */
64