diff options
author | Johan Hedberg <johan.hedberg@nokia.com> | 2006-03-16 19:08:52 +0000 |
---|---|---|
committer | Johan Hedberg <johan.hedberg@nokia.com> | 2006-03-16 19:08:52 +0000 |
commit | 5c8dea74d0f1d0ac352827f6adc8761caa161e90 (patch) | |
tree | 844afda34318c37ea876f3fa23f5a28dcc9699d4 | |
parent | 70af3d41686970fd767c16ea7d94a3acf56edce5 (diff) |
Add some new D-Bus errors
-rw-r--r-- | hcid/dbus-error.c | 16 | ||||
-rw-r--r-- | hcid/dbus.h | 2 |
2 files changed, 18 insertions, 0 deletions
diff --git a/hcid/dbus-error.c b/hcid/dbus-error.c index 28cc9328..dc672a92 100644 --- a/hcid/dbus-error.c +++ b/hcid/dbus-error.c @@ -122,6 +122,17 @@ static DBusHandlerResult error_in_progress(DBusConnection *conn, DBusMessage *ms dbus_message_new_error(msg, ERROR_INTERFACE ".InProgress", str)); } +static DBusHandlerResult error_canceled(DBusConnection *conn, DBusMessage *msg, const char *str) +{ + return send_reply_and_unref(conn, + dbus_message_new_error(msg, ERROR_INTERFACE ".Canceled", str)); +} + +DBusHandlerResult error_connect_canceled(DBusConnection *conn, DBusMessage *msg) +{ + return error_canceled(conn, msg, "Connection creation was canceled"); +} + DBusHandlerResult error_bonding_already_exists(DBusConnection *conn, DBusMessage *msg) { return error_already_exists(conn, msg, "Bonding already exists"); @@ -142,6 +153,11 @@ DBusHandlerResult error_discover_in_progress(DBusConnection *conn, DBusMessage * return error_in_progress(conn, msg, "Discover in progress"); } +DBusHandlerResult error_connect_in_progress(DBusConnection *conn, DBusMessage *msg) +{ + return error_in_progress(conn, msg, "Connection creation in progress"); +} + DBusHandlerResult error_record_does_not_exist(DBusConnection *conn, DBusMessage *msg) { return error_does_not_exist(conn, msg, "Record does not exist"); diff --git a/hcid/dbus.h b/hcid/dbus.h index 16fe2ab3..78c23aa1 100644 --- a/hcid/dbus.h +++ b/hcid/dbus.h @@ -136,10 +136,12 @@ DBusHandlerResult error_bonding_already_exists(DBusConnection *conn, DBusMessage DBusHandlerResult error_bonding_does_not_exist(DBusConnection *conn, DBusMessage *msg); DBusHandlerResult error_bonding_in_progress(DBusConnection *conn, DBusMessage *msg); DBusHandlerResult error_discover_in_progress(DBusConnection *conn, DBusMessage *msg); +DBusHandlerResult error_connect_in_progress(DBusConnection *conn, DBusMessage *msg); DBusHandlerResult error_record_does_not_exist(DBusConnection *conn, DBusMessage *msg); DBusHandlerResult error_passkey_agent_already_exists(DBusConnection *conn, DBusMessage *msg); DBusHandlerResult error_passkey_agent_does_not_exist(DBusConnection *conn, DBusMessage *msg); DBusHandlerResult error_binding_does_not_exist(DBusConnection *conn, DBusMessage *msg); +DBusHandlerResult error_connect_canceled(DBusConnection *conn, DBusMessage *msg); typedef void (*name_cb_t)(const char *name, void *user_data); |