[Kde-hardware-devel] Bluetooth support in Solid

Kevin Ottens ervin at kde.org
Tue Mar 20 22:44:12 CET 2007


Le mardi 20 mars 2007, Daniel Gollub a écrit :
> Hi list,

Hello Daniel,

Welcome on board!

> i started on the integration of Bluetooth support in Solid. So far i have
> written a bluetooth manager object which manage the bluetooth adapters
> (devices). Like listing available bluetooth interfaces, emitting signal if
> a bluetooth adapter got removed/added ....
>
> Most code is "stolen" from the network implementation ;)

Heh, good idea, it's a nice implementation with similar problems to manage.

> There is also a skeleton for a BluetoothInterface object which contains all
> kind of information about the Bluetooth adapter. Like MAC Addresse,
> Connections, Adapter Name, ...

Ok.

> 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. :-)

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).

> The first real backend is the BlueZ backend:
>
> http://cryptomilch.de/~dgollub/KDE4/kdelibs_solid_bluetoothmanagment_200703
>20.diff
> 
http://cryptomilch.de/~dgollub/KDE4/kdebase_solid_backend_bluez_20070320.diff
>
> 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).
Notably, the spaces after opening parenthesis and before closing parenthesis 
should be avoided.
http://techbase.kde.org/Policies/Kdelibs_Coding_Style

- 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?

- Solid::BluetoothInterface lacks a Q_DECLARE_PRIVATE

- There's no Solid::BluetoothDevice counterpart to 
Solid::Ifaces::BluetoothDevice?

- 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.


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. ;-)

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. ;-)

Regards.
-- 
Kévin 'ervin' Ottens, http://ervin.ipsquad.net
"Ni le maître sans disciple, Ni le disciple sans maître,
Ne font reculer l'ignorance."
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://mail.kde.org/pipermail/kde-hardware-devel/attachments/20070320/ab59f1b1/attachment.pgp 


More information about the Kde-hardware-devel mailing list