diff options
author | Stuart Martin <mister_wavey@rockbox.org> | 2002-04-30 19:14:19 +0000 |
---|---|---|
committer | Stuart Martin <mister_wavey@rockbox.org> | 2002-04-30 19:14:19 +0000 |
commit | 9db78d37b8f1cfdc662ecb543eec83884abafd39 (patch) | |
tree | 94bff52531b44cb2cbb8b81590eeb2bd24efa9ef /firmware/playlist.h | |
parent | 25ca8f2a56a8e22268f2e022eb3a00dcbaf7a327 (diff) | |
download | rockbox-9db78d37b8f1cfdc662ecb543eec83884abafd39.tar.gz rockbox-9db78d37b8f1cfdc662ecb543eec83884abafd39.zip |
header for playlists
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@332 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/playlist.h')
-rw-r--r-- | firmware/playlist.h | 63 |
1 files changed, 63 insertions, 0 deletions
diff --git a/firmware/playlist.h b/firmware/playlist.h new file mode 100644 index 0000000000..cd9e07deec --- /dev/null +++ b/firmware/playlist.h | |||
@@ -0,0 +1,63 @@ | |||
1 | /*************************************************************************** | ||
2 | * __________ __ ___. | ||
3 | * Open \______ \ ____ ____ | | _\_ |__ _______ ___ | ||
4 | * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / | ||
5 | * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < | ||
6 | * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ | ||
7 | * \/ \/ \/ \/ \/ | ||
8 | * $Id$ | ||
9 | * | ||
10 | * Copyright (C) 2002 by wavey@wavey.org | ||
11 | * | ||
12 | * All files in this archive are subject to the GNU General Public License. | ||
13 | * See the file COPYING in the source tree root for full license agreement. | ||
14 | * | ||
15 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY | ||
16 | * KIND, either express or implied. | ||
17 | * | ||
18 | ****************************************************************************/ | ||
19 | |||
20 | #ifndef __PLAYLIST_H__ | ||
21 | #define __PLAYLIST_H__ | ||
22 | |||
23 | #include "common/track.h" | ||
24 | |||
25 | /* playlist data */ | ||
26 | |||
27 | typedef struct | ||
28 | { | ||
29 | char filename[256]; /* path name of m3u playlist on disk */ | ||
30 | int *indices; /* array of indices into the playlist */ | ||
31 | int indices_count; /* current size of indices array */ | ||
32 | int index; /* index of current track within playlist */ | ||
33 | } playlist_info_t; | ||
34 | |||
35 | int persist_playlist_info( void ); | ||
36 | int reload_playlist_info( playlist_info_t *playlist ); | ||
37 | void read_entire_file( char *buf, const char *filename ); | ||
38 | void load_playlist( playlist_info_t *playlist, const char *filename ); | ||
39 | void extract_playlist_indices( char *buf, playlist_info_t *playlist ); | ||
40 | void display_current_playlist( playlist_info_t *playlist ); | ||
41 | void get_indices_as_string( char *string, playlist_info_t *playlist ); | ||
42 | void empty_playlist( playlist_info_t *playlist ); | ||
43 | track_t next_playlist_track( playlist_info_t *playlist ); | ||
44 | void display_playlist_track( track_t *track ); | ||
45 | void add_indices_to_playlist( char *buf, playlist_info_t *playlist ); | ||
46 | void extend_indices( playlist_info_t *playlist, int new_index ); | ||
47 | void randomise_playlist( playlist_info_t *playlist ); | ||
48 | int is_unused_random_in_list( int number, int *original_list, int count ); | ||
49 | |||
50 | /**********/ | ||
51 | |||
52 | |||
53 | |||
54 | |||
55 | |||
56 | |||
57 | int create_playlist( void ); | ||
58 | /*int add_to_playlist( track_t *track );*/ | ||
59 | int remove_from_playlist( int index ); | ||
60 | int set_playlist_position( void ); | ||
61 | /*track_t * get_previous_entry_in_playlist( void );*/ | ||
62 | |||
63 | #endif /* __PLAYLIST_H__ */ | ||