[avahi] about the scanf like function

Sebastien Estienne sebastien.estienne at gmail.com
Mon Aug 22 02:36:16 PDT 2005


hello

as we started to talking with lennart on the irc, when you resolve a
service you get a avahistrlst for TXT record, which is a string list
looking like this:
"foo=bar","abc=123","comment=ok"
so most of the time (if not always) people are interested in knowing
the values of this list in a key/value pair.

So i think they need some kind of avahistrlst iterator, a bit in the
same fashion than this:
http://www.porchdogsoft.com/products/howl/docs/txt_rec_iter.html#sw_text_record_iterator_next

this function would be similar to avahi_string_list_add_printf but for
doing the reverse operation

Another possiblility is to have a set of functions especially designed
to handle TXT record, like:
char * avahi_text_record_get_value_from_key(AvahiStringList *l, const
char *key); //return value

to be coherent we may add avahi_text_text_record_set

what do you think?
-- 
Sebastien Estienne


More information about the avahi mailing list