Linux bluetooth development
 help / color / mirror / Atom feed
From: Mikel Astiz <mikel.astiz.oss@gmail.com>
To: linux-bluetooth@vger.kernel.org
Cc: Mikel Astiz <mikel.astiz@bmw-carit.de>
Subject: [RFC v4 3/9] media: Add gateway_get_state() to internal API
Date: Fri, 14 Sep 2012 14:03:10 +0200	[thread overview]
Message-ID: <1347624196-11281-4-git-send-email-mikel.astiz.oss@gmail.com> (raw)
In-Reply-To: <1347624196-11281-1-git-send-email-mikel.astiz.oss@gmail.com>

From: Mikel Astiz <mikel.astiz@bmw-carit.de>

Expose the state of the gateway interface in the internal API.
---
 audio/gateway.c |    7 +++++++
 audio/gateway.h |    1 +
 2 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/audio/gateway.c b/audio/gateway.c
index 0603f12..53094af 100644
--- a/audio/gateway.c
+++ b/audio/gateway.c
@@ -787,6 +787,13 @@ gboolean gateway_is_active(struct audio_device *dev)
 	return FALSE;
 }
 
+gateway_state_t gateway_get_state(struct audio_device *dev)
+{
+	struct gateway *gw = dev->gateway;
+
+	return gw->state;
+}
+
 int gateway_connect_rfcomm(struct audio_device *dev, GIOChannel *io)
 {
 	if (!io)
diff --git a/audio/gateway.h b/audio/gateway.h
index 0893962..d87d76a 100644
--- a/audio/gateway.h
+++ b/audio/gateway.h
@@ -59,6 +59,7 @@ void gateway_unregister(struct audio_device *dev);
 struct gateway *gateway_init(struct audio_device *dev);
 gboolean gateway_is_active(struct audio_device *dev);
 gboolean gateway_is_connected(struct audio_device *dev);
+gateway_state_t gateway_get_state(struct audio_device *dev);
 int gateway_connect_rfcomm(struct audio_device *dev, GIOChannel *io);
 int gateway_connect_sco(struct audio_device *dev, GIOChannel *chan);
 void gateway_start_service(struct audio_device *device);
-- 
1.7.7.6


  parent reply	other threads:[~2012-09-14 12:03 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-14 12:03 [RFC v4 0/9] Optional acquire in Media API and related Mikel Astiz
2012-09-14 12:03 ` [RFC v4 1/9] media: Fix accesstype comparison Mikel Astiz
2012-09-14 12:03 ` [RFC v4 2/9] media: Add a2dp_sep_is_playing() to internal API Mikel Astiz
2012-09-14 12:03 ` Mikel Astiz [this message]
2012-09-14 12:03 ` [RFC v4 4/9] media: Replace transport->in_use flag with state Mikel Astiz
2012-09-14 12:03 ` [RFC v4 5/9] media: Watch interface state changes in transport Mikel Astiz
2012-09-14 12:03 ` [RFC v4 6/9] media: Split transport state based on playing flag Mikel Astiz
2012-09-14 12:03 ` [RFC v4 7/9] media: Expose transport state in D-Bus Mikel Astiz
2012-09-14 12:03 ` [RFC v4 8/9] media: Automatically release transport when HUP Mikel Astiz
2012-09-14 12:03 ` [RFC v4 9/9] media: Extend media API with optional acquire Mikel Astiz
2012-09-14 12:16 ` [RFC v4 0/9] Optional acquire in Media API and related Maxim Levitsky
2012-09-14 12:40   ` Mikel Astiz

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=1347624196-11281-4-git-send-email-mikel.astiz.oss@gmail.com \
    --to=mikel.astiz.oss@gmail.com \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=mikel.astiz@bmw-carit.de \
    /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