From: Daniel Gollub <dgollub@suse.de>
To: bluez-devel@lists.sourceforge.net
Subject: [Bluez-devel] [PATCH] Input Service support for phones
Date: Wed, 2 May 2007 15:25:07 +0200 [thread overview]
Message-ID: <200705021525.07661.dgollub@suse.de> (raw)
[-- 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
next reply other threads:[~2007-05-02 13:25 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-05-02 13:25 Daniel Gollub [this message]
2007-05-04 6:39 ` [Bluez-devel] [PATCH] Input Service support for phones Marcel Holtmann
2007-05-04 9:41 ` Daniel Gollub
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200705021525.07661.dgollub@suse.de \
--to=dgollub@suse.de \
--cc=bluez-devel@lists.sourceforge.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox