summaryrefslogtreecommitdiffstats
path: root/audio/gateway.c
diff options
context:
space:
mode:
authorLuiz Augusto von Dentz <luiz.dentz@openbossa.org>2007-07-18 18:25:13 +0000
committerLuiz Augusto von Dentz <luiz.dentz@openbossa.org>2007-07-18 18:25:13 +0000
commit7c386bc929463c6aad12677bfe0de8238ce26220 (patch)
treedd4f26a220d7532d72f99d790be78fd4da514039 /audio/gateway.c
parentf4d5c29e31cb8db7095fd5ee529ba490e2ce4e92 (diff)
Fix disable_hfp and add human readable string for states.
Diffstat (limited to 'audio/gateway.c')
-rw-r--r--audio/gateway.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/audio/gateway.c b/audio/gateway.c
index 3b84462d..0c540de5 100644
--- a/audio/gateway.c
+++ b/audio/gateway.c
@@ -551,3 +551,22 @@ void gateway_exit(void)
dbus_connection_unref(connection);
connection = NULL;
}
+
+gboolean gateway_is_enabled(uint16_t svc)
+{
+ gboolean ret;
+
+ switch (svc) {
+ case HEADSET_SVCLASS_ID:
+ ret = (hs_server != NULL);
+ break;
+ case HANDSFREE_SVCLASS_ID:
+ ret = (hf_server != NULL);
+ break;
+ default:
+ ret = FALSE;
+ break;
+ }
+
+ return ret;
+}