+ AvahiIfIndex interface,
+ AvahiProtocol protocol,
+ const gchar *domain,
+ AvahiDNSServerType type,
+ const AvahiAddress *address,
+ guint16 port /** should be 53 */);
+
+/** Similar to avahi_server_add_dns_server_address(), but specify a
+host name instead of an address. The specified host name should be
+resolvable via mDNS */
+gint avahi_server_add_dns_server_name(
+ AvahiServer *s,
+ AvahiEntryGroup *g,
+ AvahiIfIndex interface,
+ AvahiProtocol protocol,
+ const gchar *domain,
+ AvahiDNSServerType type,
+ const gchar *name,
+ guint16 port /** should be 53 */);
+
+/** Type of callback event when browsing */
+typedef enum {
+ AVAHI_BROWSER_NEW = 0, /**< The object is new on the network */
+ AVAHI_BROWSER_REMOVE = -1 /**< The object has been removed from the network */
+} AvahiBrowserEvent;
+
+/** Type of callback event when resolving */
+typedef enum {
+ AVAHI_RESOLVER_FOUND = 0, /**< RR found, resolving successful */
+ AVAHI_RESOLVER_TIMEOUT = -1 /**< Noone responded within the timeout, resolving failed */
+} AvahiResolverEvent;
+
+/** A browsing object for arbitrary RRs */
+typedef struct AvahiRecordBrowser AvahiRecordBrowser;
+
+/** Callback prototype for AvahiRecordBrowser events */
+typedef void (*AvahiRecordBrowserCallback)(
+ AvahiRecordBrowser *b, /**< The AvahiRecordBrowser object that is emitting this callback */
+ AvahiIfIndex interface, /**< Logical OS network interface number the record was found on */
+ AvahiProtocol protocol, /**< Protocol number the record was found. */
+ AvahiBrowserEvent event, /**< Browsing event, either AVAHI_BROWSER_NEW or AVAHI_BROWSER_REMOVE */
+ AvahiRecord *record, /**< The record that was found */
+ gpointer userdata /**< Arbitrary user data passed to avahi_record_browser_new() */ );
+
+/** Create a new browsing object for arbitrary RRs */
+AvahiRecordBrowser *avahi_record_browser_new(
+ AvahiServer *server, /**< The server object to which attach this query */
+ AvahiIfIndex interface, /**< Logical OS interface number where to look for the records, or AVAHI_IF_UNSPEC to look on interfaces */
+ AvahiProtocol protocol, /**< Protocol number to use when looking for the record, or AVAHI_PROTO_UNSPEC to look on all protocols */
+ AvahiKey *key, /**< The search key */
+ AvahiRecordBrowserCallback callback, /**< The callback to call on browsing events */
+ gpointer userdata /**< Arbitrary use suppliable data which is passed to the callback */);
+
+/** Free an AvahiRecordBrowser object */
+void avahi_record_browser_free(AvahiRecordBrowser *b);
+
+/** A host name to IP adddress resolver object */
+typedef struct AvahiHostNameResolver AvahiHostNameResolver;
+
+/** Callback prototype for AvahiHostNameResolver events */
+typedef void (*AvahiHostNameResolverCallback)(
+ AvahiHostNameResolver *r,
+ AvahiIfIndex interface,
+ AvahiProtocol protocol,
+ AvahiResolverEvent event, /**< Resolving event */
+ const gchar *host_name, /**< Host name which should be resolved. May differ in case from the query */
+ const AvahiAddress *a, /**< The address, or NULL if the host name couldn't be resolved. */
+ gpointer userdata);
+
+/** Create an AvahiHostNameResolver object for resolving a host name to an adddress. See AvahiRecordBrowser for more info on the paramters. */
+AvahiHostNameResolver *avahi_host_name_resolver_new(
+ AvahiServer *server,
+ AvahiIfIndex interface,
+ AvahiProtocol protocol,
+ const gchar *host_name, /**< The host name to look for */
+ AvahiProtocol aprotocol, /**< The address family of the desired address or AVAHI_PROTO_UNSPEC if doesn't matter. */
+ AvahiHostNameResolverCallback calback,
+ gpointer userdata);
+
+/** Free a AvahiHostNameResolver object */
+void avahi_host_name_resolver_free(AvahiHostNameResolver *r);
+
+/** An IP address to host name resolver object ("reverse lookup") */
+typedef struct AvahiAddressResolver AvahiAddressResolver;
+
+/** Callback prototype for AvahiAddressResolver events */
+typedef void (*AvahiAddressResolverCallback)(
+ AvahiAddressResolver *r,
+ AvahiIfIndex interface,
+ AvahiProtocol protocol,
+ AvahiResolverEvent event,
+ const AvahiAddress *a,
+ const gchar *host_name, /**< A host name for the specified address, if one was found, i.e. event == AVAHI_RESOLVER_FOUND */
+ gpointer userdata);
+
+/** Create an AvahiAddressResolver object. See AvahiRecordBrowser for more info on the paramters. */
+AvahiAddressResolver *avahi_address_resolver_new(
+ AvahiServer *server,
+ AvahiIfIndex interface,
+ AvahiProtocol protocol,
+ const AvahiAddress *address,
+ AvahiAddressResolverCallback calback,
+ gpointer userdata);
+
+/** Free an AvahiAddressResolver object */
+void avahi_address_resolver_free(AvahiAddressResolver *r);
+
+/** The type of domain to browse for */
+typedef enum {
+ AVAHI_DOMAIN_BROWSER_REGISTER, /**< Browse for a list of available registering domains */
+ AVAHI_DOMAIN_BROWSER_REGISTER_DEFAULT, /**< Browse for the default registering domain */
+ AVAHI_DOMAIN_BROWSER_BROWSE, /**< Browse for a list of available browsing domains */
+ AVAHI_DOMAIN_BROWSER_BROWSE_DEFAULT, /**< Browse for the default browsing domain */
+ AVAHI_DOMAIN_BROWSER_BROWSE_LEGACY, /**< Legacy browse domain - see DNS-SD spec for more information */
+ AVAHI_DOMAIN_BROWSER_MAX
+} AvahiDomainBrowserType;
+
+/** A local domain browsing object. May be used to enumerate domains used on the local LAN */
+typedef struct AvahiDomainBrowser AvahiDomainBrowser;
+
+/** Callback prototype for AvahiDomainBrowser events */
+typedef void (*AvahiDomainBrowserCallback)(
+ AvahiDomainBrowser *b,
+ AvahiIfIndex interface,
+ AvahiProtocol protocol,
+ AvahiBrowserEvent event,
+ const gchar *domain,
+ gpointer userdata);
+
+/** Create a new AvahiDomainBrowser object */
+AvahiDomainBrowser *avahi_domain_browser_new(
+ AvahiServer *server,
+ AvahiIfIndex interface,
+ AvahiProtocol protocol,
+ const gchar *domain,
+ AvahiDomainBrowserType type,
+ AvahiDomainBrowserCallback callback,
+ gpointer userdata);
+
+/** Free an AvahiDomainBrowser object */
+void avahi_domain_browser_free(AvahiDomainBrowser *b);
+
+/** A DNS-SD service type browsing object. May be used to enumerate the service types of all available services on the local LAN */
+typedef struct AvahiServiceTypeBrowser AvahiServiceTypeBrowser;
+
+/** Callback prototype for AvahiServiceTypeBrowser events */
+typedef void (*AvahiServiceTypeBrowserCallback)(
+ AvahiServiceTypeBrowser *b,
+ AvahiIfIndex interface,
+ AvahiProtocol protocol,
+ AvahiBrowserEvent event,