summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2008-09-01 21:55:09 +0200
committerMarcel Holtmann <marcel@holtmann.org>2008-09-01 21:55:09 +0200
commit080bb2b61a50fdc7985d7ab5e198ca716b9380fc (patch)
tree07aca7363bee4f90638715a7595473c0b1fc698f
parent75c562d773e5fe37f4257631318d7f918edc5b53 (diff)
Add skeleton for telephony drivers
-rw-r--r--acinclude.m47
-rw-r--r--audio/Makefile.am21
-rw-r--r--audio/telephony-dummy.c29
-rw-r--r--audio/telephony.h24
4 files changed, 75 insertions, 6 deletions
diff --git a/acinclude.m4 b/acinclude.m4
index 2db14efb..ff404bef 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -194,6 +194,7 @@ AC_DEFUN([AC_ARG_BLUEZ], [
configfiles_enable=yes
initscripts_enable=no
pcmciarules_enable=no
+ telephony_driver=dummy
AC_ARG_ENABLE(fortify, AC_HELP_STRING([--disable-fortify], [disable compile time buffer checks]), [
fortify_enable=${enableval}
@@ -291,6 +292,12 @@ AC_DEFUN([AC_ARG_BLUEZ], [
debug_enable=${enableval}
])
+ AC_ARG_WITH(telephony, AC_HELP_STRING([--with-telephony=DRIVER], [select telephony driver]), [
+ telephony_driver=${withval}
+ ])
+
+ AC_SUBST([TELEPHONY_DRIVER], [telephony-${telephony_driver}.c])
+
if (test "${fortify_enable}" = "yes"); then
CFLAGS="$CFLAGS -D_FORTIFY_SOURCE=2"
fi
diff --git a/audio/Makefile.am b/audio/Makefile.am
index d9f12f87..c98aa564 100644
--- a/audio/Makefile.am
+++ b/audio/Makefile.am
@@ -5,11 +5,9 @@ plugindir = $(libdir)/bluetooth/plugins
plugin_LTLIBRARIES = audio.la
audio_la_SOURCES = main.c \
- manager.h manager.c headset.h headset.c \
- ipc.h ipc.c unix.h unix.c \
- device.h device.c gateway.h gateway.c \
- sink.c sink.h avdtp.c avdtp.h \
- a2dp.c a2dp.h control.c control.h
+ ipc.h ipc.c unix.h unix.c manager.h manager.c telephony.c \
+ device.h device.c headset.h headset.c gateway.h gateway.c \
+ avdtp.h avdtp.c a2dp.h a2dp.c sink.h sink.c control.h control.c
audio_la_LDFLAGS = -module -avoid-version -no-undefined \
-export-symbols-regex bluetooth_plugin_desc
@@ -17,6 +15,10 @@ audio_la_LDFLAGS = -module -avoid-version -no-undefined \
LDADD = $(top_builddir)/common/libhelper.a \
@GDBUS_LIBS@ @GLIB_LIBS@ @DBUS_LIBS@ @BLUEZ_LIBS@
+BUILT_SOURCES = telephony.c
+
+nodist_audio_la_SOURCES = $(BUILT_SOURCES)
+
if ALSA
alsadir = $(libdir)/alsa-lib
@@ -57,6 +59,13 @@ AM_CFLAGS = @BLUEZ_CFLAGS@ @DBUS_CFLAGS@ @GLIB_CFLAGS@ @GDBUS_CFLAGS@
INCLUDES = -I$(top_srcdir)/common -I$(top_srcdir)/src
-EXTRA_DIST = audio.conf audio-api.txt test-audio asound.conf
+EXTRA_DIST = audio.conf audio-api.txt test-audio asound.conf \
+ telephony-dummy.c
MAINTAINERCLEANFILES = Makefile.in
+
+telephony.c: @TELEPHONY_DRIVER@
+ @if [ ! -e $@ ] ; then $(LN_S) $< $@ ; fi
+
+clean-local:
+ @rm -f telephony.c
diff --git a/audio/telephony-dummy.c b/audio/telephony-dummy.c
new file mode 100644
index 00000000..b698893e
--- /dev/null
+++ b/audio/telephony-dummy.c
@@ -0,0 +1,29 @@
+/*
+ *
+ * BlueZ - Bluetooth protocol stack for Linux
+ *
+ * Copyright (C) 2006-2007 Nokia Corporation
+ * Copyright (C) 2004-2008 Marcel Holtmann <marcel@holtmann.org>
+ *
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include "telephony.h"
diff --git a/audio/telephony.h b/audio/telephony.h
new file mode 100644
index 00000000..8a990113
--- /dev/null
+++ b/audio/telephony.h
@@ -0,0 +1,24 @@
+/*
+ *
+ * BlueZ - Bluetooth protocol stack for Linux
+ *
+ * Copyright (C) 2006-2007 Nokia Corporation
+ * Copyright (C) 2004-2008 Marcel Holtmann <marcel@holtmann.org>
+ *
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+