1 /* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */ 2 /* 3 * Libbrasero-media 4 * Copyright (C) Philippe Rouquier 2005-2009 <bonfire-app@wanadoo.fr> 5 * 6 * Libbrasero-media is free software; you can redistribute it and/or modify 7 * it under the terms of the GNU General Public License as published by 8 * the Free Software Foundation; either version 2 of the License, or 9 * (at your option) any later version. 10 * 11 * The Libbrasero-media authors hereby grant permission for non-GPL compatible 12 * GStreamer plugins to be used and distributed together with GStreamer 13 * and Libbrasero-media. This permission is above and beyond the permissions granted 14 * by the GPL license by which Libbrasero-media is covered. If you modify this code 15 * you may extend this exception to your version of the code, but you are not 16 * obligated to do so. If you do not wish to do so, delete this exception 17 * statement from your version. 18 * 19 * Libbrasero-media is distributed in the hope that it will be useful, 20 * but WITHOUT ANY WARRANTY; without even the implied warranty of 21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 22 * GNU Library General Public License for more details. 23 * 24 * You should have received a copy of the GNU General Public License 25 * along with this program; if not, write to: 26 * The Free Software Foundation, Inc., 27 * 51 Franklin Street, Fifth Floor 28 * Boston, MA 02110-1301, USA. 29 */ 30 31 #include <glib-object.h> 32 #include <gio/gio.h> 33 34 #ifndef _BURN_DRIVE_H_ 35 #define _BURN_DRIVE_H_ 36 37 #include <brasero-medium.h> 38 39 G_BEGIN_DECLS 40 41 typedef enum { 42 BRASERO_DRIVE_CAPS_NONE = 0, 43 BRASERO_DRIVE_CAPS_CDR = 1, 44 BRASERO_DRIVE_CAPS_CDRW = 1 << 1, 45 BRASERO_DRIVE_CAPS_DVDR = 1 << 2, 46 BRASERO_DRIVE_CAPS_DVDRW = 1 << 3, 47 BRASERO_DRIVE_CAPS_DVDR_PLUS = 1 << 4, 48 BRASERO_DRIVE_CAPS_DVDRW_PLUS = 1 << 5, 49 BRASERO_DRIVE_CAPS_DVDR_PLUS_DL = 1 << 6, 50 BRASERO_DRIVE_CAPS_DVDRW_PLUS_DL = 1 << 7, 51 BRASERO_DRIVE_CAPS_DVDRAM = 1 << 10, 52 BRASERO_DRIVE_CAPS_BDR = 1 << 8, 53 BRASERO_DRIVE_CAPS_BDRW = 1 << 9 54 } BraseroDriveCaps; 55 56 #define BRASERO_TYPE_DRIVE (brasero_drive_get_type ()) 57 #define BRASERO_DRIVE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BRASERO_TYPE_DRIVE, BraseroDrive)) 58 #define BRASERO_DRIVE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BRASERO_TYPE_DRIVE, BraseroDriveClass)) 59 #define BRASERO_IS_DRIVE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BRASERO_TYPE_DRIVE)) 60 #define BRASERO_IS_DRIVE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BRASERO_TYPE_DRIVE)) 61 #define BRASERO_DRIVE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BRASERO_TYPE_DRIVE, BraseroDriveClass)) 62 63 typedef struct _BraseroDriveClass BraseroDriveClass; 64 65 struct _BraseroDriveClass 66 { 67 GObjectClass parent_class; 68 69 /* Signals */ 70 void (* medium_added) (BraseroDrive *drive, 71 BraseroMedium *medium); 72 73 void (* medium_removed) (BraseroDrive *drive, 74 BraseroMedium *medium); 75 }; 76 77 struct _BraseroDrive 78 { 79 GObject parent_instance; 80 }; 81 82 GType brasero_drive_get_type (void) G_GNUC_CONST; 83 84 void 85 brasero_drive_reprobe (BraseroDrive *drive); 86 87 BraseroMedium * 88 brasero_drive_get_medium (BraseroDrive *drive); 89 90 GDrive * 91 brasero_drive_get_gdrive (BraseroDrive *drive); 92 93 const gchar * 94 brasero_drive_get_udi (BraseroDrive *drive); 95 96 gboolean 97 brasero_drive_is_fake (BraseroDrive *drive); 98 99 gchar * 100 brasero_drive_get_display_name (BraseroDrive *drive); 101 102 const gchar * 103 brasero_drive_get_device (BraseroDrive *drive); 104 105 const gchar * 106 brasero_drive_get_block_device (BraseroDrive *drive); 107 108 gchar * 109 brasero_drive_get_bus_target_lun_string (BraseroDrive *drive); 110 111 BraseroDriveCaps 112 brasero_drive_get_caps (BraseroDrive *drive); 113 114 gboolean 115 brasero_drive_can_write_media (BraseroDrive *drive, 116 BraseroMedia media); 117 118 gboolean 119 brasero_drive_can_write (BraseroDrive *drive); 120 121 gboolean 122 brasero_drive_can_eject (BraseroDrive *drive); 123 124 gboolean 125 brasero_drive_eject (BraseroDrive *drive, 126 gboolean wait, 127 GError **error); 128 129 void 130 brasero_drive_cancel_current_operation (BraseroDrive *drive); 131 132 gboolean 133 brasero_drive_is_door_open (BraseroDrive *drive); 134 135 gboolean 136 brasero_drive_can_use_exclusively (BraseroDrive *drive); 137 138 gboolean 139 brasero_drive_lock (BraseroDrive *drive, 140 const gchar *reason, 141 gchar **reason_for_failure); 142 gboolean 143 brasero_drive_unlock (BraseroDrive *drive); 144 145 gboolean 146 brasero_drive_is_locked (BraseroDrive *drive, 147 gchar **reason); 148 149 G_END_DECLS 150 151 #endif /* _BURN_DRIVE_H_ */ 152