GUsb 0.1.0 released!

David Zeuthen zeuthen at gmail.com
Thu Sep 15 07:56:35 PDT 2011


Hey,

On Thu, Sep 15, 2011 at 7:49 AM, Richard Hughes <hughsient at gmail.com> wrote:
> GUsb is a GObject wrapper for libusb1 that makes it easy to do
> asynchronous control, bulk and interrupt transfers with proper
> cancellation and integration into a mainloop.
>
> Tarballs available here: http://people.freedesktop.org/~hughsient/releases/

Congratulations on the release!

I haven't checked 0.1.0 but when I looked at it some time ago you were
still using libgudev types in the API, specifically the GUdevDevice
type. If that's still the case, I think it would be ideal that can be
avoided - instead I suggest that you use a OS-specific string to
represent specific devices (on Linux it could be the sysfs path) -
that way it's a lot more portable not only to non-Linux but also to
newer versions of Linux where udev looks slightly different etc.

Btw, I would also avoid things like requiring the user to call
coldplug() methods - instead just do that in either the constructed()
vfunc or ... if coldplug is something that blocks or can fail (e.g.
return a GError), just implement the GInitable/GAsyncInitable
interfaces. See e.g. libgio where this is done for e.g.
GDBusConnection or GDBusObjectManagerClient or many of the other types
using GInitable.

    David


More information about the devkit-devel mailing list