From 0192a461e37cef7e2d95d576b14e0cda277fa25d Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Mon, 4 Aug 2008 21:20:56 +0200 Subject: Move error_not_supported where it is actually used --- audio/headset.c | 7 +++++++ common/error.c | 13 ------------- common/error.h | 3 --- 3 files changed, 7 insertions(+), 16 deletions(-) diff --git a/audio/headset.c b/audio/headset.c index 61b1745f..1ffa7456 100644 --- a/audio/headset.c +++ b/audio/headset.c @@ -145,6 +145,13 @@ struct event { int (*callback) (struct audio_device *device, const char *buf); }; +static DBusHandlerResult error_not_supported(DBusConnection *conn, + DBusMessage *msg) +{ + return error_common_reply(conn, msg, ERROR_INTERFACE ".NotSupported", + "Not supported"); +} + static int rfcomm_connect(struct audio_device *device, headset_stream_cb_t cb, void *user_data, unsigned int *cb_id); static int get_records(struct audio_device *device, headset_stream_cb_t cb, diff --git a/common/error.c b/common/error.c index 3e97b2a9..e4d464ac 100644 --- a/common/error.c +++ b/common/error.c @@ -54,19 +54,6 @@ DBusHandlerResult error_connection_attempt_failed(DBusConnection *conn, DBusMess err > 0 ? strerror(err) : "Connection attempt failed"); } -/** - org.bluez.Error.NotSupported: - - The remote device does not support the expected feature. - Examples of use: trying to connect to audio device while audio is not - declared in device sdp record. -*/ -DBusHandlerResult error_not_supported(DBusConnection *conn, DBusMessage *msg) -{ - return error_common_reply(conn, msg, ERROR_INTERFACE ".NotSupported", - "Not supported"); -} - /** org.bluez.Error.Canceled: diff --git a/common/error.h b/common/error.h index 4d4236b8..b8494dfe 100644 --- a/common/error.h +++ b/common/error.h @@ -33,9 +33,6 @@ DBusHandlerResult error_connection_attempt_failed(DBusConnection *conn, DBusMessage *msg, int err); -DBusHandlerResult error_not_supported(DBusConnection *conn, - DBusMessage *msg); - DBusHandlerResult error_canceled(DBusConnection *conn, DBusMessage *msg, const char *str); -- cgit