## BraseroTrack

BraseroTrack

## Functions

void | brasero_track_changed ()
BraseroBurnResult | brasero_track_get_size ()
BraseroBurnResult | brasero_track_get_track_type ()
BraseroBurnResult | brasero_track_get_status ()
BraseroBurnResult | brasero_track_set_checksum ()
const gchar * | brasero_track_get_checksum ()
BraseroChecksumType | brasero_track_get_checksum_type ()
BraseroBurnResult | brasero_track_tag_add ()
BraseroBurnResult | brasero_track_tag_lookup ()
void | brasero_track_tag_copy_missing ()
BraseroBurnResult | brasero_track_tag_add_string ()
const gchar * | brasero_track_tag_lookup_string ()
BraseroBurnResult | brasero_track_tag_add_int ()
int | brasero_track_tag_lookup_int ()

## Types and Values

struct | BraseroTrack
enum | BraseroChecksumType

## Description

## Functions

### brasero_track_changed ()

    void
    brasero_track_changed (BraseroTrack *track);

Used internally in BraseroTrack implementations to signal a BraseroTrack object has changed.

#### Parameters

track | a BraseroTrack |

### brasero_track_get_size ()

    BraseroBurnResult
    brasero_track_get_size (BraseroTrack *track,
                            goffset *blocks,
                            goffset *bytes);

Returns the size of the data contained by `track` in bytes or in sectors

#### Parameters

track | a BraseroTrack |
blocks | a goffset or NULL |
bytes | a goffset or NULL |

#### Returns

a BraseroBurnResult. BRASERO_BURN_OK if it was successful BRASERO_BURN_NOT_READY if `track` needs more time for processing the size BRASERO_BURN_ERR if something is wrong or if it is empty

### brasero_track_get_track_type ()

    BraseroBurnResult
    brasero_track_get_track_type (BraseroTrack *track,
                                  BraseroTrackType *type);

Sets `type` to reflect the type of data contained in `track`

#### Parameters

track | a BraseroTrack |
type | a BraseroTrackType or NULL |

#### Returns

the BraseroBurnResult of the track

### brasero_track_get_status ()

    BraseroBurnResult
    brasero_track_get_status (BraseroTrack *track,
                              BraseroStatus *status);

Sets `status` to reflect whether `track` is ready to be used

#### Parameters

track | a BraseroTrack |
status | a BraseroTrackStatus |

#### Returns

a BraseroBurnResult. BRASERO_BURN_OK if it was successful BRASERO_BURN_NOT_READY if `track` needs more time for processing BRASERO_BURN_ERR if something is wrong or if it is empty

### brasero_track_set_checksum ()

    BraseroBurnResult
    brasero_track_set_checksum (BraseroTrack *track,
                                BraseroChecksumType type,
                                const gchar *checksum);

Sets a checksum for the track

#### Parameters

track | a BraseroTrack |
type | a BraseroChecksumType |
checksum | a gchar * holding the checksum |

#### Returns

a BraseroBurnResult. BRASERO_BURN_OK if the checksum was previously empty or matches the new one BRASERO_BURN_ERR otherwise

### brasero_track_get_checksum ()

    const gchar *
    brasero_track_get_checksum (BraseroTrack *track);

Get the current checksum (as a string) for the track

#### Parameters

track | a BraseroTrack |

#### Returns

a gchar * (not to be freed) or NULL

### brasero_track_get_checksum_type ()

    BraseroChecksumType
    brasero_track_get_checksum_type (BraseroTrack *track);

Get the current checksum type for the track if any.

#### Parameters

track | a BraseroTrack |

#### Returns

a BraseroChecksumType

### brasero_track_tag_add ()

    BraseroBurnResult
    brasero_track_tag_add (BraseroTrack *track,
                           const gchar *tag,
                           GValue *value);

Associates a new `tag` with a track. This can be used to pass arbitrary information for plugins, like parameters for video discs, ... See brasero-tags.h for a list of knowns tags.

#### Parameters

track | a BraseroTrack |
tag | a gchar * |
value | a GValue |

#### Returns

a BraseroBurnResult. BRASERO_BURN_OK if it was successful, BRASERO_BURN_ERR otherwise.

### brasero_track_tag_lookup ()

    BraseroBurnResult
    brasero_track_tag_lookup (BraseroTrack *track,
                              const gchar *tag,
                              GValue **value);

Retrieves a value associated with `track` through `brasero_track_tag_add()` and stores it in `value` . Do not destroy `value` afterwards as it is not a copy

#### Parameters

track | a BraseroTrack |
tag | a gchar * |
value | a GValue ** |

#### Returns

a BraseroBurnResult. BRASERO_BURN_OK if the retrieval was successful BRASERO_BURN_ERR otherwise

### brasero_track_tag_copy_missing ()

    void
    brasero_track_tag_copy_missing (BraseroTrack *dest,
                                    BraseroTrack *src);

Adds all tags of `dest` to `src` provided they do not already exists.

#### Parameters

dest | a BraseroTrack |
src | a BraseroTrack |

### brasero_track_tag_add_string ()

    BraseroBurnResult
    brasero_track_tag_add_string (BraseroTrack *track,
                                  const gchar *tag,
                                  const gchar *string);

A wrapper around `brasero_track_tag_add()` to associate a string with `track` See also `brasero_track_tag_add()`

#### Parameters

track | a BraseroTrack |
tag | a gchar * |
string | a gchar * |

#### Returns

a BraseroBurnResult. BRASERO_BURN_OK if it was successful, BRASERO_BURN_ERR otherwise.

### brasero_track_tag_lookup_string ()

    const gchar *
    brasero_track_tag_lookup_string (BraseroTrack *track,
                                     const gchar *tag);

Retrieves a string value associated with `track` . This is a wrapper around `brasero_track_tag_lookup()`.

#### Parameters

track | a BraseroTrack |
tag | a gchar * |

#### Returns

a gchar *. The value or NULL otherwise. Do not free the string as it is not a copy.

### brasero_track_tag_add_int ()

    BraseroBurnResult
    brasero_track_tag_add_int (BraseroTrack *track,
                               const gchar *tag,
                               int value);

A wrapper around `brasero_track_tag_add()` to associate a int value with `track` See also `brasero_track_tag_add()`

#### Parameters

track | a BraseroTrack |
tag | a gchar * |
value | a int |

#### Returns

a BraseroBurnResult. BRASERO_BURN_OK if it was successful, BRASERO_BURN_ERR otherwise.

### brasero_track_tag_lookup_int ()

    int
    brasero_track_tag_lookup_int (BraseroTrack *track,
                                  const gchar *tag);

Retrieves a int value associated with `track` . This is a wrapper around `brasero_track_tag_lookup()`.

#### Parameters

track | a BraseroTrack |
tag | a gchar * |

#### Returns

a int; the value or 0 otherwise

## Types and Values

### struct BraseroTrack

    struct BraseroTrack {
    	GObject parent_instance;
    };

### enum BraseroChecksumType

#### Members

BRASERO_CHECKSUM_NONE |  |
BRASERO_CHECKSUM_DETECT |  |
BRASERO_CHECKSUM_MD5 |  |
BRASERO_CHECKSUM_MD5_FILE |  |
BRASERO_CHECKSUM_SHA1 |  |
BRASERO_CHECKSUM_SHA1_FILE |  |
BRASERO_CHECKSUM_SHA256 |  |
BRASERO_CHECKSUM_SHA256_FILE |  |