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;
43 FOCUS_FOR_PLAYBACK = 1,
46 } mm_sound_focus_type_e;
48 int mm_sound_focus_get_id(int *id);
50 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, const char *additional_info, void *user_data);
51 int mm_sound_register_focus(int id, const char *stream_type, mm_sound_focus_changed_cb callback, void *user_data);
52 int mm_sound_register_focus_for_session(int id, const char *stream_type, mm_sound_focus_changed_cb callback, void *user_data);
53 int mm_sound_unregister_focus(int id);
54 int mm_sound_acquire_focus(int id, mm_sound_focus_type_e focus_type, const char *additional_info);
55 int mm_sound_release_focus(int id, mm_sound_focus_type_e focus_type, const char *additional_info);
57 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 *additional_info, void *user_data);
58 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);
59 int mm_sound_unset_focus_watch_callback(int id);
61 typedef void (*mm_sound_focus_session_interrupt_cb) (mm_sound_focus_state_e state, const char *reason_for_change, bool is_wcb, void *user_data);
62 int mm_sound_focus_set_session_interrupt_callback(mm_sound_focus_session_interrupt_cb callback, void *user_data);
63 int mm_sound_focus_unset_session_interrupt_callback(void);
70 #endif /* __MM_SOUND_FOCUS_H__ */