OGMDvd Reference Manual: OGMDvdDrive

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

## Functions

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

## Types and Values

struct | OGMDvdDrive

## Object Hierarchy

## Includes

    #include <ogmdvd-drive.h>

## Description

## Functions

### ogmdvd_drive_get_device ()

    const gchar *
    ogmdvd_drive_get_device (OGMDvdDrive *drive);

Gets the name of the device associated with the drive.

#### Parameters

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

#### Parameters

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

#### Parameters

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.

#### Parameters

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

#### Parameters

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.

#### Parameters

drive | OGMDvdDrive |

### ogmdvd_drive_can_eject ()

    gboolean
    ogmdvd_drive_can_eject (OGMDvdDrive *drive);

Checks if a drive can be ejected.

#### Parameters

drive | OGMDvdDrive |

#### Returns

`TRUE` if the drive can be ejected, FALSE otherwise.

### ogmdvd_drive_eject ()

    void
    ogmdvd_drive_eject (OGMDvdDrive *drive);

Ejects a drive.

#### Parameters

drive | OGMDvdDrive |

### ogmdvd_drive_is_door_open ()

    gboolean
    ogmdvd_drive_is_door_open (OGMDvdDrive *drive);

Reports whether the drive door or tray is open.

#### Parameters

drive | OGMDvdDrive |

#### Returns

`TRUE` if the drive door is open, `FALSE` otherwise.

### ogmdvd_drive_lock ()

    gboolean
    ogmdvd_drive_lock (OGMDvdDrive *drive);

Locks a drive.

#### Parameters

drive | OGMDvdDrive |

#### Returns

`TRUE` if the drive has been locked, `FALSE` otherwise

### ogmdvd_drive_unlock ()

    gboolean
    ogmdvd_drive_unlock (OGMDvdDrive *drive);

Unlocks a drive.

#### Parameters

drive | OGMDvdDrive |

#### Returns

`TRUE` if the drive has been unlocked, `FALSE` otherwise

## Types and Values

### struct OGMDvdDrive

    struct OGMDvdDrive {
      GObject parent_instance;

      OGMDvdDrivePriv *priv;
    };