OGMDvdDrive

OGMDvdDrive — An object representing an Optical Drive

Synopsis


#include <ogmdvd-drive.h>

                    OGMDvdDrive;
gboolean            ogmdvd_drive_door_is_open           (OGMDvdDrive *drive);
gboolean            ogmdvd_drive_eject                  (OGMDvdDrive *drive);
const gchar*        ogmdvd_drive_get_device             (OGMDvdDrive *drive);
gchar*              ogmdvd_drive_get_display_name       (OGMDvdDrive *drive);
gint                ogmdvd_drive_get_drive_type         (OGMDvdDrive *drive);
GList*              ogmdvd_drive_get_list               (void);
gint                ogmdvd_drive_get_media_type         (OGMDvdDrive *drive);
gboolean            ogmdvd_drive_get_monitor_enabled    (OGMDvdDrive *drive);
OGMDvdDrive*        ogmdvd_drive_new                    (void);
OGMDvdDrive*        ogmdvd_drive_new_from_path          (const gchar *device);
void                ogmdvd_drive_set_monitor_enabled    (OGMDvdDrive *drive,
                                                         gboolean enabled);

Description

Details

OGMDvdDrive

typedef struct {
  GObject parent_instance;

  OGMDvdDrivePriv *priv;
} OGMDvdDrive;


ogmdvd_drive_door_is_open ()

gboolean            ogmdvd_drive_door_is_open           (OGMDvdDrive *drive);

Report the whether the drive door or tray is open.

drive :

OGMDvdDrive

Returns :

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

ogmdvd_drive_eject ()

gboolean            ogmdvd_drive_eject                  (OGMDvdDrive *drive);

Eject media from a OGMDvdDrive.

drive :

OGMDvdDrive

Returns :

TRUE if the media was sucessfully ejected, FALSE otherwise.

ogmdvd_drive_get_device ()

const gchar*        ogmdvd_drive_get_device             (OGMDvdDrive *drive);

Get the name of the device associated with the drive.

drive :

OGMDvdDrive

Returns :

device name. Must be not be freed.

ogmdvd_drive_get_display_name ()

gchar*              ogmdvd_drive_get_display_name       (OGMDvdDrive *drive);

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

drive :

OGMDvdDrive

Returns :

name of the drive. Must be freed with g_free().

ogmdvd_drive_get_drive_type ()

gint                ogmdvd_drive_get_drive_type         (OGMDvdDrive *drive);

Get the type of the drive.

drive :

OGMDvdDrive

Returns :

type of drive

ogmdvd_drive_get_list ()

GList*              ogmdvd_drive_get_list               (void);

Get the list of available OGMDvdDrive

Returns :

list of drives

ogmdvd_drive_get_media_type ()

gint                ogmdvd_drive_get_media_type         (OGMDvdDrive *drive);

Determine the type of the media in the drive drive.

drive :

OGMDvdDrive

Returns :

The OGMDvdMediaType of the media in the drive or the following special values: OGMDVD_MEDIA_TYPE_ERROR if the type can not be determined OGMDVD_MEDIA_TYPE_UNKNOWN if the type can not be determined OGMDVD_MEDIA_TYPE_BUSY if the device is busy

ogmdvd_drive_get_monitor_enabled ()

gboolean            ogmdvd_drive_get_monitor_enabled    (OGMDvdDrive *drive);

Gets whether the drive is monitored.

drive :

OGMDvdDrive

Returns :

TRUE if drive is monitored.

ogmdvd_drive_new ()

OGMDvdDrive*        ogmdvd_drive_new                    (void);

Create a new OGMDvdDrive.

Returns :

The new drive.

ogmdvd_drive_new_from_path ()

OGMDvdDrive*        ogmdvd_drive_new_from_path          (const gchar *device);

Creates a OGMDvdDrive that corresponds to device.

device :

device path

Returns :

A new drive.

ogmdvd_drive_set_monitor_enabled ()

void                ogmdvd_drive_set_monitor_enabled    (OGMDvdDrive *drive,
                                                         gboolean enabled);

Sets whether to monitor drive.

drive :

OGMDvdDrive

enabled :

TRUE to enable monitoring