[Spice-devel] [PATCH spice-gtk 03/14] win-usb: rename async functions
Marc-André Lureau
marcandre.lureau at gmail.com
Wed Apr 23 11:09:08 PDT 2014
---
gtk/usb-device-manager.c | 14 ++++++--------
gtk/win-usb-driver-install.c | 22 +++++++++++-----------
gtk/win-usb-driver-install.h | 22 ++++++++++------------
3 files changed, 27 insertions(+), 31 deletions(-)
diff --git a/gtk/usb-device-manager.c b/gtk/usb-device-manager.c
index 885a023..a79bf70 100644
--- a/gtk/usb-device-manager.c
+++ b/gtk/usb-device-manager.c
@@ -1493,11 +1493,10 @@ void spice_usb_device_manager_connect_device_async(SpiceUsbDeviceManager *self,
cbinfo->cancellable = cancellable;
cbinfo->callback = callback;
cbinfo->user_data = user_data;
- cbinfo->is_install = TRUE;
- spice_win_usb_driver_install(installer, device, cancellable,
- spice_usb_device_manager_drv_install_cb,
- cbinfo);
+ spice_win_usb_driver_install_async(installer, device, cancellable,
+ spice_usb_device_manager_drv_install_cb,
+ cbinfo);
#else
_spice_usb_device_manager_connect_device_async(self,
device,
@@ -1570,11 +1569,10 @@ void spice_usb_device_manager_disconnect_device(SpiceUsbDeviceManager *self,
cbinfo->cancellable = NULL;
cbinfo->callback = NULL;
cbinfo->user_data = NULL;
- cbinfo->is_install = FALSE;
- spice_win_usb_driver_uninstall(installer, device, NULL,
- spice_usb_device_manager_drv_install_cb,
- cbinfo);
+ spice_win_usb_driver_uninstall_async(installer, device, NULL,
+ spice_usb_device_manager_drv_install_cb,
+ cbinfo);
#endif
#endif
diff --git a/gtk/win-usb-driver-install.c b/gtk/win-usb-driver-install.c
index 2e2a48b..bdc2372 100644
--- a/gtk/win-usb-driver-install.c
+++ b/gtk/win-usb-driver-install.c
@@ -346,7 +346,7 @@ spice_win_usb_driver_op_finish(SpiceWinUsbDriver *self,
}
/**
- * spice_win_usb_driver_install:
+ * spice_win_usb_driver_install_async:
* Start libusb driver installation for @device
*
* A new NamedPipe is created for each request.
@@ -355,11 +355,11 @@ spice_win_usb_driver_op_finish(SpiceWinUsbDriver *self,
* FALSE upon failure to send a request.
*/
G_GNUC_INTERNAL
-void spice_win_usb_driver_install(SpiceWinUsbDriver *self,
- SpiceUsbDevice *device,
- GCancellable *cancellable,
- GAsyncReadyCallback callback,
- gpointer user_data)
+void spice_win_usb_driver_install_async(SpiceWinUsbDriver *self,
+ SpiceUsbDevice *device,
+ GCancellable *cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data)
{
SPICE_DEBUG("Win usb driver installation started");
@@ -368,11 +368,11 @@ void spice_win_usb_driver_install(SpiceWinUsbDriver *self,
}
G_GNUC_INTERNAL
-void spice_win_usb_driver_uninstall(SpiceWinUsbDriver *self,
- SpiceUsbDevice *device,
- GCancellable *cancellable,
- GAsyncReadyCallback callback,
- gpointer user_data)
+void spice_win_usb_driver_uninstall_async(SpiceWinUsbDriver *self,
+ SpiceUsbDevice *device,
+ GCancellable *cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data)
{
SPICE_DEBUG("Win usb driver uninstall operation started");
diff --git a/gtk/win-usb-driver-install.h b/gtk/win-usb-driver-install.h
index 034abf9..b3ca4bf 100644
--- a/gtk/win-usb-driver-install.h
+++ b/gtk/win-usb-driver-install.h
@@ -64,21 +64,19 @@ GType spice_win_usb_driver_get_type(void);
SpiceWinUsbDriver *spice_win_usb_driver_new(void);
-void spice_win_usb_driver_install(SpiceWinUsbDriver *self,
- SpiceUsbDevice *device,
- GCancellable *cancellable,
- GAsyncReadyCallback callback,
- gpointer user_data);
-
-void spice_win_usb_driver_uninstall(SpiceWinUsbDriver *self,
- SpiceUsbDevice *device,
- GCancellable *cancellable,
- GAsyncReadyCallback callback,
- gpointer user_data);
-
+void spice_win_usb_driver_install_async(SpiceWinUsbDriver *self,
+ SpiceUsbDevice *device,
+ GCancellable *cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data);
gint spice_win_usb_driver_install_finish(SpiceWinUsbDriver *self,
GAsyncResult *res, GError **err);
+void spice_win_usb_driver_uninstall_async(SpiceWinUsbDriver *self,
+ SpiceUsbDevice *device,
+ GCancellable *cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data);
SpiceUsbDevice *spice_win_usb_driver_get_device(SpiceWinUsbDriver *self);
--
1.8.5.3
More information about the Spice-devel
mailing list