[brasero] Add a way to cancel some BraseroDrive operations



commit a0921c099204059e70e7843f76d713117725fc2e
Author: Philippe Rouquier <bonfire-app wanadoo fr>
Date:   Fri Jul 17 15:33:44 2009 +0200

    Add a way to cancel some BraseroDrive operations

 libbrasero-media/brasero-drive.c |   19 +++++++++++++++++++
 libbrasero-media/brasero-drive.h |    3 +++
 2 files changed, 22 insertions(+), 0 deletions(-)
---
diff --git a/libbrasero-media/brasero-drive.c b/libbrasero-media/brasero-drive.c
index d801253..796e7dc 100644
--- a/libbrasero-media/brasero-drive.c
+++ b/libbrasero-media/brasero-drive.c
@@ -217,6 +217,25 @@ brasero_drive_eject (BraseroDrive *drive,
 }
 
 /**
+ * brasero_drive_cancel_current_operation:
+ * @drive: #BraseroDrive *
+ *
+ * Cancels all operations currently running for @drive
+ *
+ **/
+void
+brasero_drive_cancel_current_operation (BraseroDrive *drive)
+{
+	BraseroDrivePrivate *priv;
+
+	g_return_if_fail (drive != NULL);
+	g_return_if_fail (BRASERO_IS_DRIVE (drive));
+
+	priv = BRASERO_DRIVE_PRIVATE (drive);	
+	g_cancellable_cancel (priv->cancel);
+}
+
+/**
  * brasero_drive_get_bus_target_lun_string:
  * @drive: a #BraseroDrive
  *
diff --git a/libbrasero-media/brasero-drive.h b/libbrasero-media/brasero-drive.h
index 3888680..34ed811 100644
--- a/libbrasero-media/brasero-drive.h
+++ b/libbrasero-media/brasero-drive.h
@@ -122,6 +122,9 @@ brasero_drive_eject (BraseroDrive *drive,
 		     gboolean wait,
 		     GError **error);
 
+void
+brasero_drive_cancel_current_operation (BraseroDrive *drive);
+
 gboolean
 brasero_drive_is_door_open (BraseroDrive *drive);
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]