D5066: Provide device type for Low Energy devices
Elvis Angelaccio
noreply at phabricator.kde.org
Wed Mar 15 22:39:50 UTC 2017
elvisangelaccio created this revision.
Restricted Application added a project: Frameworks.
Restricted Application added a subscriber: Frameworks.
REVISION SUMMARY
Bluetooth Low Energy devices have an invalid class value, so we cannot
use it to deduce the type of the device. Instead we can use the
appearance value. This is what bluez does to set a proper icon for the
device. The appearanceToType() function is adapted from the
gap_appearance_to_icon() function (bluez.git/src/dbus-common.c).
More info about appearance values in:
https://git.kernel.org/pub/scm/bluetooth/bluez.git/commit/?id=7c2a566b8a95fe3a701941c7d46ddccb14a78dae
TEST PLAN
Bluedevil applet now shows 'Mouse' rather than 'Unknow' as type for my
Bluetooth Low Energy mouse.
REPOSITORY
R269 BluezQt
BRANCH
master
REVISION DETAIL
https://phabricator.kde.org/D5066
AFFECTED FILES
src/device.cpp
src/device.h
src/utils.cpp
src/utils.h
To: elvisangelaccio, drosca
Cc: #frameworks
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20170315/942e5584/attachment.html>
More information about the Kde-frameworks-devel
mailing list