All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3 0/2] DeviceInfo and BatteryService Clients
@ 2012-03-12 13:12 chen.ganir
  2012-03-12 13:12 ` [PATCH v3 1/2] Added DeviceInformation GATT Client chen.ganir
  2012-03-12 13:12 ` [PATCH v3 2/2] Added Battery Service " chen.ganir
  0 siblings, 2 replies; 5+ messages in thread
From: chen.ganir @ 2012-03-12 13:12 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Chen Ganir

From: Chen Ganir <chen.ganir@ti.com>

Adding Battery Service client and Device Information Service Client stubs.
More logic will be added to these service as development continues.
To enable the new features you will need to use:
--enable-batterystate
--enable-deviceinfo

This is version 3 of the patch set, after fixing some problems which were
reported in the mailing list + copyright mistakes.


Chen Ganir (2):
  Added DeviceInformation GATT Client
  Added Battery Service GATT Client

 Makefile.am                 |   14 +++++++
 acinclude.m4                |   12 ++++++
 batterystate/batterystate.c |   90 +++++++++++++++++++++++++++++++++++++++++++
 batterystate/batterystate.h |   24 +++++++++++
 batterystate/main.c         |   49 +++++++++++++++++++++++
 batterystate/manager.c      |   85 ++++++++++++++++++++++++++++++++++++++++
 batterystate/manager.h      |   24 +++++++++++
 deviceinfo/deviceinfo.c     |   88 ++++++++++++++++++++++++++++++++++++++++++
 deviceinfo/deviceinfo.h     |   24 +++++++++++
 deviceinfo/main.c           |   48 +++++++++++++++++++++++
 deviceinfo/manager.c        |   85 ++++++++++++++++++++++++++++++++++++++++
 deviceinfo/manager.h        |   24 +++++++++++
 12 files changed, 567 insertions(+), 0 deletions(-)
 create mode 100644 batterystate/batterystate.c
 create mode 100644 batterystate/batterystate.h
 create mode 100644 batterystate/main.c
 create mode 100644 batterystate/manager.c
 create mode 100644 batterystate/manager.h
 create mode 100644 deviceinfo/deviceinfo.c
 create mode 100644 deviceinfo/deviceinfo.h
 create mode 100644 deviceinfo/main.c
 create mode 100644 deviceinfo/manager.c
 create mode 100644 deviceinfo/manager.h

-- 
1.7.4.1


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH v3 1/2] Added DeviceInformation GATT Client
  2012-03-12 13:12 [PATCH v3 0/2] DeviceInfo and BatteryService Clients chen.ganir
