summaryrefslogtreecommitdiffstats
path: root/avahi-client/lookup.h
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2005-11-16 19:30:11 +0000
committerLennart Poettering <lennart@poettering.net>2005-11-16 19:30:11 +0000
commit9e4237ebed07d00bf1176178d1358b475d749b27 (patch)
tree38b9fa5103733445ce69012a5c6ae65fdb043a91 /avahi-client/lookup.h
parentaffa11f5bb7309fa504624a3512dce5c88ce473b (diff)
* Implement client API for arbitrary record browsing
* Fix memory leak in avahi-client git-svn-id: file:///home/lennart/svn/public/avahi/trunk@984 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe
Diffstat (limited to 'avahi-client/lookup.h')
-rw-r--r--avahi-client/lookup.h65
1 files changed, 62 insertions, 3 deletions
diff --git a/avahi-client/lookup.h b/avahi-client/lookup.h
index f2db9ab..e96bcf7 100644
--- a/avahi-client/lookup.h
+++ b/avahi-client/lookup.h
@@ -58,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) (
@@ -105,6 +132,20 @@ typedef void (*AvahiAddressResolverCallback) (
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 (
AvahiClient *client,
@@ -207,6 +248,24 @@ AvahiClient* avahi_address_resolver_get_client (AvahiAddressResolver *);
/** Free a AvahiAddressResolver resolver object */
int avahi_address_resolver_free(AvahiAddressResolver *r);
+/** 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