diff options
author | James Willcox <snopr@snorp.net> | 2005-09-09 20:48:41 +0000 |
---|---|---|
committer | James Willcox <snopr@snorp.net> | 2005-09-09 20:48:41 +0000 |
commit | 223014183d626cd4cf6fb2cb7b17319375688138 (patch) | |
tree | a7c02650b51fec8eafceb3397741ff03d46d1f46 /avahi-common | |
parent | 8a3450396a4d60565b34cbce73aa03eb61389bb0 (diff) |
add some data access api to string list, and use it in ServiceResolver
git-svn-id: file:///home/lennart/svn/public/avahi/trunk@550 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe
Diffstat (limited to 'avahi-common')
-rw-r--r-- | avahi-common/strlst.c | 15 | ||||
-rw-r--r-- | avahi-common/strlst.h | 9 |
2 files changed, 24 insertions, 0 deletions
diff --git a/avahi-common/strlst.c b/avahi-common/strlst.c index 0c61857..72a0059 100644 --- a/avahi-common/strlst.c +++ b/avahi-common/strlst.c @@ -446,3 +446,18 @@ int avahi_string_list_get_pair(AvahiStringList *l, char **key, char **value, siz return 0; } + +AvahiStringList *avahi_string_list_get_next(AvahiStringList *l) { + assert(l); + return l->next; +} + +const uint8_t *avahi_string_list_get_text(AvahiStringList *l) { + assert(l); + return l->text; +} + +size_t avahi_string_list_get_size(AvahiStringList *l) { + assert(l); + return l->size; +} diff --git a/avahi-common/strlst.h b/avahi-common/strlst.h index 47fd14b..0f8c8d4 100644 --- a/avahi-common/strlst.h +++ b/avahi-common/strlst.h @@ -133,6 +133,15 @@ AvahiStringList *avahi_string_list_add_pair(AvahiStringList *l, const char *key, /** Same as avahi_string_list_add_pair() but allow strings containing NUL bytes in *value. */ AvahiStringList *avahi_string_list_add_pair_arbitrary(AvahiStringList *l, const char *key, const uint8_t *value, size_t size); +/** Returns the next item in the string list */ +AvahiStringList *avahi_string_list_get_next(AvahiStringList *l); + +/** Returns the text for the current item */ +const uint8_t *avahi_string_list_get_text(AvahiStringList *l); + +/** Returns the size of the current text */ +size_t avahi_string_list_get_size(AvahiStringList *l); + AVAHI_C_DECL_END #endif |