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 _BRASERO_SESSION_CFG_H_ 32 #define _BRASERO_SESSION_CFG_H_ 33 34 #include <glib-object.h> 35 36 #include <brasero-session.h> 37 #include <brasero-session-span.h> 38 39 G_BEGIN_DECLS 40 41 #define BRASERO_TYPE_SESSION_CFG (brasero_session_cfg_get_type ()) 42 #define BRASERO_SESSION_CFG(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BRASERO_TYPE_SESSION_CFG, BraseroSessionCfg)) 43 #define BRASERO_SESSION_CFG_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BRASERO_TYPE_SESSION_CFG, BraseroSessionCfgClass)) 44 #define BRASERO_IS_SESSION_CFG(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BRASERO_TYPE_SESSION_CFG)) 45 #define BRASERO_IS_SESSION_CFG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BRASERO_TYPE_SESSION_CFG)) 46 #define BRASERO_SESSION_CFG_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BRASERO_TYPE_SESSION_CFG, BraseroSessionCfgClass)) 47 48 typedef struct _BraseroSessionCfgClass BraseroSessionCfgClass; 49 typedef struct _BraseroSessionCfg BraseroSessionCfg; 50 51 struct _BraseroSessionCfgClass 52 { 53 BraseroSessionSpanClass parent_class; 54 }; 55 56 struct _BraseroSessionCfg 57 { 58 BraseroSessionSpan parent_instance; 59 }; 60 61 GType brasero_session_cfg_get_type (void) G_GNUC_CONST; 62 63 /** 64 * This is for the signal sent to tell whether or not session is valid 65 */ 66 67 typedef enum { 68 BRASERO_SESSION_VALID = 0, 69 BRASERO_SESSION_NO_CD_TEXT = 1, 70 BRASERO_SESSION_NOT_READY, 71 BRASERO_SESSION_EMPTY, 72 BRASERO_SESSION_NO_INPUT_IMAGE, 73 BRASERO_SESSION_UNKNOWN_IMAGE, 74 BRASERO_SESSION_NO_INPUT_MEDIUM, 75 BRASERO_SESSION_NO_OUTPUT, 76 BRASERO_SESSION_INSUFFICIENT_SPACE, 77 BRASERO_SESSION_OVERBURN_NECESSARY, 78 BRASERO_SESSION_NOT_SUPPORTED, 79 BRASERO_SESSION_DISC_PROTECTED 80 } BraseroSessionError; 81 82 #define BRASERO_SESSION_IS_VALID(result_MACRO) \ 83 ((result_MACRO) == BRASERO_SESSION_VALID || \ 84 (result_MACRO) == BRASERO_SESSION_NO_CD_TEXT) 85 86 BraseroSessionCfg * 87 brasero_session_cfg_new (void); 88 89 BraseroSessionError 90 brasero_session_cfg_get_error (BraseroSessionCfg *cfg); 91 92 void 93 brasero_session_cfg_add_flags (BraseroSessionCfg *cfg, 94 BraseroBurnFlag flags); 95 void 96 brasero_session_cfg_remove_flags (BraseroSessionCfg *cfg, 97 BraseroBurnFlag flags); 98 gboolean 99 brasero_session_cfg_is_supported (BraseroSessionCfg *cfg, 100 BraseroBurnFlag flag); 101 gboolean 102 brasero_session_cfg_is_compulsory (BraseroSessionCfg *cfg, 103 BraseroBurnFlag flag); 104 105 gboolean 106 brasero_session_cfg_has_default_output_path (BraseroSessionCfg *cfg); 107 108 void 109 brasero_session_cfg_enable (BraseroSessionCfg *cfg); 110 111 void 112 brasero_session_cfg_disable (BraseroSessionCfg *cfg); 113 114 G_END_DECLS 115 116 #endif /* _BRASERO_SESSION_CFG_H_ */ 117