4 * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
6 * Contact: Sangchul Lee <sc11.lee@samsung.com>
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
12 * http://www.apache.org/licenses/LICENSE-2.0
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.
23 * @file mm_sound_focus.h
24 * @brief Application interface library for sound module.
27 * Application interface library for sound module.
30 #ifndef __MM_SOUND_FOCUS_H__
31 #define __MM_SOUND_FOCUS_H__
40 } mm_sound_focus_state_e;
47 } mm_sound_focus_type_e;
49 int mm_sound_focus_get_id(int *id);
50 int mm_sound_focus_is_cb_thread(bool *result);
52 typedef void (*mm_sound_focus_changed_cb) (int id, mm_sound_focus_type_e focus_type, mm_sound_focus_state_e state, const char *reason_for_change, int option, const char *ext_info, void *user_data);
53 int mm_sound_register_focus(int id, const char *stream_type, mm_sound_focus_changed_cb callback, void *user_data);
54 int mm_sound_unregister_focus(int id);
55 int mm_sound_set_focus_reacquisition(int id, bool reacquisition);
56 int mm_sound_get_focus_reacquisition(int id, bool *reacquisition);
57 int mm_sound_get_stream_type_of_acquired_focus(int focus_type, char **stream_type, int *option, char **ext_info);
58 int mm_sound_acquire_focus(int id, mm_sound_focus_type_e focus_type, const char *ext_info);
59 int mm_sound_release_focus(int id, mm_sound_focus_type_e focus_type, const char *ext_info);
60 int mm_sound_acquire_focus_with_option(int id, mm_sound_focus_type_e focus_type, int option, const char *ext_info);
61 int mm_sound_release_focus_with_option(int id, mm_sound_focus_type_e focus_type, int option, const char *ext_info);
62 int mm_sound_update_focus_status(int id, unsigned int status);
63 int mm_sound_deliver_focus(int src_id, int dst_id, mm_sound_focus_type_e focus_type);
65 typedef void (*mm_sound_focus_changed_watch_cb) (int id, mm_sound_focus_type_e focus_type, mm_sound_focus_state_e state, const char *reason_for_change, const char *ext_info, void *user_data);
66 int mm_sound_set_focus_watch_callback(mm_sound_focus_type_e focus_type, mm_sound_focus_changed_watch_cb callback, void *user_data, int *id);
67 int mm_sound_unset_focus_watch_callback(int id);
73 #endif /* __MM_SOUND_FOCUS_H__ */