summaryrefslogtreecommitdiff
path: root/firmware
diff options
context:
space:
mode:
authorStuart Martin <mister_wavey@rockbox.org>2002-04-30 19:14:19 +0000
committerStuart Martin <mister_wavey@rockbox.org>2002-04-30 19:14:19 +0000
commit9db78d37b8f1cfdc662ecb543eec83884abafd39 (patch)
tree94bff52531b44cb2cbb8b81590eeb2bd24efa9ef /firmware
parent25ca8f2a56a8e22268f2e022eb3a00dcbaf7a327 (diff)
downloadrockbox-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')
-rw-r--r--firmware/playlist.h63
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
27typedef 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
35int persist_playlist_info( void );
36int reload_playlist_info( playlist_info_t *playlist );
37void read_entire_file( char *buf, const char *filename );
38void load_playlist( playlist_info_t *playlist, const char *filename );
39void extract_playlist_indices( char *buf, playlist_info_t *playlist );
40void display_current_playlist( playlist_info_t *playlist );
41void get_indices_as_string( char *string, playlist_info_t *playlist );
42void empty_playlist( playlist_info_t *playlist );
43track_t next_playlist_track( playlist_info_t *playlist );
44void display_playlist_track( track_t *track );
45void add_indices_to_playlist( char *buf, playlist_info_t *playlist );
46void extend_indices( playlist_info_t *playlist, int new_index );
47void randomise_playlist( playlist_info_t *playlist );
48int is_unused_random_in_list( int number, int *original_list, int count );
49
50/**********/
51
52
53
54
55
56
57int create_playlist( void );
58/*int add_to_playlist( track_t *track );*/
59int remove_from_playlist( int index );
60int set_playlist_position( void );
61/*track_t * get_previous_entry_in_playlist( void );*/
62
63#endif /* __PLAYLIST_H__ */