summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorClaudio Takahasi <claudio.takahasi@openbossa.org>2007-08-10 18:50:13 +0000
committerClaudio Takahasi <claudio.takahasi@openbossa.org>2007-08-10 18:50:13 +0000
commit3d9624ac1513b724eea443c01e655e24636c5153 (patch)
treef19c1d260b23365f84c779a252934f13e41429fb
parent152ee1375cd30d6efa61b52b46682e9d187155ed (diff)
serial: added new error - AlreadyExists
-rw-r--r--serial/error.c8
-rw-r--r--serial/error.h2
2 files changed, 10 insertions, 0 deletions
diff --git a/serial/error.c b/serial/error.c
index 22be2b1e..ba894992 100644
--- a/serial/error.c
+++ b/serial/error.c
@@ -64,6 +64,14 @@ DBusHandlerResult err_connection_not_in_progress(DBusConnection *conn,
"Connection creation not in progress"));
}
+DBusHandlerResult err_already_exists(DBusConnection *conn,
+ DBusMessage *msg, const char *str)
+{
+ return send_message_and_unref(conn,
+ dbus_message_new_error(msg,
+ SERIAL_ERROR_INTERFACE ".AlreadyExists", str));
+}
+
DBusHandlerResult err_does_not_exist(DBusConnection *conn,
DBusMessage *msg, const char *str)
{
diff --git a/serial/error.h b/serial/error.h
index 14301e95..f12602fb 100644
--- a/serial/error.h
+++ b/serial/error.h
@@ -31,6 +31,8 @@ DBusHandlerResult err_connection_in_progress(DBusConnection *conn,
DBusMessage *msg);
DBusHandlerResult err_connection_not_in_progress(DBusConnection *conn,
DBusMessage *msg);
+DBusHandlerResult err_already_exists(DBusConnection *conn,
+ DBusMessage *msg, const char *str);
DBusHandlerResult err_does_not_exist(DBusConnection *conn,
DBusMessage *msg, const char *str);
DBusHandlerResult err_failed(DBusConnection *conn,