-rw-r--r-- | libopie2/opiebluez/obluetooth.cpp | 13 | ||||
-rw-r--r-- | libopie2/opiebluez/obluetooth.h | 4 |
2 files changed, 0 insertions, 17 deletions
diff --git a/libopie2/opiebluez/obluetooth.cpp b/libopie2/opiebluez/obluetooth.cpp index 80f4bfc..e8e6bb3 100644 --- a/libopie2/opiebluez/obluetooth.cpp +++ b/libopie2/opiebluez/obluetooth.cpp | |||
@@ -328,47 +328,34 @@ QString OBluetoothDevice::deviceClass() const | |||
328 | case 13: minor = "Camcorder"; break; | 328 | case 13: minor = "Camcorder"; break; |
329 | case 14: minor = "Video Monitor"; break; | 329 | case 14: minor = "Video Monitor"; break; |
330 | case 15: minor = "Video Display and Loudspeaker"; break; | 330 | case 15: minor = "Video Display and Loudspeaker"; break; |
331 | case 16: minor = "Video Conferencing"; break; | 331 | case 16: minor = "Video Conferencing"; break; |
332 | case 17: minor = "Reserved(17)"; break; | 332 | case 17: minor = "Reserved(17)"; break; |
333 | case 18: minor = "Gaming/Toy"; break; | 333 | case 18: minor = "Gaming/Toy"; break; |
334 | } | 334 | } |
335 | break; | 335 | break; |
336 | 336 | ||
337 | case 5: major = "Peripheral"; | 337 | case 5: major = "Peripheral"; |
338 | switch ( min ) | 338 | switch ( min ) |
339 | { | 339 | { |
340 | case 16: minor = "Keyboard"; break; | 340 | case 16: minor = "Keyboard"; break; |
341 | case 32: minor = "Pointing Device"; break; | 341 | case 32: minor = "Pointing Device"; break; |
342 | case 48: minor = "Keyboard and Pointing Device"; break; | 342 | case 48: minor = "Keyboard and Pointing Device"; break; |
343 | } | 343 | } |
344 | break; | 344 | break; |
345 | 345 | ||
346 | case 6: major = "Imaging"; | 346 | case 6: major = "Imaging"; |
347 | if (min & 4) minor = "Display"; | 347 | if (min & 4) minor = "Display"; |
348 | else if (min & 8) minor = "Camera"; | 348 | else if (min & 8) minor = "Camera"; |
349 | else if (min & 16) minor = "Scanner"; | 349 | else if (min & 16) minor = "Scanner"; |
350 | else if (min & 32) minor = "Printer"; | 350 | else if (min & 32) minor = "Printer"; |
351 | break; | 351 | break; |
352 | 352 | ||
353 | case 63: major = "Uncategorized"; | 353 | case 63: major = "Uncategorized"; |
354 | break; | 354 | break; |
355 | } | 355 | } |
356 | 356 | ||
357 | return QString( "%1:%2" ).arg( major ).arg( minor ); | 357 | return QString( "%1:%2" ).arg( major ).arg( minor ); |
358 | } | 358 | } |
359 | 359 | ||
360 | QString OBluetoothDevice::getName() | ||
361 | { | ||
362 | /* FIXME: Uahhh, this gets ugly. | ||
363 | The BlueZ kernel interface seems to be very badly (if at all) documented. | ||
364 | All people are assuming that you use libbluetooth to talk to that stack. | ||
365 | However since libbluetooth is GPL, we can't do that :/ | ||
366 | Guess, we are stuck here until someone finds time and/or motivation to look | ||
367 | into that and create some easy-to-understand examples for how to talk | ||
368 | directly to the BlueZ kernel interface. | ||
369 | */ | ||
370 | }; | ||
371 | |||
372 | |||
373 | } | 360 | } |
374 | } | 361 | } |
diff --git a/libopie2/opiebluez/obluetooth.h b/libopie2/opiebluez/obluetooth.h index fa3d2c1..4bcd964 100644 --- a/libopie2/opiebluez/obluetooth.h +++ b/libopie2/opiebluez/obluetooth.h | |||
@@ -154,46 +154,42 @@ class OBluetoothInterface : public QObject | |||
154 | 154 | ||
155 | /*====================================================================================== | 155 | /*====================================================================================== |
156 | * OBluetoothDevice | 156 | * OBluetoothDevice |
157 | *======================================================================================*/ | 157 | *======================================================================================*/ |
158 | 158 | ||
159 | /** | 159 | /** |
160 | * @brief An bluetooth (remote) device abstraction. | 160 | * @brief An bluetooth (remote) device abstraction. |
161 | * | 161 | * |
162 | * This class resembles a (remote) bluetooth device. | 162 | * This class resembles a (remote) bluetooth device. |
163 | * @author Michael 'Mickey' Lauer <mickey@vanille.de> | 163 | * @author Michael 'Mickey' Lauer <mickey@vanille.de> |
164 | */ | 164 | */ |
165 | class OBluetoothDevice : public QObject | 165 | class OBluetoothDevice : public QObject |
166 | { | 166 | { |
167 | Q_OBJECT | 167 | Q_OBJECT |
168 | 168 | ||
169 | public: | 169 | public: |
170 | /** | 170 | /** |
171 | * Constructor. | 171 | * Constructor. |
172 | */ | 172 | */ |
173 | OBluetoothDevice( QObject* parent, const char* name, void* inqinfo ); | 173 | OBluetoothDevice( QObject* parent, const char* name, void* inqinfo ); |
174 | /** | 174 | /** |
175 | * Destructor. | 175 | * Destructor. |
176 | */ | 176 | */ |
177 | virtual ~OBluetoothDevice(); | 177 | virtual ~OBluetoothDevice(); |
178 | /** | 178 | /** |
179 | * @returns the MAC address of the device's interface. | 179 | * @returns the MAC address of the device's interface. |
180 | */ | 180 | */ |
181 | QString macAddress() const; | 181 | QString macAddress() const; |
182 | /** | 182 | /** |
183 | * @returns the class of device. | 183 | * @returns the class of device. |
184 | */ | 184 | */ |
185 | QString deviceClass() const; | 185 | QString deviceClass() const; |
186 | /** | ||
187 | * @returns the device name. | ||
188 | */ | ||
189 | QString getName(); | ||
190 | 186 | ||
191 | private: | 187 | private: |
192 | class Private; | 188 | class Private; |
193 | Private *d; | 189 | Private *d; |
194 | }; | 190 | }; |
195 | 191 | ||
196 | } | 192 | } |
197 | } | 193 | } |
198 | #endif | 194 | #endif |
199 | 195 | ||