* [Bluez-devel] [PATCH] Input Service support for phones
@ 2007-05-02 13:25 Daniel Gollub
2007-05-04 6:39 ` Marcel Holtmann
0 siblings, 1 reply; 3+ messages in thread
From: Daniel Gollub @ 2007-05-02 13:25 UTC (permalink / raw)
To: bluez-devel
[-- Attachment #1: Type: text/plain, Size: 259 bytes --]
Hi,
attachted is a simple patch for the input service, which allows (again -
changed since 3.9 release) using a phone as input device. Current code only
allows devices with major class of "Peripheral" and "Fake Input"
(Audio/Video).
best regards,
Daniel
[-- Attachment #2: bluez-utils_input_phone.diff --]
[-- Type: text/x-diff, Size: 1353 bytes --]
diff -u -p -r1.43 device.c
--- input/device.c 18 Apr 2007 19:33:34 -0000 1.43
+++ input/device.c 2 May 2007 13:12:54 -0000
@@ -195,6 +195,28 @@ static const char *create_input_path(uin
static int next_id = 0;
switch (major) {
+ case 0x02: /* Phone */
+ switch (minor) {
+ case 0x01: /* Cellular */
+ strcpy(subpath, "celluar");
+ break;
+ case 0x02: /* Cordless */
+ strcpy(subpath, "cordless");
+ break;
+ case 0x03: /* Smart Phone */
+ strcpy(subpath, "smartphone");
+ break;
+ case 0x04: /* Modem */
+ strcpy(subpath, "modem");
+ break;
+ case 0x05: /* ISDN */
+ strcpy(subpath, "isdn");
+ break;
+ default:
+ strcpy(subpath, "phone");
+ break;
+ }
+ break;
case 0x04: /* Audio */
switch (minor) {
/* FIXME: Testing required */
Index: input/manager.c
===================================================================
RCS file: /cvsroot/bluez/utils/input/manager.c,v
retrieving revision 1.22
diff -u -p -r1.22 manager.c
--- input/manager.c 18 Apr 2007 19:33:34 -0000 1.22
+++ input/manager.c 2 May 2007 13:12:54 -0000
@@ -800,6 +800,7 @@ static DBusHandlerResult create_device(D
switch (cls & 0x1f00) {
case 0x0500: /* Peripheral */
+ case 0x0200: /* Phone */
if (get_handles(pr, pnp_uuid, pnp_handle_reply) < 0) {
pending_req_free(pr);
return err_not_supported(conn, msg);
[-- Attachment #3: Type: text/plain, Size: 286 bytes --]
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
[-- Attachment #4: Type: text/plain, Size: 164 bytes --]
_______________________________________________
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] Input Service support for phones
2007-05-02 13:25 [Bluez-devel] [PATCH] Input Service support for phones Daniel Gollub
@ 2007-05-04 6:39 ` Marcel Holtmann
2007-05-04 9:41 ` Daniel Gollub
0 siblings, 1 reply; 3+ messages in thread
From: Marcel Holtmann @ 2007-05-04 6:39 UTC (permalink / raw)
To: BlueZ development
Hi Daniel,
> attachted is a simple patch for the input service, which allows (again -
> changed since 3.9 release) using a phone as input device. Current code only
> allows devices with major class of "Peripheral" and "Fake Input"
> (Audio/Video).
a subpath == "phone" is fully enough. Don't make it more complicated
than it needs to be.
Regards
Marcel
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
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] Input Service support for phones
2007-05-04 6:39 ` Marcel Holtmann
@ 2007-05-04 9:41 ` Daniel Gollub
0 siblings, 0 replies; 3+ messages in thread
From: Daniel Gollub @ 2007-05-04 9:41 UTC (permalink / raw)
To: bluez-devel
[-- Attachment #1: Type: text/plain, Size: 198 bytes --]
On Friday 04 May 2007, Marcel Holtmann wrote:
> a subpath == "phone" is fully enough. Don't make it more complicated
> than it needs to be.
full ack. Adapted patch attachted.
best regards,
Daniel
[-- Attachment #2: bluez-utils_input_phone_major.diff --]
[-- Type: text/x-diff, Size: 1107 bytes --]
Index: input/device.c
===================================================================
RCS file: /cvsroot/bluez/utils/input/device.c,v
retrieving revision 1.43
diff -u -p -r1.43 device.c
--- input/device.c 18 Apr 2007 19:33:34 -0000 1.43
+++ input/device.c 4 May 2007 09:39:22 -0000
@@ -195,6 +195,9 @@ static const char *create_input_path(uin
static int next_id = 0;
switch (major) {
+ case 0x02: /* Phone */
+ strcpy(subpath, "phone");
+ break;
case 0x04: /* Audio */
switch (minor) {
/* FIXME: Testing required */
Index: input/manager.c
===================================================================
RCS file: /cvsroot/bluez/utils/input/manager.c,v
retrieving revision 1.22
diff -u -p -r1.22 manager.c
--- input/manager.c 18 Apr 2007 19:33:34 -0000 1.22
+++ input/manager.c 4 May 2007 09:39:22 -0000
@@ -800,6 +800,7 @@ static DBusHandlerResult create_device(D
switch (cls & 0x1f00) {
case 0x0500: /* Peripheral */
+ case 0x0200: /* Phone */
if (get_handles(pr, pnp_uuid, pnp_handle_reply) < 0) {
pending_req_free(pr);
return err_not_supported(conn, msg);
[-- Attachment #3: Type: text/plain, Size: 286 bytes --]
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
[-- Attachment #4: Type: text/plain, Size: 164 bytes --]
_______________________________________________
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:[~2007-05-04 9:41 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-05-02 13:25 [Bluez-devel] [PATCH] Input Service support for phones Daniel Gollub
2007-05-04 6:39 ` Marcel Holtmann
2007-05-04 9:41 ` Daniel Gollub
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.