This is a special error type. It has a more general meaning and allows you to add a string to the error. --- src/error.c | 6 ++++++ src/error.h | 1 + 2 files changed, 7 insertions(+), 0 deletions(-) diff --git a/src/error.c b/src/error.c index 013de96..3a78628 100644 --- a/src/error.c +++ b/src/error.c @@ -114,3 +114,9 @@ DBusMessage *btd_error_no_such_adapter(DBusMessage *msg) return g_dbus_create_error(msg, ERROR_INTERFACE ".NoSuchAdapter", "No such adapter"); } + +DBusMessage *btd_error_failed(DBusMessage *msg, const char *str) +{ + return g_dbus_create_error(msg, ERROR_INTERFACE + ".Failed", "%s", str); +} diff --git a/src/error.h b/src/error.h index a4e32fe..faaef0a 100644 --- a/src/error.h +++ b/src/error.h @@ -41,3 +41,4 @@ DBusMessage *btd_error_in_progress(DBusMessage *msg); DBusMessage *btd_error_does_not_exist(DBusMessage *msg); DBusMessage *btd_error_not_authorized(DBusMessage *msg); DBusMessage *btd_error_no_such_adapter(DBusMessage *msg); +DBusMessage *btd_error_failed(DBusMessage *msg, const char *str); -- 1.7.3.2 -- To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html