Blame include/cdio/cd_types.h

Packit dd8086
/*
Packit dd8086
    Copyright (C) 2003, 2006, 2008, 2012 Rocky Bernstein <rocky@gnu.org>
Packit dd8086
    Copyright (C) 1996,1997,1998  Gerd Knorr <kraxel@bytesex.org>
Packit dd8086
         and       Heiko Eißfeldt <heiko@hexco.de>
Packit dd8086
Packit dd8086
    This program is free software: you can redistribute it and/or modify
Packit dd8086
    it under the terms of the GNU General Public License as published by
Packit dd8086
    the Free Software Foundation, either version 3 of the License, or
Packit dd8086
    (at your option) any later version.
Packit dd8086
Packit dd8086
    This program is distributed in the hope that it will be useful,
Packit dd8086
    but WITHOUT ANY WARRANTY; without even the implied warranty of
Packit dd8086
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
Packit dd8086
    GNU General Public License for more details.
Packit dd8086
Packit dd8086
    You should have received a copy of the GNU General Public License
Packit dd8086
    along with this program.  If not, see <http://www.gnu.org/licenses/>.
Packit dd8086
*/
Packit dd8086
Packit dd8086
/** \file cd_types.h 
Packit dd8086
 *  \brief Header for routines which automatically determine the Compact Disc
Packit dd8086
 *  format and possibly filesystem on the CD.
Packit dd8086
 *         
Packit dd8086
 */
