BraseroTrackDataCfg: Libbrasero-burn Reference Manual

## BraseroTrackDataCfg BraseroTrackDataCfg |

## Functions

BraseroTrackDataCfg * | brasero_track_data_cfg_new ()
gboolean | brasero_track_data_cfg_add ()
GtkTreePath * | brasero_track_data_cfg_add_empty_directory ()
gboolean | brasero_track_data_cfg_remove ()
gboolean | brasero_track_data_cfg_rename ()
gboolean | brasero_track_data_cfg_reset ()
gboolean | brasero_track_data_cfg_load_medium ()
void | brasero_track_data_cfg_unload_current_medium ()
BraseroMedium * | brasero_track_data_cfg_get_current_medium ()
GSList * | brasero_track_data_cfg_get_available_media ()
void | brasero_track_data_cfg_dont_filter_uri ()
GSList * | brasero_track_data_cfg_get_restored_list ()
void | brasero_track_data_cfg_restore ()
GtkTreeModel * | brasero_track_data_cfg_get_filtered_model ()
BraseroBurnResult | brasero_track_data_cfg_span ()
BraseroBurnResult | brasero_track_data_cfg_span_again ()
BraseroBurnResult | brasero_track_data_cfg_span_possible ()
void | brasero_track_data_cfg_span_stop ()
GIcon * | brasero_track_data_cfg_get_icon ()
gchar * | brasero_track_data_cfg_get_icon_path ()
gboolean | brasero_track_data_cfg_set_icon ()

## Signals

gboolean | G2-file | No Recursion
gboolean | deep-directory | No Recursion
void | icon-changed | No Recursion
int | image-uri | No Recursion
void | joliet-rename | No Recursion
gboolean | name-collision | No Recursion
void | recursive-sym | Run First
void | session-available | Run Last
void | session-loaded | Run Last
void | source-loaded | No Recursion
void | source-loading | No Recursion
void | unknown-uri | Run First
void | unreadable-uri | Run First

## Types and Values

#define | BRASERO_DND_TARGET_DATA_TRACK_REFERENCE_LIST
enum | BraseroTrackDataCfgColumn
struct | BraseroTrackDataCfg

## Object Hierarchy

        GObject
        ╰── BraseroTrack
            ╰── BraseroTrackData
                ╰── BraseroTrackDataCfg

## Implemented Interfaces

BraseroTrackDataCfg implements GtkTreeModel, GtkTreeDragDest, GtkTreeDragSource and GtkTreeSortable.

## Description

## Functions

### 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.

#### Parameters

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.

#### Parameters

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.

#### Parameters

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` .

#### Parameters

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

#### Parameters

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` .

#### Parameters

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()`.

#### Parameters

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.

#### Parameters

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.

#### Parameters

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.

#### Parameters

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()`.

#### Parameters

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.

#### Parameters

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.

#### Parameters

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.

#### Parameters

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()`.

#### Parameters

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()`.

#### Parameters

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()`.

#### Parameters

track | a BraseroTrackDataCfg |

### brasero_track_data_cfg_get_icon ()

    GIcon *
    brasero_track_data_cfg_get_icon (BraseroTrackDataCfg *track);

Returns the currently selected icon.

#### Parameters

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.

#### Parameters

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.

#### Parameters

track | a BraseroTrackDataCfg |
icon_path | a gchar |
error | a GError |

#### Returns

a gboolean. TRUE if the operation was successful, FALSE otherwise

## Types and Values

### BRASERO_DND_TARGET_DATA_TRACK_REFERENCE_LIST

    #define BRASERO_DND_TARGET_DATA_TRACK_REFERENCE_LIST "GTK_TREE_MODEL_ROW"

### enum BraseroTrackDataCfgColumn

#### Members

BRASERO_DATA_TREE_MODEL_NAME |  |
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 |  |

### struct BraseroTrackDataCfg

    struct BraseroTrackDataCfg;

## Signal Details

### The `“G2-file”` signal

    gboolean
    user_function (BraseroTrackDataCfg *braserotrackdatacfg,
                   char                *arg1,
                   gpointer             user_data)

Flags: No Recursion

### The `“deep-directory”` signal

    gboolean
    user_function (BraseroTrackDataCfg *braserotrackdatacfg,
                   char                *arg1,
                   gpointer             user_data)

Flags: No Recursion

### The `“icon-changed”` signal

    void
    user_function (BraseroTrackDataCfg *braserotrackdatacfg,
                   gpointer             user_data)

Flags: No Recursion

### The `“image-uri”` signal

    int
    user_function (BraseroTrackDataCfg *braserotrackdatacfg,
                   char                *arg1,
                   gpointer             user_data)

Flags: No Recursion

### The `“joliet-rename”` signal

    void
    user_function (BraseroTrackDataCfg *braserotrackdatacfg,
                   gpointer             user_data)

Flags: No Recursion

### The `“name-collision”` signal

    gboolean
    user_function (BraseroTrackDataCfg *braserotrackdatacfg,
                   char                *arg1,
                   gpointer             user_data)

Flags: No Recursion

### The `“recursive-sym”` signal

    void
    user_function (BraseroTrackDataCfg *braserotrackdatacfg,
                   char                *arg1,
                   gpointer             user_data)

Flags: Run First

### The `“session-available”` signal

    void
    user_function (BraseroTrackDataCfg *braserotrackdatacfg,
                   GObject             *arg1,
                   gboolean             arg2,
                   gpointer             user_data)

Flags: Run Last

### The `“session-loaded”` signal

    void
    user_function (BraseroTrackDataCfg *braserotrackdatacfg,
                   GObject             *arg1,
                   gboolean             arg2,
                   gpointer             user_data)

Flags: Run Last

### The `“source-loaded”` signal

    void
    user_function (BraseroTrackDataCfg *braserotrackdatacfg,
                   gpointer             arg1,
                   gpointer             user_data)

Flags: No Recursion

### The `“source-loading”` signal

    void
    user_function (BraseroTrackDataCfg *braserotrackdatacfg,
                   double               arg1,
                   gpointer             user_data)

Flags: No Recursion

### The `“unknown-uri”` signal

    void
    user_function (BraseroTrackDataCfg *braserotrackdatacfg,
                   char                *arg1,
                   gpointer             user_data)

Flags: Run First

### The `“unreadable-uri”` signal

    void
    user_function (BraseroTrackDataCfg *braserotrackdatacfg,
                   gpointer             arg1,
                   char                *arg2,
                   gpointer             user_data)

Flags: Run First