"Fossies" - the Fresh Open Source Software Archive

Member "xorriso-1.5.4/libburn/mmc.h" (30 Jan 2021, 5238 Bytes) of package /linux/misc/xorriso-1.5.4.pl02.tar.gz:


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 "mmc.h" see the Fossies "Dox" file reference documentation and the last Fossies "Diffs" side-by-side code changes report: 1.5.1_vs_1.5.2.

    1 /* -*- indent-tabs-mode: t; tab-width: 8; c-basic-offset: 8; -*- */
    2 
    3 /* Copyright (c) 2004 - 2006 Derek Foreman, Ben Jansens
    4    Copyright (c) 2006 - 2014 Thomas Schmitt <scdbackup@gmx.net>
    5    Provided under GPL version 2 or later.
    6 */
    7 
    8 
    9 #ifndef __MMC
   10 #define __MMC
   11 
   12 struct burn_drive;
   13 struct burn_write_opts;
   14 struct command;
   15 struct buffer;
   16 struct cue_sheet;
   17 
   18 /* MMC commands */
   19 
   20 void mmc_read(struct burn_drive *);
   21 
   22 /* ts A61009 : removed redundant parameter d in favor of o->drive */
   23 /* void mmc_close_session(struct burn_drive *, struct burn_write_opts *); */
   24 /* void mmc_close_disc(struct burn_drive *, struct burn_write_opts *); */
   25 void mmc_close_session(struct burn_write_opts *o);
   26 void mmc_close_disc(struct burn_write_opts *o);
   27 
   28 void mmc_close(struct burn_drive *, int session, int track);
   29 void mmc_get_event(struct burn_drive *);
   30 int mmc_write(struct burn_drive *, int start, struct buffer *buf);
   31 void mmc_write_12(struct burn_drive *d, int start, struct buffer *buf);
   32 void mmc_sync_cache(struct burn_drive *);
   33 void mmc_load(struct burn_drive *);
   34 void mmc_eject(struct burn_drive *);
   35 void mmc_erase(struct burn_drive *, int);
   36 void mmc_read_toc(struct burn_drive *);
   37 void mmc_read_disc_info(struct burn_drive *);
   38 void mmc_read_atip(struct burn_drive *);
   39 int mmc_read_cd(struct burn_drive *d, int start, int len,
   40                 int sec_type, int main_ch,
   41                 const struct burn_read_opts *o, struct buffer *buf, int flag);
   42 void mmc_set_speed(struct burn_drive *, int, int);
   43 void mmc_read_lead_in(struct burn_drive *, struct buffer *);
   44 void mmc_perform_opc(struct burn_drive *);
   45 void mmc_get_configuration(struct burn_drive *);
   46 
   47 /* ts A61110 : added parameters trackno, lba, nwa. Redefined return value.
   48    @return 1=nwa is valid , 0=nwa is not valid , -1=error */
   49 int mmc_get_nwa(struct burn_drive *d, int trackno, int *lba, int *nwa);
   50 
   51 /* ts B11228 : changed from void to int */ 
   52 int mmc_send_cue_sheet(struct burn_drive *, struct cue_sheet *);
   53 
   54 /* ts A61023 : get size and free space of drive buffer */
   55 int mmc_read_buffer_capacity(struct burn_drive *d);
   56 
   57 /* ts A61021 : the mmc specific part of sg.c:enumerate_common()
   58 */
   59 int mmc_setup_drive(struct burn_drive *d);
   60 
   61 /* ts A61219 : learned much from dvd+rw-tools-7.0: plus_rw_format()
   62                and mmc5r03c.pdf, 6.5 FORMAT UNIT */
   63 int mmc_format_unit(struct burn_drive *d, off_t size, int flag);
   64 
   65 /* ts A61225 : obtain write speed descriptors via ACh GET PERFORMANCE */
   66 int mmc_get_write_performance(struct burn_drive *d);
   67 
   68 
   69 /* ts A61229 : outsourced from spc_select_write_params() */
   70 /* Note: Page data is not zeroed here to allow preset defaults. Thus
   71            memset(pd, 0, 2 + d->mdata->write_page_length); 
   72          is the eventual duty of the caller.
   73 */
   74 int mmc_compose_mode_page_5(struct burn_drive *d,
   75                             struct burn_session *s, int tno,
   76                             const struct burn_write_opts *o,
   77                             unsigned char *pd);
   78 
   79 /* ts A70201 */
   80 int mmc_four_char_to_int(unsigned char *data);
   81 
   82 /* ts A70201 :
   83    Common track info fetcher for mmc_get_nwa() and mmc_fake_toc()
   84 */
   85 int mmc_read_track_info(struct burn_drive *d, int trackno, struct buffer *buf,
   86                         int alloc_len);
   87 
   88 /* ts A70812 : return 0 = ok , return BE_CANCELLED = error occurred */
   89 int mmc_read_10(struct burn_drive *d, int start, int amount,
   90                 struct buffer *buf);
   91 
   92 /* ts A81210 : Determine the upper limit of readable data size */
   93 int mmc_read_capacity(struct burn_drive *d);
   94 
   95 /* ts A61201 */
   96 char *mmc_obtain_profile_name(int profile_number);
   97 
   98 
   99 /* mmc5r03c.pdf 4.3.4.4.1 d) "The maximum number of RZones is 2 302." */
  100 #define BURN_MMC_FAKE_TOC_MAX_SIZE 2302
  101 
  102 
  103 /* ts A90903 */
  104 /* MMC backend of API call burn_get_media_product_id()
  105 */
  106 int mmc_get_media_product_id(struct burn_drive *d,
  107         char **product_id, char **media_code1, char **media_code2,
  108     char **book_type, int flag);
  109 
  110 
  111 /* ts A60910 (estimated) */
  112 int mmc_function_spy(struct burn_drive *d, char * text);
  113 
  114 /* ts A91118 */
  115 int mmc_start_if_needed(struct burn_drive *d, int flag);
  116 
  117 /* ts B00924 */
  118 int mmc_get_bd_spare_info(struct burn_drive *d,
  119                                 int *alloc_blocks, int *free_blocks, int flag);
  120 
  121 /* ts B10801 */
  122 int mmc_get_phys_format_info(struct burn_drive *d, int *disk_category,
  123                         char **book_name, int *part_version, int *num_layers,
  124                         int *num_blocks, int flag);
  125 
  126 /* ts B11201 */
  127 int mmc_get_leadin_text(struct burn_drive *d,
  128                         unsigned char **text_packs, int *num_packs, int flag);
  129 
  130 /* ts B40107 */
  131 int mmc_get_performance(struct burn_drive *d, int descr_type, int flag);
  132 
  133 /* ts B90414 */
  134 int burn_make_feature_text(struct burn_drive *d, unsigned int feature_code,
  135                            unsigned char flags,
  136                            unsigned char additional_length,
  137                            unsigned char *feature_data,
  138                            char **text, int flag);
  139 
  140 #ifdef Libburn_develop_quality_scaN
  141 /* B21108 ts */
  142 int mmc_nec_optiarc_f3(struct burn_drive *d, int sub_op,
  143                        int start_lba, int rate_period,
  144                        int *eba, int *error_rate1, int *error_rate2);
  145 #endif
  146 
  147 #endif /*__MMC*/