summaryrefslogtreecommitdiff
authormickeyl <mickeyl>2005-05-03 14:06:40 (UTC)
committer mickeyl <mickeyl>2005-05-03 14:06:40 (UTC)
commita0da10e78110fe3b291f4d2d3956bf6003ca2d2a (patch) (unidiff)
tree8b902cdc88d4c196971c7a925aa3e7dfc2215c54
parent8dc5378786b26d847e4771129760ccb76f04c40f (diff)
downloadopie-a0da10e78110fe3b291f4d2d3956bf6003ca2d2a.zip
opie-a0da10e78110fe3b291f4d2d3956bf6003ca2d2a.tar.gz
opie-a0da10e78110fe3b291f4d2d3956bf6003ca2d2a.tar.bz2
GET_LINK_QUALITY_RP_SIZE has been renamed to READ_LINK_QUALITY_RP_SIZE in newer versions of bluez
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--noncore/settings/networksettings2/opietooth2/OTDriver.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/noncore/settings/networksettings2/opietooth2/OTDriver.cpp b/noncore/settings/networksettings2/opietooth2/OTDriver.cpp
index cfd0491..dbc9b97 100644
--- a/noncore/settings/networksettings2/opietooth2/OTDriver.cpp
+++ b/noncore/settings/networksettings2/opietooth2/OTDriver.cpp
@@ -1,112 +1,114 @@
1/*************************************************************************** 1/***************************************************************************
2 * Copyright (C) 2003 by Mattia Merzi * 2 * Copyright (C) 2003 by Mattia Merzi *
3 * ottobit@ferrara.linux.it * 3 * ottobit@ferrara.linux.it *
4 * * 4 * *
5 * This program is free software; you can redistribute it and/or modify * 5 * This program is free software; you can redistribute it and/or modify *
6 * it under the terms of the GNU General Public License as published by * 6 * it under the terms of the GNU General Public License as published by *
7 * the Free Software Foundation; either version 2 of the License, or * 7 * the Free Software Foundation; either version 2 of the License, or *
8 * (at your option) any later version. * 8 * (at your option) any later version. *
9 ***************************************************************************/ 9 ***************************************************************************/
10 10
11#include <opie2/odebug.h> 11#include <opie2/odebug.h>
12#include <qtimer.h> 12#include <qtimer.h>
13 13
14#include <sys/poll.h> 14#include <sys/poll.h>
15#include <bluezlib.h> 15#include <bluezlib.h>
16 16#ifndef GET_LINK_QUALITY_RP_SIZE
17#define GET_LINK_QUALITY_RP_SIZE READ_LINK_QUALITY_RP_SIZE
18#endif
17#include <OTGateway.h> 19#include <OTGateway.h>
18#include <OTDriver.h> 20#include <OTDriver.h>
19#include <OTHCISocket.h> 21#include <OTHCISocket.h>
20 22
21using namespace Opietooth2; 23using namespace Opietooth2;
22 24
23static struct { 25static struct {
24 const char *str; 26 const char *str;
25 unsigned short rev; 27 unsigned short rev;
26} csr_map[] = { 28} csr_map[] = {
27 { "HCI 11.2 (bc01b)", 114 }, 29 { "HCI 11.2 (bc01b)", 114 },
28 { "HCI 11.3 (bc01b)", 115 }, 30 { "HCI 11.3 (bc01b)", 115 },
29 { "HCI 12.1 (bc01b)", 119 }, 31 { "HCI 12.1 (bc01b)", 119 },
30 { "HCI 12.3 (bc01b)", 134 }, 32 { "HCI 12.3 (bc01b)", 134 },
31 { "HCI 12.7 (bc01b)", 188 }, 33 { "HCI 12.7 (bc01b)", 188 },
32 { "HCI 12.8 (bc01b)", 218 }, 34 { "HCI 12.8 (bc01b)", 218 },
33 { "HCI 12.9 (bc01b)", 283 }, 35 { "HCI 12.9 (bc01b)", 283 },
34 { "HCI 13.10 (bc01b)", 309 }, 36 { "HCI 13.10 (bc01b)", 309 },
35 { "HCI 13.11 (bc01b)", 351 }, 37 { "HCI 13.11 (bc01b)", 351 },
36 { "HCI 16.4 (bc01b)", 523 }, 38 { "HCI 16.4 (bc01b)", 523 },
37 { "HCI 14.3 (bc02x)", 272 }, 39 { "HCI 14.3 (bc02x)", 272 },
38 { "HCI 14.6 (bc02x)", 336 }, 40 { "HCI 14.6 (bc02x)", 336 },
39 { "HCI 14.7 (bc02x)", 373 }, 41 { "HCI 14.7 (bc02x)", 373 },
40 { "HCI 14.8 (bc02x)", 487 }, 42 { "HCI 14.8 (bc02x)", 487 },
41 { "HCI 15.3 (bc02x)", 443 }, 43 { "HCI 15.3 (bc02x)", 443 },
42 { "HCI 16.4 (bc02x)", 525 }, 44 { "HCI 16.4 (bc02x)", 525 },
43 { NULL, 0} 45 { NULL, 0}
44}; 46};
45 47
46static char *services[] = { "Positioning", 48static char *services[] = { "Positioning",
47 "Networking", 49 "Networking",
48 "Rendering", 50 "Rendering",
49 "Capturing", 51 "Capturing",
50 "Object Transfer", 52 "Object Transfer",
51 "Audio", 53 "Audio",
52 "Telephony", 54 "Telephony",
53 "Information" }; 55 "Information" };
54 56
55static char *major_devices[] = { "Miscellaneous", 57static char *major_devices[] = { "Miscellaneous",
56 "Computer", 58 "Computer",
57 "Phone", 59 "Phone",
58 "LAN Access", 60 "LAN Access",
59 "Audio/Video", 61 "Audio/Video",
60 "Peripheral", 62 "Peripheral",
61 "Imaging", 63 "Imaging",
62 "Uncategorized" }; 64 "Uncategorized" };
63 65
64 66
65typedef struct { 67typedef struct {
66 short Minor; 68 short Minor;
67 const char * Description; 69 const char * Description;
68} ClassMap_t; 70} ClassMap_t;
69 71
70static ClassMap_t MapMiscClass[] = { 72static ClassMap_t MapMiscClass[] = {
71 { -1, "" } 73 { -1, "" }
72}; 74};
73 75
74static ClassMap_t MapUnclassifiedClass[] = { 76static ClassMap_t MapUnclassifiedClass[] = {
75 { -1, "" } 77 { -1, "" }
76}; 78};
77 79
78static ClassMap_t MapComputerClass[] = { 80static ClassMap_t MapComputerClass[] = {
79 { 0, "Uncategorized" } , 81 { 0, "Uncategorized" } ,
80 { 1, "Desktop workstation" } , 82 { 1, "Desktop workstation" } ,
81 { 2, "Server" } , 83 { 2, "Server" } ,
82 { 3, "Laptop" } , 84 { 3, "Laptop" } ,
83 { 4, "Handheld" } , 85 { 4, "Handheld" } ,
84 { 5, "Palm" } , 86 { 5, "Palm" } ,
85 { 6, "Wearable" }, 87 { 6, "Wearable" },
86 { -1, 0 } 88 { -1, 0 }
87}; 89};
88 90
89static ClassMap_t MapPhoneClass[] = { 91static ClassMap_t MapPhoneClass[] = {
90 { 0, "Uncategorized" }, 92 { 0, "Uncategorized" },
91 { 1, "Cellular" }, 93 { 1, "Cellular" },
92 { 2, "Cordless" }, 94 { 2, "Cordless" },
93 { 3, "Smart phone" }, 95 { 3, "Smart phone" },
94 { 4, "Wired modem or voice gateway" }, 96 { 4, "Wired modem or voice gateway" },
95 { 5, "Common ISDN Access" }, 97 { 5, "Common ISDN Access" },
96 { 6, "Sim Card Reader" }, 98 { 6, "Sim Card Reader" },
97 { -1, 0 } 99 { -1, 0 }
98}; 100};
99 101
100static ClassMap_t MapAVClass[] = { 102static ClassMap_t MapAVClass[] = {
101 { 0, "Uncategorized" }, 103 { 0, "Uncategorized" },
102 { 1, "Device conforms to the Headset profile" }, 104 { 1, "Device conforms to the Headset profile" },
103 { 2, "Hands-free" }, 105 { 2, "Hands-free" },
104 { 3, 0 }, 106 { 3, 0 },
105 { 4, "Microphone" }, 107 { 4, "Microphone" },
106 { 5, "Loudspeaker" }, 108 { 5, "Loudspeaker" },
107 { 6, "Headphones" }, 109 { 6, "Headphones" },
108 { 7, "Portable Audio" }, 110 { 7, "Portable Audio" },
109 { 8, "Car Audio" }, 111 { 8, "Car Audio" },
110 { 9, "Set-top box" }, 112 { 9, "Set-top box" },
111 { 10, "HiFi Audio Device" }, 113 { 10, "HiFi Audio Device" },
112 { 11, "VCR" }, 114 { 11, "VCR" },