@ 2012-03-12 13:12 ` chen.ganir
  2012-03-12 21:20   ` Claudio Takahasi
  2012-03-12 13:12 ` [PATCH v3 2/2] Added Battery Service " chen.ganir
  1 sibling, 1 reply; 5+ messages in thread
From: chen.ganir @ 2012-03-12 13:12 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Chen Ganir

From: Chen Ganir <chen.ganir@ti.com>

Added the DeviceInformation GATT Client plugin skeleton.
---
 Makefile.am             |    7 ++++
 acinclude.m4            |    6 +++
 deviceinfo/deviceinfo.c |   88 +++++++++++++++++++++++++++++++++++++++++++++++
 deviceinfo/deviceinfo.h |   24 +++++++++++++
 deviceinfo/main.c       |   48 +++++++++++++++++++++++++
 deviceinfo/manager.c    |   85 +++++++++++++++++++++++++++++++++++++++++++++
 deviceinfo/manager.h    |   24 +++++++++++++
 7 files changed, 282 insertions(+), 0 deletions(-)
 create mode 100644 deviceinfo/deviceinfo.c
 create mode 100644 deviceinfo/deviceinfo.h
 create mode 100644 deviceinfo/main.c
 create mode 100644 deviceinfo/manager.c
 create mode 100644 deviceinfo/manager.h

diff --git a/Makefile.am b/Makefile.am
index bd587eb..c2c61d6 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -244,6 +244,13 @@ builtin_sources += thermometer/main.c \
 			thermometer/thermometer.h thermometer/thermometer.c
 endif
 
+if DEVICEINFOPLUGIN
+builtin_modules += deviceinfo
+builtin_sources += deviceinfo/main.c \
+			deviceinfo/manager.h deviceinfo/manager.c \
+			deviceinfo/deviceinfo.h deviceinfo/deviceinfo.c
+endif
+
 builtin_modules += hciops mgmtops
 builtin_sources += plugins/hciops.c plugins/mgmtops.c
 
diff --git a/acinclude.m4 b/acinclude.m4
index b0f790c..14b7a4c 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -220,6 +220,7 @@ AC_DEFUN([AC_ARG_BLUEZ], [
 	dbusoob_enable=no
 	wiimote_enable=no
 	thermometer_enable=no
+	deviceinfo_enable=no
 
 	AC_ARG_ENABLE(optimization, AC_HELP_STRING([--disable-optimization], [disable code optimization]), [
 		optimization_enable=${enableval}
@@ -372,6 +373,10 @@ AC_DEFUN([AC_ARG_BLUEZ], [
 		thermometer_enable=${enableval}
 	])
 
+	AC_ARG_ENABLE(deviceinfo, AC_HELP_STRING([--enable-deviceinfo], [enable deviceinfo plugin]), [
+		deviceinfo_enable=${enableval}
+	])
+
 	if (test "${fortify_enable}" = "yes"); then
 		CFLAGS="$CFLAGS -D_FORTIFY_SOURCE=2"
 	fi
@@ -429,4 +434,5 @@ AC_DEFUN([AC_ARG_BLUEZ], [
 	AM_CONDITIONAL(DBUSOOBPLUGIN, test "${dbusoob_enable}" = "yes")
 	AM_CONDITIONAL(WIIMOTEPLUGIN, test "${wiimote_enable}" = "yes")
 	AM_CONDITIONAL(THERMOMETERPLUGIN, test "${thermometer_enable}" = "yes")
+	AM_CONDITIONAL(DEVICEINFOPLUGIN, test "${deviceinfo_enable}" = "yes")
 ])
diff --git a/deviceinfo/deviceinfo.c b/deviceinfo/deviceinfo.c
new file mode 100644
index 0000000..6d1834b
--- /dev/null
+++ b/deviceinfo/deviceinfo.c
@@ -0,0 +1,88 @@
+/*
+ *
+ *  BlueZ - Bluetooth protocol stack for Linux
+ *
+ *  Copyright (C) 2012 Texas Instruments, Inc.
+ *
+ *  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 <glib.h>
+#include <bluetooth/uuid.h>
+#include "adapter.h"
+#include "device.h"
+#include "gattrib.h"
+#include "attio.h"
+#include "att.h"
+#include "gatt.h"
+#include "deviceinfo.h"
+
+struct deviceinfo {
+	struct btd_device	*dev;		/* Device reference */
+};
+
+static GSList *deviceinfoservers = NULL;
+
+static void destroy_deviceinfo(gpointer user_data)
+{
+	struct deviceinfo *d = user_data;
+
+	btd_device_unref(d->dev);
+	g_free(d);
+}
+
+static gint cmp_device(gconstpointer a, gconstpointer b)
+{
+	const struct deviceinfo *d = a;
+	const struct btd_device *dev = b;
+
+	if (dev == d->dev)
+		return 0;
+
+	return -1;
+}
+
+int deviceinfo_register(struct btd_device *device, struct att_primary *dattr)
+{
+	struct deviceinfo *d;
+
+	d = g_new0(struct deviceinfo, 1);
+	d->dev = btd_device_ref(device);
+
+	deviceinfoservers = g_slist_prepend(deviceinfoservers, d);
+
+	return 0;
+}
+
+void deviceinfo_unregister(struct btd_device *device)
+{
+	struct deviceinfo *d;
+	GSList *l;
+
+	l = g_slist_find_custom(deviceinfoservers, device, cmp_device);
+	if (l == NULL)
+		return;
+
+	d = l->data;
+	deviceinfoservers = g_slist_remove(deviceinfoservers, d);
+
+	destroy_deviceinfo(d);
+}
diff --git a/deviceinfo/deviceinfo.h b/deviceinfo/deviceinfo.h
new file mode 100644
index 0000000..1859821
--- /dev/null
+++ b/deviceinfo/deviceinfo.h
@@ -0,0 +1,24 @@
+/*
+ *
+ *  BlueZ - Bluetooth protocol stack for Linux
+ *
+ *  Copyright (C) 2012 Texas Instruments, Inc.
+ *
+ *  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
+ *
+ */
+
+int deviceinfo_register(struct btd_device *device,struct att_primary *tattr);
+void deviceinfo_unregister(struct btd_device *device);
diff --git a/deviceinfo/main.c b/deviceinfo/main.c
new file mode 100644
index 0000000..ec5f103
--- /dev/null
+++ b/deviceinfo/main.c
@@ -0,0 +1,48 @@
+/*
+ *
+ *  BlueZ - Bluetooth protocol stack for Linux
+ *
+ *  Copyright (C) 2012 Texas Instruments, Inc.
+ *
+ *  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 <glib.h>
+#include <errno.h>
+
+#include "plugin.h"
+#include "manager.h"
+
+static int deviceinfo_init(void)
+{
+	if (deviceinfo_manager_init() < 0) {
+		return -EIO;
+	}
+
+	return 0;
+}
+
+static void deviceinfo_exit(void)
+{
+	deviceinfo_manager_exit();
+}
+
+BLUETOOTH_PLUGIN_DEFINE(deviceinfo, VERSION, BLUETOOTH_PLUGIN_PRIORITY_DEFAULT,
+					deviceinfo_init, deviceinfo_exit)
diff --git a/deviceinfo/manager.c b/deviceinfo/manager.c
new file mode 100644
index 0000000..7bfca49
--- /dev/null
+++ b/deviceinfo/manager.c
@@ -0,0 +1,85 @@
+/*
+ *
+ *  BlueZ - Bluetooth protocol stack for Linux
+ *
+ *  Copyright (C) 2012 Texas Instruments, Inc.
+ *
+ *  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
+ *
+ */
+
+#include <glib.h>
+#include <errno.h>
+#include <bluetooth/uuid.h>
+
+#include "adapter.h"
+#include "device.h"
+#include "att.h"
+#include "deviceinfo.h"
+#include "manager.h"
+
+#define DEVICE_INFORMATION_UUID		"0000180a-0000-1000-8000-00805f9b34fb"
+
+static gint primary_uuid_cmp(gconstpointer a, gconstpointer b)
+{
+	const struct att_primary *prim = a;
+	const char *uuid = b;
+
+	return g_strcmp0(prim->uuid, uuid);
+}
+
+static int deviceinfo_driver_probe(struct btd_device *device, GSList *uuids)
+{
+	struct att_primary *tattr;
+	GSList *primaries, *l;
+
+	primaries = btd_device_get_primaries(device);
+
+	l = g_slist_find_custom(primaries, DEVICE_INFORMATION_UUID,
+							primary_uuid_cmp);
+	if (l == NULL)
+		return -EINVAL;
+
+	tattr = l->data;
+
+	return deviceinfo_register(device, tattr);
+}
+
+static void deviceinfo_driver_remove(struct btd_device *device)
+{
+	deviceinfo_unregister(device);
+}
+
+static struct btd_device_driver deviceinfo_device_driver = {
+	.name	= "deviceinformation-device-driver",
+	.uuids	= BTD_UUIDS(DEVICE_INFORMATION_UUID),
+	.probe	= deviceinfo_driver_probe,
+	.remove	= deviceinfo_driver_remove
+};
+
+int deviceinfo_manager_init(void)
+{
+	int ret;
+	ret = btd_register_device_driver(&deviceinfo_device_driver);
+	if (ret < 0)
+                return ret;
+
+	return 0;
+}
+
+void deviceinfo_manager_exit(void)
+{
+	btd_unregister_device_driver(&deviceinfo_device_driver);
+}
diff --git a/deviceinfo/manager.h b/deviceinfo/manager.h
new file mode 100644
index 0000000..0f742ca
--- /dev/null
+++ b/deviceinfo/manager.h
@@ -0,0 +1,24 @@
+/*
+ *
+ *  BlueZ - Bluetooth protocol stack for Linux
+ *
+ *  Copyright (C) 2012 Texas Instruments, Inc.
+ *
+ *  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
+ *
+ */
+
+int deviceinfo_manager_init(void);
+void deviceinfo_manager_exit(void);
-- 
1.7.4.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH v3 2/2] Added Battery Service GATT Client
  2012-03-12 13:12 [PATCH v3 0/2] DeviceInfo and BatteryService Clients chen.ganir
  2012-03-12 13:12 ` [PATCH v3 1/2] Added DeviceInformation GATT Client chen.ganir
