struct vfsref* playq_xmms_give ( void   )  [read]

XMMS-like function that retreives the next song from the playlist.

Definition at line 48 of file playq_xmms.c.

00049 {
00050         struct vfsref *vr = NULL;
00051 
00052         if (cursong != NULL)
00053                 /* Unmark it */
00054                 vfs_unmark(cursong);
00055 
00056         if (selectsong != NULL) {
00057                 /* Selected song has the highest priority */
00058                 cursong = selectsong;
00059                 selectsong = NULL;
00060         } else if (cursong != NULL) {
00061                 /* Song after current song */
00062                 cursong = vfs_list_next(cursong);
00063                 /* We've reached the end */
00064                 if (cursong == NULL && playq_repeat)
00065                         cursong = vfs_list_first(&playq_list);
00066         } else {
00067                 cursong = vfs_list_first(&playq_list);
00068         }
00069 
00070         if (cursong != NULL) {
00071                 vfs_mark(cursong);
00072                 vr = vfs_dup(cursong);
00073         }
00074 
00075         /* Update markers */
00076         gui_playq_notify_done();
00077 
00078         return (vr);
00079 }

Here is the call graph for this function:

 All Data Structures Files Functions Variables Defines
Generated on Mon Mar 15 04:45:45 2010 for herrie by  doxygen 1.6.3