diff options
-rw-r--r-- | audio/headset.c | 11 | ||||
-rw-r--r-- | audio/manager.c | 13 |
2 files changed, 14 insertions, 10 deletions
diff --git a/audio/headset.c b/audio/headset.c index 81115915..04a24ca0 100644 --- a/audio/headset.c +++ b/audio/headset.c @@ -140,30 +140,31 @@ static DBusHandlerResult error_reply(DBusConnection *conn, DBusMessage *msg, static DBusHandlerResult err_already_connected(DBusConnection *conn, DBusMessage *msg) { - return error_reply(conn, msg, "org.bluez.Error.AlreadyConnected", + return error_reply(conn, msg, "org.bluez.audio.Error.AlreadyConnected", "Already connected to a device"); } static DBusHandlerResult err_not_connected(DBusConnection *conn, DBusMessage *msg) { - return error_reply(conn, msg, "org.bluez.Error.NotConnected", + return error_reply(conn, msg, "org.bluez.audio.Error.NotConnected", "Not connected to any device"); } static DBusHandlerResult err_not_supported(DBusConnection *conn, DBusMessage *msg) { - return error_reply(conn, msg, "org.bluez.Error.NotSupported", + return error_reply(conn, msg, "org.bluez.audio.Error.NotSupported", "The service is not supported by the remote device"); } static DBusHandlerResult err_connect_failed(DBusConnection *conn, DBusMessage *msg, int err) { - return error_reply(conn, msg, "org.bluez.Error.ConnectFailed", strerror(err)); + return error_reply(conn, msg, "org.bluez.audio.Error.ConnectFailed", + strerror(err)); } static DBusHandlerResult err_failed(DBusConnection *conn, DBusMessage *msg) { - return error_reply(conn, msg, "org.bluez.Error.Failed", "Failed"); + return error_reply(conn, msg, "org.bluez.audio.Error.Failed", "Failed"); } static gint headset_bda_cmp(gconstpointer headset, gconstpointer bda) diff --git a/audio/manager.c b/audio/manager.c index 1512218f..04bb3b96 100644 --- a/audio/manager.c +++ b/audio/manager.c @@ -82,7 +82,7 @@ static DBusHandlerResult error_reply(DBusConnection *conn, DBusMessage *msg, static DBusHandlerResult err_invalid_args(DBusConnection *conn, DBusMessage *msg, const char *descr) { - return error_reply(conn, msg, "org.bluez.Error.InvalidArguments", + return error_reply(conn, msg, "org.bluez.audio.Error.InvalidArguments", descr ? descr : "Invalid arguments in method call"); } @@ -186,7 +186,7 @@ static DBusHandlerResult am_create_headset(DBusMessage *msg) hs_path = headset_add(&bda); if (!hs_path) return error_reply(connection, msg, - "org.bluez.Error.Failed", + "org.bluez.audio.Error.Failed", "Unable to create new headset object"); manager_add_headset(hs_path); } @@ -219,7 +219,8 @@ static DBusHandlerResult am_remove_headset(DBusMessage *msg) match = g_slist_find_custom(headsets, path, (GCompareFunc) strcmp); if (!match) - return error_reply(connection, msg, "org.bluez.Error.DoesNotExist", + return error_reply(connection, msg, + "org.bluez.audio.Error.DoesNotExist", "The headset does not exist"); reply = dbus_message_new_method_return(msg); @@ -279,7 +280,8 @@ static DBusHandlerResult am_get_default_headset(DBusMessage *msg) DBusMessage *reply; if (!default_hs) - return error_reply(connection, msg, "org.bluez.Error.DoesNotExist", + return error_reply(connection, msg, + "org.bluez.audio.Error.DoesNotExist", "There is no default headset"); reply = dbus_message_new_method_return(msg); @@ -314,7 +316,8 @@ static DBusHandlerResult am_change_default_headset(DBusMessage *msg) match = g_slist_find_custom(headsets, path, (GCompareFunc) strcmp); if (!match) - return error_reply(connection, msg, "org.bluez.Error.DoesNotExist", + return error_reply(connection, msg, + "org.bluez.audio.Error.DoesNotExist", "The headset does not exist"); reply = dbus_message_new_method_return(msg); |