[brasero] 2009-04-20 Philippe Rouquier <ykw localhost localdomain>
- From: Philippe Rouquier <philippr src gnome org>
- To: svn-commits-list gnome org
- Subject: [brasero] 2009-04-20 Philippe Rouquier <ykw localhost localdomain>
- Date: Mon, 20 Apr 2009 11:34:31 -0400 (EDT)
commit b3a19a0f04b12fad9abc234aa4b12dd1babd1cef
Author: Philippe Rouquier <bonfire-app wanadoo fr>
Date: Mon Apr 20 15:05:06 2009 +0200
2009-04-20 Philippe Rouquier <ykw localhost localdomain>
Add virtual methods to retrieve all information about a data track
* libbrasero-burn/brasero-track-data.c (brasero_track_data_get_fs),
(brasero_track_data_get_fs_real), (brasero_track_data_get_grafts),
(brasero_track_data_get_grafts_real),
(brasero_track_data_get_excluded),
(brasero_track_data_get_excluded_real),
(brasero_track_data_get_paths), (brasero_track_data_get_file_num),
(brasero_track_data_get_file_num_real),
(brasero_track_data_class_init):
* libbrasero-burn/brasero-track-data.h:
---
ChangeLog | 14 +++++
libbrasero-burn/brasero-track-data.c | 105 ++++++++++++++++++++++++----------
libbrasero-burn/brasero-track-data.h | 6 ++
3 files changed, 95 insertions(+), 30 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 6bedd5c..3c096ed 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,17 @@
+2009-04-20 Philippe Rouquier <ykw localhost localdomain>
+
+ Add virtual methods to retrieve all information about a data track
+
+ * libbrasero-burn/brasero-track-data.c (brasero_track_data_get_fs),
+ (brasero_track_data_get_fs_real), (brasero_track_data_get_grafts),
+ (brasero_track_data_get_grafts_real),
+ (brasero_track_data_get_excluded),
+ (brasero_track_data_get_excluded_real),
+ (brasero_track_data_get_paths), (brasero_track_data_get_file_num),
+ (brasero_track_data_get_file_num_real),
+ (brasero_track_data_class_init):
+ * libbrasero-burn/brasero-track-data.h:
+
2009-04-19 Philippe Rouquier <bonfire-app wanadoo fr>
Another fix for argument types
diff --git a/libbrasero-burn/brasero-track-data.c b/libbrasero-burn/brasero-track-data.c
index 5e025a6..7f3c2ae 100644
--- a/libbrasero-burn/brasero-track-data.c
+++ b/libbrasero-burn/brasero-track-data.c
@@ -150,17 +150,6 @@ brasero_track_data_rm_fs (BraseroTrackData *track,
return BRASERO_BURN_OK;
}
-BraseroImageFS
-brasero_track_data_get_fs (BraseroTrackData *track)
-{
- BraseroTrackDataPrivate *priv;
-
- g_return_val_if_fail (BRASERO_IS_TRACK_DATA (track), BRASERO_IMAGE_FS_NONE);
-
- priv = BRASERO_TRACK_DATA_PRIVATE (track);
- return priv->fs_type;
-}
-
BraseroBurnResult
brasero_track_data_set_data_blocks (BraseroTrackData *track,
goffset blocks)
@@ -189,15 +178,43 @@ brasero_track_data_set_file_num (BraseroTrackData *track,
return BRASERO_BURN_OK;
}
+BraseroImageFS
+brasero_track_data_get_fs (BraseroTrackData *track)
+{
+ BraseroTrackDataClass *klass;
+
+ g_return_val_if_fail (BRASERO_IS_TRACK_DATA (track), BRASERO_IMAGE_FS_NONE);
+
+ klass = BRASERO_TRACK_DATA_CLASS (track);
+ return klass->get_fs (track);
+}
+
+BraseroImageFS
+brasero_track_data_get_fs_real (BraseroTrackData *track)
+{
+ BraseroTrackDataPrivate *priv;
+
+ priv = BRASERO_TRACK_DATA_PRIVATE (track);
+ return priv->fs_type;
+}
+
GSList *
brasero_track_data_get_grafts (BraseroTrackData *track)
{
- BraseroTrackDataPrivate *priv;
+ BraseroTrackDataClass *klass;
g_return_val_if_fail (BRASERO_IS_TRACK_DATA (track), NULL);
- priv = BRASERO_TRACK_DATA_PRIVATE (track);
+ klass = BRASERO_TRACK_DATA_CLASS (track);
+ return klass->get_grafts (track);
+}
+static GSList *
+brasero_track_data_get_grafts_real (BraseroTrackData *track)
+{
+ BraseroTrackDataPrivate *priv;
+
+ priv = BRASERO_TRACK_DATA_PRIVATE (track);
return priv->grafts;
}
@@ -205,18 +222,19 @@ GSList *
brasero_track_data_get_excluded (BraseroTrackData *track,
gboolean copy)
{
- BraseroTrackDataPrivate *priv;
+ BraseroTrackDataClass *klass;
GSList *retval = NULL;
+ GSList *excluded;
GSList *iter;
g_return_val_if_fail (BRASERO_IS_TRACK_DATA (track), NULL);
- priv = BRASERO_TRACK_DATA_PRIVATE (track);
-
+ klass = BRASERO_TRACK_DATA_CLASS (track);
+ excluded = klass->get_excluded (track);
if (!copy)
- return priv->excluded;
+ return excluded;
- for (iter = priv->excluded; iter; iter = iter->next) {
+ for (iter = excluded; iter; iter = iter->next) {
gchar *uri;
uri = iter->data;
@@ -226,6 +244,15 @@ brasero_track_data_get_excluded (BraseroTrackData *track,
return retval;
}
+static GSList *
+brasero_track_data_get_excluded_real (BraseroTrackData *track)
+{
+ BraseroTrackDataPrivate *priv;
+
+ priv = BRASERO_TRACK_DATA_PRIVATE (track);
+ return priv->excluded;
+}
+
BraseroBurnResult
brasero_track_data_get_paths (BraseroTrackData *track,
gboolean use_joliet,
@@ -235,14 +262,17 @@ brasero_track_data_get_paths (BraseroTrackData *track,
const gchar *videodir,
GError **error)
{
+ GSList *grafts;
+ GSList *excluded;
BraseroBurnResult result;
- BraseroTrackDataPrivate *priv;
+ BraseroTrackDataClass *klass;
g_return_val_if_fail (BRASERO_IS_TRACK_DATA (track), BRASERO_BURN_NOT_SUPPORTED);
- priv = BRASERO_TRACK_DATA_PRIVATE (track);
- result = brasero_mkisofs_base_write_to_files (priv->grafts,
- priv->excluded,
+ grafts = klass->get_grafts (track);
+ excluded = klass->get_excluded (track);
+ result = brasero_mkisofs_base_write_to_files (grafts,
+ excluded,
use_joliet,
emptydir,
videodir,
@@ -254,19 +284,28 @@ brasero_track_data_get_paths (BraseroTrackData *track,
BraseroBurnResult
brasero_track_data_get_file_num (BraseroTrackData *track,
- guint64 *num_files)
+ guint64 *file_num)
{
- BraseroTrackDataPrivate *priv;
+ BraseroTrackDataClass *klass;
- g_return_val_if_fail (BRASERO_IS_TRACK_DATA (track), BRASERO_BURN_NOT_SUPPORTED);
-
- priv = BRASERO_TRACK_DATA_PRIVATE (track);
+ g_return_val_if_fail (BRASERO_IS_TRACK_DATA (track), 0);
- *num_files = priv->file_num;
+ klass = BRASERO_TRACK_DATA_GET_CLASS (track);
+ if (file_num)
+ *file_num = klass->get_file_num (track);
return BRASERO_BURN_OK;
}
+static guint64
+brasero_track_data_get_file_num_real (BraseroTrackData *track)
+{
+ BraseroTrackDataPrivate *priv;
+
+ priv = BRASERO_TRACK_DATA_PRIVATE (track);
+ return priv->file_num;
+}
+
static BraseroBurnResult
brasero_track_data_get_size (BraseroTrack *track,
goffset *blocks,
@@ -335,8 +374,9 @@ brasero_track_data_finalize (GObject *object)
static void
brasero_track_data_class_init (BraseroTrackDataClass *klass)
{
- GObjectClass* object_class = G_OBJECT_CLASS (klass);
- BraseroTrackClass* track_class = BRASERO_TRACK_CLASS (klass);
+ GObjectClass *object_class = G_OBJECT_CLASS (klass);
+ BraseroTrackClass *track_class = BRASERO_TRACK_CLASS (klass);
+ BraseroTrackDataClass *track_data_class = BRASERO_TRACK_DATA_CLASS (klass);
g_type_class_add_private (klass, sizeof (BraseroTrackDataPrivate));
@@ -345,6 +385,11 @@ brasero_track_data_class_init (BraseroTrackDataClass *klass)
track_class->get_type = brasero_track_data_get_track_type;
track_class->get_status = brasero_track_data_get_status;
track_class->get_size = brasero_track_data_get_size;
+
+ track_data_class->get_fs = brasero_track_data_get_fs_real;
+ track_data_class->get_grafts = brasero_track_data_get_grafts_real;
+ track_data_class->get_excluded = brasero_track_data_get_excluded_real;
+ track_data_class->get_file_num = brasero_track_data_get_file_num_real;
}
BraseroTrackData *
diff --git a/libbrasero-burn/brasero-track-data.h b/libbrasero-burn/brasero-track-data.h
index 1264a86..c647ade 100644
--- a/libbrasero-burn/brasero-track-data.h
+++ b/libbrasero-burn/brasero-track-data.h
@@ -63,6 +63,12 @@ typedef struct _BraseroTrackData BraseroTrackData;
struct _BraseroTrackDataClass
{
BraseroTrackClass parent_class;
+
+ /* virtual functions */
+ BraseroImageFS (*get_fs) (BraseroTrackData *track);
+ GSList* (*get_grafts) (BraseroTrackData *track);
+ GSList* (*get_excluded) (BraseroTrackData *track);
+ guint64 (*get_file_num) (BraseroTrackData *track);
};
struct _BraseroTrackData
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]