>From e3419bae8524e86902b69c7d9bfdd580ea394786 Mon Sep 17 00:00:00 2001 From: Bastien Nocera Date: Sat, 29 Nov 2008 16:18:46 +0000 Subject: [PATCH] Add other audio devices And special-case them in the wizard. --- common/bluetooth-client.c | 4 ++++ common/bluetooth-client.h | 13 +++++++------ wizard/main.c | 1 + wizard/pin-code-database.txt | 1 + 4 files changed, 13 insertions(+), 6 deletions(-) diff --git a/common/bluetooth-client.c b/common/bluetooth-client.c index 5c55a00..bd42132 100644 --- a/common/bluetooth-client.c +++ b/common/bluetooth-client.c @@ -92,6 +92,8 @@ const gchar *bluetooth_type_to_string(guint type) return N_("Headset"); case BLUETOOTH_TYPE_HEADPHONE: return N_("Headphone"); + case BLUETOOTH_TYPE_OTHER_AUDIO: + return N_("Audio device"); case BLUETOOTH_TYPE_KEYBOARD: return N_("Keyboard"); case BLUETOOTH_TYPE_MOUSE: @@ -134,6 +136,8 @@ static guint class_to_type(guint32 class) return BLUETOOTH_TYPE_HEADSET; case 0x06: return BLUETOOTH_TYPE_HEADPHONE; + default: + return BLUETOOTH_TYPE_OTHER_AUDIO; } break; case 0x05: diff --git a/common/bluetooth-client.h b/common/bluetooth-client.h index 09f91ab..5c35213 100644 --- a/common/bluetooth-client.h +++ b/common/bluetooth-client.h @@ -112,12 +112,13 @@ enum { BLUETOOTH_TYPE_NETWORK = 1 << 4, BLUETOOTH_TYPE_HEADSET = 1 << 5, BLUETOOTH_TYPE_HEADPHONE = 1 << 6, - BLUETOOTH_TYPE_KEYBOARD = 1 << 7, - BLUETOOTH_TYPE_MOUSE = 1 << 8, - BLUETOOTH_TYPE_CAMERA = 1 << 9, - BLUETOOTH_TYPE_PRINTER = 1 << 10, - BLUETOOTH_TYPE_JOYPAD = 1 << 11, - BLUETOOTH_TYPE_TABLET = 1 << 12, + BLUETOOTH_TYPE_OTHER_AUDIO = 1 << 7, + BLUETOOTH_TYPE_KEYBOARD = 1 << 8, + BLUETOOTH_TYPE_MOUSE = 1 << 9, + BLUETOOTH_TYPE_CAMERA = 1 << 10, + BLUETOOTH_TYPE_PRINTER = 1 << 11, + BLUETOOTH_TYPE_JOYPAD = 1 << 12, + BLUETOOTH_TYPE_TABLET = 1 << 13, }; #define _BLUETOOTH_TYPE_NUM_TYPES 12 diff --git a/wizard/main.c b/wizard/main.c index b29552c..2342040 100644 --- a/wizard/main.c +++ b/wizard/main.c @@ -68,6 +68,7 @@ static guint string_to_type(const char *type) TYPE_IS ("keyboard", BLUETOOTH_TYPE_KEYBOARD); TYPE_IS ("headset", BLUETOOTH_TYPE_HEADSET); TYPE_IS ("headphone", BLUETOOTH_TYPE_HEADPHONE); + TYPE_IS ("audio", BLUETOOTH_TYPE_OTHER_AUDIO); g_warning ("unhandled type '%s'", type); return BLUETOOTH_TYPE_ANY; diff --git a/wizard/pin-code-database.txt b/wizard/pin-code-database.txt index 653fc2c..a12dcb4 100644 --- a/wizard/pin-code-database.txt +++ b/wizard/pin-code-database.txt @@ -22,3 +22,4 @@ any 00:0D:B5: GPS-GW-005 0000 # Headphones and headsets headphone 0000 headset 0000 +audio 0000 -- 1.6.0.4