BraseroMedium

## BraseroMedium BraseroMedium |

## Synopsis

                        BraseroMedium;
    BraseroMedia        brasero_medium_get_status           (BraseroMedium *medium);
    guint64             brasero_medium_get_max_write_speed  (BraseroMedium *medium);
    guint64 *           brasero_medium_get_write_speeds     (BraseroMedium *medium);
    void                brasero_medium_get_free_space       (BraseroMedium *medium,
                                                             goffset *bytes,
                                                             goffset *blocks);
    void                brasero_medium_get_capacity         (BraseroMedium *medium,
                                                             goffset *bytes,
                                                             goffset *blocks);
    void                brasero_medium_get_data_size        (BraseroMedium *medium,
                                                             goffset *bytes,
                                                             goffset *blocks);
    gint64              brasero_medium_get_next_writable_address
                                                            (BraseroMedium *medium);
    gboolean            brasero_medium_can_be_rewritten     (BraseroMedium *medium);
    gboolean            brasero_medium_can_be_written       (BraseroMedium *medium);
    const gchar *       brasero_medium_get_CD_TEXT_title    (BraseroMedium *medium);
    const gchar *       brasero_medium_get_type_string      (BraseroMedium *medium);
    gchar *             brasero_medium_get_tooltip          (BraseroMedium *medium);
    BraseroDrive *      brasero_medium_get_drive            (BraseroMedium *medium);
    guint               brasero_medium_get_track_num        (BraseroMedium *medium);
    gboolean            brasero_medium_get_last_data_track_space
                                                            (BraseroMedium *medium,
                                                             goffset *bytes,
                                                             goffset *sectors);
    gboolean            brasero_medium_get_last_data_track_address
                                                            (BraseroMedium *medium,
                                                             goffset *bytes,
                                                             goffset *sectors);
    gboolean            brasero_medium_get_track_space      (BraseroMedium *medium,
                                                             guint num,
                                                             goffset *bytes,
                                                             goffset *sectors);
    gboolean            brasero_medium_get_track_address    (BraseroMedium *medium,
                                                             guint num,
                                                             goffset *bytes,
                                                             goffset *sectors);
    gboolean            brasero_medium_can_use_dummy_for_sao
                                                            (BraseroMedium *medium);
    gboolean            brasero_medium_can_use_dummy_for_tao
                                                            (BraseroMedium *medium);
    gboolean            brasero_medium_can_use_burnfree     (BraseroMedium *medium);

## Description

## Details

### BraseroMedium

    typedef struct {
    	GObject parent_instance;
    } BraseroMedium;

Represents a physical medium currently inserted in a BraseroDrive.

### brasero_medium_get_status ()

    BraseroMedia        brasero_medium_get_status           (BraseroMedium *medium);

Gets the medium type and state.

`medium` : | BraseroMedium
Returns : | a BraseroMedia.

### brasero_medium_get_max_write_speed ()

    guint64             brasero_medium_get_max_write_speed  (BraseroMedium *medium);

Gets the maximum speed that can be used to write to `medium`. Note: the speed are in B/sec.

`medium` : | BraseroMedium
Returns : | a guint64.

### brasero_medium_get_write_speeds ()

    guint64 *           brasero_medium_get_write_speeds     (BraseroMedium *medium);

Gets an array holding all possible speeds to write to `medium`. Note: the speed are in B/sec.

`medium` : | BraseroMedium
Returns : | a guint64 *.

### brasero_medium_get_free_space ()

    void                brasero_medium_get_free_space       (BraseroMedium *medium,
                                                             goffset *bytes,
                                                             goffset *blocks);

Stores in either `size` (in bytes) or `blocks` (the number of blocks) the space on the disc that can be used for writing.

`medium` : | BraseroMedium
`bytes` : | a gint64 * or NULL
`blocks` : | a gint64 * or NULL

### brasero_medium_get_capacity ()

    void                brasero_medium_get_capacity         (BraseroMedium *medium,
                                                             goffset *bytes,
                                                             goffset *blocks);

Stores in either `size` (in bytes) or `blocks` (the number of blocks) the total disc space. Note that when the disc is closed this space is the one occupied by data. Otherwise it is the sum of free and used space.

`medium` : | BraseroMedium
`bytes` : | a gint64 * or NULL
`blocks` : | a gint64 * or NULL

### brasero_medium_get_data_size ()

    void                brasero_medium_get_data_size        (BraseroMedium *medium,
                                                             goffset *bytes,
                                                             goffset *blocks);

Stores in either `size` (in bytes) or `blocks` (the number of blocks) the size used to store data (including audio on CDs) on the disc.

`medium` : | BraseroMedium
`bytes` : | a gint64 * or NULL
`blocks` : | a gint64 * or NULL

### brasero_medium_get_next_writable_address ()

    gint64              brasero_medium_get_next_writable_address
                                                            (BraseroMedium *medium);

Gets the address (block number) that can be used to write a new session on `medium`

`medium` : | BraseroMedium
Returns : | a gint64.

### brasero_medium_can_be_rewritten ()

    gboolean            brasero_medium_can_be_rewritten     (BraseroMedium *medium);

