[avahi] gnome-vfs avahi support
Alexander Larsson
alexl at redhat.com
Tue Oct 25 23:45:07 PDT 2005
On Tue, 2005-10-25 at 19:25 +0200, Lennart Poettering wrote:
> On Tue, 25.10.05 18:39, Alexander Larsson (alexl at redhat.com) wrote:
>
> > I just commited initial support for Avahi to gnome-vfs HEAD.
> > It seems to work, although I haven't done any heavy testing.
> >
>
> Cool stuff.
>
> Some notes:
>
> There is no need to call avahi_client_get_version_string() after
> initialization to test if everything is working. Newer versions of
> avahi (including the upcoming avahi 0.6) do a call like this in
> avahi_client_new() anyway, to make sure that the client and server
> versions match. Older versions already did a GetState() call to get the
> initial state of the avahi daemon.
Maybe you should remove this from the example in the docs. That is where
I got it from. Or at least add a comment that it is not required. I
removed this.
> This is ugly:
>
> <snip>
> text_len = avahi_string_list_serialize (txt, NULL, 0);
> text = g_malloc (text_len);
> text_len = avahi_string_list_serialize (txt, text, text_len);
>
> hash = decode_txt_record (text, text_len);
> </snip>
>
> Consider enumerating though the string list directly instead of
> serializing and parsing it again.
Well, i need to serialize because the API also gives the raw serialized
form. I just cheated a bit by reusing decode_txt_record instead of
having it work on AvahiStringList. Ugly, but faster to write. :)
> Please consider supporting "_webdavs._tcp" in addition to "_wedav._tcp"!
I added that, thanks for the tip.
> When Avahi 0.6 is finally released some improvements to your code
> could certainly be made: support for AVAHI_BROWSER_ALL_FOR_NOW (which
> is issued as soon as avahi thinks the list of services found is
> "complete") and support for avahis own implementation of "DNS-SD over
> Unicast DNS" aka "Wide Area DNS-SD".
Yeah.
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Alexander Larsson Red Hat, Inc
alexl at redhat.com alla at lysator.liu.se
He's a shy umbrella-wielding card sharp in a wheelchair. She's a pregnant
nymphomaniac museum curator from Mars. They fight crime!
More information about the avahi
mailing list