tizen 2.3.1 release
[framework/multimedia/libmm-player.git] / src / include / mm_player_asm.h
1 /*
2  * libmm-player
3  *
4  * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
5  *
6  * Contact: JongHyuk Choi <jhchoi.choi@samsung.com>, YeJin Cho <cho.yejin@samsung.com>,
7  * Seungbae Shin <seungbae.shin@samsung.com>, YoungHwan An <younghwan_.an@samsung.com>
8  *
9  * Licensed under the Apache License, Version 2.0 (the "License");
10  * you may not use this file except in compliance with the License.
11  * You may obtain a copy of the License at
12  *
13  * http://www.apache.org/licenses/LICENSE-2.0
14  *
15  * Unless required by applicable law or agreed to in writing, software
16  * distributed under the License is distributed on an "AS IS" BASIS,
17  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18  * See the License for the specific language governing permissions and
19  * limitations under the License.
20  *
21  */
22
23 #ifndef __MM_PLAYER_ASM_H__
24 #define __MM_PLAYER_ASM_H__
25
26 #include <glib.h>
27 #include <mm_types.h>
28
29 #include <mm_session.h>
30 #include <mm_session_private.h>
31 #include <audio-session-manager.h>
32
33 #ifdef __cplusplus
34 extern "C" {
35 #endif
36
37 typedef struct {
38         int handle;
39         int pid;
40         bool by_asm_cb;
41         int antishock;
42         int event_src;
43         int skip_session;
44         bool keep_last_pos;
45         int user_route_policy;
46         ASM_sound_states_t state;
47         ASM_sound_events_t event;
48         ASM_resource_t resource;
49         bool exit_cb;
50         bool cb_pending;
51 } MMPlayerASM;
52
53 gint _mmplayer_asm_register(MMPlayerASM* sm, ASM_sound_cb_t callback, void* param);
54 gint _mmplayer_asm_unregister(MMPlayerASM* sm);
55 gint _mmplayer_asm_set_state(MMHandleType player, ASM_sound_states_t state, gboolean enable_safety_vol);
56 ASM_cb_result_t __mmplayer_asm_callback(int handle, ASM_event_sources_t event_src, ASM_sound_commands_t command, unsigned int sound_status, void* cb_data);
57
58 #ifdef __cplusplus
59 }
60 #endif
61
62 #endif /* __MM_PLAYER_ASM_H__ */