[Kde-hardware-devel] First capabilities support

Kevin Ottens ervin at kde.org
Wed Feb 22 15:57:24 CET 2006


Le Mercredi 22 Février 2006 15:15, Will Stephenson a écrit :
> Looking at the API now, with my 'how will it work with network devices'
> tshirt on..

Nice that will definitely be needed. Currently I'm still working on the first 
capabilities related to storage, but my next target is definitely to work on 
network capabilities and the links between hardware discovery and network 
management layers.

At first sight it seems that a couple of methods allowing to make the joint 
could be enough (from a network interface get the corresponding device from 
the hardware layer if applicable, and the symetrical operation from a 
device). But since I'm still missing quite some usecases I'm surely wrong...

Ok, going back to your idea.

> My first thought is, i see that each capability subclass defines a set of
> characteristics, like Processor::canThrottle().  This might make it hard to
> add more characteristics in future - how about defining capabilities by
> multiple inheritance from a set of fine grained characteristics such as
>
> public class Throttleable
> {
> 	virtual bool canThrottle() const = 0;
> };
>
> This is very java like, I know!

I find this fine grained characteristics idea tempting, but it unfortunately 
means that we'll break binary compatibility to add new characteristics. :-/

> It would make it easy to define characteristics once that could apply to
> several Capabilities,  for example both NetworkDevices and Storages might
> be Hotpluggable.

Yes, you're completely right. But for the sake of compatibility we'll have to 
define such methods in several interfaces IMHO.

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/20060222/53baba4c/attachment.pgp 


More information about the Kde-hardware-devel mailing list