## BraseroMediumMonitor

BraseroMediumMonitor

## Functions

BraseroMediumMonitor * | brasero_medium_monitor_get_default ()
GSList * | brasero_medium_monitor_get_media ()
GSList * | brasero_medium_monitor_get_drives ()
BraseroDrive * | brasero_medium_monitor_get_drive ()
gboolean | brasero_medium_monitor_is_probing ()

## Signals

void | drive-added | No Recursion
void | drive-removed | No Recursion
void | medium-added | No Recursion
void | medium-removed | No Recursion

## Types and Values

struct | BraseroMediumMonitor
enum | BraseroMediaType
enum | BraseroDriveType

## Object Hierarchy

        GObject
        ╰── BraseroMediumMonitor

## Description

## Functions

### brasero_medium_monitor_get_default ()

    BraseroMediumMonitor *
    brasero_medium_monitor_get_default (void);

Gets the currently active monitor.

#### Returns

a BraseroMediumMonitor. Unref when it is not needed anymore.

### brasero_medium_monitor_get_media ()

    GSList *
    brasero_medium_monitor_get_media (BraseroMediumMonitor *monitor,
                                      BraseroMediaType type);

Obtains the list of available media that are of the given type.

#### Parameters

monitor | a BraseroMediumMonitor |
type | the type of BraseroMedium that should be in the list |

#### Returns

a GSList of BraseroMedium or NULL. The list must be freed and the element unreffed when finished.

[element-type BraseroMedia.Medium][transfer full]

### brasero_medium_monitor_get_drives ()

    GSList *
    brasero_medium_monitor_get_drives (BraseroMediumMonitor *monitor,
                                       BraseroDriveType type);

Gets the list of available drives that are of the given type.

#### Parameters

monitor | a BraseroMediumMonitor |
type | a BraseroDriveType to tell what type of drives to include in the list |

#### Returns

a GSList of BraseroDrive or NULL. The list must be freed and the element unreffed when finished.

[element-type BraseroMedia.Drive][transfer full]

### brasero_medium_monitor_get_drive ()

    BraseroDrive *
    brasero_medium_monitor_get_drive (BraseroMediumMonitor *monitor,
                                      const gchar *device);

Returns the BraseroDrive object whose path is `path` .

#### Parameters

monitor | a BraseroMediumMonitor |
device | the path of the device |

#### Returns

a BraseroDrive or NULL. It should be unreffed when no longer in use.

### brasero_medium_monitor_is_probing ()

    gboolean
    brasero_medium_monitor_is_probing (BraseroMediumMonitor *monitor);

Returns if the library is still probing some other media.

#### Parameters

monitor | a BraseroMediumMonitor |

#### Returns

`TRUE` if it is still probing some media

## Types and Values

### struct BraseroMediumMonitor

    struct BraseroMediumMonitor;

### enum BraseroMediaType

#### Members

BRASERO_MEDIA_TYPE_NONE |  |
BRASERO_MEDIA_TYPE_FILE |  |
BRASERO_MEDIA_TYPE_DATA |  |
BRASERO_MEDIA_TYPE_AUDIO |  |
BRASERO_MEDIA_TYPE_WRITABLE |  |
BRASERO_MEDIA_TYPE_REWRITABLE |  |
BRASERO_MEDIA_TYPE_ANY_IN_BURNER |  |
BRASERO_MEDIA_TYPE_CD |  |
BRASERO_MEDIA_TYPE_ALL_BUT_FILE |  |
BRASERO_MEDIA_TYPE_ALL |  |

### enum BraseroDriveType

#### Members

BRASERO_DRIVE_TYPE_NONE |  |
BRASERO_DRIVE_TYPE_FILE |  |
BRASERO_DRIVE_TYPE_WRITER |  |
BRASERO_DRIVE_TYPE_READER |  |
BRASERO_DRIVE_TYPE_ALL_BUT_FILE |  |
BRASERO_DRIVE_TYPE_ALL |  |

## Signal Details

### The `“drive-added”` signal

    void
    user_function (BraseroMediumMonitor *monitor,
                   BraseroDrive         *medium,
                   gpointer              user_data)

This signal gets emitted when a new drive was detected

#### Parameters

monitor | the object which received the signal |
medium | the new medium which was added |
user_data | user data set when the signal handler was connected. |

Flags: No Recursion

### The `“drive-removed”` signal

    void
    user_function (BraseroMediumMonitor *monitor,
                   BraseroDrive         *medium,
                   gpointer              user_data)

This signal gets emitted when a drive is not longer available

#### Parameters

monitor | the object which received the signal |
medium | the medium which was removed |
user_data | user data set when the signal handler was connected. |

Flags: No Recursion

### The `“medium-added”` signal

    void
    user_function (BraseroMediumMonitor *monitor,
                   BraseroMedium        *medium,
                   gpointer              user_data)

This signal gets emitted when a new medium was detected

#### Parameters

monitor | the object which received the signal |
medium | the new medium which was added |
user_data | user data set when the signal handler was connected. |

Flags: No Recursion

### The `“medium-removed”` signal

    void
    user_function (BraseroMediumMonitor *monitor,
                   BraseroMedium        *medium,
                   gpointer              user_data)

This signal gets emitted when a medium is not longer available

#### Parameters

monitor | the object which received the signal |
medium | the medium which was removed |
user_data | user data set when the signal handler was connected. |

Flags: No Recursion