summaryrefslogtreecommitdiff
path: root/playlist.h
diff options
context:
space:
mode:
authorGravatar Alexey Yakovenko <wakeroid@gmail.com>2010-01-10 12:21:05 +0100
committerGravatar Alexey Yakovenko <wakeroid@gmail.com>2010-01-10 12:21:05 +0100
commit07c402bc06c7158b5669f622ff7d1896ce423ff7 (patch)
treeb50673ade6bc1b2a9dbfdf819434ee08b11f55f9 /playlist.h
parent5e65f53c6064a6eb977cdcf8a735a22f9a0deb7a (diff)
playlist structural changes
Diffstat (limited to 'playlist.h')
-rw-r--r--playlist.h30
1 files changed, 22 insertions, 8 deletions
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);