## BraseroTrackDataCfg BraseroTrackDataCfg |

## Synopsis

    #define             BRASERO_DND_TARGET_DATA_TRACK_REFERENCE_LIST
    enum                BraseroTrackDataCfgColumn;
                        BraseroTrackDataCfg;
    BraseroTrackDataCfg * brasero_track_data_cfg_new        (void);
    gboolean            brasero_track_data_cfg_add          (BraseroTrackDataCfg *track,
                                                             const gchar *uri,
                                                             GtkTreePath *parent);
    GtkTreePath *       brasero_track_data_cfg_add_empty_directory
                                                            (BraseroTrackDataCfg *track,
                                                             const gchar *name,
                                                             GtkTreePath *parent);
    gboolean            brasero_track_data_cfg_remove       (BraseroTrackDataCfg *track,
                                                             GtkTreePath *treepath);
    gboolean            brasero_track_data_cfg_rename       (BraseroTrackDataCfg *track,
                                                             const gchar *newname,
                                                             GtkTreePath *treepath);
    gboolean            brasero_track_data_cfg_reset        (BraseroTrackDataCfg *track);
    gboolean            brasero_track_data_cfg_load_medium  (BraseroTrackDataCfg *track,
                                                             BraseroMedium *medium,
                                                             GError **error);
    void                brasero_track_data_cfg_unload_current_medium
                                                            (BraseroTrackDataCfg *track);
    BraseroMedium *     brasero_track_data_cfg_get_current_medium
                                                            (BraseroTrackDataCfg *track);
    GSList *            brasero_track_data_cfg_get_available_media
                                                            (BraseroTrackDataCfg *track);
    void                brasero_track_data_cfg_dont_filter_uri
                                                            (BraseroTrackDataCfg *track,
                                                             const gchar *uri);
    GSList *            brasero_track_data_cfg_get_restored_list
                                                            (BraseroTrackDataCfg *track);
    void                brasero_track_data_cfg_restore      (BraseroTrackDataCfg *track,
                                                             GtkTreePath *treepath);
    GtkTreeModel *      brasero_track_data_cfg_get_filtered_model
                                                            (BraseroTrackDataCfg *track);
    BraseroBurnResult   brasero_track_data_cfg_span         (BraseroTrackDataCfg *track,
                                                             goffset sectors,
                                                             BraseroTrackData *new_track);
    BraseroBurnResult   brasero_track_data_cfg_span_again   (BraseroTrackDataCfg *track);
    BraseroBurnResult   brasero_track_data_cfg_span_possible
                                                            (BraseroTrackDataCfg *track,
                                                             goffset sectors);
    void                brasero_track_data_cfg_span_stop    (BraseroTrackDataCfg *track);
    GIcon *             brasero_track_data_cfg_get_icon     (BraseroTrackDataCfg *track);
    gchar *             brasero_track_data_cfg_get_icon_path
                                                            (BraseroTrackDataCfg *track);
    gboolean            brasero_track_data_cfg_set_icon     (BraseroTrackDataCfg *track,
                                                             const gchar *icon_path,
                                                             GError **error);

## Description

## Details

### BRASERO_DND_TARGET_DATA_TRACK_REFERENCE_LIST

    #define BRASERO_DND_TARGET_DATA_TRACK_REFERENCE_LIST "GTK_TREE_MODEL_ROW"

### enum BraseroTrackDataCfgColumn

    typedef enum {
    	BRASERO_DATA_TREE_MODEL_NAME		= 0,
    	BRASERO_DATA_TREE_MODEL_URI,
    	BRASERO_DATA_TREE_MODEL_MIME_DESC,
    	BRASERO_DATA_TREE_MODEL_MIME_ICON,
    	BRASERO_DATA_TREE_MODEL_SIZE,
    	BRASERO_DATA_TREE_MODEL_SHOW_PERCENT,
    	BRASERO_DATA_TREE_MODEL_PERCENT,
    	BRASERO_DATA_TREE_MODEL_STYLE,
    	BRASERO_DATA_TREE_MODEL_COLOR,
    	BRASERO_DATA_TREE_MODEL_EDITABLE,
    	BRASERO_DATA_TREE_MODEL_IS_FILE,
    	BRASERO_DATA_TREE_MODEL_IS_LOADING,
    	BRASERO_DATA_TREE_MODEL_IS_IMPORTED,
    	BRASERO_DATA_TREE_MODEL_COL_NUM
    } BraseroTrackDataCfgColumn;

### BraseroTrackDataCfg

    typedef struct {
    	BraseroTrackData parent_instance;
    } BraseroTrackDataCfg;

