]> git.meshlink.io Git - catta/commitdiff
add a bunch of new errors codes
authorLennart Poettering <lennart@poettering.net>
Sun, 25 Sep 2005 19:57:10 +0000 (19:57 +0000)
committerLennart Poettering <lennart@poettering.net>
Sun, 25 Sep 2005 19:57:10 +0000 (19:57 +0000)
git-svn-id: file:///home/lennart/svn/public/avahi/trunk@604 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe

avahi-common/dbus.c
avahi-common/dbus.h
avahi-common/error.c
avahi-common/error.h

index e2b3a3f7fef1ed5243ff477f8db17c32fd714877..28428ed1f4a0d0ae2932dcaa2c221e845802922f 100644 (file)
@@ -57,7 +57,12 @@ static const char * const table[- AVAHI_ERR_MAX] = {
     AVAHI_DBUS_ERR_NOT_CONNECTED,
     AVAHI_DBUS_ERR_NO_MEMORY,
     AVAHI_DBUS_ERR_INVALID_OBJECT,
-    AVAHI_DBUS_ERR_NO_DAEMON
+    AVAHI_DBUS_ERR_NO_DAEMON,
+    AVAHI_DBUS_ERR_INVALID_INTERFACE,
+    AVAHI_DBUS_ERR_INVALID_PROTOCOL,
+    AVAHI_DBUS_ERR_INVALID_FLAGS,
+    AVAHI_DBUS_ERR_NOT_FOUND,
+    AVAHI_DBUS_ERR_INVALID_CONFIG
 };
 
 int avahi_error_dbus_to_number(const char *s) {
index cdfef4db70ca09c6c60994d3e62d378e9c762212..cd90af1ab82269fe63f70812267958bfbeab1458 100644 (file)
@@ -68,6 +68,11 @@ AVAHI_C_DECL_BEGIN
 #define AVAHI_DBUS_ERR_NO_MEMORY "org.freedesktop.Avahi.NoMemoryError"
 #define AVAHI_DBUS_ERR_INVALID_OBJECT "org.freedesktop.Avahi.InvalidObjectError"
 #define AVAHI_DBUS_ERR_NO_DAEMON "org.freedesktop.Avahi.NoDaemonError"
+#define AVAHI_DBUS_ERR_INVALID_INTERFACE "org.freedesktop.Avahi.InvalidInterfaceError"
+#define AVAHI_DBUS_ERR_INVALID_PROTOCOL "org.freedesktop.Avahi.InvalidInterfaceProtocol"
+#define AVAHI_DBUS_ERR_INVALID_FLAGS "org.freedesktop.Avahi.InvalidFlags"
+#define AVAHI_DBUS_ERR_NOT_FOUND "org.freedesktop.Avahi.NotFound"
+#define AVAHI_DBUS_ERR_INVALID_CONFIG "org.freedesktop.Avahi.InvalidConfiguration"
 
 /** Convert a DBus error string into an Avahi error number */
 int avahi_error_dbus_to_number(const char *s);
index 67a57011c534a3e4669b093da477052d39454b27..73f13d2df85297d440f1f458d4adb852ab62cf36 100644 (file)
   USA.
  ***/
 
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
 #include "error.h"
 
 const char *avahi_strerror(int error) {
@@ -51,6 +55,11 @@ const char *avahi_strerror(int error) {
         "Memory exhausted",
         "The object passed in was not valid",
         "Daemon not running",
+        "Invalid interface index",
+        "Invalid protocol specification",
+        "Invalid flags",
+        "Not found",
+        "Invalid configuration"
     };
 
     if (-error < 0 || -error >= -AVAHI_ERR_MAX)
index f8d6c35e1dcbf246130acf8cfddcbc83155b6c1a..2b06c5a83e4a841217b498dc48c5ce9910ea41b0 100644 (file)
@@ -59,6 +59,11 @@ enum {
     AVAHI_ERR_NO_MEMORY = -24,             /**< Memory exhausted */
     AVAHI_ERR_INVALID_OBJECT = -25,        /**< The object passed to this function was invalid */
     AVAHI_ERR_NO_DAEMON = -26,             /**< Daemon not running */
+    AVAHI_ERR_INVALID_INTERFACE = -27,     /**< Invalid interface */
+    AVAHI_ERR_INVALID_PROTOCOL = -28,      /**< Invalid protocol */
+    AVAHI_ERR_INVALID_FLAGS = -29,         /**< Invalid flags */
+    AVAHI_ERR_NOT_FOUND = -30,             /**< Not found */
+    AVAHI_ERR_INVALID_CONFIG = -31,        /**< Configuration error */
 
     /****
      ****    IF YOU ADD A NEW ERROR CODE HERE, PLEASE DON'T FORGET TO ADD
@@ -68,7 +73,7 @@ enum {
      ****    Also remember to update the MAX value below.
      ****/
     
-    AVAHI_ERR_MAX = -27
+    AVAHI_ERR_MAX = -32
 };
 
 /** Return a human readable error string for the specified error code */