avahi 0.6.30

avahi-client/lookup.h

Go to the documentation of this file.
00001 #ifndef fooclientlookuphfoo
00002 #define fooclientlookuphfoo
00003 
00004 /***
00005   This file is part of avahi.
00006 
00007   avahi is free software; you can redistribute it and/or modify it
00008   under the terms of the GNU Lesser General Public License as
00009   published by the Free Software Foundation; either version 2.1 of the
00010   License, or (at your option) any later version.
00011 
00012   avahi is distributed in the hope that it will be useful, but WITHOUT
00013   ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
00014   or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General
00015   Public License for more details.
00016 
00017   You should have received a copy of the GNU Lesser General Public
00018   License along with avahi; if not, write to the Free Software
00019   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
00020   USA.
00021 ***/
00022 
00023 #include <inttypes.h>
00024 
00025 #include <avahi-common/cdecl.h>
00026 #include <avahi-common/address.h>
00027 #include <avahi-common/strlst.h>
00028 #include <avahi-common/defs.h>
00029 #include <avahi-common/watch.h>
00030 #include <avahi-common/gccmacro.h>
00031 
00032 #include <avahi-client/client.h>
00033 
00039 AVAHI_C_DECL_BEGIN
00040 
00044 typedef struct AvahiDomainBrowser AvahiDomainBrowser;
00045 
00047 typedef void (*AvahiDomainBrowserCallback) (
00048     AvahiDomainBrowser *b,
00049     AvahiIfIndex interface,
00050     AvahiProtocol protocol,
00051     AvahiBrowserEvent event,
00052     const char *domain,
00053     AvahiLookupResultFlags flags,
00054     void *userdata);
00055 
00057 AvahiDomainBrowser* avahi_domain_browser_new (
00058     AvahiClient *client,
00059     AvahiIfIndex interface,
00060     AvahiProtocol protocol,
00061     const char *domain,
00062     AvahiDomainBrowserType btype,
00063     AvahiLookupFlags flags,
00064     AvahiDomainBrowserCallback callback,
00065     void *userdata);
00066 
00068 AvahiClient* avahi_domain_browser_get_client (AvahiDomainBrowser *);
00069 
00071 int avahi_domain_browser_free (AvahiDomainBrowser *);
00072 
00078 typedef struct AvahiServiceBrowser AvahiServiceBrowser;
00079 
00081 typedef void (*AvahiServiceBrowserCallback) (
00082     AvahiServiceBrowser *b,
00083     AvahiIfIndex interface,
00084     AvahiProtocol protocol,
00085     AvahiBrowserEvent event,
00086     const char *name,
00087     const char *type,
00088     const char *domain,
00089     AvahiLookupResultFlags flags,
00090     void *userdata);
00091 
00103 AvahiServiceBrowser* avahi_service_browser_new (
00104     AvahiClient *client,
00105     AvahiIfIndex interface,     
00106     AvahiProtocol protocol,     
00107     const char *type,           
00108     const char *domain,         
00109     AvahiLookupFlags flags,
00110     AvahiServiceBrowserCallback callback,
00111     void *userdata);
00112 
00114 AvahiClient* avahi_service_browser_get_client (AvahiServiceBrowser *);
00115 
00117 int avahi_service_browser_free (AvahiServiceBrowser *);
00118 
00123 typedef struct AvahiServiceTypeBrowser AvahiServiceTypeBrowser;
00124 
00126 typedef void (*AvahiServiceTypeBrowserCallback) (
00127     AvahiServiceTypeBrowser *b,
00128     AvahiIfIndex interface,
00129     AvahiProtocol protocol,
00130     AvahiBrowserEvent event,
00131     const char *type,
00132     const char *domain,
00133     AvahiLookupResultFlags flags,
00134     void *userdata);
00135 
00137 AvahiServiceTypeBrowser* avahi_service_type_browser_new (
00138     AvahiClient *client,
00139     AvahiIfIndex interface,
00140     AvahiProtocol protocol,
00141     const char *domain,
00142     AvahiLookupFlags flags,
00143     AvahiServiceTypeBrowserCallback callback,
00144     void *userdata);
00145 
00147 AvahiClient* avahi_service_type_browser_get_client (AvahiServiceTypeBrowser *);
00148 
00150 int avahi_service_type_browser_free (AvahiServiceTypeBrowser *);
00151 
00157 typedef struct AvahiServiceResolver AvahiServiceResolver;
00158 
00160 typedef void (*AvahiServiceResolverCallback) (
00161     AvahiServiceResolver *r,
00162     AvahiIfIndex interface,
00163     AvahiProtocol protocol,
00164     AvahiResolverEvent event,
00165     const char *name,
00166     const char *type,
00167     const char *domain,
00168     const char *host_name,
00169     const AvahiAddress *a,
00170     uint16_t port,
00171     AvahiStringList *txt,
00172     AvahiLookupResultFlags flags,
00173     void *userdata);
00174 
00189 AvahiServiceResolver * avahi_service_resolver_new(
00190     AvahiClient *client,
00191     AvahiIfIndex interface,   
00192     AvahiProtocol protocol,   
00193     const char *name,         
00194     const char *type,         
00195     const char *domain,       
00196     AvahiProtocol aprotocol,  
00197     AvahiLookupFlags flags,
00198     AvahiServiceResolverCallback callback,
00199     void *userdata);
00200 
00202 AvahiClient* avahi_service_resolver_get_client (AvahiServiceResolver *);
00203 
00205 int avahi_service_resolver_free(AvahiServiceResolver *r);
00206 
00211 typedef struct AvahiHostNameResolver AvahiHostNameResolver;
00212 
00214 typedef void (*AvahiHostNameResolverCallback) (
00215     AvahiHostNameResolver *r,
00216     AvahiIfIndex interface,
00217     AvahiProtocol protocol,
00218     AvahiResolverEvent event,
00219     const char *name,
00220     const AvahiAddress *a,
00221     AvahiLookupResultFlags flags,
00222     void *userdata);
00223 
00225 AvahiHostNameResolver * avahi_host_name_resolver_new(
00226     AvahiClient *client,
00227     AvahiIfIndex interface,
00228     AvahiProtocol protocol,
00229     const char *name,
00230     AvahiProtocol aprotocol,
00231     AvahiLookupFlags flags,
00232     AvahiHostNameResolverCallback callback,
00233     void *userdata);
00234 
00236 AvahiClient* avahi_host_name_resolver_get_client (AvahiHostNameResolver *);
00237 
00239 int avahi_host_name_resolver_free(AvahiHostNameResolver *r);
00240 
00242 typedef struct AvahiAddressResolver AvahiAddressResolver;
00243 
00245 typedef void (*AvahiAddressResolverCallback) (
00246     AvahiAddressResolver *r,
00247     AvahiIfIndex interface,
00248     AvahiProtocol protocol,
00249     AvahiResolverEvent event,
00250     const AvahiAddress *a,
00251     const char *name,
00252     AvahiLookupResultFlags flags,
00253     void *userdata);
00254 
00256 AvahiAddressResolver* avahi_address_resolver_new(
00257     AvahiClient *client,
00258     AvahiIfIndex interface,
00259     AvahiProtocol protocol,
00260     const AvahiAddress *a,
00261     AvahiLookupFlags flags,
00262     AvahiAddressResolverCallback callback,
00263     void *userdata);
00264 
00266 AvahiClient* avahi_address_resolver_get_client (AvahiAddressResolver *);
00267 
00269 int avahi_address_resolver_free(AvahiAddressResolver *r);
00270 
00276 typedef struct AvahiRecordBrowser AvahiRecordBrowser;
00277 
00279 typedef void (*AvahiRecordBrowserCallback) (
00280     AvahiRecordBrowser *b,
00281     AvahiIfIndex interface,
00282     AvahiProtocol protocol,
00283     AvahiBrowserEvent event,
00284     const char *name,
00285     uint16_t clazz,
00286     uint16_t type,
00287     const void *rdata,
00288     size_t size,
00289     AvahiLookupResultFlags flags,
00290     void *userdata);
00291 
00293 AvahiRecordBrowser* avahi_record_browser_new(
00294     AvahiClient *client,
00295     AvahiIfIndex interface,
00296     AvahiProtocol protocol,
00297     const char *name,
00298     uint16_t clazz,
00299     uint16_t type,
00300     AvahiLookupFlags flags,
00301     AvahiRecordBrowserCallback callback,
00302     void *userdata);
00303 
00305 AvahiClient* avahi_record_browser_get_client(AvahiRecordBrowser *);
00306 
00308 int avahi_record_browser_free(AvahiRecordBrowser *);
00309 
00312 AVAHI_C_DECL_END
00313 
00314 #endif