### brasero_track_data_cfg_new ()

    BraseroTrackDataCfg * brasero_track_data_cfg_new        (void);

Creates a new BraseroTrackDataCfg.

Returns : | a new BraseroTrackDataCfg.

### brasero_track_data_cfg_add ()

    gboolean            brasero_track_data_cfg_add          (BraseroTrackDataCfg *track,
                                                             const gchar *uri,
                                                             GtkTreePath *parent);

Add a new file (with `uri` as URI) under a directory (`parent`). If `parent` is NULL, the file is added to the root. Also if `uri` is the path of a directory, this directory will be explored and all its children added to the tree.

`track` : | a BraseroTrackDataCfg
`uri` : | a gchar
`parent` : | a GtkTreePath or NULL
Returns : | a gboolean. TRUE if the operation was successful, FALSE otherwise

### brasero_track_data_cfg_add_empty_directory ()

    GtkTreePath *       brasero_track_data_cfg_add_empty_directory
                                                            (BraseroTrackDataCfg *track,
                                                             const gchar *name,
                                                             GtkTreePath *parent);

Add a new empty directory (with `name` as name) under another directory (`parent`). If `parent` is NULL, the file is added to the root.

`track` : | a BraseroTrackDataCfg
`name` : | a gchar
`parent` : | a GtkTreePath or NULL
Returns : | a GtkTreePath which should be destroyed when not needed; NULL if the operation was not successful.

### brasero_track_data_cfg_remove ()

    gboolean            brasero_track_data_cfg_remove       (BraseroTrackDataCfg *track,
                                                             GtkTreePath *treepath);

Removes a file or a directory (as well as its children) from the tree. NOTE: some files cannot be removed like files from an imported session.

`track` : | a BraseroTrackDataCfg
`treepath` : | a GtkTreePath
Returns : | a gboolean. TRUE if the operation was successful, FALSE otherwise

### brasero_track_data_cfg_rename ()

    gboolean            brasero_track_data_cfg_rename       (BraseroTrackDataCfg *track,
                                                             const gchar *newname,
                                                             GtkTreePath *treepath);

Renames the file in the tree pointed by `treepath`.

`track` : | a BraseroTrackDataCfg
`newname` : | a gchar
`treepath` : | a GtkTreePath
Returns : | a gboolean. TRUE if the operation was successful, FALSE otherwise

### brasero_track_data_cfg_reset ()

    gboolean            brasero_track_data_cfg_reset        (BraseroTrackDataCfg *track);

Completely empties `track` and unloads any currently loaded session

`track` : | a BraseroTrackDataCfg
Returns : | a gboolean. TRUE if the operation was successful, FALSE otherwise

### brasero_track_data_cfg_load_medium ()

    gboolean            brasero_track_data_cfg_load_medium  (BraseroTrackDataCfg *track,
                                                             BraseroMedium *medium,
                                                             GError **error);

Tries to load the contents of the last session of `medium` so all its files will be included in the tree to perform a merge between files from the session and new added files. Errors are stored in `error`.

`track` : | a BraseroTrackDataCfg
`medium` : | a BraseroMedium
`error` : | a GError
Returns : | a gboolean. TRUE if the operation was successful, FALSE otherwise

### brasero_track_data_cfg_unload_current_medium ()

    void                brasero_track_data_cfg_unload_current_medium
                                                            (BraseroTrackDataCfg *track);

Unload the contents of the last session of the currently loaded medium. See `brasero_track_data_cfg_load_medium()`.

`track` : | a BraseroTrackDataCfg

### brasero_track_data_cfg_get_current_medium ()

    BraseroMedium *     brasero_track_data_cfg_get_current_medium
                                                            (BraseroTrackDataCfg *track);

Gets the currently loaded medium.

`track` : | a BraseroTrackDataCfg
Returns : | a BraseroMedium. NULL if no medium are currently loaded. Do not unref when the BraseroMedium is not needed anymore.

### brasero_track_data_cfg_get_available_media ()

    GSList *            brasero_track_data_cfg_get_available_media
                                                            (BraseroTrackDataCfg *track);

Gets a list of all the media that can be appended with new data and which have a session that can be loaded.

`track` : | a BraseroTrackDataCfg
Returns : | a GSList of BraseroMedium. Free the list and unref its contents when the list is not needed anymore.

### brasero_track_data_cfg_dont_filter_uri ()

    void                brasero_track_data_cfg_dont_filter_uri
                                                            (BraseroTrackDataCfg *track,
                                                             const gchar *uri);

Prevents `uri` to be filtered while automatic exploration of added directories is performed.

`track` : | a BraseroTrackDataCfg
`uri` : | a gchar

