Commit b407bf83 authored by Philippe Rouquier's avatar Philippe Rouquier Committed by Philippe Rouquier

Remove libbrasero-media use of BraseroBurnResult which should be only used

2009-04-04  Philippe Rouquier  <bonfire-app@wanadoo.fr>

	Remove libbrasero-media use of BraseroBurnResult which should be only
	used by libbrasero-burn.

	* libbrasero-burn/burn-caps.c (brasero_medium_support_flags),
	(brasero_medium_supported_flags):
	* libbrasero-media/Makefile.am:
	* libbrasero-media/brasero-medium.c
	(brasero_medium_get_last_data_track_address),
	(brasero_medium_get_last_data_track_space),
	(brasero_medium_get_track_space),
	(brasero_medium_get_track_address),
	(brasero_medium_test_simulate_CD_TAO),
	(brasero_medium_test_simulate_CD_SAO),
	(brasero_medium_test_simulate_DVDRW),
	(brasero_medium_test_simulate_2A),
	(brasero_medium_get_capacity_CD_RW),
	(brasero_medium_get_capacity_DVD_RW),
	(brasero_medium_get_capacity_by_type),
	(brasero_medium_get_speed_mmc3),
	(brasero_medium_get_page_2A_write_speed_desc),
	(brasero_medium_get_speed), (brasero_medium_track_volume_size),
	(brasero_medium_track_get_info),
	(brasero_medium_track_set_leadout_DVDR_blank),
	(brasero_medium_track_set_leadout_CDR_blank),
	(brasero_medium_set_write_mode_page),
	(brasero_medium_track_set_leadout),
	(brasero_medium_get_sessions_info), (brasero_medium_set_blank),
	(brasero_medium_get_contents), (brasero_medium_get_medium_type),
	(brasero_medium_get_css_feature), (brasero_medium_init_real),
	(brasero_medium_can_use_dummy_for_sao),
	(brasero_medium_can_use_dummy_for_tao),
	(brasero_medium_can_use_burnfree):
	* libbrasero-media/brasero-medium.h:

