## BurnerTrack

BurnerTrack

## Functions

void | burner_track_changed ()
BurnerBurnResult | burner_track_get_size ()
BurnerBurnResult | burner_track_get_track_type ()
BurnerBurnResult | burner_track_get_status ()
BurnerBurnResult | burner_track_set_checksum ()
const gchar * | burner_track_get_checksum ()
BurnerChecksumType | burner_track_get_checksum_type ()
BurnerBurnResult | burner_track_tag_add ()
BurnerBurnResult | burner_track_tag_lookup ()
void | burner_track_tag_copy_missing ()
BurnerBurnResult | burner_track_tag_add_string ()
const gchar * | burner_track_tag_lookup_string ()
BurnerBurnResult | burner_track_tag_add_int ()
int | burner_track_tag_lookup_int ()

## Types and Values

struct | BurnerTrack
enum | BurnerChecksumType

## Description

## Functions

### burner_track_changed ()

    void
    burner_track_changed (BurnerTrack *track);

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

#### Parameters

track | a BurnerTrack |

### burner_track_get_size ()

    BurnerBurnResult
    burner_track_get_size (BurnerTrack *track,
                           goffset *blocks,
                           goffset *bytes);

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

#### Parameters

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

#### Returns

a BurnerBurnResult. BURNER_BURN_OK if it was successful BURNER_BURN_NOT_READY if `track` needs more time for processing the size BURNER_BURN_ERR if something is wrong or if it is empty

### burner_track_get_track_type ()

    BurnerBurnResult
    burner_track_get_track_type (BurnerTrack *track,
                                 BurnerTrackType *type);

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

#### Parameters

track | a BurnerTrack |
type | a BurnerTrackType or NULL |

#### Returns

the BurnerBurnResult of the track

### burner_track_get_status ()

    BurnerBurnResult
    burner_track_get_status (BurnerTrack *track,
                             BurnerStatus *status);

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

#### Parameters

track | a BurnerTrack |
status | a BurnerTrackStatus |

#### Returns

a BurnerBurnResult. BURNER_BURN_OK if it was successful BURNER_BURN_NOT_READY if `track` needs more time for processing BURNER_BURN_ERR if something is wrong or if it is empty

### burner_track_set_checksum ()

    BurnerBurnResult
    burner_track_set_checksum (BurnerTrack *track,
                               BurnerChecksumType type,
                               const gchar *checksum);

Sets a checksum for the track

#### Parameters

track | a BurnerTrack |
type | a BurnerChecksumType |
checksum | a gchar * holding the checksum |

#### Returns

a BurnerBurnResult. BURNER_BURN_OK if the checksum was previously empty or matches the new one BURNER_BURN_ERR otherwise

### burner_track_get_checksum ()

    const gchar *
    burner_track_get_checksum (BurnerTrack *track);

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

#### Parameters

track | a BurnerTrack |

#### Returns

a gchar * (not to be freed) or NULL

### burner_track_get_checksum_type ()

    BurnerChecksumType
    burner_track_get_checksum_type (BurnerTrack *track);

Get the current checksum type for the track if any.

#### Parameters

track | a BurnerTrack |

#### Returns

a BurnerChecksumType

### burner_track_tag_add ()

    BurnerBurnResult
    burner_track_tag_add (BurnerTrack *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 burner-tags.h for a list of knowns tags.

#### Parameters

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

#### Returns

a BurnerBurnResult. BURNER_BURN_OK if it was successful, BURNER_BURN_ERR otherwise.

### burner_track_tag_lookup ()

    BurnerBurnResult
    burner_track_tag_lookup (BurnerTrack *track,
                             const gchar *tag,
                             GValue **value);

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

#### Parameters

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

#### Returns

a BurnerBurnResult. BURNER_BURN_OK if the retrieval was successful BURNER_BURN_ERR otherwise

### burner_track_tag_copy_missing ()

    void
    burner_track_tag_copy_missing (BurnerTrack *dest,
                                   BurnerTrack *src);

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

#### Parameters

dest | a BurnerTrack |
src | a BurnerTrack |

### burner_track_tag_add_string ()

    BurnerBurnResult
    burner_track_tag_add_string (BurnerTrack *track,
                                 const gchar *tag,
                                 const gchar *string);

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

#### Parameters

track | a BurnerTrack |
tag | a gchar * |
string | a gchar * |

#### Returns

a BurnerBurnResult. BURNER_BURN_OK if it was successful, BURNER_BURN_ERR otherwise.

### burner_track_tag_lookup_string ()

    const gchar *
    burner_track_tag_lookup_string (BurnerTrack *track,
                                    const gchar *tag);

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

#### Parameters

track | a BurnerTrack |
tag | a gchar * |

#### Returns

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

### burner_track_tag_add_int ()

    BurnerBurnResult
    burner_track_tag_add_int (BurnerTrack *track,
                              const gchar *tag,
                              int value);

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

#### Parameters

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

#### Returns

a BurnerBurnResult. BURNER_BURN_OK if it was successful, BURNER_BURN_ERR otherwise.

### burner_track_tag_lookup_int ()

    int
    burner_track_tag_lookup_int (BurnerTrack *track,
                                 const gchar *tag);

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

#### Parameters

track | a BurnerTrack |
tag | a gchar * |

#### Returns

a int; the value or 0 otherwise

## Types and Values

### struct BurnerTrack

    struct BurnerTrack {
    	GObject parent_instance;
    };

### enum BurnerChecksumType

#### Members

BURNER_CHECKSUM_NONE |  |
BURNER_CHECKSUM_DETECT |  |
BURNER_CHECKSUM_MD5 |  |
BURNER_CHECKSUM_MD5_FILE |  |
BURNER_CHECKSUM_SHA1 |  |
BURNER_CHECKSUM_SHA1_FILE |  |
BURNER_CHECKSUM_SHA256 |  |
BURNER_CHECKSUM_SHA256_FILE |  |