avahi 0.6.30

avahi-common/defs.h

Go to the documentation of this file.
00001 #ifndef foodefshfoo
00002 #define foodefshfoo
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 
00025 #include <avahi-common/cdecl.h>
00026 
00216 AVAHI_C_DECL_BEGIN
00217 
00221 typedef enum {
00222     AVAHI_SERVER_INVALID,          
00223     AVAHI_SERVER_REGISTERING,      
00224     AVAHI_SERVER_RUNNING,          
00225     AVAHI_SERVER_COLLISION,        
00226     AVAHI_SERVER_FAILURE           
00227 } AvahiServerState;
00228 
00230 typedef enum {
00231     AVAHI_ENTRY_GROUP_UNCOMMITED,    
00232     AVAHI_ENTRY_GROUP_REGISTERING,   
00233     AVAHI_ENTRY_GROUP_ESTABLISHED,   
00234     AVAHI_ENTRY_GROUP_COLLISION,     
00235     AVAHI_ENTRY_GROUP_FAILURE        
00236 } AvahiEntryGroupState;
00237 
00243 typedef enum {
00244     AVAHI_PUBLISH_UNIQUE = 1,           
00245     AVAHI_PUBLISH_NO_PROBE = 2,         
00246     AVAHI_PUBLISH_NO_ANNOUNCE = 4,      
00247     AVAHI_PUBLISH_ALLOW_MULTIPLE = 8,   
00249     AVAHI_PUBLISH_NO_REVERSE = 16,      
00250     AVAHI_PUBLISH_NO_COOKIE = 32,       
00252     AVAHI_PUBLISH_UPDATE = 64,          
00254     AVAHI_PUBLISH_USE_WIDE_AREA = 128,  
00255     AVAHI_PUBLISH_USE_MULTICAST = 256   
00257 } AvahiPublishFlags;
00258 
00260 typedef enum {
00262     AVAHI_LOOKUP_USE_WIDE_AREA = 1,    
00263     AVAHI_LOOKUP_USE_MULTICAST = 2,    
00265     AVAHI_LOOKUP_NO_TXT = 4,           
00266     AVAHI_LOOKUP_NO_ADDRESS = 8        
00267 } AvahiLookupFlags;
00268 
00270 typedef enum {
00271     AVAHI_LOOKUP_RESULT_CACHED = 1,         
00272     AVAHI_LOOKUP_RESULT_WIDE_AREA = 2,      
00273     AVAHI_LOOKUP_RESULT_MULTICAST = 4,      
00274     AVAHI_LOOKUP_RESULT_LOCAL = 8,          
00275     AVAHI_LOOKUP_RESULT_OUR_OWN = 16,       
00276     AVAHI_LOOKUP_RESULT_STATIC = 32         
00277 } AvahiLookupResultFlags;
00278 
00284 typedef enum {
00285     AVAHI_BROWSER_NEW,               
00286     AVAHI_BROWSER_REMOVE,            
00287     AVAHI_BROWSER_CACHE_EXHAUSTED,   
00288     AVAHI_BROWSER_ALL_FOR_NOW,       
00289     AVAHI_BROWSER_FAILURE            
00290 } AvahiBrowserEvent;
00291 
00293 typedef enum {
00294     AVAHI_RESOLVER_FOUND,          
00295     AVAHI_RESOLVER_FAILURE         
00296 } AvahiResolverEvent;
00297 
00303 typedef enum {
00304     AVAHI_DOMAIN_BROWSER_BROWSE,            
00305     AVAHI_DOMAIN_BROWSER_BROWSE_DEFAULT,    
00306     AVAHI_DOMAIN_BROWSER_REGISTER,          
00307     AVAHI_DOMAIN_BROWSER_REGISTER_DEFAULT,  
00308     AVAHI_DOMAIN_BROWSER_BROWSE_LEGACY,     
00309     AVAHI_DOMAIN_BROWSER_MAX
00310 } AvahiDomainBrowserType;
00311 
00319 #define AVAHI_SERVICE_COOKIE "org.freedesktop.Avahi.cookie"
00320 
00322 #define AVAHI_SERVICE_COOKIE_INVALID (0)
00323 
00328 enum {
00329     AVAHI_DNS_TYPE_A = 0x01,
00330     AVAHI_DNS_TYPE_NS = 0x02,
00331     AVAHI_DNS_TYPE_CNAME = 0x05,
00332     AVAHI_DNS_TYPE_SOA = 0x06,
00333     AVAHI_DNS_TYPE_PTR = 0x0C,
00334     AVAHI_DNS_TYPE_HINFO = 0x0D,
00335     AVAHI_DNS_TYPE_MX = 0x0F,
00336     AVAHI_DNS_TYPE_TXT = 0x10,
00337     AVAHI_DNS_TYPE_AAAA = 0x1C,
00338     AVAHI_DNS_TYPE_SRV = 0x21
00339 };
00340 
00342 enum {
00343     AVAHI_DNS_CLASS_IN = 0x01          
00344 };
00345 
00349 #define AVAHI_DEFAULT_TTL_HOST_NAME (120)
00350 
00352 #define AVAHI_DEFAULT_TTL (75*60)
00353 
00354 AVAHI_C_DECL_END
00355 
00356 #endif