BraseroTrack

## BraseroTrack BraseroTrack |

## Synopsis

                        BraseroTrack;
    void                brasero_track_changed               (BraseroTrack *track);
    BraseroBurnResult   brasero_track_get_size              (BraseroTrack *track,
                                                             goffset *blocks,
                                                             goffset *bytes);
    BraseroBurnResult   brasero_track_get_track_type        (BraseroTrack *track,
                                                             BraseroTrackType *type);
    BraseroBurnResult   brasero_track_get_status            (BraseroTrack *track,
                                                             BraseroStatus *status);
    enum                BraseroChecksumType;
    BraseroBurnResult   brasero_track_set_checksum          (BraseroTrack *track,
                                                             BraseroChecksumType type,
                                                             const gchar *checksum);
    const gchar *       brasero_track_get_checksum          (BraseroTrack *track);
    BraseroChecksumType  brasero_track_get_checksum_type    (BraseroTrack *track);
    BraseroBurnResult   brasero_track_tag_add               (BraseroTrack *track,
                                                             const gchar *tag,
                                                             GValue *value);
    BraseroBurnResult   brasero_track_tag_lookup            (BraseroTrack *track,
                                                             const gchar *tag,
                                                             GValue **value);
    void                brasero_track_tag_copy_missing      (BraseroTrack *dest,
                                                             BraseroTrack *src);
    BraseroBurnResult   brasero_track_tag_add_string        (BraseroTrack *track,
                                                             const gchar *tag,
                                                             const gchar *string);
    const gchar *       brasero_track_tag_lookup_string     (BraseroTrack *track,
                                                             const gchar *tag);
    BraseroBurnResult   brasero_track_tag_add_int           (BraseroTrack *track,
                                                             const gchar *tag,
                                                             int value);
    int                 brasero_track_tag_lookup_int        (BraseroTrack *track,
                                                             const gchar *tag);

## Description

## Details

### BraseroTrack

    typedef struct {
    	GObject parent_instance;
    } BraseroTrack;

### brasero_track_changed ()

    void                brasero_track_changed               (BraseroTrack *track);

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

`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

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

`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

`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

### enum BraseroChecksumType

    typedef enum {
    	BRASERO_CHECKSUM_NONE			= 0,
    	BRASERO_CHECKSUM_DETECT			= 1,		/* means the plugin handles detection of checksum type */
    	BRASERO_CHECKSUM_MD5			= 1 << 1,
    	BRASERO_CHECKSUM_MD5_FILE		= 1 << 2,
    	BRASERO_CHECKSUM_SHA1			= 1 << 3,
    	BRASERO_CHECKSUM_SHA1_FILE		= 1 << 4,
    	BRASERO_CHECKSUM_SHA256			= 1 << 5,
    	BRASERO_CHECKSUM_SHA256_FILE		= 1 << 6,
    } BraseroChecksumType;

### brasero_track_set_checksum ()

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

Sets a checksum for the track

`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

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

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

`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

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

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

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

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

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

`track` : | a BraseroTrack
`tag` : | a gchar *
Returns : | a int; the value or 0 otherwise