1 /* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
2 /*
3  * Libbrasero-burn
4  * Copyright (C) Philippe Rouquier 2005-2009 <bonfire-app@wanadoo.fr>
5  *
6  * Libbrasero-burn 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-burn authors hereby grant permission for non-GPL compatible
12  * GStreamer plugins to be used and distributed together with GStreamer
13  * and Libbrasero-burn. This permission is above and beyond the permissions granted
14  * by the GPL license by which Libbrasero-burn 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-burn 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 #ifndef BURN_H
32 #define BURN_H
33 
34 #include <glib.h>
35 #include <glib-object.h>
36 
37 #include <brasero-error.h>
38 #include <brasero-track.h>
39 #include <brasero-session.h>
40 
41 #include <brasero-medium.h>
42 
43 G_BEGIN_DECLS
44 
45 #define BRASERO_TYPE_BURN         (brasero_burn_get_type ())
46 #define BRASERO_BURN(o)           (G_TYPE_CHECK_INSTANCE_CAST ((o), BRASERO_TYPE_BURN, BraseroBurn))
47 #define BRASERO_BURN_CLASS(k)     (G_TYPE_CHECK_CLASS_CAST((k), BRASERO_TYPE_BURN, BraseroBurnClass))
48 #define BRASERO_IS_BURN(o)        (G_TYPE_CHECK_INSTANCE_TYPE ((o), BRASERO_TYPE_BURN))
49 #define BRASERO_IS_BURN_CLASS(k)  (G_TYPE_CHECK_CLASS_TYPE ((k), BRASERO_TYPE_BURN))
50 #define BRASERO_BURN_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), BRASERO_TYPE_BURN, BraseroBurnClass))
51 
52 typedef struct {
53 	GObject parent;
54 } BraseroBurn;
55 
56 typedef struct {
57 	GObjectClass parent_class;
58 
59 	/* signals */
60 	BraseroBurnResult		(*insert_media_request)		(BraseroBurn *obj,
61 									 BraseroDrive *drive,
62 									 BraseroBurnError error,
63 									 BraseroMedia required_media);
64 
65 	BraseroBurnResult		(*eject_failure)		(BraseroBurn *obj,
66 							                 BraseroDrive *drive);
67 
68 	BraseroBurnResult		(*blank_failure)		(BraseroBurn *obj);
69 
70 	BraseroBurnResult		(*location_request)		(BraseroBurn *obj,
71 									 GError *error,
72 									 gboolean is_temporary);
73 
74 	BraseroBurnResult		(*ask_disable_joliet)		(BraseroBurn *obj);
75 
76 	BraseroBurnResult		(*warn_data_loss)		(BraseroBurn *obj);
77 	BraseroBurnResult		(*warn_previous_session_loss)	(BraseroBurn *obj);
78 	BraseroBurnResult		(*warn_audio_to_appendable)	(BraseroBurn *obj);
79 	BraseroBurnResult		(*warn_rewritable)		(BraseroBurn *obj);
80 
81 	BraseroBurnResult		(*dummy_success)		(BraseroBurn *obj);
82 
83 	void				(*progress_changed)		(BraseroBurn *obj,
84 									 gdouble overall_progress,
85 									 gdouble action_progress,
86 									 glong time_remaining);
87 	void				(*action_changed)		(BraseroBurn *obj,
88 									 BraseroBurnAction action);
89 
90 	BraseroBurnResult		(*install_missing)		(BraseroBurn *obj,
91 									 BraseroPluginErrorType error,
92 									 const gchar *detail);
93 } BraseroBurnClass;
94 
95 GType brasero_burn_get_type (void);
96 BraseroBurn *brasero_burn_new (void);
97 
98 BraseroBurnResult
99 brasero_burn_record (BraseroBurn *burn,
100 		     BraseroBurnSession *session,
101 		     GError **error);
102 
103 BraseroBurnResult
104 brasero_burn_check (BraseroBurn *burn,
105 		    BraseroBurnSession *session,
106 		    GError **error);
107 
108 BraseroBurnResult
109 brasero_burn_blank (BraseroBurn *burn,
110 		    BraseroBurnSession *session,
111 		    GError **error);
112 
113 BraseroBurnResult
114 brasero_burn_cancel (BraseroBurn *burn,
115 		     gboolean protect);
116 
117 BraseroBurnResult
118 brasero_burn_status (BraseroBurn *burn,
119 		     BraseroMedia *media,
120 		     goffset *isosize,
121 		     goffset *written,
122 		     guint64 *rate);
123 
124 void
125 brasero_burn_get_action_string (BraseroBurn *burn,
126 				BraseroBurnAction action,
127 				gchar **string);
128 
129 G_END_DECLS
130 
131 #endif /* BURN_H */
132