Search
lxdream.org :: lxdream/src/gdrom/gdrom.h :: diff
lxdream 0.9.1
released Jun 29
Download Now
filename src/gdrom/gdrom.h
changeset 709:18c39a8e504c
prev678:35eb00945316
next720:b5594d1ac80a
author nkeynes
date Wed Jun 25 10:40:45 2008 +0000 (15 years ago)
permissions -rw-r--r--
last change Commit OSX CD-ROM driver work-in-progress
file annotate diff log raw
1.1 --- a/src/gdrom/gdrom.h Thu May 29 11:00:26 2008 +0000
1.2 +++ b/src/gdrom/gdrom.h Wed Jun 25 10:40:45 2008 +0000
1.3 @@ -26,6 +26,14 @@
1.4
1.5 typedef uint16_t gdrom_error_t;
1.6
1.7 +
1.8 +struct gdrom_device {
1.9 + char *name; // internal name
1.10 + char *device_name; // Human-readable device name
1.11 +};
1.12 +
1.13 +typedef struct gdrom_device *gdrom_device_t;
1.14 +
1.15 typedef struct gdrom_disc *gdrom_disc_t;
1.16
1.17 typedef gboolean (*gdrom_disc_change_hook_t)( gdrom_disc_t new_disc, const gchar *new_disc_name, void *user_data );
1.18 @@ -59,8 +67,6 @@
1.19
1.20 const gchar *gdrom_get_current_disc_name();
1.21
1.22 -GList *gdrom_get_native_devices();
1.23 -
1.24 uint32_t gdrom_read_sectors( uint32_t sector, uint32_t sector_count,
1.25 int mode, unsigned char *buf, uint32_t *length );
1.26
1.27 @@ -80,4 +86,26 @@
1.28
1.29 uint8_t gdrom_get_track_no_by_lba( uint32_t lba );
1.30
1.31 +
1.32 +/**
1.33 + * Native CD-ROM API - provided by drivers/cd_*.c
1.34 + *
1.35 + * A device name is either a system special file (most unixes) or a url of the
1.36 + * form dvd://<identifier> or cd://<identifier>, where <identifier> is a system
1.37 + * defined string that uniquely identifies a particular device.
1.38 + */
1.39 +
1.40 +/**
1.41 + * Return a list of gdrom_device_t defining all CD/DVD drives in the host system.
1.42 + */
1.43 +GList *cdrom_get_native_devices();
1.44 +
1.45 +/**
1.46 + * Open a native device given a device name and url method. Eg, for the url dvd://1
1.47 + * this function will be invoked with method = "dvd" and name = "1"
1.48 + *
1.49 + * @return NULL on failure, otherwise a valid gdrom_disc_t that can be mounted.
1.50 + */
1.51 +gdrom_disc_t cdrom_open_device( const gchar *method, const gchar *name );
1.52 +
1.53 #endif
.