2013-04-12 22:34:22

by João Paulo Rechi Vita

[permalink] [raw]
Subject: [PATCH BlueZ 1/3] audio: Remove unused constant

From: João Paulo Rechi Vita <[email protected]>

Removes the never used constant AUDIO_INTERFACE which is defined to
"org.bluez.Audio".
---
profiles/audio/device.c | 2 --
1 file changed, 2 deletions(-)

diff --git a/profiles/audio/device.c b/profiles/audio/device.c
index 907221d..b9d1dde 100644
--- a/profiles/audio/device.c
+++ b/profiles/audio/device.c
@@ -56,8 +56,6 @@
#include "sink.h"
#include "source.h"

-#define AUDIO_INTERFACE "org.bluez.Audio"
-
#define CONTROL_CONNECT_TIMEOUT 2
#define AVDTP_CONNECT_TIMEOUT 1
#define AVDTP_CONNECT_TIMEOUT_BOOST 1
--
1.7.11.7



2013-04-15 14:20:49

by Luiz Augusto von Dentz

[permalink] [raw]
Subject: Re: [PATCH BlueZ 1/3] audio: Remove unused constant

Hi Joao,

On Sat, Apr 13, 2013 at 1:34 AM, <[email protected]> wrote:
> From: Jo?o Paulo Rechi Vita <[email protected]>
>
> Removes the never used constant AUDIO_INTERFACE which is defined to
> "org.bluez.Audio".
> ---
> profiles/audio/device.c | 2 --
> 1 file changed, 2 deletions(-)
>
> diff --git a/profiles/audio/device.c b/profiles/audio/device.c
> index 907221d..b9d1dde 100644
> --- a/profiles/audio/device.c
> +++ b/profiles/audio/device.c
> @@ -56,8 +56,6 @@
> #include "sink.h"
> #include "source.h"
>
> -#define AUDIO_INTERFACE "org.bluez.Audio"
> -
> #define CONTROL_CONNECT_TIMEOUT 2
> #define AVDTP_CONNECT_TIMEOUT 1
> #define AVDTP_CONNECT_TIMEOUT_BOOST 1
> --
> 1.7.11.7

All 3 patches pushed upstream, thanks.


--
Luiz Augusto von Dentz

2013-04-12 22:34:24

by João Paulo Rechi Vita

[permalink] [raw]
Subject: [PATCH BlueZ 3/3] audio: Remove unused constants

From: João Paulo Rechi Vita <[email protected]>

Removes the never used constants AUDIO_SINK_INTERFACE and
AUDIO_SOURCE_INTERFACE which are defined to "org.bluez.AudioSink" and
"org.bluez.AudioSource", respectively.
---
profiles/audio/sink.h | 2 --
profiles/audio/source.h | 2 --
2 files changed, 4 deletions(-)

diff --git a/profiles/audio/sink.h b/profiles/audio/sink.h
index ba0dde8..7ec7610 100644
--- a/profiles/audio/sink.h
+++ b/profiles/audio/sink.h
@@ -22,8 +22,6 @@
*
*/

-#define AUDIO_SINK_INTERFACE "org.bluez.AudioSink"
-
typedef enum {
SINK_STATE_DISCONNECTED,
SINK_STATE_CONNECTING,
diff --git a/profiles/audio/source.h b/profiles/audio/source.h
index 61afd94..317db9a 100644
--- a/profiles/audio/source.h
+++ b/profiles/audio/source.h
@@ -23,8 +23,6 @@
*
*/

-#define AUDIO_SOURCE_INTERFACE "org.bluez.AudioSource"
-
typedef enum {
SOURCE_STATE_DISCONNECTED,
SOURCE_STATE_CONNECTING,
--
1.7.11.7


2013-04-12 22:34:23

by João Paulo Rechi Vita

[permalink] [raw]
Subject: [PATCH BlueZ 2/3] audio: Remove unused function

From: João Paulo Rechi Vita <[email protected]>

Removes the never used function audio_device_is_active.
---
profiles/audio/device.c | 19 -------------------
profiles/audio/device.h | 3 ---
2 files changed, 22 deletions(-)

diff --git a/profiles/audio/device.c b/profiles/audio/device.c
index b9d1dde..7a76284 100644
--- a/profiles/audio/device.c
+++ b/profiles/audio/device.c
@@ -316,25 +316,6 @@ struct audio_device *audio_device_register(struct btd_device *device)
return dev;
}

-gboolean audio_device_is_active(struct audio_device *dev,
- const char *interface)
-{
- if (!interface) {
- if ((dev->sink || dev->source) && avdtp_is_connected(dev))
- return TRUE;
- } else if (!strcmp(interface, AUDIO_SINK_INTERFACE) && dev->sink &&
- avdtp_is_connected(dev))
- return TRUE;
- else if (!strcmp(interface, AUDIO_SOURCE_INTERFACE) && dev->source &&
- avdtp_is_connected(dev))
- return TRUE;
- else if (!strcmp(interface, AUDIO_CONTROL_INTERFACE) && dev->control &&
- control_is_active(dev))
- return TRUE;
-
- return FALSE;
-}
-
void audio_device_unregister(struct audio_device *device)
{
DBG("%s", device_get_path(device->btd_dev));
diff --git a/profiles/audio/device.h b/profiles/audio/device.h
index ad4dae5..b772594 100644
--- a/profiles/audio/device.h
+++ b/profiles/audio/device.h
@@ -43,6 +43,3 @@ struct audio_device {
struct audio_device *audio_device_register(struct btd_device *device);

void audio_device_unregister(struct audio_device *device);
-
-gboolean audio_device_is_active(struct audio_device *dev,
- const char *interface);
--
1.7.11.7