Update on DeviceKit

David Zeuthen david at fubar.dk
Wed May 7 08:33:13 PDT 2008


On Wed, 2008-05-07 at 11:02 +0200, Marcel Holtmann wrote:
> Hi David,
> 
> > ---------
> > DeviceKit
> > ---------
> > 
> > This is a simple system service that a) can enumerate devices; b) emits
> > signals when devices are added removed; c) provides a way to merge
> > device information / quirks onto devices. And that's it. A device is
> > identified by a) the native OS-specific path (on Linux a sysfs path); b)
> > an optional UNIX device file; and c) key/value pairs describing the
> > device. It's a very simple service, a bit like what HAL is today without
> > all the probers/callouts
> 
> do we really have to use dbus-glib and GObject inside this daemon. I
> would prefer if we can keep the dependencies to GLib and D-Bus low-level
> and then use something like libgdbus as D-Bus helper library (or even
> embed it).

So I did look at libgdbus but decided not to use it as, AFAICT, it
forces me to do marshaling by hand; is that still the case? FWIW, it's
not like I think dbus-glib is the best thing since sliced bread but it
does get the job done. Ideally, I'd like to use a GInterface based
framework using DValue. If something like that appears I'd be happy to
move the code over, shouldn't be a big change.

> I personally think that GObject should only be used in UI applications
> and not within system daemons. Especially when I look into the embedded
> world, it would make sense to keep the dependencies really small and
> give people a chance to use something like Embedded-GLib (eglib) if they
> have limited resources, but still wanna use standard technology like
> D-Bus and HAL/DeviceKit for most tasks and not invent everything over
> and over again.

I, like most other people, prefer to use languages/frameworks that are
object oriented for a lot of reasons. And I'd hate to reinvent the wheel
doing a lame object model myself like with PolicyKit (granted, this was
done for other reasons). And GObject already does this very nicely
though, admittedly, the learning curve is pretty steep (as compared to
e.g. C++). And, frankly, IIRC a lot upcoming embedded devices using
Linux are already using GObject elsewhere in the stack.

     David




More information about the hal mailing list