summaryrefslogtreecommitdiff
path: root/src/include/mf-ug-list-play.h
blob: b24f39b1ad7c36c28972b2f0b8a9536cff0687c0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
/*
 * Copyright 2012          Samsung Electronics Co., Ltd
 *
 * Licensed under the Flora License, Version 1.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *  http://floralicense.org/license/
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */


#ifndef __MF_UG_LIST_PLAY_H
#define __MF_UG_LIST_PLAY_H

#include <player.h>
#include <sound_manager.h>

typedef enum {
	MF_PLAYER_CB_TYPE_STARTED,
	MF_PLAYER_CB_TYPE_PAUSED,
	MF_PLAYER_CB_TYPE_COMPLETED,
	MF_PLAYER_CB_TYPE_INTURRUPTED,
	MF_PLAYER_CB_TYPE_ERROR,
	MF_PLAYER_CB_TYPE_BUFFERING,
	MF_PLAYER_CB_TYPE_PREPARE,
	MF_PLAYER_CB_TYPE_NUM,
} mf_player_cb_type;

typedef enum {
	MF_VOLUME_NONE,
	MF_VOLUME_ALERT,
	MF_VOLUME_NOTIFICATION,
	MF_VOLUME_RINGTONE,
	MF_VOLUME_NUM
} mf_player_volume_type;


typedef struct __mf_player_cbs mf_player_cbs;
struct __mf_player_cbs{
	/* player callbacks */
	/*note: start callback and paused callback for player have been removed*/
	/*player_started_cb started_cb;*/
	/*player_paused_cb paused_cb;*/
	player_completed_cb completed_cb;
	player_interrupted_cb interrupted_cb;
	player_error_cb error_cb;
	player_buffering_cb buffering_cb;
	player_prepared_cb prepare_cb;

	/* callback user data */
	void *user_data[MF_PLAYER_CB_TYPE_NUM];
};


typedef struct {
	mf_player_cb_type cb_type;

	union {
		player_interrupted_code_e interrupted_code;
		int error_code;
		int percent;
	} param;
} mf_player_cb_extra_data;

void mf_ug_player_vol_set(const char *path);
void mf_ug_list_play_pause(void *data);

#endif