X-Git-Url: http://git.meshlink.io/?a=blobdiff_plain;f=avahi-common%2Fstrlst.h;h=a4a4202a19c16ca9ca9f1962b3b10b60d85811e9;hb=baf1f046e0255c4e0f864044ce06fe3d360eb4da;hp=85a16f410e4458275eaba1f200c0043a6d8635d8;hpb=cc7bb72552184951e806f4d0f2449629b35b9c93;p=catta diff --git a/avahi-common/strlst.h b/avahi-common/strlst.h index 85a16f4..a4a4202 100644 --- a/avahi-common/strlst.h +++ b/avahi-common/strlst.h @@ -62,10 +62,17 @@ void avahi_string_list_free(AvahiStringList *l); * start. */ AvahiStringList *avahi_string_list_add(AvahiStringList *l, const gchar *text); -/** Append am arbitrary length byte string to the list. Returns the +/** Append an arbitrary length byte string to the list. Returns the * new list start. */ AvahiStringList *avahi_string_list_add_arbitrary(AvahiStringList *l, const guint8 *text, guint size); +/** Append a new entry to the string list. The string is not filled +with data. The caller should fill in string data afterwards by writing +it to l->text, where l is the pointer returned by this function. This +function exists solely to optimize a few operations where otherwise +superfluous string copying would be necessary. */ +AvahiStringList*avahi_string_list_add_anonymous(AvahiStringList *l, guint size); + /** Same as avahi_string_list_add(), but takes a variable number of * NUL terminated strings. The argument list must be terminated by a * NULL pointer. Returns the new list start. */ @@ -93,6 +100,13 @@ 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