aboutsummaryrefslogtreecommitdiffstats
path: root/src/list.c
diff options
context:
space:
mode:
authorQball Cow <qball@qballcow.nl>2007-09-26 08:25:35 +0000
committerQball Cow <qball@qballcow.nl>2007-09-26 08:25:35 +0000
commitcb9d1b3d275fac683a4128b93a76ab72c99a0209 (patch)
tree15e8cccedd2db17faa35a040f9432d61dabb86aa /src/list.c
parent3a03b89b48eb206c82878dc7743ffc412c30039b (diff)
downloadmpd-cb9d1b3d275fac683a4128b93a76ab72c99a0209.tar.gz
mpd-cb9d1b3d275fac683a4128b93a76ab72c99a0209.tar.xz
mpd-cb9d1b3d275fac683a4128b93a76ab72c99a0209.zip
Playlist queue patch (http://musicpd.org/mantis/view.php?id=1478) version 11.
This adds the following commands: * queueid <id> Add song <id> to the queue. * dequeue <pos> Remove song from <pos> from the queue * queueinfo List the queue To the statusfield it adds the following entry: playlistqueue: <uid> UID can be used by clients to track changes in the playlist queue. git-svn-id: https://svn.musicpd.org/mpd/trunk@6927 09075e82-0dd4-0310-85a5-a0d7c8717e4f
Diffstat (limited to '')
-rw-r--r--src/list.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/list.c b/src/list.c
index 71c30f7b6..14832adb7 100644
--- a/src/list.c
+++ b/src/list.c
@@ -287,6 +287,21 @@ int findInList(List * list, char *key, void **data)
return 0;
}
+ListNode *getNodeByPosition(List *list, int pos)
+{
+ ListNode *tmpNode;
+
+ assert(list != NULL);
+ if (pos < 0 || pos >= list->numberOfNodes)
+ return NULL;
+
+ tmpNode = list->firstNode;
+ while (pos-- > 0)
+ tmpNode = tmpNode->nextNode;
+
+ return tmpNode;
+}
+
int deleteFromList(List * list, char *key)
{
ListNode *tmpNode;