Home | History | Annotate | Download | only in avahi-gobject
      1 /*
      2  * ga-enums.h
      3  * Copyright (C) 2006-2007 Collabora Ltd.
      4  *
      5  * This library is free software; you can redistribute it and/or
      6  * modify it under the terms of the GNU Lesser General Public
      7  * License as published by the Free Software Foundation; either
      8  * version 2.1 of the License, or (at your option) any later version.
      9  *
     10  * This library is distributed in the hope that it will be useful,
     11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
     12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
     13  * Lesser General Public License for more details.
     14  *
     15  * You should have received a copy of the GNU Lesser General Public
     16  * License along with this library; if not, write to the Free Software
     17  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
     18  */
     19 
     20 #ifndef __GA_ENUMS_H__
     21 #define __GA_ENUMS_H__
     22 
     23 #include <glib-object.h>
     24 #include <avahi-common/defs.h>
     25 #include <avahi-common/address.h>
     26 
     27 G_BEGIN_DECLS
     28 /** Values for GaProtocol */
     29         typedef enum {
     30     GA_PROTOCOL_INET = AVAHI_PROTO_INET,     /**< IPv4 */
     31     GA_PROTOCOL_INET6 = AVAHI_PROTO_INET6,   /**< IPv6 */
     32     GA_PROTOCOL_UNSPEC = AVAHI_PROTO_UNSPEC  /**< Unspecified/all protocol(s) */
     33 } GaProtocol;
     34 
     35 
     36 /** Some flags for lookup callback functions */
     37 typedef enum {
     38     GA_LOOKUP_RESULT_CACHED = AVAHI_LOOKUP_RESULT_CACHED,     /**< This response originates from the cache */
     39     GA_LOOKUP_RESULT_WIDE_AREA = AVAHI_LOOKUP_RESULT_WIDE_AREA,
     40                                                               /**< This response originates from wide area DNS */
     41     GA_LOOKUP_RESULT_MULTICAST = AVAHI_LOOKUP_RESULT_MULTICAST,
     42                                                               /**< This response originates from multicast DNS */
     43     GA_LOOKUP_RESULT_LOCAL = AVAHI_LOOKUP_RESULT_LOCAL,       /**< This record/service resides on and was announced by the local host. Only available in service and record browsers and only on AVAHI_BROWSER_NEW. */
     44     GA_LOOKUP_RESULT_OUR_OWN = AVAHI_LOOKUP_RESULT_OUR_OWN,   /**< This service belongs to the same local client as the browser object. Only available in avahi-client, and only for service browsers and only on AVAHI_BROWSER_NEW. */
     45     GA_LOOKUP_RESULT_STATIC = AVAHI_LOOKUP_RESULT_STATIC      /**< The returned data has been defined statically by some configuration option */
     46 } GaLookupResultFlags;
     47 
     48 typedef enum {
     49     GA_LOOKUP_NO_FLAGS = 0,
     50     GA_LOOKUP_USE_WIDE_AREA = AVAHI_LOOKUP_USE_WIDE_AREA,    /**< Force lookup via wide area DNS */
     51     GA_LOOKUP_USE_MULTICAST = AVAHI_LOOKUP_USE_MULTICAST,    /**< Force lookup via multicast DNS */
     52     GA_LOOKUP_NO_TXT = AVAHI_LOOKUP_NO_TXT,                  /**< When doing service resolving, don't lookup TXT record */
     53     GA_LOOKUP_NO_ADDRESS = AVAHI_LOOKUP_NO_ADDRESS           /**< When doing service resolving, don't lookup A/AAAA record */
     54 } GaLookupFlags;
     55 
     56 typedef enum {
     57     GA_RESOLVER_FOUND = AVAHI_RESOLVER_FOUND,           /**< RR found, resolving successful */
     58     GA_RESOLVER_FAILURE = AVAHI_RESOLVER_FAILURE        /**< Resolving failed due to some reason which can be retrieved using avahi_server_errno()/avahi_client_errno() */
     59 } GaResolverEvent;
     60 
     61 typedef enum {
     62     GA_BROWSER_NEW = AVAHI_BROWSER_NEW,             /**< The object is new on the network */
     63     GA_BROWSER_REMOVE = AVAHI_BROWSER_REMOVE,                     /**< The object has been removed from the network */
     64     GA_BROWSER_CACHE_EXHAUSTED = AVAHI_BROWSER_CACHE_EXHAUSTED,   /**< One-time event, to notify the user that all entries from the caches have been send */
     65     GA_BROWSER_ALL_FOR_NOW = AVAHI_BROWSER_ALL_FOR_NOW,           /**< One-time event, to notify the user that more records will probably not show up in the near future, i.e. all cache entries have been read and all static servers been queried */
     66     GA_BROWSER_FAILURE = AVAHI_BROWSER_FAILURE                    /**< Browsing failed due to some reason which can be retrieved using avahi_server_errno()/avahi_client_errno() */
     67 } GaBrowserEvent;
     68 
     69 G_END_DECLS
     70 #endif /* #ifndef __GA_CLIENT_H__ */
     71