summaryrefslogtreecommitdiffstats
path: root/avahi-common
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2005-10-24 22:41:39 +0000
committerLennart Poettering <lennart@poettering.net>2005-10-24 22:41:39 +0000
commitf17d2832301b0f2fcd50fdcc6fec77666178158f (patch)
tree1f221330303258df9897b794df536672c9ef3fd0 /avahi-common
parent71a48fcf258fbff06507d111b9c790a6d94a95f7 (diff)
* add new entry group state AVAHI_ENTRY_GROUP_FAILURE
* pass error code alongside entry gorup state changes over DBUS * add new server state AVAHI_SERVER_FAILURE * pass error code alongside server state changes over DBUS * fix client-publish-service * rename error code AVAHI_ERR_LOCAL_COLLISION to AVAHI_ERR_COLLISION * update TODO git-svn-id: file:///home/lennart/svn/public/avahi/trunk@854 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe
Diffstat (limited to 'avahi-common')
-rw-r--r--avahi-common/dbus.c4
-rw-r--r--avahi-common/dbus.h3
-rw-r--r--avahi-common/defs.h6
-rw-r--r--avahi-common/error.h2
4 files changed, 9 insertions, 6 deletions
diff --git a/avahi-common/dbus.c b/avahi-common/dbus.c
index 179b1ed..058b819 100644
--- a/avahi-common/dbus.c
+++ b/avahi-common/dbus.c
@@ -31,7 +31,7 @@
#include <avahi-common/dbus.h>
static const char * const table[- AVAHI_ERR_MAX] = {
- NULL, /* OK */
+ AVAHI_DBUS_ERR_OK,
AVAHI_DBUS_ERR_FAILURE,
AVAHI_DBUS_ERR_BAD_STATE,
AVAHI_DBUS_ERR_INVALID_HOST_NAME,
@@ -39,7 +39,7 @@ static const char * const table[- AVAHI_ERR_MAX] = {
AVAHI_DBUS_ERR_NO_NETWORK,
AVAHI_DBUS_ERR_INVALID_TTL,
AVAHI_DBUS_ERR_IS_PATTERN,
- AVAHI_DBUS_ERR_LOCAL_COLLISION,
+ AVAHI_DBUS_ERR_COLLISION,
AVAHI_DBUS_ERR_INVALID_RECORD,
AVAHI_DBUS_ERR_INVALID_SERVICE_NAME,
AVAHI_DBUS_ERR_INVALID_SERVICE_TYPE,
diff --git a/avahi-common/dbus.h b/avahi-common/dbus.h
index 9806f58..9cafbde 100644
--- a/avahi-common/dbus.h
+++ b/avahi-common/dbus.h
@@ -42,6 +42,7 @@ AVAHI_C_DECL_BEGIN
#define AVAHI_DBUS_INTERFACE_HOST_NAME_RESOLVER AVAHI_DBUS_NAME".HostNameResolver"
#define AVAHI_DBUS_INTERFACE_SERVICE_RESOLVER AVAHI_DBUS_NAME".ServiceResolver"
+#define AVAHI_DBUS_ERR_OK "org.freedesktop.Avahi.Success"
#define AVAHI_DBUS_ERR_FAILURE "org.freedesktop.Avahi.Failure"
#define AVAHI_DBUS_ERR_BAD_STATE "org.freedesktop.Avahi.BadStateError"
#define AVAHI_DBUS_ERR_INVALID_HOST_NAME "org.freedesktop.Avahi.InvalidHostNameError"
@@ -49,7 +50,7 @@ AVAHI_C_DECL_BEGIN
#define AVAHI_DBUS_ERR_NO_NETWORK "org.freedesktop.Avahi.NoNetworkError"
#define AVAHI_DBUS_ERR_INVALID_TTL "org.freedesktop.Avahi.InvalidTTLError"
#define AVAHI_DBUS_ERR_IS_PATTERN "org.freedesktop.Avahi.IsPatternError"
-#define AVAHI_DBUS_ERR_LOCAL_COLLISION "org.freedesktop.Avahi.LocalCollisionError"
+#define AVAHI_DBUS_ERR_COLLISION "org.freedesktop.Avahi.CollisionError"
#define AVAHI_DBUS_ERR_INVALID_RECORD "org.freedesktop.Avahi.InvalidRecordError"
#define AVAHI_DBUS_ERR_INVALID_SERVICE_NAME "org.freedesktop.Avahi.InvalidServiceNameError"
#define AVAHI_DBUS_ERR_INVALID_SERVICE_TYPE "org.freedesktop.Avahi.InvalidServiceTypeError"
diff --git a/avahi-common/defs.h b/avahi-common/defs.h
index 3b8c2a5..2dcc829 100644
--- a/avahi-common/defs.h
+++ b/avahi-common/defs.h
@@ -139,7 +139,8 @@ typedef enum {
AVAHI_ENTRY_GROUP_UNCOMMITED, /**< The group has not yet been commited, the user must still call avahi_entry_group_commit() */
AVAHI_ENTRY_GROUP_REGISTERING, /**< 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_COLLISION, /**< A name collision for one of the entries in the group has been detected, the entries have been withdrawn */
+ AVAHI_ENTRY_GROUP_FAILURE /**< Some kind of failure happened, the entries have been withdrawn */
} AvahiEntryGroupState;
/** The type of domain to browse for */
@@ -200,7 +201,8 @@ typedef enum {
AVAHI_SERVER_INVALID, /**< Invalid state (initial) */
AVAHI_SERVER_REGISTERING, /**< Host RRs are being registered */
AVAHI_SERVER_RUNNING, /**< All host RRs have been established */
- AVAHI_SERVER_COLLISION /**< There is a collision with a host RR. All host RRs have been withdrawn, the user should set a new host name via avahi_server_set_host_name() */
+ AVAHI_SERVER_COLLISION, /**< There is a collision with a host RR. All host RRs have been withdrawn, the user should set a new host name via avahi_server_set_host_name() */
+ AVAHI_SERVER_FAILURE /**< Some fatal failure happened, the server is unable to proceed */
} AvahiServerState;
/** For every service a special TXT item is implicitly added, which
diff --git a/avahi-common/error.h b/avahi-common/error.h
index 55c388b..270aece 100644
--- a/avahi-common/error.h
+++ b/avahi-common/error.h
@@ -40,7 +40,7 @@ enum {
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_COLLISION = -8, /**< Name collision */
AVAHI_ERR_INVALID_RECORD = -9, /**< Invalid RR */
AVAHI_ERR_INVALID_SERVICE_NAME = -10, /**< Invalid service name */