Add copyright notices to all relevant files. (based on svn log)
[profile/ivi/pulseaudio.git] / src / pulsecore / strlist.h
1 #ifndef foostrlisthfoo
2 #define foostrlisthfoo
3
4 /* $Id$ */
5
6 /***
7   This file is part of PulseAudio.
8
9   Copyright 2004-2006 Lennart Poettering
10
11   PulseAudio is free software; you can redistribute it and/or modify
12   it under the terms of the GNU Lesser General Public License as published
13   by the Free Software Foundation; either version 2 of the License,
14   or (at your option) any later version.
15
16   PulseAudio is distributed in the hope that it will be useful, but
17   WITHOUT ANY WARRANTY; without even the implied warranty of
18   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19   General Public License for more details.
20
21   You should have received a copy of the GNU Lesser General Public License
22   along with PulseAudio; if not, write to the Free Software
23   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
24   USA.
25 ***/
26
27 typedef struct pa_strlist pa_strlist;
28
29 /* Add the specified server string to the list, return the new linked list head */
30 pa_strlist* pa_strlist_prepend(pa_strlist *l, const char *s);
31
32 /* Remove the specified string from the list, return the new linked list head */
33 pa_strlist* pa_strlist_remove(pa_strlist *l, const char *s);
34
35 /* Make a whitespace separated string of all server stringes. Returned memory has to be freed with pa_xfree() */
36 char *pa_strlist_tostring(pa_strlist *l);
37
38 /* Free the entire list */
39 void pa_strlist_free(pa_strlist *l);
40
41 /* Return the next entry in the list in *string and remove it from
42  * the list. Returns the new list head. The memory *string points to
43  * has to be freed with pa_xfree() */
44 pa_strlist* pa_strlist_pop(pa_strlist *l, char **s);
45
46 /* Parse a whitespace separated server list */
47 pa_strlist* pa_strlist_parse(const char *s);
48
49 #endif