summaryrefslogtreecommitdiffstats
path: root/hcid/dbus-error.c
diff options
context:
space:
mode:
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");