]> git.meshlink.io Git - catta/blobdiff - avahi-core/core.h
add man page for avahi-daemon.conf
[catta] / avahi-core / core.h
index aa6b80944f7f15ea7c81d4b13397aac990fe2cd3..2951f6d34efc41f381a096e8f28bc4ce950ffb68 100644 (file)
@@ -35,7 +35,9 @@
 
 #include <avahi-common/cdecl.h>
 
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
 AVAHI_C_DECL_BEGIN
+#endif
 
 /** An mDNS responder object */
 typedef struct AvahiServer AvahiServer;
@@ -46,19 +48,43 @@ typedef struct AvahiEntry AvahiEntry;
 /** A group of locally registered DNS RRs */
 typedef struct AvahiEntryGroup AvahiEntryGroup;
 
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
 AVAHI_C_DECL_END
+#endif
 
 #include <avahi-common/address.h>
 #include <avahi-common/rr.h>
 #include <avahi-common/alternative.h>
 
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
 AVAHI_C_DECL_BEGIN
+#endif
 
 /** Error codes used by avahi */
 enum { 
-    AVAHI_OK = 0,                      /**< OK */
-    AVAHI_ERR_FAILURE = -1,            /**< Generic error code */
-    AVAHI_ERR_BAD_STATE = -2           /**< Object was in a bad state */
+    AVAHI_OK = 0,                          /**< OK */
+    AVAHI_ERR_FAILURE = -1,                /**< Generic error code */
+    AVAHI_ERR_BAD_STATE = -2,              /**< Object was in a bad state */
+    AVAHI_ERR_INVALID_HOST_NAME = -3,      /**< Invalid host name */
+    AVAHI_ERR_INVALID_DOMAIN_NAME = -4,    /**< Invalid domain name */
+    AVAHI_ERR_NO_NETWORK = -5,             /**< No suitable network protocol available */
+    AVAHI_ERR_INVALID_TTL = -6,            /**< Invalid DNS TTL */
+    AVAHI_ERR_IS_PATTERN = -7,             /**< RR key is pattern */
+    AVAHI_ERR_LOCAL_COLLISION = -8,        /**< Local name collision */
+    AVAHI_ERR_INVALID_RECORD = -9,         /**< Invalid RR */
+    AVAHI_ERR_INVALID_SERVICE_NAME = -10,  /**< Invalid service name */
+    AVAHI_ERR_INVALID_SERVICE_TYPE = -11,  /**< Invalid service type */
+    AVAHI_ERR_INVALID_PORT = -12,          /**< Invalid port number */
+    AVAHI_ERR_INVALID_KEY = -13,           /**< Invalid key */
+    AVAHI_ERR_INVALID_ADDRESS = -14,       /**< Invalid address */
+    AVAHI_ERR_TIMEOUT = -15,               /**< Timeout reached */
+    AVAHI_ERR_TOO_MANY_CLIENTS = -16,      /**< Too many clients */
+    AVAHI_ERR_TOO_MANY_OBJECTS = -17,      /**< Too many objects */
+    AVAHI_ERR_TOO_MANY_ENTRIES = -18,      /**< Too many entries */
+    AVAHI_ERR_OS = -19,                    /**< OS error */
+    AVAHI_ERR_ACCESS_DENIED = -20,         /**< Access denied */
+    AVAHI_ERR_INVALID_OPERATION = -21,     /**< Invalid operation */
+    AVAHI_ERR_MAX = -22
 };
 
 /** States of a server object */
@@ -83,8 +109,7 @@ typedef enum {
     AVAHI_ENTRY_GROUP_UNCOMMITED = -1,   /**< The group has not yet been commited, the user must still call avahi_entry_group_commit() */
     AVAHI_ENTRY_GROUP_REGISTERING = 0,   /**< The entries of the group are currently being registered */
     AVAHI_ENTRY_GROUP_ESTABLISHED,       /**< The entries have successfully been established */
-    AVAHI_ENTRY_GROUP_COLLISION,          /**< A name collision for one of the entries in the group has been detected, the entries have been withdrawn */ 
-    AVAHI_ENTRY_GROUP_SLEEPING           /**< Rate limiting of probe packets is active */
+    AVAHI_ENTRY_GROUP_COLLISION          /**< A name collision for one of the entries in the group has been detected, the entries have been withdrawn */ 
 } AvahiEntryGroupState;
 
 /** Prototype for callback functions which are called whenever the state of an AvahiServer object changes */
@@ -114,7 +139,8 @@ AvahiServer *avahi_server_new(
     GMainContext *c,               /**< The GLIB main loop context to attach to */
     const AvahiServerConfig *sc,   /**< If non-NULL a pointer to a configuration structure for the server. The server makes an internal deep copy of this structure, so you may free it using avahi_server_config_done() immediately after calling this function. */
     AvahiServerCallback callback,  /**< A callback which is called whenever the state of the server changes */
-    gpointer userdata              /**< An opaque pointer which is passed to the callback function */);
+    gpointer userdata,             /**< An opaque pointer which is passed to the callback function */
+    gint *error);
 
 /** Free an mDNS responder object */
 void avahi_server_free(AvahiServer* s);
@@ -604,6 +630,14 @@ AvahiDNSServerBrowser *avahi_dns_server_browser_new(
 /** Free an AvahiDNSServerBrowser object */
 void avahi_dns_server_browser_free(AvahiDNSServerBrowser *b);
 
+/** Return a human readable error string for the specified error code */
+const gchar *avahi_strerror(gint error);
+
+/** Return the last error code */
+gint avahi_server_errno(AvahiServer *s);
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
 AVAHI_C_DECL_END
+#endif
 
 #endif