public inbox for linux-bluetooth@vger.kernel.org
 help / color / mirror / Atom feed
* [Bluez-devel] [PATCH 1/4] add bluetooth id database
@ 2008-01-29  5:12 Aristeu Sergio Rozanski Filho
  2008-01-29 16:26 ` Marcel Holtmann
  0 siblings, 1 reply; 3+ messages in thread
From: Aristeu Sergio Rozanski Filho @ 2008-01-29  5:12 UTC (permalink / raw)
  To: BlueZ development

This patch adds a simple bluetooth id database

---
 input/Makefile.am     |    3 ++-
 input/bluetooth_ids.h |    8 ++++++++
 input/device.c        |    4 +++-
 3 files changed, 13 insertions(+), 2 deletions(-)

--- /dev/null	1970-01-01 00:00:00.000000000 +0000
+++ b/input/bluetooth_ids.h	2007-11-28 11:56:37.000000000 -0500
@@ -0,0 +1,8 @@
+#ifndef BLUETOOTH_IDS_H
+#define BLUETOOTH_IDS_H
+
+#define BLUETOOTH_VENDOR_ID_SONY 0x054c
+#define BLUETOOTH_DEVICE_ID_PS3CONTROLLER 0x0268
+
+#endif	/* BLUETOOTH_IDS_H */
+
--- a/input/device.c	2007-11-28 11:56:36.000000000 -0500
+++ b/input/device.c	2007-11-28 11:56:37.000000000 -0500
@@ -52,6 +52,7 @@
 #include "error.h"
 #include "manager.h"
 #include "storage.h"
+#include "bluetooth_ids.h"
 
 #define INPUT_DEVICE_INTERFACE	"org.bluez.input.Device"
 
@@ -615,7 +616,8 @@ static int hidp_connadd(bdaddr_t *src, b
 
 	info("New input device %s (%s)", addr, req.name);
 
-	if (req.vendor == 0x054c && req.product == 0x0268) {
+	if (req.vendor == BLUETOOTH_VENDOR_ID_SONY &&
+	    req.product == BLUETOOTH_DEVICE_ID_PS3CONTROLLER) {
 		unsigned char buf[] = { 0x53, 0xf4,  0x42, 0x03, 0x00, 0x00 };
 		err = write(ctrl_sk, buf, sizeof(buf));
 	}
--- a/input/Makefile.am	2007-11-28 11:56:36.000000000 -0500
+++ b/input/Makefile.am	2007-11-28 11:56:37.000000000 -0500
@@ -12,7 +12,8 @@ service_PROGRAMS = bluetoothd-service-in
 
 bluetoothd_service_input_SOURCES = main.c \
 	manager.h manager.c \
-	server.h server.c device.h device.c storage.h storage.c
+	server.h server.c device.h device.c storage.h storage.c \
+	bluetooth_ids.h
 
 LDADD = $(top_builddir)/common/libhelper.a \
 		@GLIB_LIBS@ @DBUS_LIBS@ @BLUEZ_LIBS@

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Bluez-devel mailing list
Bluez-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-devel

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

* Re: [Bluez-devel] [PATCH 1/4] add bluetooth id database
  2008-01-29  5:12 [Bluez-devel] [PATCH 1/4] add bluetooth id database Aristeu Sergio Rozanski Filho
@ 2008-01-29 16:26 ` Marcel Holtmann
  2008-01-29 16:56   ` Aristeu Rozanski
  0 siblings, 1 reply; 3+ messages in thread
From: Marcel Holtmann @ 2008-01-29 16:26 UTC (permalink / raw)
  To: BlueZ development

Hi Aristeu,

> This patch adds a simple bluetooth id database

don't like the idea at all and I don't see the need for it. It is better
at the moment to use the constants directly and add proper comments
around its usage.

Regards

Marcel



-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Bluez-devel mailing list
Bluez-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-devel

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

* Re: [Bluez-devel] [PATCH 1/4] add bluetooth id database
  2008-01-29 16:26 ` Marcel Holtmann
@ 2008-01-29 16:56   ` Aristeu Rozanski
  0 siblings, 0 replies; 3+ messages in thread
From: Aristeu Rozanski @ 2008-01-29 16:56 UTC (permalink / raw)
  To: BlueZ development

Hi Marcel,
> > This patch adds a simple bluetooth id database
> 
> don't like the idea at all and I don't see the need for it. It is better
> at the moment to use the constants directly and add proper comments
> around its usage.
ok, I'll drop it

-- 
Aristeu


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Bluez-devel mailing list
Bluez-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-devel

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

end of thread, other threads:[~2008-01-29 16:56 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-01-29  5:12 [Bluez-devel] [PATCH 1/4] add bluetooth id database Aristeu Sergio Rozanski Filho
2008-01-29 16:26 ` Marcel Holtmann
2008-01-29 16:56   ` Aristeu Rozanski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox