summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPavel Grunt <pgrunt@redhat.com>2015-09-22 15:26:16 +0200
committerPavel Grunt <pgrunt@redhat.com>2015-09-22 19:09:20 +0200
commit838f159bd99f78355eb1a94cc956e2058b9bb7e4 (patch)
treefb536fd889b5eb4ec4155fc057a29ca610e12e30
parent9453a8fb1db1967ab69a4d93545395fcd3ee568b (diff)
docs: Add spice_usb_device_manager_connect_device_async
-rw-r--r--src/usb-device-manager.c21
-rw-r--r--src/usb-device-manager.h2
2 files changed, 13 insertions, 10 deletions
diff --git a/src/usb-device-manager.c b/src/usb-device-manager.c
index 2f98cc2..c274702 100644
--- a/src/usb-device-manager.c
+++ b/src/usb-device-manager.c
@@ -1386,14 +1386,6 @@ gboolean spice_usb_device_manager_is_device_connected(SpiceUsbDeviceManager *sel
return !!spice_usb_device_manager_get_channel_for_dev(self, device);
}
-/**
- * spice_usb_device_manager_connect_device_async:
- * @manager: the #SpiceUsbDeviceManager manager
- * @device: a #SpiceUsbDevice to redirect
- * @cancellable: a #GCancellable or NULL
- * @callback: a #GAsyncReadyCallback to call when the request is satisfied
- * @user_data: data to pass to callback
- */
static void
_spice_usb_device_manager_connect_device_async(SpiceUsbDeviceManager *self,
SpiceUsbDevice *device,
@@ -1469,7 +1461,18 @@ done:
g_object_unref(result);
}
-
+/**
+ * spice_usb_device_manager_connect_device_async:
+ * @self: a #SpiceUsbDeviceManager.
+ * @device: a #SpiceUsbDevice to redirect
+ * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore
+ * @callback: a #GAsyncReadyCallback to call when the request is satisfied
+ * @user_data: the data to pass to callback function
+ *
+ * Asynchronously connects the @device. When completed, @callback will be called.
+ * Then it is possible to call spice_usb_device_manager_connect_device_finish()
+ * to get the result of the operation.
+ */
void spice_usb_device_manager_connect_device_async(SpiceUsbDeviceManager *self,
SpiceUsbDevice *device,
GCancellable *cancellable,
diff --git a/src/usb-device-manager.h b/src/usb-device-manager.h
index 8b173bb..0751272 100644
--- a/src/usb-device-manager.h
+++ b/src/usb-device-manager.h
@@ -102,7 +102,7 @@ GPtrArray* spice_usb_device_manager_get_devices_with_filter(
gboolean spice_usb_device_manager_is_device_connected(SpiceUsbDeviceManager *manager,
SpiceUsbDevice *device);
void spice_usb_device_manager_connect_device_async(
- SpiceUsbDeviceManager *manager,
+ SpiceUsbDeviceManager *self,
SpiceUsbDevice *device,
GCancellable *cancellable,
GAsyncReadyCallback callback,