[Spice-devel] [PATCH spice-gtk v2 4/6] Rename spice_usb_acl_helper_open_acl() to _open_acl_async()

Jonathon Jongsma jjongsma at redhat.com
Thu Mar 10 17:17:15 UTC 2016


Follow established practice and make the function's behavior more
explicit.
---
 src/channel-usbredir.c | 12 ++++++------
 src/usb-acl-helper.c   | 14 +++++++-------
 src/usb-acl-helper.h   | 10 +++++-----
 3 files changed, 18 insertions(+), 18 deletions(-)

diff --git a/src/channel-usbredir.c b/src/channel-usbredir.c
index dd9557b..b37f464 100644
--- a/src/channel-usbredir.c
+++ b/src/channel-usbredir.c
@@ -363,12 +363,12 @@ void spice_usbredir_channel_connect_device_async(
     priv->acl_helper = spice_usb_acl_helper_new();
     g_object_set(spice_channel_get_session(SPICE_CHANNEL(channel)),
                  "inhibit-keyboard-grab", TRUE, NULL);
-    spice_usb_acl_helper_open_acl(priv->acl_helper,
-                                  libusb_get_bus_number(device),
-                                  libusb_get_device_address(device),
-                                  cancellable,
-                                  spice_usbredir_channel_open_acl_cb,
-                                  channel);
+    spice_usb_acl_helper_open_acl_async(priv->acl_helper,
+                                        libusb_get_bus_number(device),
+                                        libusb_get_device_address(device),
+                                        cancellable,
+                                        spice_usbredir_channel_open_acl_cb,
+                                        channel);
     return;
 #else
     if (!spice_usbredir_channel_open_device(channel, &err)) {
diff --git a/src/usb-acl-helper.c b/src/usb-acl-helper.c
index 1cc2c4f..20400eb 100644
--- a/src/usb-acl-helper.c
+++ b/src/usb-acl-helper.c
@@ -184,11 +184,11 @@ SpiceUsbAclHelper *spice_usb_acl_helper_new(void)
 }
 
 G_GNUC_INTERNAL
-void spice_usb_acl_helper_open_acl(SpiceUsbAclHelper *self,
-                                   gint busnum, gint devnum,
-                                   GCancellable *cancellable,
-                                   GAsyncReadyCallback callback,
-                                   gpointer user_data)
+void spice_usb_acl_helper_open_acl_async(SpiceUsbAclHelper *self,
+                                         gint busnum, gint devnum,
+                                         GCancellable *cancellable,
+                                         GAsyncReadyCallback callback,
+                                         gpointer user_data)
 {
     g_return_if_fail(SPICE_IS_USB_ACL_HELPER(self));
 
@@ -203,7 +203,7 @@ void spice_usb_acl_helper_open_acl(SpiceUsbAclHelper *self,
     gchar buf[128];
 
     result = g_simple_async_result_new(G_OBJECT(self), callback, user_data,
-                                       spice_usb_acl_helper_open_acl);
+                                       spice_usb_acl_helper_open_acl_async);
 
     if (priv->out_ch) {
         g_simple_async_result_set_error(result,
@@ -273,7 +273,7 @@ gboolean spice_usb_acl_helper_open_acl_finish(
     GSimpleAsyncResult *result = G_SIMPLE_ASYNC_RESULT(res);
 
     g_return_val_if_fail(g_simple_async_result_is_valid(res, G_OBJECT(self),
-                                               spice_usb_acl_helper_open_acl),
+                                               spice_usb_acl_helper_open_acl_async),
                          FALSE);
 
     if (g_simple_async_result_propagate_error(result, err))
diff --git a/src/usb-acl-helper.h b/src/usb-acl-helper.h
index aa5d3d4..e2e27db 100644
--- a/src/usb-acl-helper.h
+++ b/src/usb-acl-helper.h
@@ -57,11 +57,11 @@ GType spice_usb_acl_helper_get_type(void);
 
 SpiceUsbAclHelper *spice_usb_acl_helper_new(void);
 
-void spice_usb_acl_helper_open_acl(SpiceUsbAclHelper *self,
-                                   gint busnum, gint devnum,
-                                   GCancellable *cancellable,
-                                   GAsyncReadyCallback callback,
-                                   gpointer user_data);
+void spice_usb_acl_helper_open_acl_async(SpiceUsbAclHelper *self,
+                                         gint busnum, gint devnum,
+                                         GCancellable *cancellable,
+                                         GAsyncReadyCallback callback,
+                                         gpointer user_data);
 gboolean spice_usb_acl_helper_open_acl_finish(
     SpiceUsbAclHelper *self, GAsyncResult *res, GError **err);
 
-- 
2.4.3



More information about the Spice-devel mailing list