@ 2012-03-12 13:12 ` chen.ganir
  1 sibling, 0 replies; 5+ messages in thread
From: chen.ganir @ 2012-03-12 13:12 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Chen Ganir

From: Chen Ganir <chen.ganir@ti.com>

Added support for the Battery Service Gatt Client side.
---
 Makefile.am                 |    7 +++
 acinclude.m4                |    6 +++
 batterystate/batterystate.c |   90 +++++++++++++++++++++++++++++++++++++++++++
 batterystate/batterystate.h |   24 +++++++++++
 batterystate/main.c         |   49 +++++++++++++++++++++++
 batterystate/manager.c      |   85 ++++++++++++++++++++++++++++++++++++++++
 batterystate/manager.h      |   24 +++++++++++
 7 files changed, 285 insertions(+), 0 deletions(-)
 create mode 100644 batterystate/batterystate.c
 create mode 100644 batterystate/batterystate.h
 create mode 100644 batterystate/main.c
 create mode 100644 batterystate/manager.c
 create mode 100644 batterystate/manager.h

diff --git a/Makefile.am b/Makefile.am
index c2c61d6..10fd078 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -251,6 +251,13 @@ builtin_sources += deviceinfo/main.c \
 			deviceinfo/deviceinfo.h deviceinfo/deviceinfo.c
 endif
 
+if BATTERYSTATEPLUGIN
+builtin_modules += batterystate
+builtin_sources += batterystate/main.c \
+			batterystate/manager.h batterystate/manager.c \
+			batterystate/batterystate.h batterystate/batterystate.c
+endif
+
 builtin_modules += hciops mgmtops
 builtin_sources += plugins/hciops.c plugins/mgmtops.c
 
diff --git a/acinclude.m4 b/acinclude.m4
index 14b7a4c..b33b4bf 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -221,6 +221,7 @@ AC_DEFUN([AC_ARG_BLUEZ], [
 	wiimote_enable=no
 	thermometer_enable=no
 	deviceinfo_enable=no
+	batterystate_enable=no
 
 	AC_ARG_ENABLE(optimization, AC_HELP_STRING([--disable-optimization], [disable code optimization]), [
 		optimization_enable=${enableval}
@@ -377,6 +378,10 @@ AC_DEFUN([AC_ARG_BLUEZ], [
 		deviceinfo_enable=${enableval}
 	])
 
+	AC_ARG_ENABLE(batterystate, AC_HELP_STRING([--enable-batterystate], [enable batterystate plugin]), [
+		batterystate_enable=${enableval}
+	])
+
 	if (test "${fortify_enable}" = "yes"); then
 		CFLAGS="$CFLAGS -D_FORTIFY_SOURCE=2"
 	fi
@@ -435,4 +440,5 @@ AC_DEFUN([AC_ARG_BLUEZ], [
 	AM_CONDITIONAL(WIIMOTEPLUGIN, test "${wiimote_enable}" = "yes")
 	AM_CONDITIONAL(THERMOMETERPLUGIN, test "${thermometer_enable}" = "yes")
 	AM_CONDITIONAL(DEVICEINFOPLUGIN, test "${deviceinfo_enable}" = "yes")
+	AM_CONDITIONAL(BATTERYSTATEPLUGIN, test "${batterystate_enable}" = "yes")
 ])
diff --git a/batterystate/batterystate.c b/batterystate/batterystate.c
new file mode 100644
index 0000000..114786d
--- /dev/null
+++ b/batterystate/batterystate.c
@@ -0,0 +1,90 @@
+/*
+ *
+ *  BlueZ - Bluetooth protocol stack for Linux
+ *
+ *  Copyright (C) 2012 Texas Instruments, Inc.
+ *
+ *  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 <glib.h>
+#include <errno.h>
+#include <bluetooth/uuid.h>
+
+#include "adapter.h"
+#include "device.h"
+#include "gattrib.h"
+#include "attio.h"
+#include "att.h"
+#include "gatt.h"
+#include "batterystate.h"
+
+struct batterystate {
+	struct btd_device	*dev;		/* Device reference */
+};
+
+static GSList *batteryservices = NULL;
+
+static gint cmp_device(gconstpointer a, gconstpointer b)
+{
+	const struct batterystate *bs = a;
+	const struct btd_device *dev = b;
+
+	if (dev == bs->dev)
+		return 0;
+
+	return -1;
+}
+
+static void destroy_batterystate(gpointer user_data)
+{
+	struct batterystate *bs = user_data;
+
+	btd_device_unref(bs->dev);
+	g_free(bs);
+}
+
+
+int batterystate_register(struct btd_device *device, struct att_primary *dattr)
+{
+	struct batterystate *bs;
+
+	bs = g_new0(struct batterystate, 1);
+	bs->dev = btd_device_ref(device);
+
+	batteryservices = g_slist_prepend(batteryservices, bs);
+
+	return 0;
+}
+
+void batterystate_unregister(struct btd_device *device)
+{
+	struct batterystate *bs;
+	GSList *l;
+
+	l = g_slist_find_custom(batteryservices, device, cmp_device);
+	if (l == NULL)
+		return;
+
+	bs = l->data;
+	batteryservices = g_slist_remove(batteryservices, bs);
+
+	destroy_batterystate(bs);
+}
diff --git a/batterystate/batterystate.h b/batterystate/batterystate.h
new file mode 100644
index 0000000..b8b22f1
--- /dev/null
+++ b/batterystate/batterystate.h
@@ -0,0 +1,24 @@
+/*
+ *
+ *  BlueZ - Bluetooth protocol stack for Linux
+ *
+ *  Copyright (C) 2012 Texas Instruments, Inc.
+ *
+ *  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
+ *
+ */
+
+int batterystate_register(struct btd_device *device, struct att_primary *tattr);
+void batterystate_unregister(struct btd_device *device);
diff --git a/batterystate/main.c b/batterystate/main.c
new file mode 100644
index 0000000..bdde9bb
--- /dev/null
+++ b/batterystate/main.c
@@ -0,0 +1,49 @@
+/*
+ *
+ *  BlueZ - Bluetooth protocol stack for Linux
+ *
+ *  Copyright (C) 2012 Texas Instruments, Inc.
+ *
+ *  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 <glib.h>
+#include <errno.h>
+#include <gdbus.h>
+
+#include "plugin.h"
+#include "manager.h"
+
+static int batterystate_init(void)
+{
+	if (batterystate_manager_init() < 0) {
+		return -EIO;
+	}
+
+	return 0;
+}
+
+static void batterystate_exit(void)
+{
+	batterystate_manager_exit();
+}
+
+BLUETOOTH_PLUGIN_DEFINE(batterystate, VERSION, BLUETOOTH_PLUGIN_PRIORITY_DEFAULT,
+					batterystate_init, batterystate_exit)
diff --git a/batterystate/manager.c b/batterystate/manager.c
new file mode 100644
index 0000000..4d9389a
--- /dev/null
+++ b/batterystate/manager.c
@@ -0,0 +1,85 @@
+/*
+ *
+ *  BlueZ - Bluetooth protocol stack for Linux
+ *
+ *  Copyright (C) 2012 Texas Instruments, Inc.
+ *
+ *  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
+ *
+ */
+
+#include <glib.h>
+#include <errno.h>
+#include <bluetooth/uuid.h>
+
+#include "adapter.h"
+#include "device.h"
+#include "att.h"
+#include "batterystate.h"
+#include "manager.h"
+
+#define BATTERY_SERVICE_UUID		"0000180f-0000-1000-8000-00805f9b34fb"
+
+static gint primary_uuid_cmp(gconstpointer a, gconstpointer b)
+{
+	const struct att_primary *prim = a;
+	const char *uuid = b;
+
+	return g_strcmp0(prim->uuid, uuid);
+}
+
+static int batterystate_driver_probe(struct btd_device *device, GSList *uuids)
+{
+	struct att_primary *tattr;
+	GSList *primaries, *l;
+
+	primaries = btd_device_get_primaries(device);
+
+	l = g_slist_find_custom(primaries, BATTERY_SERVICE_UUID,
+							primary_uuid_cmp);
+	if (l == NULL)
+		return -EINVAL;
+
+	tattr = l->data;
+
+	return batterystate_register(device, tattr);
+}
+
+static void batterystate_driver_remove(struct btd_device *device)
+{
+	batterystate_unregister(device);
+}
+
+static struct btd_device_driver batterystate_device_driver = {
+	.name	= "batterystate-device-driver",
+	.uuids	= BTD_UUIDS(BATTERY_SERVICE_UUID),
+	.probe	= batterystate_driver_probe,
+	.remove	= batterystate_driver_remove
+};
+
+int batterystate_manager_init(void)
+{
+	int ret;
+	ret = btd_register_device_driver(&batterystate_device_driver);
+	if (ret < 0)
+                return ret;
+
+	return 0;
+}
+
+void batterystate_manager_exit(void)
+{
+	btd_unregister_device_driver(&batterystate_device_driver);
+}
diff --git a/batterystate/manager.h b/batterystate/manager.h
new file mode 100644
index 0000000..7f0bf15
--- /dev/null
+++ b/batterystate/manager.h
@@ -0,0 +1,24 @@
+/*
+ *
+ *  BlueZ - Bluetooth protocol stack for Linux
+ *
+ *  Copyright (C) 2012 Texas Instruments, Inc.
+ *
+ *  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
+ *
+ */
+
+int batterystate_manager_init(void);
+void batterystate_manager_exit(void);
-- 
1.7.4.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH v3 1/2] Added DeviceInformation GATT Client
  2012-03-12 13:12 ` [PATCH v3 1/2] Added DeviceInformation GATT Client chen.ganir
