On 11/19/2014 05:37 AM, Fabiano Fidêncio wrote:
ping?
On Thu, 2014-11-13 at 02:32 +0100, Fabiano Fidêncio wrote:
+
+/**
+ * spice_usb_device_get_libusb_device:
+ * @device: #SpiceUsbDevice to get the descriptor information of
+ *
+ * Returns: (transfer none): the %libusb_device associated to %SpiceUsbDevice.
+ *
+ * Since: 0.27
+ **/
+gconstpointer
+spice_usb_device_get_libusb_device(const SpiceUsbDevice *device G_GNUC_UNUSED)
+{
+#ifdef USE_USBREDIR
+#ifndef G_OS_WIN32
+ const SpiceUsbDeviceInfo *info = (const SpiceUsbDeviceInfo *)device;
+
+ g_return_val_if_fail(info != NULL, FALSE);
+
+ return info->libdev;
+#endif
+#else
+ return NULL;
+#endif
+}
Hi Fabiano,
I think it's better to also return NULL when USE_USBREDIR is not defined.
(e.g. replace the 2 #ifdef to a single #if defined && ! defined )
Thanks,
Uri.
_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/spice-devel