merge with master
[apps/core/preloaded/ug-myfile-efl.git] / src / include / mf-ug-list-play.h
1 /*
2  * Copyright 2012          Samsung Electronics Co., Ltd
3  *
4  * Licensed under the Flora License, Version 1.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *  http://floralicense.org/license/
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16
17
18 #ifndef __MF_UG_LIST_PLAY_H
19 #define __MF_UG_LIST_PLAY_H
20
21 #include <player.h>
22 #include <sound_manager.h>
23
24 typedef enum {
25         MF_PLAYER_CB_TYPE_STARTED,
26         MF_PLAYER_CB_TYPE_PAUSED,
27         MF_PLAYER_CB_TYPE_COMPLETED,
28         MF_PLAYER_CB_TYPE_INTURRUPTED,
29         MF_PLAYER_CB_TYPE_ERROR,
30         MF_PLAYER_CB_TYPE_BUFFERING,
31         MF_PLAYER_CB_TYPE_PREPARE,
32         MF_PLAYER_CB_TYPE_NUM,
33 } mf_player_cb_type;
34
35 typedef enum {
36         MF_VOLUME_NONE,
37         MF_VOLUME_ALERT,
38         MF_VOLUME_NOTIFICATION,
39         MF_VOLUME_RINGTONE,
40         MF_VOLUME_NUM
41 } mf_player_volume_type;
42
43
44 typedef struct __mf_player_cbs mf_player_cbs;
45 struct __mf_player_cbs{
46         /* player callbacks */
47         /*note: start callback and paused callback for player have been removed*/
48         /*player_started_cb started_cb;*/
49         /*player_paused_cb paused_cb;*/
50         player_completed_cb completed_cb;
51         player_interrupted_cb interrupted_cb;
52         player_error_cb error_cb;
53         player_buffering_cb buffering_cb;
54         player_prepared_cb prepare_cb;
55
56         /* callback user data */
57         void *user_data[MF_PLAYER_CB_TYPE_NUM];
58 };
59
60
61 typedef struct {
62         mf_player_cb_type cb_type;
63
64         union {
65                 player_interrupted_code_e interrupted_code;
66                 int error_code;
67                 int percent;
68         } param;
69 } mf_player_cb_extra_data;
70
71 void mf_ug_player_vol_set(const char *path);
72 void mf_ug_list_play_pause(void *data);
73
74 #endif