From 07c402bc06c7158b5669f622ff7d1896ce423ff7 Mon Sep 17 00:00:00 2001 From: Alexey Yakovenko Date: Sun, 10 Jan 2010 12:21:05 +0100 Subject: playlist structural changes --- playlist.h | 30 ++++++++++++++++++++++-------- 1 file changed, 22 insertions(+), 8 deletions(-) (limited to 'playlist.h') diff --git a/playlist.h b/playlist.h index 0276aea2..25d4cc26 100644 --- a/playlist.h +++ b/playlist.h @@ -53,17 +53,31 @@ typedef struct playItem_s { unsigned in_playlist : 1; // 1 if item is in playlist } playItem_t; -typedef struct { - playItem_t *playlist_head[PL_MAX_ITERATORS]; // head of linked list - playItem_t *playlist_tail[PL_MAX_ITERATORS]; // tail of linked list - int playlist_current_row[PL_MAX_ITERATORS]; // current row (cursor) - playItem_t *playlist_current_ptr; // pointer to a real current playlist item (or NULL) +typedef struct playlist_s{ + char *fname; + playItem_t *head[PL_MAX_ITERATORS]; // head of linked list + playItem_t *tail[PL_MAX_ITERATORS]; // tail of linked list + int current_row[PL_MAX_ITERATORS]; // current row (cursor) + struct playlist_s *next; } playlist_t; -extern playItem_t *playlist_head[PL_MAX_ITERATORS]; // head of linked list -extern playItem_t *playlist_tail[PL_MAX_ITERATORS]; // tail of linked list -extern int playlist_current_row[PL_MAX_ITERATORS]; // current row (cursor) +// playlist management functions +int +plt_get_count (void); + +void +plt_add (int before); + +void +plt_remove (int plt); + +void +plt_set_curr (playlist_t *ptr); + +playlist_t * +plt_get_curr (void); +// playlist access functions int pl_add_dir (const char *dirname, int (*cb)(playItem_t *it, void *data), void *user_data); -- cgit v1.2.3