Add Proximity Profile plugin skeleton

This commit is contained in:
Claudio Takahasi 2011-07-13 09:37:55 -03:00 committed by Johan Hedberg
parent 8a617a8df5
commit 37c3958aba
4 changed files with 54 additions and 0 deletions

View File

@ -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

View File

@ -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")

View File

@ -18,6 +18,7 @@ fi
--libexecdir=/lib \
--enable-capng \
--enable-gatt-example \
--enable-proximity \
--enable-health \
--enable-tracer \
--enable-tools \

42
proximity/main.c Normal file
View File

@ -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)