18914
|
1 /*
|
|
2 MPlayer Gui for win32
|
|
3 Copyright (c) 2003 Sascha Sommer <saschasommer@freenet.de>
|
|
4 Copyright (c) 2006 Erik Augustson <erik_27can@yahoo.com>
|
|
5 Copyright (c) 2006 Gianluigi Tiesi <sherpya@netfarm.it>
|
|
6
|
|
7 This program is free software; you can redistribute it and/or modify
|
|
8 it under the terms of the GNU General Public License as published by
|
|
9 the Free Software Foundation; either version 2 of the License, or
|
|
10 (at your option) any later version.
|
|
11
|
|
12 This program is distributed in the hope that it will be useful,
|
|
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
15 GNU General Public License for more details.
|
|
16
|
|
17 You should have received a copy of the GNU General Public License
|
|
18 along with this program; if not, write to the Free Software
|
|
19 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02111-1307 USA
|
|
20 */
|
|
21
|
|
22 #ifndef _PLAYLIST_H
|
|
23 #define _PLAYLIST_H
|
|
24
|
|
25 typedef struct
|
|
26 {
|
|
27 char *filename;
|
|
28 char *artist;
|
|
29 char *title;
|
|
30 int duration;
|
|
31 } pl_track_t;
|
|
32
|
|
33 typedef struct playlist_t playlist_t;
|
|
34 struct playlist_t
|
|
35 {
|
|
36 int current; /* currently used track */
|
|
37 int trackcount; /* number of tracknumber */
|
|
38 pl_track_t **tracks; /* tracklist */
|
|
39 void (*add_track)(playlist_t* playlist, const char *filename, const char *artist, const char *title, int duration);
|
|
40 void (*remove_track)(playlist_t* playlist, int number);
|
|
41 void (*moveup_track)(playlist_t* playlist, int number);
|
|
42 void (*movedown_track)(playlist_t* playlist, int number);
|
|
43 void (*dump_playlist)(playlist_t* playlist);
|
|
44 void (*sort_playlist)(playlist_t* playlist, int opt);
|
|
45 void (*clear_playlist)(playlist_t* playlist);
|
|
46 void (*free_playlist)(playlist_t* playlist);
|
|
47 };
|
|
48
|
|
49 #define SORT_BYFILENAME 1
|
|
50 #define SORT_BYARTIST 2
|
|
51 #define SORT_BYTITLE 3
|
|
52 #define SORT_BYDURATION 4
|
|
53
|
|
54 extern playlist_t *create_playlist(void);
|
|
55 extern BOOL adddirtoplaylist(playlist_t *playlist, const char* path, BOOL recursive);
|
|
56
|
|
57 #endif
|