From 1ffedb586bd2fb6daa3970304fac7c5b415cd38f Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Sun, 25 Sep 2005 20:12:40 +0000 Subject: * split off lookup.h and publish.h from core.h * implement wide-area DNS-SD * if multiple clients query the same records, only start the query packet sequence once * implement recursive CNAME queries * add support for resolving services without TXT or A/AAAA records * enlarge resolving timeouts to 5s * implement new browse/resolving events CACHE_EXHAUSTED/ALL_FOR_NOW * add support for resolving services without name. (i.e. for normal SRV records) git-svn-id: file:///home/lennart/svn/public/avahi/trunk@608 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe --- avahi-core/browse.h | 34 +++++++++++++++++++++++++++++----- 1 file changed, 29 insertions(+), 5 deletions(-) (limited to 'avahi-core/browse.h') diff --git a/avahi-core/browse.h b/avahi-core/browse.h index 0d1cdb8..70e724f 100644 --- a/avahi-core/browse.h +++ b/avahi-core/browse.h @@ -23,19 +23,43 @@ ***/ #include + #include "core.h" #include "timeeventq.h" #include "server.h" +#include "dns.h" +#include "lookup.h" -void avahi_browser_cleanup(AvahiServer *server); -void avahi_browser_notify(AvahiServer *s, AvahiInterface *i, AvahiRecord *record, AvahiBrowserEvent event); +typedef struct AvahiSRBLookup AvahiSRBLookup; -int avahi_is_subscribed(AvahiServer *s, AvahiInterface *i, AvahiKey *k); +struct AvahiSRecordBrowser { + AVAHI_LLIST_FIELDS(AvahiSRecordBrowser, browser); + int dead; + AvahiServer *server; -void avahi_s_record_browser_destroy(AvahiSRecordBrowser *b); + AvahiKey *key; + AvahiIfIndex interface; + AvahiProtocol protocol; + AvahiLookupFlags flags; + + AvahiTimeEvent *defer_time_event; + + AvahiSRecordBrowserCallback callback; + void* userdata; + + /* Lookup data */ + AVAHI_LLIST_HEAD(AvahiSRBLookup, lookups); + unsigned n_lookups; + AvahiSRBLookup *root_lookup; +}; + +void avahi_browser_cleanup(AvahiServer *server); + +void avahi_s_record_browser_destroy(AvahiSRecordBrowser *b); void avahi_s_record_browser_restart(AvahiSRecordBrowser *b); +void avahi_s_record_browser_cancel(AvahiSRecordBrowser *b); -void avahi_browser_new_interface(AvahiServer*s, AvahiInterface *i); +#define AVAHI_VALID_FLAGS(flags, max) (!((flags) & ~(max))) #endif -- cgit