"Fossies" - the Fresh Open Source Software Archive

Member "libcdio-2.1.0/include/cdio/disc.h" (12 Aug 2018, 4763 Bytes) of package /linux/privat/libcdio-2.1.0.tar.bz2:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. For more information about "disc.h" see the Fossies "Dox" file reference documentation.

    1 /* -*- c -*-
    2 
    3     Copyright (C) 2018 Thomas Schmitt
    4     Copyright (C) 2004, 2005, 2006, 2008, 2010, 2012, 2014
    5     Rocky Bernstein <rocky@gnu.org>
    6 
    7     This program is free software: you can redistribute it and/or modify
    8     it under the terms of the GNU General Public License as published by
    9     the Free Software Foundation, either version 3 of the License, or
   10     (at your option) any later version.
   11 
   12     This program is distributed in the hope that it will be useful,
   13     but WITHOUT ANY WARRANTY; without even the implied warranty of
   14     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   15     GNU General Public License for more details.
   16 
   17     You should have received a copy of the GNU General Public License
   18     along with this program.  If not, see <http://www.gnu.org/licenses/>.
   19 */
   20 
   21 /**
   22    \file disc.h
   23    \brief  The top-level header for disc-related libcdio calls.
   24  */
   25 #ifndef CDIO_DISC_H_
   26 #define CDIO_DISC_H_
   27 
   28 #ifdef __cplusplus
   29 extern "C" {
   30 #endif /* __cplusplus */
   31 
   32     /**
   33        disc modes. The first combined from MMC-5 6.33.3.13 (Send
   34        CUESHEET), "DVD Book" from MMC-5 Table 400, page 419.  and
   35        GNU/Linux /usr/include/linux/cdrom.h and we've added DVD.
   36     */
   37   typedef enum {
   38     CDIO_DISC_MODE_CD_DA,           /**< CD-DA */
   39     CDIO_DISC_MODE_CD_DATA,         /**< CD-ROM form 1 */
   40     CDIO_DISC_MODE_CD_XA,           /**< CD-ROM XA form2 */
   41     CDIO_DISC_MODE_CD_MIXED,        /**< Some combo of above. */
   42     CDIO_DISC_MODE_DVD_ROM,         /**< DVD ROM (e.g. movies) */
   43     CDIO_DISC_MODE_DVD_RAM,         /**< DVD-RAM */
   44     CDIO_DISC_MODE_DVD_R,           /**< DVD-R */
   45     CDIO_DISC_MODE_DVD_RW,          /**< DVD-RW */
   46     CDIO_DISC_MODE_HD_DVD_ROM,      /**< HD DVD-ROM */
   47     CDIO_DISC_MODE_HD_DVD_RAM,      /**< HD DVD-RAM */
   48     CDIO_DISC_MODE_HD_DVD_R,        /**< HD DVD-R */
   49     CDIO_DISC_MODE_DVD_PR,          /**< DVD+R */
   50     CDIO_DISC_MODE_DVD_PRW,         /**< DVD+RW */
   51     CDIO_DISC_MODE_DVD_PRW_DL,      /**< DVD+RW DL */
   52     CDIO_DISC_MODE_DVD_PR_DL,       /**< DVD+R DL */
   53     CDIO_DISC_MODE_DVD_OTHER,       /**< Unknown/unclassified DVD type */
   54     CDIO_DISC_MODE_NO_INFO,
   55     CDIO_DISC_MODE_ERROR,
   56     CDIO_DISC_MODE_CD_I         /**< CD-i. */
   57   } discmode_t;
   58 
   59   extern const char *discmode2str[];
   60 
   61   /**
   62     Read cdtext information for a cdtext_t object.
   63     About format and usage of these data see the documentation of call
   64     mmc_read_cdtext() in include file <cdio/mmc.h>.
   65 
   66 
   67     @param p_cdio the CD object that may contain CD-Text information.
   68     @return malloc'd pointer to raw CD-Text data as replied by the drive
   69             or NULL if problems occur or CD-Text information does not exist.
   70             A non-NULL return value must be freed with cdio_free() when done.
   71   */
   72   uint8_t * cdio_get_cdtext_raw (CdIo_t *p_cdio);
   73 
   74   /**
   75     Return a pointer to the cdtext_t object which is attached to a CdIo_t
   76     object. If no such cdtext_t is attached yet, then try to read CD-TEXT
   77     information and use it to create and initialise the cdtext_t object.
   78 
   79     For usage of cdtext_t see include file <cdio/cdtext.h>.
   80 
   81     @param p_cdio the CD object that may contain CD-Text information.
   82     @return a pointer to the attached cdtext_t object or NULL if problems
   83             occur or if CD-Text information does not exist.
   84   */
   85   cdtext_t *cdio_get_cdtext (CdIo_t *p_cdio);
   86 
   87   /**
   88     Get disc mode - the kind of CD (CD-DA, CD-ROM mode 1, CD-MIXED, etc.
   89     that we've got. The notion of "CD" is extended a little to include
   90     DVD's.
   91   */
   92   discmode_t cdio_get_discmode (CdIo_t *p_cdio);
   93 
   94   /**
   95     Get the lsn of the end of the CD
   96 
   97     @return the lsn. On error 0 or CDIO_INVALD_LSN.
   98   */
   99   lsn_t cdio_get_disc_last_lsn(const CdIo_t *p_cdio);
  100 
  101   /**
  102     Return the Joliet level recognized for p_cdio.
  103   */
  104   uint8_t cdio_get_joliet_level(const CdIo_t *p_cdio);
  105 
  106   /**
  107     Get the media catalog number (MCN) from the CD.
  108 
  109     @return the media catalog number or NULL if there is none or we
  110     don't have the ability to get it.
  111 
  112     Note: The caller must free the returned string with cdio_free()
  113     when done with it.
  114 
  115   */
  116   char * cdio_get_mcn (const CdIo_t *p_cdio);
  117 
  118   /**
  119     Get the number of tracks on the CD.
  120 
  121     @return the number of tracks, or CDIO_INVALID_TRACK if there is
  122     an error.
  123   */
  124   track_t cdio_get_num_tracks (const CdIo_t *p_cdio);
  125 
  126   /**
  127     Return true if discmode is some sort of CD.
  128   */
  129   bool cdio_is_discmode_cdrom (discmode_t discmode);
  130 
  131   /**
  132     Return true if discmode is some sort of DVD.
  133   */
  134   bool cdio_is_discmode_dvd (discmode_t discmode);
  135 
  136   /**
  137       cdio_stat_size is deprecated. @see cdio_get_disc_last_lsn
  138   */
  139 #define cdio_stat_size cdio_get_disc_last_lsn
  140 
  141 #ifdef __cplusplus
  142 }
  143 #endif /* __cplusplus */
  144 
  145 #endif /* CDIO_DISC_H_ */