X-Git-Url: http://git.meshlink.io/?a=blobdiff_plain;f=avahi-client%2Flookup.h;h=89d1fb248839075a955180edb317b18507e4e3e8;hb=e7bcb6b9a448332e34855128b4d496b852dfd2af;hp=659700eb107ab34662e6f29e3d161a7198fe663d;hpb=0c54764cf19428a0c52724a75ddf3368e3899209;p=catta diff --git a/avahi-client/lookup.h b/avahi-client/lookup.h index 659700e..89d1fb2 100644 --- a/avahi-client/lookup.h +++ b/avahi-client/lookup.h @@ -38,9 +38,7 @@ /** \example client-browse-services.c Example how to browse for DNS-SD * services using the client interface to avahi-daemon. */ -#ifndef DOXYGEN_SHOULD_SKIP_THIS AVAHI_C_DECL_BEGIN -#endif /** A domain browser object */ typedef struct AvahiDomainBrowser AvahiDomainBrowser; @@ -60,14 +58,41 @@ typedef struct AvahiHostNameResolver AvahiHostNameResolver; /** An address resolver object */ typedef struct AvahiAddressResolver AvahiAddressResolver; +/** A record browser object */ +typedef struct AvahiRecordBrowser AvahiRecordBrowser; + /** The function prototype for the callback of an AvahiDomainBrowser */ -typedef void (*AvahiDomainBrowserCallback) (AvahiDomainBrowser *b, AvahiIfIndex interface, AvahiProtocol protocol, AvahiBrowserEvent event, const char *domain, AvahiLookupResultFlags flags, void *userdata); +typedef void (*AvahiDomainBrowserCallback) ( + AvahiDomainBrowser *b, + AvahiIfIndex interface, + AvahiProtocol protocol, + AvahiBrowserEvent event, + const char *domain, + AvahiLookupResultFlags flags, + void *userdata); /** The function prototype for the callback of an AvahiServiceBrowser */ -typedef void (*AvahiServiceBrowserCallback) (AvahiServiceBrowser *b, AvahiIfIndex interface, AvahiProtocol protocol, AvahiBrowserEvent event, const char *name, const char *type, const char *domain, AvahiLookupResultFlags flags, void *userdata); +typedef void (*AvahiServiceBrowserCallback) ( + AvahiServiceBrowser *b, + AvahiIfIndex interface, + AvahiProtocol protocol, + AvahiBrowserEvent event, + const char *name, + const char *type, + const char *domain, + AvahiLookupResultFlags flags, + void *userdata); /** The function prototype for the callback of an AvahiServiceTypeBrowser */ -typedef void (*AvahiServiceTypeBrowserCallback) (AvahiServiceTypeBrowser *b, AvahiIfIndex interface, AvahiProtocol protocol, AvahiBrowserEvent event, const char *type, const char *domain, AvahiLookupResultFlags flags, void *userdata); +typedef void (*AvahiServiceTypeBrowserCallback) ( + AvahiServiceTypeBrowser *b, + AvahiIfIndex interface, + AvahiProtocol protocol, + AvahiBrowserEvent event, + const char *type, + const char *domain, + AvahiLookupResultFlags flags, + void *userdata); /** The function prototype for the callback of an AvahiServiceResolver */ typedef void (*AvahiServiceResolverCallback) ( @@ -102,12 +127,24 @@ typedef void (*AvahiAddressResolverCallback) ( AvahiIfIndex interface, AvahiProtocol protocol, AvahiResolverEvent event, - AvahiProtocol aprotocol, const AvahiAddress *a, const char *name, AvahiLookupResultFlags flags, void *userdata); +/** The function prototype for the callback of an AvahiRecordBrowser */ +typedef void (*AvahiRecordBrowserCallback) ( + AvahiRecordBrowser *b, + AvahiIfIndex interface, + AvahiProtocol protocol, + AvahiBrowserEvent event, + const char *name, + uint16_t clazz, + uint16_t type, + const void *rdata, + size_t size, + AvahiLookupResultFlags flags, + void *userdata); /** Browse for domains on the local network */ AvahiDomainBrowser* avahi_domain_browser_new ( @@ -156,7 +193,7 @@ AvahiServiceBrowser* avahi_service_browser_new ( /** Get the parent client of an AvahiServiceBrowser object */ AvahiClient* avahi_service_browser_get_client (AvahiServiceBrowser *); -/* Cleans up and frees an AvahiServiceBrowser object */ +/** Cleans up and frees an AvahiServiceBrowser object */ int avahi_service_browser_free (AvahiServiceBrowser *); /** Create a new service resolver object */ @@ -195,18 +232,8 @@ AvahiClient* avahi_host_name_resolver_get_client (AvahiHostNameResolver *); /** Free a hostname resolver object */ int avahi_host_name_resolver_free(AvahiHostNameResolver *r); -/** Create a new address resolver object from an address string. Set aprotocol to AF_UNSPEC for protocol detection. */ -AvahiAddressResolver * avahi_address_resolver_new( - AvahiClient *client, - AvahiIfIndex interface, - AvahiProtocol protocol, - const char *address, - AvahiLookupFlags flags, - AvahiAddressResolverCallback callback, - void *userdata); - /** Create a new address resolver object from an AvahiAddress object */ -AvahiAddressResolver* avahi_address_resolver_new_a( +AvahiAddressResolver* avahi_address_resolver_new( AvahiClient *client, AvahiIfIndex interface, AvahiProtocol protocol, @@ -221,9 +248,24 @@ AvahiClient* avahi_address_resolver_get_client (AvahiAddressResolver *); /** Free a AvahiAddressResolver resolver object */ int avahi_address_resolver_free(AvahiAddressResolver *r); -#ifndef DOXYGEN_SHOULD_SKIP_THIS -AVAHI_C_DECL_END -#endif +/** Browse for records of a type on the local network */ +AvahiRecordBrowser* avahi_record_browser_new( + AvahiClient *client, + AvahiIfIndex interface, + AvahiProtocol protocol, + const char *name, + uint16_t clazz, + uint16_t type, + AvahiLookupFlags flags, + AvahiRecordBrowserCallback callback, + void *userdata); + +/** Get the parent client of an AvahiRecordBrowser object */ +AvahiClient* avahi_record_browser_get_client(AvahiRecordBrowser *); +/** Cleans up and frees an AvahiRecordBrowser object */ +int avahi_record_browser_free(AvahiRecordBrowser *); + +AVAHI_C_DECL_END #endif