@ 2012-03-12 21:20   ` Claudio Takahasi
  2012-03-13  6:18     ` Ganir, Chen
  0 siblings, 1 reply; 5+ messages in thread
From: Claudio Takahasi @ 2012-03-12 21:20 UTC (permalink / raw)
  To: chen.ganir; +Cc: linux-bluetooth

Hi Chen Ganir:

s/Added/Add in the first line of commit message.
Use imperative/present tense in the commit message to follow the convention.

On Mon, Mar 12, 2012 at 10:12 AM,  <chen.ganir@ti.com> wrote:
> From: Chen Ganir <chen.ganir@ti.com>
>
> Added the DeviceInformation GATT Client plugin skeleton.
> ---
>  Makefile.am             |    7 ++++
>  acinclude.m4            |    6 +++
>  deviceinfo/deviceinfo.c |   88 +++++++++++++++++++++++++++++++++++++++++++++++
>  deviceinfo/deviceinfo.h |   24 +++++++++++++
>  deviceinfo/main.c       |   48 +++++++++++++++++++++++++
>  deviceinfo/manager.c    |   85 +++++++++++++++++++++++++++++++++++++++++++++
>  deviceinfo/manager.h    |   24 +++++++++++++
>  7 files changed, 282 insertions(+), 0 deletions(-)
>  create mode 100644 deviceinfo/deviceinfo.c
>  create mode 100644 deviceinfo/deviceinfo.h
>  create mode 100644 deviceinfo/main.c
>  create mode 100644 deviceinfo/manager.c
>  create mode 100644 deviceinfo/manager.h
>
> diff --git a/Makefile.am b/Makefile.am
> index bd587eb..c2c61d6 100644
> --- a/Makefile.am
> +++ b/Makefile.am
> @@ -244,6 +244,13 @@ builtin_sources += thermometer/main.c \
>                        thermometer/thermometer.h thermometer/thermometer.c
>  endif
>
> +if DEVICEINFOPLUGIN
> +builtin_modules += deviceinfo
> +builtin_sources += deviceinfo/main.c \
> +                       deviceinfo/manager.h deviceinfo/manager.c \
> +                       deviceinfo/deviceinfo.h deviceinfo/deviceinfo.c
> +endif
> +
>  builtin_modules += hciops mgmtops
>  builtin_sources += plugins/hciops.c plugins/mgmtops.c
>
> diff --git a/acinclude.m4 b/acinclude.m4
> index b0f790c..14b7a4c 100644
> --- a/acinclude.m4
> +++ b/acinclude.m4
> @@ -220,6 +220,7 @@ AC_DEFUN([AC_ARG_BLUEZ], [
>        dbusoob_enable=no
>        wiimote_enable=no
>        thermometer_enable=no
> +       deviceinfo_enable=no

You will need Marcel's blessing to add a new configure option.

>
>        AC_ARG_ENABLE(optimization, AC_HELP_STRING([--disable-optimization], [disable code optimization]), [
>                optimization_enable=${enableval}
> @@ -372,6 +373,10 @@ AC_DEFUN([AC_ARG_BLUEZ], [
>                thermometer_enable=${enableval}
>        ])
>
> +       AC_ARG_ENABLE(deviceinfo, AC_HELP_STRING([--enable-deviceinfo], [enable deviceinfo plugin]), [
> +               deviceinfo_enable=${enableval}
> +       ])
> +
>        if (test "${fortify_enable}" = "yes"); then
>                CFLAGS="$CFLAGS -D_FORTIFY_SOURCE=2"
>        fi
> @@ -429,4 +434,5 @@ AC_DEFUN([AC_ARG_BLUEZ], [
>        AM_CONDITIONAL(DBUSOOBPLUGIN, test "${dbusoob_enable}" = "yes")
>        AM_CONDITIONAL(WIIMOTEPLUGIN, test "${wiimote_enable}" = "yes")
>        AM_CONDITIONAL(THERMOMETERPLUGIN, test "${thermometer_enable}" = "yes")
> +       AM_CONDITIONAL(DEVICEINFOPLUGIN, test "${deviceinfo_enable}" = "yes")
>  ])
> diff --git a/deviceinfo/deviceinfo.c b/deviceinfo/deviceinfo.c
> new file mode 100644
> index 0000000..6d1834b
> --- /dev/null
> +++ b/deviceinfo/deviceinfo.c
> @@ -0,0 +1,88 @@
> +/*
> + *
> + *  BlueZ - Bluetooth protocol stack for Linux
> + *
> + *  Copyright (C) 2012 Texas Instruments, Inc.
> + *
> + *  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 <glib.h>
> +#include <bluetooth/uuid.h>
> +#include "adapter.h"
> +#include "device.h"
> +#include "gattrib.h"
> +#include "attio.h"
> +#include "att.h"
> +#include "gatt.h"
> +#include "deviceinfo.h"
> +
> +struct deviceinfo {
> +       struct btd_device       *dev;           /* Device reference */
> +};
> +
> +static GSList *deviceinfoservers = NULL;
> +
> +static void destroy_deviceinfo(gpointer user_data)

deviceinfo_free sounds better.

> +{
> +       struct deviceinfo *d = user_data;
> +
> +       btd_device_unref(d->dev);
> +       g_free(d);
> +}
> +
> +static gint cmp_device(gconstpointer a, gconstpointer b)
> +{
> +       const struct deviceinfo *d = a;
> +       const struct btd_device *dev = b;
> +
> +       if (dev == d->dev)
> +               return 0;
> +
> +       return -1;
> +}
> +
> +int deviceinfo_register(struct btd_device *device, struct att_primary *dattr)
> +{
> +       struct deviceinfo *d;
> +
> +       d = g_new0(struct deviceinfo, 1);
> +       d->dev = btd_device_ref(device);
> +
> +       deviceinfoservers = g_slist_prepend(deviceinfoservers, d);
> +
> +       return 0;
> +}
> +
> +void deviceinfo_unregister(struct btd_device *device)
> +{
> +       struct deviceinfo *d;
> +       GSList *l;
> +
> +       l = g_slist_find_custom(deviceinfoservers, device, cmp_device);
> +       if (l == NULL)
> +               return;
> +
> +       d = l->data;
> +       deviceinfoservers = g_slist_remove(deviceinfoservers, d);
> +
> +       destroy_deviceinfo(d);
> +}
> diff --git a/deviceinfo/deviceinfo.h b/deviceinfo/deviceinfo.h
> new file mode 100644
> index 0000000..1859821
> --- /dev/null
> +++ b/deviceinfo/deviceinfo.h
> @@ -0,0 +1,24 @@
> +/*
> + *
> + *  BlueZ - Bluetooth protocol stack for Linux
> + *
> + *  Copyright (C) 2012 Texas Instruments, Inc.
> + *
> + *  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
> + *
> + */
> +
> +int deviceinfo_register(struct btd_device *device,struct att_primary *tattr);
> +void deviceinfo_unregister(struct btd_device *device);
> diff --git a/deviceinfo/main.c b/deviceinfo/main.c
> new file mode 100644
> index 0000000..ec5f103
> --- /dev/null
> +++ b/deviceinfo/main.c
> @@ -0,0 +1,48 @@
> +/*
> + *
> + *  BlueZ - Bluetooth protocol stack for Linux
> + *
> + *  Copyright (C) 2012 Texas Instruments, Inc.
> + *
> + *  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 <glib.h>
> +#include <errno.h>
> +
> +#include "plugin.h"
> +#include "manager.h"
> +
> +static int deviceinfo_init(void)
> +{
> +       if (deviceinfo_manager_init() < 0) {
> +               return -EIO;
> +       }
> +
> +       return 0;
> +}
> +
> +static void deviceinfo_exit(void)
> +{
> +       deviceinfo_manager_exit();
> +}
> +
> +BLUETOOTH_PLUGIN_DEFINE(deviceinfo, VERSION, BLUETOOTH_PLUGIN_PRIORITY_DEFAULT,
> +                                       deviceinfo_init, deviceinfo_exit)
> diff --git a/deviceinfo/manager.c b/deviceinfo/manager.c
> new file mode 100644
> index 0000000..7bfca49
> --- /dev/null
> +++ b/deviceinfo/manager.c
> @@ -0,0 +1,85 @@
> +/*
> + *
> + *  BlueZ - Bluetooth protocol stack for Linux
> + *
> + *  Copyright (C) 2012 Texas Instruments, Inc.
> + *
> + *  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
> + *
> + */
> +
> +#include <glib.h>
> +#include <errno.h>
> +#include <bluetooth/uuid.h>
> +
> +#include "adapter.h"
> +#include "device.h"
> +#include "att.h"
> +#include "deviceinfo.h"
> +#include "manager.h"
> +
> +#define DEVICE_INFORMATION_UUID                "0000180a-0000-1000-8000-00805f9b34fb"
> +
> +static gint primary_uuid_cmp(gconstpointer a, gconstpointer b)
> +{
> +       const struct att_primary *prim = a;
> +       const char *uuid = b;
> +
> +       return g_strcmp0(prim->uuid, uuid);
> +}
> +
> +static int deviceinfo_driver_probe(struct btd_device *device, GSList *uuids)
> +{
> +       struct att_primary *tattr;

Use "prim" instead of tattr to follow the standard.

> +       GSList *primaries, *l;
> +
> +       primaries = btd_device_get_primaries(device);
> +
> +       l = g_slist_find_custom(primaries, DEVICE_INFORMATION_UUID,
> +                                                       primary_uuid_cmp);
> +       if (l == NULL)
> +               return -EINVAL;
> +
> +       tattr = l->data;
> +
> +       return deviceinfo_register(device, tattr);
> +}
> +
> +static void deviceinfo_driver_remove(struct btd_device *device)
> +{
> +       deviceinfo_unregister(device);
> +}
> +
> +static struct btd_device_driver deviceinfo_device_driver = {
> +       .name   = "deviceinformation-device-driver",

deviceinfo_driver is enough and it will follow the same pattern of the
other "device drivers"

> +       .uuids  = BTD_UUIDS(DEVICE_INFORMATION_UUID),
> +       .probe  = deviceinfo_driver_probe,
> +       .remove = deviceinfo_driver_remove
> +};
> +
> +int deviceinfo_manager_init(void)
> +{
> +       int ret;

Missing empty line here or use "return btd_register_device_driver..." directly

> +       ret = btd_register_device_driver(&deviceinfo_device_driver);
> +       if (ret < 0)
> +                return ret;
> +
> +       return 0;
> +}

The same comments are applied to Battery State files.

BR,
Claudio

^ permalink raw reply	[flat|nested] 5+ messages in thread

* RE: [PATCH v3 1/2] Added DeviceInformation GATT Client
  2012-03-12 21:20   ` Claudio Takahasi
@ 2012-03-13  6:18     ` Ganir, Chen
  0 siblings, 0 replies; 5+ messages in thread
From: Ganir, Chen @ 2012-03-13  6:18 UTC (permalink / raw)
  To: Claudio Takahasi; +Cc: linux-bluetooth

Q2xhdWRpbw0KDQo+IC0tLS0tT3JpZ2luYWwgTWVzc2FnZS0tLS0tDQo+IEZyb206IENsYXVkaW8g
VGFrYWhhc2kgW21haWx0bzpjbGF1ZGlvLnRha2FoYXNpQG9wZW5ib3NzYS5vcmddDQo+IFNlbnQ6
IE1vbmRheSwgTWFyY2ggMTIsIDIwMTIgMTE6MjEgUE0NCj4gVG86IEdhbmlyLCBDaGVuDQo+IENj
OiBsaW51eC1ibHVldG9vdGhAdmdlci5rZXJuZWwub3JnDQo+IFN1Ympl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ZWdpc3Rlcl9kZXZpY2VfZHJpdmVyKCZkZXZpY2VpbmZvX2RldmljZV9kcml2ZXIpOw0KPiA+ICsg
wqAgwqAgwqAgaWYgKHJldCA8IDApDQo+ID4gKyDCoCDCoCDCoCDCoCDCoCDCoCDCoCDCoHJldHVy
biByZXQ7DQo+ID4gKw0KPiA+ICsgwqAgwqAgwqAgcmV0dXJuIDA7DQo+ID4gK30NCj4gDQo+IFRo
ZSBzYW1lIGNvbW1lbnRzIGFyZSBhcHBsaWVkIHRvIEJhdHRlcnkgU3RhdGUgZmlsZXMuDQo+IA0K
PiBCUiwNCj4gQ2xhdWRpbw0KDQpBIGZpeGVkIHBhdGNoIHNldCB3aWxsIGZvbGxvdyBpbiBhIGZl
dyBtb21lbnRzLg0K

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2012-03-13  6:18 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-03-12 13:12 [PATCH v3 0/2] DeviceInfo and BatteryService Clients chen.ganir
2012-03-12 13:12 ` [PATCH v3 1/2] Added DeviceInformation GATT Client chen.ganir
2012-03-12 21:20   ` Claudio Takahasi
2012-03-13  6:18     ` Ganir, Chen
2012-03-12 13:12 ` [PATCH v3 2/2] Added Battery Service " chen.ganir

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.