BraseroMediumMonitor
3
BRASERO Library

# BraseroMediumMonitor

## Synopsis

                        BraseroMediumMonitor;
    BraseroMediumMonitor * brasero_medium_monitor_get_default
                                                            (void);
    enum                BraseroMediaType;
    enum                BraseroDriveType;
    GSList *            brasero_medium_monitor_get_media    (BraseroMediumMonitor *monitor,
                                                             BraseroMediaType type);
    GSList *            brasero_medium_monitor_get_drives   (BraseroMediumMonitor *monitor,
                                                             BraseroDriveType type);
    BraseroDrive *      brasero_medium_monitor_get_drive    (BraseroMediumMonitor *monitor,
                                                             const gchar *device);
    gboolean            brasero_medium_monitor_is_probing   (BraseroMediumMonitor *monitor);

## Object Hierarchy

      GObject
       +----BraseroMediumMonitor

## Signals

      "drive-added"                                    : Run Last / No Recursion
      "drive-removed"                                  : Run Last / No Recursion
      "medium-added"                                   : Run Last / No Recursion
      "medium-removed"                                 : Run Last / No Recursion

## Description

## Details

### BraseroMediumMonitor

    typedef struct _BraseroMediumMonitor BraseroMediumMonitor;

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

### enum BraseroMediaType

    typedef enum {
    	BRASERO_MEDIA_TYPE_NONE				= 0,
    	BRASERO_MEDIA_TYPE_FILE				= 1,
    	BRASERO_MEDIA_TYPE_DATA				= 1 << 1,
    	BRASERO_MEDIA_TYPE_AUDIO			= 1 << 2,
    	BRASERO_MEDIA_TYPE_WRITABLE			= 1 << 3,
    	BRASERO_MEDIA_TYPE_REWRITABLE			= 1 << 4,
    	BRASERO_MEDIA_TYPE_ANY_IN_BURNER		= 1 << 5,
    	BRASERO_MEDIA_TYPE_ALL_BUT_FILE			= 0xFE,
    	BRASERO_MEDIA_TYPE_ALL				= 0xFF
    } BraseroMediaType;

### enum BraseroDriveType

    typedef enum {
    	BRASERO_DRIVE_TYPE_NONE				= 0,
    	BRASERO_DRIVE_TYPE_FILE				= 1,
    	BRASERO_DRIVE_TYPE_WRITER			= 1 << 1,
    	BRASERO_DRIVE_TYPE_READER			= 1 << 2,
    	BRASERO_DRIVE_TYPE_ALL_BUT_FILE			= 0xFE,
    	BRASERO_DRIVE_TYPE_ALL				= 0xFF
    } BraseroDriveType;

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

`monitor` :

  a BraseroMediumMonitor

`type` :

  the type of BraseroMedium that should be in the list

Returns :

  a GSList or NULL

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

`monitor` :

  a BraseroMediumMonitor

`type` :

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

Returns :

  a GSList or NULL

### brasero_medium_monitor_get_drive ()

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

Returns the BraseroDrive object whose path is `path`.

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

`monitor` :

  a BraseroMediumMonitor

Returns :

  `TRUE` if it is still probing some media

## Signal Details

### The `"drive-added"` signal

    void                user_function                      (BraseroMediumMonitor *monitor,
                                                            BraseroDrive         *medium,
                                                            gpointer              user_data)      : Run Last / No Recursion

This signal gets emitted when a new drive was detected

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

### The `"drive-removed"` signal

    void                user_function                      (BraseroMediumMonitor *monitor,
                                                            BraseroDrive         *medium,
                                                            gpointer              user_data)      : Run Last / No Recursion

This signal gets emitted when a drive is not longer available

`monitor` :

  the object which received the signal

`medium` :

  the medium which was removed

`user_data` :

  user data set when the signal handler was connected.

### The `"medium-added"` signal

    void                user_function                      (BraseroMediumMonitor *monitor,
                                                            BraseroMedium        *medium,
                                                            gpointer              user_data)      : Run Last / No Recursion

This signal gets emitted when a new medium was detected

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

### The `"medium-removed"` signal

    void                user_function                      (BraseroMediumMonitor *monitor,
                                                            BraseroMedium        *medium,
                                                            gpointer              user_data)      : Run Last / No Recursion

This signal gets emitted when a medium is not longer available

`monitor` :

  the object which received the signal

`medium` :

  the medium which was removed

`user_data` :

  user data set when the signal handler was connected.