]> git.meshlink.io Git - catta/blobdiff - avahi-core/server.h
* Rework some Browsing/Resolving stuff
[catta] / avahi-core / server.h
index 420c50158c115fbedf64f250f121adc44f740be8..93ae1f07acf4e2f8a4d459ae39e7d002e1b24e17 100644 (file)
@@ -28,7 +28,7 @@
 #include "llist.h"
 #include "timeeventq.h"
 #include "announce.h"
-#include "subscribe.h"
+#include "resolve.h"
 #include "dns.h"
 #include "rrlist.h"
 
@@ -68,35 +68,49 @@ struct AvahiServer {
     GMainContext *context;
     AvahiInterfaceMonitor *monitor;
 
+    AvahiServerConfig config;
+
     AVAHI_LLIST_HEAD(AvahiEntry, entries);
     GHashTable *entries_by_key;
 
     AVAHI_LLIST_HEAD(AvahiEntryGroup, groups);
     
-    AVAHI_LLIST_HEAD(AvahiSubscription, subscriptions);
-    GHashTable *subscription_hashtable;
+    AVAHI_LLIST_HEAD(AvahiRecordBrowser, record_browsers);
+    GHashTable *record_browser_hashtable;
+    AVAHI_LLIST_HEAD(AvahiHostNameResolver, host_name_resolvers);
+    AVAHI_LLIST_HEAD(AvahiAddressResolver, address_resolvers);
+    AVAHI_LLIST_HEAD(AvahiDomainBrowser, domain_browsers);
 
-    gboolean need_entry_cleanup, need_group_cleanup;
+    gboolean need_entry_cleanup, need_group_cleanup, need_browser_cleanup;
     
     AvahiTimeEventQueue *time_event_queue;
     
-    gchar *host_name, *host_name_fqdn, *domain;
+    gchar *host_name, *host_name_fqdn, *domain_name;
 
     gint fd_ipv4, fd_ipv6;
 
     GPollFD pollfd_ipv4, pollfd_ipv6;
     GSource *source;
 
-    gboolean ignore_bad_ttl;
+    AvahiServerState state;
+    AvahiServerCallback callback;
+    gpointer userdata;
+
+    AvahiEntryGroup *hinfo_entry_group;
+    AvahiEntryGroup *browse_domain_entry_group;
+    guint n_host_rr_pending;
 
-    AvahiRecordList *record_list; /* Used for assembling responses */
+    AvahiTimeEvent *register_time_event;
+    
+    /* Used for assembling responses */
+    AvahiRecordList *record_list;
 };
 
 gboolean avahi_server_entry_match_interface(AvahiEntry *e, AvahiInterface *i);
 
 void avahi_server_post_query(AvahiServer *s, gint interface, guchar protocol, AvahiKey *key);
 
-void avahi_server_prepare_response(AvahiServer *s, AvahiInterface *i, AvahiEntry *e, gboolean unicast_response);
+void avahi_server_prepare_response(AvahiServer *s, AvahiInterface *i, AvahiEntry *e, gboolean unicast_response, gboolean auxiliary);
 void avahi_server_prepare_matching_responses(AvahiServer *s, AvahiInterface *i, AvahiKey *k, gboolean unicast_response);
 void avahi_server_generate_response(AvahiServer *s, AvahiInterface *i, AvahiDnsPacket *p, const AvahiAddress *a, guint16 port, gboolean legacy_unicast);
 
@@ -104,4 +118,11 @@ void avahi_entry_group_change_state(AvahiEntryGroup *g, AvahiEntryGroupState sta
 
 gboolean avahi_entry_commited(AvahiEntry *e);
 
+void avahi_server_enumerate_aux_records(AvahiServer *s, AvahiInterface *i, AvahiRecord *r, void (*callback)(AvahiServer *s, AvahiRecord *r, gboolean flush_cache, gpointer userdata), gpointer userdata);
+
+void avahi_host_rr_entry_group_callback(AvahiServer *s, AvahiEntryGroup *g, AvahiEntryGroupState state, void *userdata);
+
+void avahi_server_decrease_host_rr_pending(AvahiServer *s);
+void avahi_server_increase_host_rr_pending(AvahiServer *s);
+
 #endif