From 23a798caf6aa70bbff3fcbe9bbdb50d602bd1bb3 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Thu, 30 Apr 2009 01:33:56 +0200 Subject: strlist: add new calls pa_strlist_{next|data}() --- src/pulsecore/strlist.c | 12 ++++++++++++ src/pulsecore/strlist.h | 6 ++++++ 2 files changed, 18 insertions(+) (limited to 'src') diff --git a/src/pulsecore/strlist.c b/src/pulsecore/strlist.c index cbafbba6..0f4ca867 100644 --- a/src/pulsecore/strlist.c +++ b/src/pulsecore/strlist.c @@ -159,3 +159,15 @@ pa_strlist *pa_strlist_reverse(pa_strlist *l) { return r; } + +pa_strlist *pa_strlist_next(pa_strlist *s) { + pa_assert(s); + + return s->next; +} + +const char *pa_strlist_data(pa_strlist *s) { + pa_assert(s); + + return ITEM_TO_TEXT(s); +} diff --git a/src/pulsecore/strlist.h b/src/pulsecore/strlist.h index 2584e86c..e57203c5 100644 --- a/src/pulsecore/strlist.h +++ b/src/pulsecore/strlist.h @@ -47,4 +47,10 @@ pa_strlist* pa_strlist_parse(const char *s); /* Reverse string list */ pa_strlist *pa_strlist_reverse(pa_strlist *l); +/* Return the next item in the list */ +pa_strlist *pa_strlist_next(pa_strlist *s); + +/* Return the string associated to the current item */ +const char *pa_strlist_data(pa_strlist *s); + #endif -- cgit