libhal C++ wrapper
david at fubar.dk
Mon Nov 27 09:42:09 PST 2006
(adding dbus-cpp author to the Cc)
sorry for the lag, busy with work and thanksgiving,
On Sun, 2006-11-19 at 05:52 +0100, Milosz Derezynski wrote:
> Hi Everyone
> I'd like to announce that i've begun work on a libhal C++ wrapper,
> first starting with the core libhal, and next will be libhal-storage.
> The API is very similar to e.g. cairomm or glibmm, using RefPtrs,
> So far we have 2 basic first-class objects, HAL::Context and
> HAL::Device, HAL::Device being a "virtual" class in the sense that it
> has no direct representation in the C API (rather the context can be
> used to acquire information about devices); HAL::Device is basically
> just a convenience class to bundle methods and manage state related to
> a device.
> (I'd also like to put attention onto the fact that the API is
> mostly/solely geared towards applications, and hence does not
> implement, for now at least, things that e.g. hald-addon daemons would
> use, since these are likely to be just written in C anyway).
> The PS/PSI system is also wrapped in an STL like fashion and can be
> quite well integrated with standard C++ code.
This sounds interesting however long term I'm hoping to get rid of
libhal all together and make applications move towards using D-Bus
For some languages / runtimes I think the plan is to create the bindings
classes at runtime (e.g. Mono, Java, Python), for others (e.g. glib and
probably plain C++) I think the idea is to generate stub classes.
Did you check out dbus-cpp that Murray Cumming wrote 1-2 years ago?
Perhaps it would be useful if dbus-cpp included a binding tool that took
D-Bus introspection XML and generated stubs. Unless this is the case
More information about the hal