]> git.meshlink.io Git - catta/blobdiff - avahi-common/strlst.h
* replace guchar and gint by AvahiProtocol, AvahiIfIndex at many places where it...
[catta] / avahi-common / strlst.h
index 1d9ef34f961c40283b70668572b04e0e887b85f1..99a9d2aa2b0fb0769fa11ab9dfcf8d22fa89f04f 100644 (file)
@@ -25,6 +25,8 @@
 #include <glib.h>
 #include <avahi-common/cdecl.h>
 
+/** \file strlst.h Implementation of a data type to store lists of strings */
+
 AVAHI_C_DECL_BEGIN
 
 /** Linked list of strings that can contain any number of binary
@@ -47,6 +49,11 @@ AvahiStringList *avahi_string_list_new(const gchar *txt, ...);
 /** Same as avahi_string_list_new() but pass a va_list structure */
 AvahiStringList *avahi_string_list_new_va(va_list va);
 
+/** Create a new string list from a string array. The strings are
+ * copied using g_strdup(). length should contain the length of the
+ * array, or -1 if the array is NULL terminated*/
+AvahiStringList *avahi_string_list_new_from_array(const gchar **array, gint length);
+
 /** Free a string list */
 void avahi_string_list_free(AvahiStringList *l);
 
@@ -86,6 +93,12 @@ gboolean avahi_string_list_equal(const AvahiStringList *a, const AvahiStringList
 /** Copy a string list */
 AvahiStringList *avahi_string_list_copy(const AvahiStringList *l);
 
+/** Reverse the string list. */
+AvahiStringList* avahi_string_list_reverse(AvahiStringList *l);
+
+/** Return the number of elements in the string list */
+guint avahi_string_list_length(const AvahiStringList *l);
+
 AVAHI_C_DECL_END
 
 #endif