Merge branch 'master' into 'master'
[brasero.git] / libbrasero-media / brasero-drive.h
blob9121374c7831df6b47d4eebabf8bab5e9331b19c
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>
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.
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.
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.
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.
31 #include <glib-object.h>
32 #include <gio/gio.h>
34 #ifndef _BURN_DRIVE_H_
35 #define _BURN_DRIVE_H_
37 #include <brasero-medium.h>
39 G_BEGIN_DECLS
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;
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))
63 typedef struct _BraseroDriveClass BraseroDriveClass;
65 struct _BraseroDriveClass
67 GObjectClass parent_class;
69 /* Signals */
70 void (* medium_added) (BraseroDrive *drive,
71 BraseroMedium *medium);
73 void (* medium_removed) (BraseroDrive *drive,
74 BraseroMedium *medium);
77 struct _BraseroDrive
79 GObject parent_instance;
82 GType brasero_drive_get_type (void) G_GNUC_CONST;
84 void
85 brasero_drive_reprobe (BraseroDrive *drive);
87 BraseroMedium *
88 brasero_drive_get_medium (BraseroDrive *drive);
90 GDrive *
91 brasero_drive_get_gdrive (BraseroDrive *drive);
93 const gchar *
94 brasero_drive_get_udi (BraseroDrive *drive);
96 gboolean
97 brasero_drive_is_fake (BraseroDrive *drive);
99 gchar *
100 brasero_drive_get_display_name (BraseroDrive *drive);
102 const gchar *
103 brasero_drive_get_device (BraseroDrive *drive);
105 const gchar *
106 brasero_drive_get_block_device (BraseroDrive *drive);
108 gchar *
109 brasero_drive_get_bus_target_lun_string (BraseroDrive *drive);
111 BraseroDriveCaps
112 brasero_drive_get_caps (BraseroDrive *drive);
114 gboolean
115 brasero_drive_can_write_media (BraseroDrive *drive,
116 BraseroMedia media);
118 gboolean
119 brasero_drive_can_write (BraseroDrive *drive);
121 gboolean
122 brasero_drive_can_eject (BraseroDrive *drive);
124 gboolean
125 brasero_drive_eject (BraseroDrive *drive,
126 gboolean wait,
127 GError **error);
129 void
130 brasero_drive_cancel_current_operation (BraseroDrive *drive);
132 gboolean
133 brasero_drive_is_door_open (BraseroDrive *drive);
135 gboolean
136 brasero_drive_can_use_exclusively (BraseroDrive *drive);
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);
145 gboolean
146 brasero_drive_is_locked (BraseroDrive *drive,
147 gchar **reason);
149 G_END_DECLS
151 #endif /* _BURN_DRIVE_H_ */