25 #include <sys/types.h> 29 #include <avahi-common/cdecl.h> 30 #include <avahi-common/gccmacro.h> 117 size_t avahi_string_list_serialize(
AvahiStringList *l,
void * data,
size_t size);
120 int avahi_string_list_parse(const
void *data,
size_t size,
AvahiStringList **ret);
size_t avahi_string_list_get_size(AvahiStringList *l)
Returns the size of the current text.
uint8_t text[1]
Character data.
void avahi_string_list_free(AvahiStringList *l)
Free a string list.
AvahiStringList * avahi_string_list_add_printf(AvahiStringList *l, const char *format,...) AVAHI_GCC_PRINTF_ATTR23
Append a new NUL terminated formatted string to the specified string list.
AvahiStringList * avahi_string_list_add_many(AvahiStringList *r,...) AVAHI_GCC_SENTINEL
Same as avahi_string_list_add(), but takes a variable number of NUL terminated strings.
AvahiStringList * avahi_string_list_add_anonymous(AvahiStringList *l, size_t size)
Append a new entry to the string list.
size_t size
Size of text[].
int avahi_string_list_get_pair(AvahiStringList *l, char **key, char **value, size_t *size)
Return the DNS-SD TXT key and value for the specified string list item.
AvahiStringList * avahi_string_list_get_next(AvahiStringList *l)
Returns the next item in the string list.
uint8_t * avahi_string_list_get_text(AvahiStringList *l)
Returns the text for the current item.
AvahiStringList * avahi_string_list_add(AvahiStringList *l, const char *text)
Append a NUL terminated string to the specified string list.
char * avahi_string_list_to_string(AvahiStringList *l)
Convert the string list object to a single character string, seperated by spaces and enclosed in ""...
AvahiStringList * avahi_string_list_new(const char *txt,...) AVAHI_GCC_SENTINEL
Create a new string list by taking a variable list of NUL terminated strings.
Linked list of strings that can contain any number of binary characters, including NUL bytes...
unsigned avahi_string_list_length(const AvahiStringList *l)
Return the number of elements in the string list.
AvahiStringList * avahi_string_list_reverse(AvahiStringList *l)
Reverse the string list.
AvahiStringList * avahi_string_list_find(AvahiStringList *l, const char *key)
Find the string list entry for the given DNS-SD TXT key.
AvahiStringList * avahi_string_list_add_pair(AvahiStringList *l, const char *key, const char *value)
Add a new DNS-SD TXT key value pair to the string list.
struct AvahiStringList * next
Pointer to the next linked list element.
AvahiStringList * avahi_string_list_new_from_array(const char **array, int length)
Create a new string list from a string array.
AvahiStringList * avahi_string_list_add_arbitrary(AvahiStringList *l, const uint8_t *text, size_t size)
Append an arbitrary length byte string to the list.
int avahi_string_list_equal(const AvahiStringList *a, const AvahiStringList *b)
Compare to string lists.
struct AvahiStringList AvahiStringList
Linked list of strings that can contain any number of binary characters, including NUL bytes...
AvahiStringList * avahi_string_list_add_pair_arbitrary(AvahiStringList *l, const char *key, const uint8_t *value, size_t size)
Same as avahi_string_list_add_pair() but allow strings containing NUL bytes in *value.
AvahiStringList * avahi_string_list_copy(const AvahiStringList *l)
Copy a string list.