svn path=/trunk/; revision=2208
parent 30902994
2009-04-04 Philippe Rouquier <bonfire-app@wanadoo.fr>
Remove libbrasero-media use of BraseroBurnResult which should be only
used by libbrasero-burn.
* libbrasero-burn/burn-caps.c (brasero_medium_support_flags),
(brasero_medium_supported_flags):
* libbrasero-media/Makefile.am:
* libbrasero-media/brasero-medium.c
(brasero_medium_get_last_data_track_address),
(brasero_medium_get_last_data_track_space),
(brasero_medium_get_track_space),
(brasero_medium_get_track_address),
(brasero_medium_test_simulate_CD_TAO),
(brasero_medium_test_simulate_CD_SAO),
(brasero_medium_test_simulate_DVDRW),
(brasero_medium_test_simulate_2A),
(brasero_medium_get_capacity_CD_RW),
(brasero_medium_get_capacity_DVD_RW),
(brasero_medium_get_capacity_by_type),
(brasero_medium_get_speed_mmc3),
(brasero_medium_get_page_2A_write_speed_desc),
(brasero_medium_get_speed), (brasero_medium_track_volume_size),
(brasero_medium_track_get_info),
(brasero_medium_track_set_leadout_DVDR_blank),
(brasero_medium_track_set_leadout_CDR_blank),
(brasero_medium_set_write_mode_page),
(brasero_medium_track_set_leadout),
(brasero_medium_get_sessions_info), (brasero_medium_set_blank),
(brasero_medium_get_contents), (brasero_medium_get_medium_type),
(brasero_medium_get_css_feature), (brasero_medium_init_real),
(brasero_medium_can_use_dummy_for_sao),
(brasero_medium_can_use_dummy_for_tao),
(brasero_medium_can_use_burnfree):
* libbrasero-media/brasero-medium.h:
2009-04-03 Philippe Rouquier <bonfire-app@wanadoo.fr>
Updated some tag names
......
......@@ -91,18 +91,6 @@ typedef struct _BraseroCapsTest BraseroCapsTest;
static GObjectClass *parent_class = NULL;
static BraseroBurnCaps *default_caps = NULL;
/**
* These two functions are not public API and defined in burn-medium.c
*/
gboolean
brasero_medium_support_flags (BraseroMedium *medium,
BraseroBurnFlag flags);
BraseroBurnFlag
brasero_medium_supported_flags (BraseroMedium *self,
BraseroBurnFlag flags);
/**
* This macro is used to determine whether or not blanking could change anything
* for the medium so that we can write to it.
......@@ -1178,6 +1166,42 @@ brasero_caps_add_processing_plugins_to_task (BraseroBurnSession *session,
return retval;
}
/**
* This one is not supposed to be public API. It's declared in burn-caps.c
*/
gboolean
brasero_medium_support_flags (BraseroMedium *medium,
BraseroBurnFlag flags)
{
BraseroMedia media;
media = brasero_medium_get_status (medium);
if (flags & BRASERO_BURN_FLAG_DUMMY) {
/* This is always FALSE */
if (media & BRASERO_MEDIUM_PLUS)
return FALSE;
if (media & BRASERO_MEDIUM_DVD) {
if (!brasero_medium_can_use_dummy_for_sao (medium))
return FALSE;
}
else if (flags & BRASERO_BURN_FLAG_DAO) {
if (!brasero_medium_can_use_dummy_for_sao (medium))
return FALSE;
}
else if (!brasero_medium_can_use_dummy_for_tao (medium))
return FALSE;
}
if (flags & BRASERO_BURN_FLAG_BURNPROOF) {
if (!brasero_medium_can_use_burnfree (medium))
return FALSE;
}
return TRUE;
}
static gboolean
brasero_burn_caps_flags_check_for_drive (BraseroBurnSession *session)
{
......@@ -2419,6 +2443,37 @@ brasero_caps_get_flags (BraseroCaps *caps,
return retval;
}
static BraseroBurnFlag
brasero_medium_supported_flags (BraseroMedium *medium,
BraseroBurnFlag flags)
{
BraseroMedia media;
media = brasero_medium_get_status (medium);
/* This is always FALSE */
if (media & BRASERO_MEDIUM_PLUS)
flags &= ~BRASERO_BURN_FLAG_DUMMY;
/* Simulation is only possible according to write modes. This mode is
* mostly used by cdrecord/wodim for CLONE images. */
else if (media & BRASERO_MEDIUM_DVD) {
if (!brasero_medium_can_use_dummy_for_sao (medium))
flags &= ~BRASERO_BURN_FLAG_DUMMY;
}
else if (flags & BRASERO_BURN_FLAG_DAO) {
if (!brasero_medium_can_use_dummy_for_sao (medium))
flags &= ~BRASERO_BURN_FLAG_DUMMY;
}
else if (!brasero_medium_can_use_dummy_for_tao (medium))
flags &= ~BRASERO_BURN_FLAG_DUMMY;
if (!brasero_medium_can_use_burnfree (medium))
flags &= ~BRASERO_BURN_FLAG_BURNPROOF;
return flags;
}
static BraseroBurnFlag
brasero_burn_caps_flags_update_for_drive (BraseroBurnFlag flags,
BraseroBurnSession *session)
......
INCLUDES = \
-I$(top_srcdir) \
-I$(top_srcdir)/libbrasero-burn/ \
-I$(top_builddir) \
-DBRASERO_LOCALE_DIR=\""$(prefix)/$(DATADIRNAME)/locale"\" \
-DBRASERO_PREFIX=\"$(prefix)\" \
......
This diff is collapsed.
......@@ -111,25 +111,34 @@ brasero_medium_get_track_num (BraseroMedium *medium);
gboolean
brasero_medium_get_last_data_track_space (BraseroMedium *medium,
guint64 *size,
guint64 *blocks);
guint64 *bytes,
guint64 *sectors);
gboolean
brasero_medium_get_last_data_track_address (BraseroMedium *medium,
guint64 *byte,
guint64 *sector);
guint64 *bytes,
guint64 *sectors);
gboolean
brasero_medium_get_track_space (BraseroMedium *medium,
guint num,
guint64 *size,
guint64 *blocks);
guint64 *bytes,
guint64 *sectors);
gboolean
brasero_medium_get_track_address (BraseroMedium *medium,
guint num,
guint64 *byte,
guint64 *sector);
guint64 *bytes,
guint64 *sectors);
gboolean
brasero_medium_can_use_dummy_for_sao (BraseroMedium *medium);
gboolean
brasero_medium_can_use_dummy_for_tao (BraseroMedium *medium);
gboolean
brasero_medium_can_use_burnfree (BraseroMedium *medium);
G_END_DECLS
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment