From 869c3c5167c599c9481b3716fa7e1da18fd0710b Mon Sep 17 00:00:00 2001 From: Mikel Astiz Date: Fri, 7 Sep 2012 17:20:27 +0200 Subject: [PATCH] media: Add gateway_get_state() to internal API Expose the state of the gateway interface in the internal API. --- audio/gateway.c | 7 +++++++ audio/gateway.h | 1 + 2 files changed, 8 insertions(+) diff --git a/audio/gateway.c b/audio/gateway.c index 0603f1201..53094af0e 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 0893962bc..d87d76ac3 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); -- 2.47.3