Search
lxdream.org :: lxdream/src/gdrom/gddriver.h :: diff
lxdream 0.9.1
released Jun 29
Download Now
filename src/gdrom/gddriver.h
changeset 736:a02d1475ccfd
prev729:4cc913eabd3d
next782:1af8b5ce627c
author nkeynes
date Mon Jul 14 07:44:42 2008 +0000 (15 years ago)
permissions -rw-r--r--
last change Re-indent everything consistently
Fix include guards for consistency as well
file annotate diff log raw
1.1 --- a/src/gdrom/gddriver.h Sun Jul 06 05:35:13 2008 +0000
1.2 +++ b/src/gdrom/gddriver.h Mon Jul 14 07:44:42 2008 +0000
1.3 @@ -18,14 +18,18 @@
1.4 * GNU General Public License for more details.
1.5 */
1.6
1.7 -#ifndef lxdream_gdrom_driver_H
1.8 -#define lxdream_gdrom_driver_H 1
1.9 +#ifndef lxdream_gddriver_H
1.10 +#define lxdream_gddriver_H 1
1.11
1.12 #include <stdio.h>
1.13 #include "lxdream.h"
1.14 #include "gdrom/gdrom.h"
1.15 #include <glib/gstrfuncs.h>
1.16
1.17 +#ifdef __cplusplus
1.18 +extern "C" {
1.19 +#endif
1.20 +
1.21 #define MAX_SECTOR_SIZE 2352
1.22
1.23 #define CD_FRAMES_PER_SECOND 75
1.24 @@ -48,20 +52,20 @@
1.25 */
1.26 typedef enum {
1.27 GDROM_MODE0, // Mode 0 - should never actually see this
1.28 -/* Data-only modes (image file contains only the user data) */
1.29 + /* Data-only modes (image file contains only the user data) */
1.30 GDROM_MODE1, // Standard CD-Rom Mode 1 data track
1.31 GDROM_MODE2_FORMLESS, // Mode 2 data track with no sub-structure (rare)
1.32 GDROM_MODE2_FORM1, // Mode 2/Form 1 data track (standard for multisession)
1.33 GDROM_MODE2_FORM2, // Mode 2/Form 2 data track (also fairly uncommon).
1.34 GDROM_CDDA, // Standard audio track
1.35
1.36 -/* This one is somewhat special - the image file contains the 2336 bytes of
1.37 - * "extended user data", which in turn contains either a form 1 or form 2
1.38 - * sector. In other words it's a raw mode2 XA sector without the 16-byte header.
1.39 - */
1.40 + /* This one is somewhat special - the image file contains the 2336 bytes of
1.41 + * "extended user data", which in turn contains either a form 1 or form 2
1.42 + * sector. In other words it's a raw mode2 XA sector without the 16-byte header.
1.43 + */
1.44 GDROM_SEMIRAW_MODE2,
1.45 -/* Raw modes (image contains the full 2352-byte sector). Split into XA/Non-XA
1.46 - * here for convenience, although it's really a session level flag. */
1.47 + /* Raw modes (image contains the full 2352-byte sector). Split into XA/Non-XA
1.48 + * here for convenience, although it's really a session level flag. */
1.49 GDROM_RAW_XA,
1.50 GDROM_RAW_NONXA,
1.51 } gdrom_track_mode_t;
1.52 @@ -105,9 +109,9 @@
1.53 * @return PKT_ERR_OK on success, or another PKT_ERR_* code on failure.
1.54 */
1.55 gdrom_error_t (*read_sector)( struct gdrom_disc *disc,
1.56 - uint32_t lba, int mode,
1.57 - unsigned char *buf, uint32_t *length );
1.58 -
1.59 + uint32_t lba, int mode,
1.60 + unsigned char *buf, uint32_t *length );
1.61 +
1.62 /**
1.63 * Read the TOC from the disc and write it into the specified buffer.
1.64 * The method is responsible for returning the data in gd-rom
1.65 @@ -222,4 +226,5 @@
1.66 * Construct a Read CD command for the given sector + mode
1.67 */
1.68 void mmc_make_read_cd_cmd( char *cmd, uint32_t sector, int mode );
1.69 -#endif
1.70 +
1.71 +#endif /* !lxdream_gddriver_H */
.