summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClaudio Takahasi <claudio.takahasi@openbossa.org>2011-07-13 09:37:55 -0300
committerJohan Hedberg <johan.hedberg@intel.com>2011-07-26 11:13:01 +0300
commit37c3958abade05352c48597f7feafd752c930628 (patch)
tree64fb62c77582e628a7fc2f2008a4ec5fe1605030
parent8a617a8df5641be0280e9c5e46fb464a73909ed5 (diff)
downloadbluez-37c3958abade05352c48597f7feafd752c930628.tar.gz
Add Proximity Profile plugin skeleton
-rw-r--r--Makefile.am5
-rw-r--r--acinclude.m46
-rwxr-xr-xbootstrap-configure1
-rw-r--r--proximity/main.c42
4 files changed, 54 insertions, 0 deletions
diff --git a/Makefile.am b/Makefile.am
index 52c49fb47..5f2bd7298 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -190,6 +190,11 @@ builtin_sources += network/main.c \
network/connection.h network/connection.c
endif
+if PROXIMITYPLUGIN
+builtin_modules += proximity
+builtin_sources += proximity/main.c
+endif
+
if SERVICEPLUGIN
builtin_modules += service
builtin_sources += plugins/service.c
diff --git a/acinclude.m4 b/acinclude.m4
index 4073f59f4..68ece3566 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -193,6 +193,7 @@ AC_DEFUN([AC_ARG_BLUEZ], [
serial_enable=yes
network_enable=yes
sap_enable=no
+ proximity_enable=no
service_enable=yes
health_enable=no
pnat_enable=no
@@ -240,6 +241,10 @@ AC_DEFUN([AC_ARG_BLUEZ], [
])
AC_SUBST([SAP_DRIVER], [sap-${sap_driver}.c])
+ AC_ARG_ENABLE(proximity, AC_HELP_STRING([--enable-proximity], [enable proximity plugin]), [
+ proximity_enable=${enableval}
+ ])
+
AC_ARG_ENABLE(serial, AC_HELP_STRING([--disable-serial], [disable serial plugin]), [
serial_enable=${enableval}
])
@@ -386,6 +391,7 @@ AC_DEFUN([AC_ARG_BLUEZ], [
AM_CONDITIONAL(SERIALPLUGIN, test "${serial_enable}" = "yes")
AM_CONDITIONAL(NETWORKPLUGIN, test "${network_enable}" = "yes")
AM_CONDITIONAL(SAPPLUGIN, test "${sap_enable}" = "yes")
+ AM_CONDITIONAL(PROXIMITYPLUGIN, test "${proximity_enable}" = "yes")
AM_CONDITIONAL(SERVICEPLUGIN, test "${service_enable}" = "yes")
AM_CONDITIONAL(HEALTHPLUGIN, test "${health_enable}" = "yes")
AM_CONDITIONAL(MCAP, test "${health_enable}" = "yes")
diff --git a/bootstrap-configure b/bootstrap-configure
index 55c1049f0..b0020cb60 100755
--- a/bootstrap-configure
+++ b/bootstrap-configure
@@ -18,6 +18,7 @@ fi
--libexecdir=/lib \
--enable-capng \
--enable-gatt-example \
+ --enable-proximity \
--enable-health \
--enable-tracer \
--enable-tools \
diff --git a/proximity/main.c b/proximity/main.c
new file mode 100644
index 000000000..dccd61918
--- /dev/null
+++ b/proximity/main.c
@@ -0,0 +1,42 @@
+/*
+ *
+ * BlueZ - Bluetooth protocol stack for Linux
+ *
+ * Copyright (C) 2011 Nokia Corporation
+ * Copyright (C) 2011 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 "plugin.h"
+
+static int proximity_init(void)
+{
+ return 0;
+}
+
+static void proximity_exit(void)
+{
+}
+
+BLUETOOTH_PLUGIN_DEFINE(proximity, VERSION,
+ BLUETOOTH_PLUGIN_PRIORITY_DEFAULT,
+ proximity_init, proximity_exit)