[Kde-hardware-devel] Bluetooth support in Solid
Daniel Gollub
dgollub at suse.de
Thu Mar 22 19:51:42 CET 2007
On Tuesday 20 March 2007, Kevin Ottens wrote:
> Welcome on board!
Thanks!
>
> > I also plan to have a third object called BluetoothRemoteDevice which is
> > responsible for the remote device which got discovered by the
> > BluetoothInterfaces.
>
> How is it related to the BluetoothDevice available in your patch?
> More generally, I'd like to know which kind of information it would
> provide?
>
> Sorry, I'm lacking a bit of imagination here. :-)
I finally renamed the BluetoothDevice class to BluetoothRemoteDevice ..
hopefully this name is less confusing.
It provides information about the remote device.. e.g.:
MAC address
Connection status
Bluetooth version
Bluetooth chip revision
Manufacturer name of bluetooth chip
Company string based on MAC address
Major class of remote device (Example: "computer")
Minor class of remote device (Example: "laptop")
List of service classes ("networking", "object transfer", ...)
Name of remote device
(Local) Alias of remote device
Last "seen" date/time stamp
Last "used" date/time stamp
Status of pairing ("bonding")
...
>
> Note that my ultimate goal is still to have the bluetooth devices appear in
> the tree provided by Solid::DeviceManager. I'm fine with having a separate
> set of classes for the pairing and the advanced bluetooth operations, but
> once a device is paired it should be discoverable as any other device (this
> way our applications would be able to find those devices "for free" without
> doing some bluetooth voodoo in their code).
Is it some how possible to "merge" this device information from my
BluetoothRemoteDevice object to the DeviceManager ... without implementing
direct bluetooth support in HAL ;)
> > Please let me know what you think about this implementation...
>
> You got my general questions above. Now I'll be more specific on the first
> patch itself (I didn't look closely at the bluez backend patch, I trust you
> on this one).
>
> - I spotted a few kdelibs style violation (I know Solid doesn't follow it
> 100% yet, but let's not introduce more inconsistencies) and indentation
> issues (lines 339, 643, 963, 1013, 1019).
Fixed those few style violations...
> Notably, the spaces after opening parenthesis and before closing
> parenthesis should be avoided.
> http://techbase.kde.org/Policies/Kdelibs_Coding_Style
I try to clean up the code next time and try to follow the kdelibs coding
style... at least i included the kdesdk vim config ;)
>
> - There a couple of empty "public Q_SLOTS:" sections lines 621 and 991
>
> - I'm not exactly sure why Solid::Ifaces::BluetoothDevice doesn't inherit
> QObject, are you planning to have an inheritance tree starting from here?
fixed.
>
> - Solid::BluetoothInterface lacks a Q_DECLARE_PRIVATE
fixed.
>
> - There's no Solid::BluetoothDevice counterpart to
> Solid::Ifaces::BluetoothDevice?
Renamed to BluetoothRemoteDevice ... but counterpart still missing.
Will change this tomorrow..
>
> - It would be ++cool to have also a fake bluetooth backend implementation
> and a set of automated tests using it in order to test the frontend
> classes.
Is on my todo list as well ;)
>
>
> Anyway, we should probably find a place in the subversion repository for
> this code. Seeing the kdelibs subsystem freeze is close, those bluetooth
> related classes will probably make it for 4.1 so we have some time to make
> it mature. Of course the earlier we can start playing with it, the better.
> ;-)
If i finish the Bluetooth Manager in time (until next weekend, before kdelibs
freeze), would it be possible to have this in KDE4.0 as well? At least then
you should be able to review the API of the bluetooth manager in Oslo as
well.
>
> I should really invest in some bluetooth gadgets, I want to play with this
> stuff too!
>
> Thanks a lot for this couple of first patch, hoping to see more in the
> future. ;-)
This and next week i have to go to vocational school.. but i hope to do a lot
of hacking this weekend. And hopefully find some time next week during school
as well...
(vocational school is an evil place without internet connection...)
http://cryptomilch.de/~dgollub/KDE4/kdelibs_solid_bluetoothmanagment_20070322.diff
best regards,
Daniel
More information about the Kde-hardware-devel
mailing list