### brasero_track_data_cfg_get_restored_list ()

    GSList *            brasero_track_data_cfg_get_restored_list
                                                            (BraseroTrackDataCfg *track);

Gets a list of URIs (as gchar *) that were restored with `brasero_track_data_cfg_restore()`.

`track` : | a BraseroTrackDataCfg
Returns : | a GSList; free the list and its contents when not needed anymore.

### brasero_track_data_cfg_restore ()

    void                brasero_track_data_cfg_restore      (BraseroTrackDataCfg *track,
                                                             GtkTreePath *treepath);

Removes a file from the filtered file list (see `brasero_track_data_cfg_get_filtered_model()`) and re-adds it wherever it should be in the tree. `treepath` is a GtkTreePath associated with the GtkTreeModel which holds the filtered files not the main tree.

`track` : | a BraseroTrackDataCfg
`treepath` : | a GtkTreePath

### brasero_track_data_cfg_get_filtered_model ()

    GtkTreeModel *      brasero_track_data_cfg_get_filtered_model
                                                            (BraseroTrackDataCfg *track);

Gets a GtkTreeModel which contains all the files that were automatically filtered while added directories were explored.

`track` : | a BraseroTrackDataCfg
Returns : | a GtkTreeModel. Unref when not needed.

### brasero_track_data_cfg_span ()

    BraseroBurnResult   brasero_track_data_cfg_span         (BraseroTrackDataCfg *track,
                                                             goffset sectors,
                                                             BraseroTrackData *new_track);

Creates a new BraseroTrackData (stored in `new_track`) from the files contained in `track`. The sum of their sizes does not exceed `sectors`. This allows to burn a tree on multiple discs. This function can be called repeatedly; in this case if some files were left out after the previous calls, the newly created BraseroTrackData is created with all or part of the remaining files.

`track` : | a BraseroTrackDataCfg
`sectors` : | a goffset
`new_track` : | a BraseroTrackData
Returns : | a BraseroBurnResult. BRASERO_BURN_OK if there is not anymore data. BRASERO_BURN_RETRY if the operation was successful and a new BraseroTrackDataCfg was created. BRASERO_BURN_ERR otherwise.

### brasero_track_data_cfg_span_again ()

    BraseroBurnResult   brasero_track_data_cfg_span_again   (BraseroTrackDataCfg *track);

Checks whether some files were not included during calls to `brasero_track_data_cfg_span()`.

`track` : | a BraseroTrackDataCfg
Returns : | a BraseroBurnResult. BRASERO_BURN_OK if there is not anymore data. BRASERO_BURN_RETRY if the operation was successful and a new BraseroTrackDataCfg was created. BRASERO_BURN_ERR otherwise.

### brasero_track_data_cfg_span_possible ()

    BraseroBurnResult   brasero_track_data_cfg_span_possible
                                                            (BraseroTrackDataCfg *track,
                                                             goffset sectors);

Checks if a new BraseroTrackData can be created from the files remaining in the tree after calls to `brasero_track_data_cfg_span()`.

`track` : | a BraseroTrackDataCfg
`sectors` : | a goffset
Returns : | a BraseroBurnResult. BRASERO_BURN_OK if there is not anymore data. BRASERO_BURN_RETRY if the operation was successful and a new BraseroTrackDataCfg was created. BRASERO_BURN_ERR otherwise.

### brasero_track_data_cfg_span_stop ()

    void                brasero_track_data_cfg_span_stop    (BraseroTrackDataCfg *track);

Resets the list of files that were included after calls to `brasero_track_data_cfg_span()`.

`track` : | a BraseroTrackDataCfg

### brasero_track_data_cfg_get_icon ()

    GIcon *             brasero_track_data_cfg_get_icon     (BraseroTrackDataCfg *track);

Returns the currently selected icon.

`track` : | a BraseroTrackDataCfg
Returns : | a GIcon or NULL.

### brasero_track_data_cfg_get_icon_path ()

    gchar *             brasero_track_data_cfg_get_icon_path
                                                            (BraseroTrackDataCfg *track);

Returns a path pointing to the currently selected icon file.

`track` : | a BraseroTrackDataCfg
Returns : | a gchar or NULL.

### brasero_track_data_cfg_set_icon ()

    gboolean            brasero_track_data_cfg_set_icon     (BraseroTrackDataCfg *track,
                                                             const gchar *icon_path,
                                                             GError **error);

Sets the current icon.

`track` : | a BraseroTrackDataCfg
`icon_path` : | a gchar
`error` : | a GError
Returns : | a gboolean. TRUE if the operation was successful, FALSE otherwise