55daf5bcf606ffd145b0d352c2aa4ec87f096259
[platform/core/multimedia/libmm-sound.git] / include / mm_sound_proxy.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_proxy.h
24  * @brief               Client-Side proxy interface for audio module.
25  * @date
26  * @version             Release
27  *
28  * Client-Side proxy interface for audio module.
29  */
30
31 #ifndef __MM_SOUND_PROXY_H__
32 #define __MM_SOUND_PROXY_H__
33
34 #include "mm_sound_private.h"
35 #include "mm_sound_device.h"
36 #include "mm_sound_focus.h"
37 #include "include/mm_sound_client.h"
38
39 typedef void (*mm_sound_proxy_userdata_free) (void *data);
40
41 int mm_sound_proxy_get_current_connected_device_list(int device_flags, GList** device_list);
42 int mm_sound_proxy_get_device_by_id(int device_id, mm_sound_device_t **device);
43 int mm_sound_proxy_add_device_connected_callback(mm_sound_device_connected_wrapper_cb func, void *userdata, mm_sound_proxy_userdata_free freefunc, unsigned *subs_id);
44 int mm_sound_proxy_remove_device_connected_callback(unsigned subs_id);
45 int mm_sound_proxy_add_device_info_changed_callback(mm_sound_device_info_changed_wrapper_cb func, void* userdata, mm_sound_proxy_userdata_free freefunc, unsigned *subs_id);
46 int mm_sound_proxy_remove_device_info_changed_callback(unsigned subs_id);
47 int mm_sound_proxy_add_device_state_changed_callback(mm_sound_device_state_changed_wrapper_cb func, void* userdata, mm_sound_proxy_userdata_free freefunc, unsigned *subs_id);
48 int mm_sound_proxy_remove_device_state_changed_callback(unsigned subs_id);
49 int mm_sound_proxy_add_device_running_changed_callback(mm_sound_device_running_changed_wrapper_cb func, void* userdata, mm_sound_proxy_userdata_free freefunc, unsigned *subs_id);
50 int mm_sound_proxy_remove_device_running_changed_callback(unsigned subs_id);
51 int mm_sound_proxy_is_stream_on_device(int stream_id, int device_id, bool *is_on);
52 int mm_sound_proxy_set_volume_by_type(const char *volume_type, const unsigned volume_level);
53 int mm_sound_proxy_add_volume_changed_callback(mm_sound_volume_changed_wrapper_cb func, void* userdata, mm_sound_proxy_userdata_free freefunc, unsigned *subs_id);
54 int mm_sound_proxy_remove_volume_changed_callback(unsigned subs_id);
55 int mm_sound_proxy_add_ducking_state_changed_callback(mm_sound_ducking_state_changed_wrapper_cb func, void* userdata, mm_sound_proxy_userdata_free freefunc, unsigned *subs_id);
56 int mm_sound_proxy_remove_ducking_state_changed_callback(unsigned subs_id);
57 int mm_sound_proxy_set_mute_by_type(const char *volume_type, bool mute);
58 int mm_sound_proxy_emergent_exit(int exit_pid);
59 int mm_sound_proxy_set_filter_by_type(const char *stream_type, const char *filter_name, const char *filter_parameters, const char *filter_group);
60 int mm_sound_proxy_unset_filter_by_type(const char *stream_type);
61 int mm_sound_proxy_control_filter_by_type(const char *stream_type, const char *filter_name, const char *filter_controls);
62
63 int mm_sound_proxy_register_focus(int pid, const char *stream_type, int *id);
64 int mm_sound_proxy_unregister_focus(int index);
65 int mm_sound_proxy_set_focus_reacquisition(int index, bool reacquisition);
66 int mm_sound_proxy_get_acquired_focus_stream_type(int focus_type, char **stream_type, int *option, char **ext_info);
67 int mm_sound_proxy_acquire_focus(int index, mm_sound_focus_type_e type, int option, const char *ext_info);
68 int mm_sound_proxy_release_focus(int index, mm_sound_focus_type_e type, int option, const char *ext_info);
69 int mm_sound_proxy_update_stream_focus_status(int focus_id, unsigned int status);
70 int mm_sound_proxy_deliver_focus(int src_index, int dst_index, mm_sound_focus_type_e focus_type);
71 int mm_sound_proxy_add_focus_watch_callback(int index, mm_sound_focus_type_e type);
72 int mm_sound_proxy_remove_focus_watch_callback(int index);
73
74 int mm_sound_proxy_add_test_callback(mm_sound_test_cb func, void *userdata, mm_sound_proxy_userdata_free freefunc, unsigned *subs_id);
75 int mm_sound_proxy_remove_test_callback(unsigned subs_id);
76 int mm_sound_proxy_test(int a, int b, int* get);
77
78 int mm_sound_proxy_initialize(void);
79 int mm_sound_proxy_finalize(void);
80
81 #endif /* __MM_SOUND_PROXY_H__ */