hughsie / libgusb

GUsb is a GObject wrapper for libusb1
GNU Lesser General Public License v2.1
25 stars 21 forks source link

Add a thin glib wrapper around libusb_endpoint_descriptor #23

Closed EmmanuelP closed 4 years ago

EmmanuelP commented 4 years ago

Hi,

Please let me know if you are willing to accept a patch like this that adds a wrapper around the libusb endpoint structure. Not all accessors are implemented yet, and may be it is a bit over enginereed. It could be implemented without adding a new object, just by adding the necessary struct copy and accessors in GUsbInterface.

Cheers,

Emmanuel.

hughsie commented 4 years ago

I think that's a perfectly sane thing to do, thanks! One little niggle then LGTM.

EmmanuelP commented 4 years ago

@hughsie which niggle ?

hughsie commented 4 years ago

Ohh, maybe Git Hub didn't save my review comment. Basically, for (i = 0; i < iface->bNumEndpoints; i++) -> for (guint i = 0; i < iface->bNumEndpoints; i++) pls.

EmmanuelP commented 4 years ago

Fixed. It is not a common pattern in ligusb code base though.

hughsie commented 4 years ago

Can you squash the commits down into one commit please, and force push to update this PR. Then LGTM.

EmmanuelP commented 4 years ago

Done.

EmmanuelP commented 4 years ago

Thanks.