linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Chanyeol Park <chanyeol.park@samsung.com>
To: Gustavo Padovan <gustavo@padovan.org>
Cc: linux-bluetooth@vger.kernel.org,
	Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Subject: Re: [PATCH 03/21] headset: remove deprecated DBus methods
Date: Thu, 14 Jun 2012 16:43:20 +0900	[thread overview]
Message-ID: <4FD99618.6030100@samsung.com> (raw)
In-Reply-To: <1339620223-6639-4-git-send-email-gustavo@padovan.org>

Hi
On 2012년 06월 14일 05:43, Gustavo Padovan wrote:
> From: Gustavo Padovan<gustavo.padovan@collabora.co.uk>
>
> ---
>   audio/headset.c   |  151 -----------------------------------------------------
>   doc/audio-api.txt |   28 ----------
>   2 files changed, 179 deletions(-)
>
> diff --git a/audio/headset.c b/audio/headset.c
> index 729e4dc..3ce7eb9 100644
> --- a/audio/headset.c
> +++ b/audio/headset.c
> @@ -1673,26 +1673,6 @@ static DBusMessage *hs_stop(DBusConnection *conn, DBusMessage *msg,
>   	return reply;
>   }
>
> -static DBusMessage *hs_is_playing(DBusConnection *conn, DBusMessage *msg,
> -					void *data)
> -{
> -	struct audio_device *device = data;
> -	struct headset *hs = device->headset;
> -	DBusMessage *reply;
> -	dbus_bool_t playing;
> -
> -	reply = dbus_message_new_method_return(msg);
> -	if (!reply)
> -		return NULL;
> -
> -	playing = (hs->state == HEADSET_STATE_PLAYING);
> -
> -	dbus_message_append_args(reply, DBUS_TYPE_BOOLEAN,&playing,
> -					DBUS_TYPE_INVALID);
> -
> -	return reply;
> -}
> -
>   static DBusMessage *hs_disconnect(DBusConnection *conn, DBusMessage *msg,
>   					void *data)
>   {
> @@ -1816,95 +1796,6 @@ static DBusMessage *hs_cancel_call(DBusConnection *conn,
>   	return reply;
>   }
>
> -static DBusMessage *hs_play(DBusConnection *conn, DBusMessage *msg,
> -				void *data)
> -{
> -	struct audio_device *device = data;
> -	struct headset *hs = device->headset;
> -	int err;
> -
> -	if (sco_hci) {
> -		error("Refusing Headset.Play() because SCO HCI routing "
> -				"is enabled");
> -		return btd_error_not_available(msg);
> -	}
> -
> -	switch (hs->state) {
> -	case HEADSET_STATE_DISCONNECTED:
> -	case HEADSET_STATE_CONNECTING:
> -		return btd_error_not_connected(msg);
> -	case HEADSET_STATE_PLAY_IN_PROGRESS:
> -		if (hs->pending&&  hs->pending->msg == NULL) {
> -			hs->pending->msg = dbus_message_ref(msg);
> -			return NULL;
> -		}
> -		return btd_error_busy(msg);
> -	case HEADSET_STATE_PLAYING:
> -		return btd_error_already_connected(msg);
> -	case HEADSET_STATE_CONNECTED:
> -	default:
> -		break;
> -	}
> -
> -	err = sco_connect(device, NULL, NULL, NULL);
> -	if (err<  0)
> -		return btd_error_failed(msg, strerror(-err));
> -
> -	hs->pending->msg = dbus_message_ref(msg);
> -
> -	return NULL;
> -}
> -
> -static DBusMessage *hs_get_speaker_gain(DBusConnection *conn,
> -					DBusMessage *msg,
> -					void *data)
> -{
> -	struct audio_device *device = data;
> -	struct headset *hs = device->headset;
> -	struct headset_slc *slc = hs->slc;
> -	DBusMessage *reply;
> -	dbus_uint16_t gain;
> -
> -	if (hs->state<  HEADSET_STATE_CONNECTED)
> -		return btd_error_not_available(msg);
> -
> -	reply = dbus_message_new_method_return(msg);
> -	if (!reply)
> -		return NULL;
> -
> -	gain = (dbus_uint16_t) slc->sp_gain;
> -
> -	dbus_message_append_args(reply, DBUS_TYPE_UINT16,&gain,
> -					DBUS_TYPE_INVALID);
> -
> -	return reply;
> -}
> -
> -static DBusMessage *hs_get_mic_gain(DBusConnection *conn,
> -					DBusMessage *msg,
> -					void *data)
> -{
> -	struct audio_device *device = data;
> -	struct headset *hs = device->headset;
> -	struct headset_slc *slc = hs->slc;
> -	DBusMessage *reply;
> -	dbus_uint16_t gain;
> -
> -	if (hs->state<  HEADSET_STATE_CONNECTED || slc == NULL)
> -		return btd_error_not_available(msg);
> -
> -	reply = dbus_message_new_method_return(msg);
> -	if (!reply)
> -		return NULL;
> -
> -	gain = (dbus_uint16_t) slc->mic_gain;
> -
> -	dbus_message_append_args(reply, DBUS_TYPE_UINT16,&gain,
> -					DBUS_TYPE_INVALID);
> -
> -	return reply;
> -}
> -
>   static DBusMessage *hs_set_gain(DBusConnection *conn,
>   				DBusMessage *msg,
>   				void *data, uint16_t gain,
> @@ -1937,32 +1828,6 @@ static DBusMessage *hs_set_gain(DBusConnection *conn,
>   	return reply;
>   }
>
> -static DBusMessage *hs_set_speaker_gain(DBusConnection *conn,
> -					DBusMessage *msg,
> -					void *data)
> -{
> -	uint16_t gain;
> -
> -	if (!dbus_message_get_args(msg, NULL, DBUS_TYPE_UINT16,&gain,
> -				DBUS_TYPE_INVALID))
> -		return NULL;
> -
> -	return hs_set_gain(conn, msg, data, gain, HEADSET_GAIN_SPEAKER);
> -}
> -
> -static DBusMessage *hs_set_mic_gain(DBusConnection *conn,
> -					DBusMessage *msg,
> -					void *data)
> -{
> -	uint16_t gain;
> -
> -	if (!dbus_message_get_args(msg, NULL, DBUS_TYPE_UINT16,&gain,
> -				DBUS_TYPE_INVALID))
> -		return NULL;
> -
> -	return hs_set_gain(conn, msg, data, gain, HEADSET_GAIN_MICROPHONE);
> -}
> -
>   static DBusMessage *hs_get_properties(DBusConnection *conn,
>   					DBusMessage *msg, void *data)
>   {
> @@ -2065,23 +1930,7 @@ static const GDBusMethodTable headset_methods[] = {
>   			hs_is_connected) },
>   	{ GDBUS_METHOD("IndicateCall", NULL, NULL, hs_ring) },
>   	{ GDBUS_METHOD("CancelCall", NULL, NULL, hs_cancel_call) },
> -	{ GDBUS_DEPRECATED_ASYNC_METHOD("Play", NULL, NULL, hs_play) },
>   	{ GDBUS_METHOD("Stop", NULL, NULL, hs_stop) },
> -	{ GDBUS_DEPRECATED_METHOD("IsPlaying",
> -					NULL, GDBUS_ARGS({ "playing", "b" }),
> -					hs_is_playing) },
> -	{ GDBUS_DEPRECATED_METHOD("GetSpeakerGain",
> -					NULL, GDBUS_ARGS({ "gain", "q" }),
> -					hs_get_speaker_gain) },
> -	{ GDBUS_DEPRECATED_METHOD("GetMicrophoneGain",
> -					NULL, GDBUS_ARGS({ "gain", "q" }),
> -					hs_get_mic_gain) },
> -	{ GDBUS_DEPRECATED_METHOD("SetSpeakerGain",
> -					GDBUS_ARGS({ "gain", "q" }), NULL,
> -					hs_set_speaker_gain) },
> -	{ GDBUS_DEPRECATED_METHOD("SetMicrophoneGain",
> -					GDBUS_ARGS({ "gain", "q" }), NULL,
> -					hs_set_mic_gain) },
>   	{ GDBUS_METHOD("GetProperties",
>   			NULL, GDBUS_ARGS({ "properties", "a{sv}" }),
>   			hs_get_properties) },
> diff --git a/doc/audio-api.txt b/doc/audio-api.txt
> index 02291fd..dc5c811 100644
> --- a/doc/audio-api.txt
> +++ b/doc/audio-api.txt
> @@ -66,11 +66,6 @@ Methods		void Connect()
>   			Disconnect from the HSP/HFP service on the remote
>   			device.
>
> -		boolean IsConnected() {deprecated}
> -
> -			Returns TRUE if there is a active connection to the
> -			HSP/HFP connection on the remote device.
> -
>   		void IndicateCall()
>
>   			Indicate an incoming call on the headset
> @@ -89,29 +84,6 @@ Methods		void Connect()
>
>   			Close the audio connection.
>
> -		boolean IsPlaying() {deprecated}
> -
> -			Returns true if an audio connection to the headset
> -			is active.
> -
> -		uint16 GetSpeakerGain() {deprecated}
> -
> -			Returns the current speaker gain if available,
> -			otherwise returns the error NotAvailable.
> -
> -		uint16 GetMicrophoneGain() {deprecated}
> -
> -			Returns the current microphone gain if available,
> -			otherwise returns the error NotAvailable.
> -
> -		void SetSpeakerGain(uint16 gain) {deprecated}
> -
> -			Changes the current speaker gain if possible.
> -
> -		void SetMicrophoneGain(uint16 gain) {deprecated}
> -
> -			Changes the current speaker gain if possible.
> -
>   		dict GetProperties()
>
>   			Returns all properties for the interface. See the
If you remove these APIs, could you guide me how to use SCO open officially?
Currently we don't use PulseAudio HFP modules.

BR
Chanyeol Park.




  reply	other threads:[~2012-06-14  7:43 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-13 20:43 [PATCH 00/21] BlueZ 5.0 patches Gustavo Padovan
2012-06-13 20:43 ` [PATCH 02/21] remove the hciops plugin Gustavo Padovan
2012-06-13 20:43 ` [PATCH 03/21] headset: remove deprecated DBus methods Gustavo Padovan
2012-06-14  7:43   ` Chanyeol Park [this message]
2012-06-14  8:14     ` Luiz Augusto von Dentz
2012-06-14 14:07   ` [PATCH -v2 " Gustavo Padovan
2012-06-13 20:43 ` [PATCH 04/21] sink: remove deprecated DBus method Gustavo Padovan
2012-06-13 20:43 ` [PATCH 05/21] adapter: remove deprecated ListDevices() method Gustavo Padovan
2012-06-13 20:43 ` [PATCH 06/21] manager: remove deprecated ListAdapters() method Gustavo Padovan
2012-06-13 20:43 ` [PATCH 07/21] adapter: remove btd_adapter_encrypt_link() Gustavo Padovan
2012-06-13 20:43 ` [PATCH 08/21] adapter_ops: remove disable_cod_cache Gustavo Padovan
2012-06-13 20:43 ` [PATCH 09/21] manager: remove unused manager_add_adapter() Gustavo Padovan
2012-06-13 20:43 ` [PATCH 10/21] adapter: make restore powered work again Gustavo Padovan
2012-06-13 20:43 ` [PATCH 11/21] serial: remove SerialProxy interface Gustavo Padovan
2012-06-13 20:43 ` [PATCH 12/21] serial: remove unneeded headers include Gustavo Padovan
2012-06-13 20:43 ` [PATCH 13/21] input: remove unneeded header inclusions Gustavo Padovan
2012-06-13 20:43 ` [PATCH 14/21] serial: remove old way to connect to a serial port Gustavo Padovan
2012-06-13 20:43 ` [PATCH 15/21] emulator: move it to the tools folder Gustavo Padovan
2012-06-13 20:43 ` [PATCH 16/21] btmgmt: move to " Gustavo Padovan
2012-06-13 20:43 ` [PATCH 17/21] alert: move alert to profiles dir Gustavo Padovan
2012-06-13 20:43 ` [PATCH 18/21] deviceinfo: move to profiles folder Gustavo Padovan
2012-06-14 13:49   ` [PATCH 19/21] proximity: move to the " Gustavo Padovan
2012-06-13 20:43 ` [PATCH 20/21] thermometer: " Gustavo Padovan
2012-06-13 20:43 ` [PATCH 21/21] time: " Gustavo Padovan
2012-06-14  9:22 ` [PATCH 00/21] BlueZ 5.0 patches Bastien Nocera
2012-06-14 12:03   ` Anderson Lizardo
2012-06-14 13:02     ` Szymon Janc
2012-06-14 12:18   ` Johan Hedberg
2012-06-14 13:34   ` Gustavo Padovan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4FD99618.6030100@samsung.com \
    --to=chanyeol.park@samsung.com \
    --cc=gustavo.padovan@collabora.co.uk \
    --cc=gustavo@padovan.org \
    --cc=linux-bluetooth@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).