Packit dd8086
Packit dd8086
#ifndef CDIO_CD_TYPES_H_
Packit dd8086
#define CDIO_CD_TYPES_H_
Packit dd8086
Packit dd8086
#ifdef __cplusplus
Packit dd8086
extern "C" {
Packit dd8086
#endif /* __cplusplus */
Packit dd8086
Packit dd8086
/**
Packit dd8086
 * Filesystem types we understand. The highest-numbered fs type should
Packit dd8086
 *  be less than CDIO_FS_MASK defined below.
Packit dd8086
 */
Packit dd8086
  typedef enum {
Packit dd8086
    CDIO_FS_AUDIO                = 1, /**< audio only - not really a 
Packit dd8086
                                         filesystem */
Packit dd8086
    CDIO_FS_HIGH_SIERRA          = 2, /**< High-Sierra Filesystem */
Packit dd8086
    CDIO_FS_ISO_9660             = 3, /**< ISO 9660 filesystem */
Packit dd8086
    CDIO_FS_INTERACTIVE          = 4,
Packit dd8086
    CDIO_FS_HFS                  = 5, /**< file system used on the Macintosh 
Packit dd8086
                                         system in MacOS 6 through MacOS 9
Packit dd8086
                                         and deprecated in OSX. */
Packit dd8086
    CDIO_FS_UFS                  = 6, /**< Generic Unix file system derived
Packit dd8086
                                         from the Berkeley fast file 
Packit dd8086
                                         system. */
Packit dd8086
    
Packit dd8086
    /**<
Packit dd8086
     * EXT2 was the GNU/Linux native filesystem for early kernels. Newer
Packit dd8086
     * GNU/Linux OS's may use EXT3 which is EXT2 with a journal. 
Packit dd8086
     */
Packit dd8086
    CDIO_FS_EXT2                 = 7,
Packit dd8086
Packit dd8086
    CDIO_FS_ISO_HFS              = 8,  /**< both HFS & ISO-9660 filesystem */
Packit dd8086
    CDIO_FS_ISO_9660_INTERACTIVE = 9,  /**< both CD-RTOS and ISO filesystem */
Packit dd8086
Packit dd8086
Packit dd8086
    /**<
Packit dd8086
     * The 3DO is, technically, a set of specifications created by the 3DO
Packit dd8086
     * company.  These specs are for making a 3DO Interactive Multiplayer
Packit dd8086
     * which uses a CD-player. Panasonic in the early 90's was the first
Packit dd8086
     * company to manufacture and market a 3DO player. 
Packit dd8086
     */
Packit dd8086
    CDIO_FS_3DO                 = 10,
Packit dd8086
Packit dd8086
Packit dd8086
    /**<
Packit dd8086
       Microsoft X-BOX CD.
Packit dd8086
    */
Packit dd8086
    CDIO_FS_XISO                = 11,
Packit dd8086
    CDIO_FS_UDFX                = 12,
Packit dd8086
    CDIO_FS_UDF                 = 13,
Packit dd8086
    CDIO_FS_ISO_UDF             = 14
Packit dd8086
  } cdio_fs_t;
Packit dd8086
Packit dd8086
Packit dd8086
/** 
Packit dd8086
 * Macro to extract just the FS type portion defined above 
Packit dd8086
*/
Packit dd8086
#define CDIO_FSTYPE(fs) (fs & CDIO_FS_MASK)
Packit dd8086
Packit dd8086
/**
Packit dd8086
 *  Bit masks for the classes of CD-images. These are generally
Packit dd8086
 *  higher-level than the fs-type information above and may be determined
Packit dd8086
 *  based of the fs type information. This 
Packit dd8086
 */
Packit dd8086
  typedef enum {
Packit dd8086
    CDIO_FS_MASK              =   0x000f, /**< Note: this should be 2**n-1 and
Packit dd8086
                                               and greater than the highest 
Packit dd8086
                                               CDIO_FS number above */
Packit dd8086
    CDIO_FS_ANAL_XA           =   0x00010, /**< eXtended Architecture format */
Packit dd8086
    CDIO_FS_ANAL_MULTISESSION =   0x00020, /**< CD has multisesion */
Packit dd8086
    CDIO_FS_ANAL_PHOTO_CD     =   0x00040, /**< Is a Kodak Photo CD */
Packit dd8086
    CDIO_FS_ANAL_HIDDEN_TRACK =   0x00080, /**< Hidden track at the 
Packit dd8086
                                               beginning of the CD */
Packit dd8086
    CDIO_FS_ANAL_CDTV         =   0x00100,
Packit dd8086
    CDIO_FS_ANAL_BOOTABLE     =   0x00200, /**< CD is bootable */
Packit dd8086
    CDIO_FS_ANAL_VIDEOCD      =   0x00400, /**< VCD 1.1 */
Packit dd8086
    CDIO_FS_ANAL_ROCKRIDGE    =   0x00800, /**< Has Rock Ridge Extensions to
Packit dd8086
                                               ISO 9660, */
Packit dd8086
    CDIO_FS_ANAL_JOLIET       =   0x01000, /**< Microsoft Joliet extensions 
Packit dd8086
                                                to ISO 9660, */
Packit dd8086
    CDIO_FS_ANAL_SVCD         =   0x02000, /**< Super VCD or Choiji Video CD */
Packit dd8086
    CDIO_FS_ANAL_CVD          =   0x04000, /**< Choiji Video CD */
Packit dd8086
    CDIO_FS_ANAL_XISO         =   0x08000, /**< XBOX CD */
Packit dd8086
    CDIO_FS_ANAL_ISO9660_ANY  =   0x10000, /**< Any sort fo ISO9660 FS */
Packit dd8086
    CDIO_FS_ANAL_VCD_ANY      =   (CDIO_FS_ANAL_VIDEOCD|CDIO_FS_ANAL_SVCD|
Packit dd8086
                                   CDIO_FS_ANAL_CVD),
Packit dd8086
    CDIO_FS_MATCH_ALL         =  ~CDIO_FS_MASK /**< bitmask which can
Packit dd8086
                                                 be used by
Packit dd8086
                                                 cdio_get_devices to
Packit dd8086
                                                 specify matching any
Packit dd8086
                                                 sort of CD. */
Packit dd8086
  } cdio_fs_cap_t;
Packit dd8086
    
Packit dd8086
Packit dd8086
#define CDIO_FS_UNKNOWN             CDIO_FS_MASK
Packit dd8086
Packit dd8086
/**
Packit dd8086
 * 
Packit dd8086
 */
Packit dd8086
#define CDIO_FS_MATCH_ALL            (cdio_fs_anal_t) (~CDIO_FS_MASK)
Packit dd8086
Packit dd8086
Packit dd8086
/*!
Packit dd8086
  \brief The type used to return analysis information from
Packit dd8086
  cdio_guess_cd_type. 
Packit dd8086
Packit dd8086
  These fields make sense only for when an ISO-9660 filesystem is used.
Packit dd8086
 */
Packit dd8086
typedef struct 
Packit dd8086
{
Packit dd8086
  unsigned int  joliet_level;  /**< If has Joliet extensions, this is the
Packit dd8086
                                  associated level number (i.e. 1, 2, or 3). */
Packit dd8086
  char          iso_label[33]; /**< This is 32 + 1 for null byte at the end in 
Packit dd8086
                                    formatting the string */
Packit dd8086
  unsigned int  isofs_size;
Packit dd8086
  uint8_t       UDFVerMinor;   /**< For UDF filesystems only */
Packit dd8086
  uint8_t       UDFVerMajor;   /**< For UDF filesystems only */
Packit dd8086
} cdio_iso_analysis_t;
Packit dd8086
Packit dd8086
/**
Packit dd8086
 *  Try to determine what kind of CD-image and/or filesystem we
Packit dd8086
 *  have at track track_num. Return information about the CD image
Packit dd8086
 *  is returned in iso_analysis and the return value.
Packit dd8086
 */
Packit dd8086
cdio_fs_anal_t cdio_guess_cd_type(const CdIo_t *cdio, int start_session, 
Packit dd8086
                                  track_t track_num, 
Packit dd8086
                                  /*out*/ cdio_iso_analysis_t *iso_analysis);
Packit dd8086
Packit dd8086
#ifdef __cplusplus
Packit dd8086
}
Packit dd8086
#endif /* __cplusplus */
Packit dd8086
Packit dd8086
/** The below variables are trickery to force the above enum symbol
Packit dd8086
    values to be recorded in debug symbol tables. They are used to
Packit dd8086
    allow one to refer to the enumeration value names in the typedefs
Packit dd8086
    above in a debugger and debugger expressions.
Packit dd8086
*/
Packit dd8086
extern cdio_fs_cap_t debug_cdio_fs_cap;
Packit dd8086
extern cdio_fs_t     debug_cdio_fs;
Packit dd8086
Packit dd8086
#endif /* CDIO_CD_TYPES_H_ */
Packit dd8086

Packit dd8086
/* 
Packit dd8086
 * Local variables:
Packit dd8086
 *  c-file-style: "gnu"
Packit dd8086
 *  tab-width: 8
Packit dd8086
 *  indent-tabs-mode: nil
Packit dd8086
 * End:
Packit dd8086
 */