]> git.meshlink.io Git - catta/blob - avahi-client/lookup.h
* remove lots of DOXYGEN_SHOULD_SKIP_THIS from the header files, use doxygen macro...
[catta] / avahi-client / lookup.h
1 #ifndef fooclientlookuphfoo
2 #define fooclientlookuphfoo
3
4 /* $Id$ */
5
6 /***
7   This file is part of avahi.
8  
9   avahi is free software; you can redistribute it and/or modify it
10   under the terms of the GNU Lesser General Public License as
11   published by the Free Software Foundation; either version 2.1 of the
12   License, or (at your option) any later version.
13  
14   avahi is distributed in the hope that it will be useful, but WITHOUT
15   ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
16   or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General
17   Public License for more details.
18  
19   You should have received a copy of the GNU Lesser General Public
20   License along with avahi; if not, write to the Free Software
21   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
22   USA.
23 ***/
24
25 #include <inttypes.h>
26
27 #include <avahi-common/cdecl.h>
28 #include <avahi-common/address.h>
29 #include <avahi-common/strlst.h>
30 #include <avahi-common/defs.h>
31 #include <avahi-common/watch.h>
32 #include <avahi-common/gccmacro.h>
33
34 #include <avahi-client/client.h>
35
36 /** \file avahi-client/lookup.h Lookup Client API */
37
38 /** \example client-browse-services.c Example how to browse for DNS-SD
39  * services using the client interface to avahi-daemon. */
40
41 AVAHI_C_DECL_BEGIN
42
43 /** A domain browser object */
44 typedef struct AvahiDomainBrowser AvahiDomainBrowser;
45
46 /** A service browser object */
47 typedef struct AvahiServiceBrowser AvahiServiceBrowser;
48
49 /** A service type browser object */
50 typedef struct AvahiServiceTypeBrowser AvahiServiceTypeBrowser;
51
52 /** A service resolver object */
53 typedef struct AvahiServiceResolver AvahiServiceResolver;
54
55 /** A service resolver object */
56 typedef struct AvahiHostNameResolver AvahiHostNameResolver;
57
58 /** An address resolver object */
59 typedef struct AvahiAddressResolver AvahiAddressResolver;
60
61 /** The function prototype for the callback of an AvahiDomainBrowser */
62 typedef void (*AvahiDomainBrowserCallback) (AvahiDomainBrowser *b, AvahiIfIndex interface, AvahiProtocol protocol, AvahiBrowserEvent event, const char *domain, AvahiLookupResultFlags flags, void *userdata);
63
64 /** The function prototype for the callback of an AvahiServiceBrowser */
65 typedef void (*AvahiServiceBrowserCallback) (AvahiServiceBrowser *b, AvahiIfIndex interface, AvahiProtocol protocol, AvahiBrowserEvent event, const char *name, const char *type, const char *domain, AvahiLookupResultFlags flags, void *userdata);
66
67 /** The function prototype for the callback of an AvahiServiceTypeBrowser */
68 typedef void (*AvahiServiceTypeBrowserCallback) (AvahiServiceTypeBrowser *b, AvahiIfIndex interface, AvahiProtocol protocol, AvahiBrowserEvent event, const char *type, const char *domain, AvahiLookupResultFlags flags, void *userdata);
69
70 /** The function prototype for the callback of an AvahiServiceResolver */
71 typedef void (*AvahiServiceResolverCallback) (
72     AvahiServiceResolver *r,
73     AvahiIfIndex interface,
74     AvahiProtocol protocol,
75     AvahiResolverEvent event,
76     const char *name,
77     const char *type,
78     const char *domain,
79     const char *host_name,
80     const AvahiAddress *a,
81     uint16_t port,
82     AvahiStringList *txt,
83     AvahiLookupResultFlags flags, 
84     void *userdata);
85
86 /** The function prototype for the callback of an AvahiHostNameResolver */
87 typedef void (*AvahiHostNameResolverCallback) (
88     AvahiHostNameResolver *r,
89     AvahiIfIndex interface,
90     AvahiProtocol protocol,
91     AvahiResolverEvent event,
92     const char *name,
93     const AvahiAddress *a,
94     AvahiLookupResultFlags flags, 
95     void *userdata);
96
97 /** The function prototype for the callback of an AvahiAddressResolver */
98 typedef void (*AvahiAddressResolverCallback) (
99     AvahiAddressResolver *r,
100     AvahiIfIndex interface,
101     AvahiProtocol protocol,
102     AvahiResolverEvent event,
103     const AvahiAddress *a,
104     const char *name,
105     AvahiLookupResultFlags flags, 
106     void *userdata);
107
108 /** Browse for domains on the local network */
109 AvahiDomainBrowser* avahi_domain_browser_new (
110     AvahiClient *client,
111     AvahiIfIndex interface,
112     AvahiProtocol protocol,
113     const char *domain,
114     AvahiDomainBrowserType btype,
115     AvahiLookupFlags flags,
116     AvahiDomainBrowserCallback callback,
117     void *userdata);
118
119 /** Get the parent client of an AvahiDomainBrowser object */
120 AvahiClient* avahi_domain_browser_get_client (AvahiDomainBrowser *);
121
122 /** Cleans up and frees an AvahiDomainBrowser object */
123 int avahi_domain_browser_free (AvahiDomainBrowser *);
124
125 /** Browse for service types on the local network */
126 AvahiServiceTypeBrowser* avahi_service_type_browser_new (
127     AvahiClient *client,
128     AvahiIfIndex interface,
129     AvahiProtocol protocol,
130     const char *domain,
131     AvahiLookupFlags flags,
132     AvahiServiceTypeBrowserCallback callback,
133     void *userdata);
134
135 /** Get the parent client of an AvahiServiceTypeBrowser object */
136 AvahiClient* avahi_service_type_browser_get_client (AvahiServiceTypeBrowser *);
137
138 /** Cleans up and frees an AvahiServiceTypeBrowser object */
139 int avahi_service_type_browser_free (AvahiServiceTypeBrowser *);
140
141 /** Browse for services of a type on the local network */
142 AvahiServiceBrowser* avahi_service_browser_new (
143     AvahiClient *client,
144     AvahiIfIndex interface,
145     AvahiProtocol protocol,
146     const char *type,
147     const char *domain,
148     AvahiLookupFlags flags,
149     AvahiServiceBrowserCallback callback,
150     void *userdata);
151
152 /** Get the parent client of an AvahiServiceBrowser object */
153 AvahiClient* avahi_service_browser_get_client (AvahiServiceBrowser *);
154
155 /* Cleans up and frees an AvahiServiceBrowser object */
156 int avahi_service_browser_free (AvahiServiceBrowser *);
157
158 /** Create a new service resolver object */
159 AvahiServiceResolver * avahi_service_resolver_new(
160     AvahiClient *client,
161     AvahiIfIndex interface,
162     AvahiProtocol protocol,
163     const char *name,
164     const char *type,
165     const char *domain,
166     AvahiProtocol aprotocol,
167     AvahiLookupFlags flags,
168     AvahiServiceResolverCallback callback,
169     void *userdata);
170
171 /** Get the parent client of an AvahiServiceResolver object */
172 AvahiClient* avahi_service_resolver_get_client (AvahiServiceResolver *);
173
174 /** Free a service resolver object */
175 int avahi_service_resolver_free(AvahiServiceResolver *r);
176
177 /** Create a new hostname resolver object */
178 AvahiHostNameResolver * avahi_host_name_resolver_new(
179     AvahiClient *client,
180     AvahiIfIndex interface,
181     AvahiProtocol protocol,
182     const char *name,
183     AvahiProtocol aprotocol,
184     AvahiLookupFlags flags,
185     AvahiHostNameResolverCallback callback,
186     void *userdata);
187
188 /** Get the parent client of an AvahiHostNameResolver object */
189 AvahiClient* avahi_host_name_resolver_get_client (AvahiHostNameResolver *);
190
191 /** Free a hostname resolver object */
192 int avahi_host_name_resolver_free(AvahiHostNameResolver *r);
193
194 /** Create a new address resolver object from an AvahiAddress object */
195 AvahiAddressResolver* avahi_address_resolver_new(
196     AvahiClient *client,
197     AvahiIfIndex interface,
198     AvahiProtocol protocol,
199     const AvahiAddress *a,
200     AvahiLookupFlags flags,
201     AvahiAddressResolverCallback callback,
202     void *userdata);
203
204 /** Get the parent client of an AvahiAddressResolver object */
205 AvahiClient* avahi_address_resolver_get_client (AvahiAddressResolver *);
206
207 /** Free a AvahiAddressResolver resolver object */
208 int avahi_address_resolver_free(AvahiAddressResolver *r);
209
210 AVAHI_C_DECL_END
211
212 #endif