## OGMDvdDrive OGMDvdDrive — An object representing an Optical Drive |

## Synopsis

    #include <ogmdvd-drive.h>

    struct              OGMDvdDrive;
    const gchar *       ogmdvd_drive_get_device             (OGMDvdDrive *drive);
    GDrive *            ogmdvd_drive_get_gdrive             (OGMDvdDrive *drive);
    gchar *             ogmdvd_drive_get_name               (OGMDvdDrive *drive);
    gint                ogmdvd_drive_get_drive_type         (OGMDvdDrive *drive);
    gint                ogmdvd_drive_get_medium_type        (OGMDvdDrive *drive);
    void                ogmdvd_drive_load                   (OGMDvdDrive *drive);
    gboolean            ogmdvd_drive_can_eject              (OGMDvdDrive *drive);
    void                ogmdvd_drive_eject                  (OGMDvdDrive *drive);
    gboolean            ogmdvd_drive_is_door_open           (OGMDvdDrive *drive);
    gboolean            ogmdvd_drive_lock                   (OGMDvdDrive *drive);
    gboolean            ogmdvd_drive_unlock                 (OGMDvdDrive *drive);

## Description

## Details

### struct OGMDvdDrive

    struct OGMDvdDrive {
      GObject parent_instance;

      OGMDvdDrivePriv *priv;
    };

### ogmdvd_drive_get_device ()

    const gchar *       ogmdvd_drive_get_device             (OGMDvdDrive *drive);

Gets the name of the device associated with the drive.

`drive` : | OGMDvdDrive
Returns : | the name of the device (must be not be freed).

### ogmdvd_drive_get_gdrive ()

    GDrive *            ogmdvd_drive_get_gdrive             (OGMDvdDrive *drive);

Gets the GDrive associated to `drive`.

`drive` : | OGMDvdDrive
Returns : | a GDrive, or NULL

### ogmdvd_drive_get_name ()

    gchar *             ogmdvd_drive_get_name               (OGMDvdDrive *drive);

Gets the name of the drive for use in a user interface

`drive` : | OGMDvdDrive
Returns : | the name of the drive (must be freed with `g_free()`)

### ogmdvd_drive_get_drive_type ()

    gint                ogmdvd_drive_get_drive_type         (OGMDvdDrive *drive);

Gets the type of the drive.

`drive` : | OGMDvdDrive
Returns : | the type of drive, or -1

### ogmdvd_drive_get_medium_type ()

    gint                ogmdvd_drive_get_medium_type        (OGMDvdDrive *drive);

Gets the type of the medium in `drive`.

`drive` : | OGMDvdDrive
Returns : | The OGMDvdMediumType of the media in the drive or the following special values: `OGMDVD_MEDIA_TYPE_UNKNOWN` if the type can not be determined `OGMDVD_MEDIA_TYPE_NONE` if no medium is present

### ogmdvd_drive_load ()

    void                ogmdvd_drive_load                   (OGMDvdDrive *drive);

Loads a drive.

`drive` : | OGMDvdDrive

### ogmdvd_drive_can_eject ()

    gboolean            ogmdvd_drive_can_eject              (OGMDvdDrive *drive);

Checks if a drive can be ejected.

`drive` : | OGMDvdDrive
Returns : | `TRUE` if the drive can be ejected, FALSE otherwise.

### ogmdvd_drive_eject ()

    void                ogmdvd_drive_eject                  (OGMDvdDrive *drive);

Ejects a drive.

`drive` : | OGMDvdDrive

### ogmdvd_drive_is_door_open ()

    gboolean            ogmdvd_drive_is_door_open           (OGMDvdDrive *drive);

Reports whether the drive door or tray is open.

`drive` : | OGMDvdDrive
Returns : | `TRUE` if the drive door is open, `FALSE` otherwise.

### ogmdvd_drive_lock ()

    gboolean            ogmdvd_drive_lock                   (OGMDvdDrive *drive);

Locks a drive.

`drive` : | OGMDvdDrive
Returns : | `TRUE` if the drive has been locked, `FALSE` otherwise

### ogmdvd_drive_unlock ()

    gboolean            ogmdvd_drive_unlock                 (OGMDvdDrive *drive);

Unlocks a drive.

`drive` : | OGMDvdDrive
Returns : | `TRUE` if the drive has been unlocked, `FALSE` otherwise