Gets whether the medium can be rewritten. Note: it also checks that the drive can rewrite the medium type.

`medium` : | BraseroMedium
Returns : | a gboolean. TRUE if the medium can be rewritten, FALSE otherwise.

### brasero_medium_can_be_written ()

    gboolean            brasero_medium_can_be_written       (BraseroMedium *medium);

Gets whether the medium can be written. It also checks that the medium can write the medium.

`medium` : | BraseroMedium
Returns : | a gboolean. TRUE if the medium can be rewritten, FALSE otherwise.

### brasero_medium_get_CD_TEXT_title ()

    const gchar *       brasero_medium_get_CD_TEXT_title    (BraseroMedium *medium);

Gets the CD-TEXT title for `Medium`.

`medium` : | BraseroMedium
Returns : | a gchar *.

### brasero_medium_get_type_string ()

    const gchar *       brasero_medium_get_type_string      (BraseroMedium *medium);

Returns the medium type as a string to be displayed in a UI.

`medium` : | BraseroMedium
Returns : | a gchar *.

### brasero_medium_get_tooltip ()

    gchar *             brasero_medium_get_tooltip          (BraseroMedium *medium);

Returns a tooltip to be displayed in the UI. It is of the form {content type} {disc type} in {drive name}.

`medium` : | BraseroMedium
Returns : | a gchar *.

### brasero_medium_get_drive ()

    BraseroDrive *      brasero_medium_get_drive            (BraseroMedium *medium);

Gets the BraseroDrive in which the medium is inserted.

`medium` : | BraseroMedium
Returns : | a BraseroDrive. No need to unref after use. [transfer none]

### brasero_medium_get_track_num ()

    guint               brasero_medium_get_track_num        (BraseroMedium *medium);

Gets the number of tracks on the medium.

`medium` : | BraseroMedium
Returns : | a guint.

### brasero_medium_get_last_data_track_space ()

    gboolean            brasero_medium_get_last_data_track_space
                                                            (BraseroMedium *medium,
                                                             goffset *bytes,
                                                             goffset *sectors);

Stores in either `bytes` (in bytes) or in `sectors` (in blocks) the space used by the last track on the medium.

`medium` : | BraseroMedium
`bytes` : | a goffset * or NULL
`sectors` : | a goffset * or NULL
Returns : | a gboolean. Returns TRUE if information could be retrieved.

### brasero_medium_get_last_data_track_address ()

    gboolean            brasero_medium_get_last_data_track_address
                                                            (BraseroMedium *medium,
                                                             goffset *bytes,
                                                             goffset *sectors);

Stores in either `bytes` (in bytes) or in `sectors` (in blocks) the address where the last session starts. This is useful when creating a multisession image or when reading the contents of this last track.

`medium` : | BraseroMedium
`bytes` : | a goffset * or NULL
`sectors` : | a goffset * or NULL
Returns : | a gboolean. Returns TRUE if information could be retrieved.

### brasero_medium_get_track_space ()

    gboolean            brasero_medium_get_track_space      (BraseroMedium *medium,
                                                             guint num,
                                                             goffset *bytes,
                                                             goffset *sectors);

Stores in either `bytes` (in bytes) or in `sectors` (in blocks) the space used by session `num` on the disc.

`medium` : | a BraseroMedium
`num` : | a guint
`bytes` : | a goffset * or NULL
`sectors` : | a goffset * or NULL
Returns : | a gboolean. Returns TRUE if information could be retrieved; FALSE otherwise (usually when track `num` doesn't exist).

### brasero_medium_get_track_address ()

    gboolean            brasero_medium_get_track_address    (BraseroMedium *medium,
                                                             guint num,
                                                             goffset *bytes,
                                                             goffset *sectors);

Stores in either `bytes` (in bytes) or in `sectors` (in blocks) the address at which the session identified by `num` starts.

`medium` : | a BraseroMedium
`num` : | a guint
`bytes` : | a goffset * or NULL
`sectors` : | a goffset * or NULL
Returns : | a gboolean. Returns TRUE if information could be retrieved; FALSE otherwise (usually when track `num` doesn't exist).

### brasero_medium_can_use_dummy_for_sao ()

    gboolean            brasero_medium_can_use_dummy_for_sao
                                                            (BraseroMedium *medium);

Gets whether the medium supports doing a test write with SAO on.

`medium` : | BraseroMedium
Returns : | a gboolean. TRUE if the medium can use SAO write mode during a test write, FALSE otherwise.

### brasero_medium_can_use_dummy_for_tao ()

    gboolean            brasero_medium_can_use_dummy_for_tao
                                                            (BraseroMedium *medium);

Gets whether the medium supports doing a test write with TAO on.

`medium` : | BraseroMedium
Returns : | a gboolean. TRUE if the medium can use TAO write mode during a test write, FALSE otherwise.

### brasero_medium_can_use_burnfree ()

    gboolean            brasero_medium_can_use_burnfree     (BraseroMedium *medium);

Gets whether the medium supports any burnfree technology.

`medium` : | BraseroMedium
Returns : | a gboolean. TRUE if the medium can use any burnfree technology, FALSE otherwise.