1 /*
2  *  Copyright (C) 2009 David Mohr <david@mcbf.net>
3  *
4  *  This program is free software; you can redistribute it and/or modify
5  *  it under the terms of the GNU General Public License as published by
6  *  the Free Software Foundation; either version 2 of the License, or
7  *  (at your option) any later version.
8  *
9  *  This program is distributed in the hope that it will be useful,
10  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
11  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12  *  GNU Library General Public License for more details.
13  *
14  *  You should have received a copy of the GNU General Public License
15  *  along with this program; if not, write to the Free Software
16  *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
17  *
18  */
19 
20 #ifndef __XFBURN_DEVICE__
21 #define __XFBURN_DEVICE__
22 
23 #include <glib-object.h>
24 #include <libburn.h>
25 
26 G_BEGIN_DECLS
27 
28 #define XFBURN_TYPE_DEVICE xfburn_device_get_type()
29 
30 #define XFBURN_DEVICE(obj) \
31   (G_TYPE_CHECK_INSTANCE_CAST ((obj), XFBURN_TYPE_DEVICE, XfburnDevice))
32 
33 #define XFBURN_DEVICE_CLASS(klass) \
34   (G_TYPE_CHECK_CLASS_CAST ((klass), XFBURN_TYPE_DEVICE, XfburnDeviceClass))
35 
36 #define XFBURN_IS_DEVICE(obj) \
37   (G_TYPE_CHECK_INSTANCE_TYPE ((obj), XFBURN_TYPE_DEVICE))
38 
39 #define XFBURN_IS_DEVICE_CLASS(klass) \
40   (G_TYPE_CHECK_CLASS_TYPE ((klass), XFBURN_TYPE_DEVICE))
41 
42 #define XFBURN_DEVICE_GET_CLASS(obj) \
43   (G_TYPE_INSTANCE_GET_CLASS ((obj), XFBURN_TYPE_DEVICE, XfburnDeviceClass))
44 
45 typedef struct {
46   GObject parent;
47 } XfburnDevice;
48 
49 typedef struct {
50   GObjectClass parent_class;
51 } XfburnDeviceClass;
52 
53 GType xfburn_device_get_type (void);
54 
55 XfburnDevice* xfburn_device_new (void);
56 
57 void xfburn_device_fillin_libburn_info (XfburnDevice *device, struct burn_drive_info *drive);
58 gboolean xfburn_device_refresh_info (XfburnDevice * device, gboolean get_speed_info);
59 gboolean xfburn_device_grab (XfburnDevice * device, struct burn_drive_info **drive_info);
60 gboolean xfburn_device_release (struct burn_drive_info *drive_info, gboolean eject);
61 const gchar * xfburn_device_set_name (XfburnDevice *device, const gchar *vendor, const gchar *product);
62 gboolean xfburn_device_can_burn (XfburnDevice *device);
63 gboolean xfburn_device_can_dummy_write (XfburnDevice *device);
64 
65 G_END_DECLS
66 
67 #endif /* __XFBURN_DEVICE__ */
68 
69