summaryrefslogtreecommitdiffstats
path: root/hcid/dbus-error.c
diff options
context:
space:
mode:
authorJohan Hedberg <johan.hedberg@nokia.com>2006-03-16 20:31:56 +0000
committerJohan Hedberg <johan.hedberg@nokia.com>2006-03-16 20:31:56 +0000
commite6edccc19224e03227351de839e02637516bf6f9 (patch)
treebee579ae2d22bc139f7cd750cbcc68da223ef942 /hcid/dbus-error.c
parent5c8dea74d0f1d0ac352827f6adc8761caa161e90 (diff)
Add a couple of new errors
Diffstat (limited to 'hcid/dbus-error.c')
-rw-r--r--hcid/dbus-error.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/hcid/dbus-error.c b/hcid/dbus-error.c
index dc672a92..d126d11b 100644
--- a/hcid/dbus-error.c
+++ b/hcid/dbus-error.c
@@ -104,6 +104,13 @@ DBusHandlerResult error_unsupported_major_class(DBusConnection *conn, DBusMessag
"Unsupported Major Class"));
}
+DBusHandlerResult error_connection_attempt_failed(DBusConnection *conn, DBusMessage *msg, int err)
+{
+ return send_reply_and_unref(conn,
+ dbus_message_new_error(msg, ERROR_INTERFACE ".ConnectionAttemptFailed",
+ err ? "Connection attempt failed" : strerror(err)));
+}
+
static DBusHandlerResult error_already_exists(DBusConnection *conn, DBusMessage *msg, const char *str)
{
return send_reply_and_unref(conn,
@@ -122,6 +129,12 @@ static DBusHandlerResult error_in_progress(DBusConnection *conn, DBusMessage *ms
dbus_message_new_error(msg, ERROR_INTERFACE ".InProgress", str));
}
+static DBusHandlerResult error_not_in_progress(DBusConnection *conn, DBusMessage *msg, const char *str)
+{
+ return send_reply_and_unref(conn,
+ dbus_message_new_error(msg, ERROR_INTERFACE ".NotInProgress", str));
+}
+
static DBusHandlerResult error_canceled(DBusConnection *conn, DBusMessage *msg, const char *str)
{
return send_reply_and_unref(conn,
@@ -158,6 +171,11 @@ DBusHandlerResult error_connect_in_progress(DBusConnection *conn, DBusMessage *m
return error_in_progress(conn, msg, "Connection creation in progress");
}
+DBusHandlerResult error_connect_not_in_progress(DBusConnection *conn, DBusMessage *msg)
+{
+ return error_not_in_progress(conn, msg, "Connection creation not in progress");
+}
+
DBusHandlerResult error_record_does_not_exist(DBusConnection *conn, DBusMessage *msg)
{
return error_does_not_exist(conn, msg, "Record does not exist");