home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / cdrom.zip / DDK / BASE / SRC / DEV / DASD / CDROM / OS2CDROM / cddefs.h < prev    next >
Text File  |  1996-06-18  |  5KB  |  146 lines

  1. /**************************************************************************
  2.  *
  3.  * SOURCE FILE NAME = CDDEFS.H
  4.  *
  5.  * DESCRIPTIVE NAME = Typedefs/Defines for OS/2 CD-ROM Device Manager
  6.  *
  7.  * Copyright : COPYRIGHT IBM CORPORATION, 1991, 1992
  8.  *             LICENSED MATERIAL - PROGRAM PROPERTY OF IBM
  9.  *             REFER TO COPYRIGHT INSTRUCTION FORM#G120-2083
  10.  *             RESTRICTED MATERIALS OF IBM
  11.  *             IBM CONFIDENTIAL
  12.  *
  13.  * VERSION = V2.0
  14.  *
  15.  * DATE
  16.  *
  17.  * DESCRIPTION
  18.  *
  19.  *
  20.  * FUNCTIONS
  21.  *
  22.  * ENTRY POINTS:
  23.  *
  24.  * DEPENDENCIES:
  25.  *
  26.  * NOTES
  27.  *
  28.  *
  29.  * STRUCTURES
  30.  *
  31.  * EXTERNAL REFERENCES
  32.  *
  33.  * EXTERNAL FUNCTIONS
  34.  *
  35.  * CHANGE ACTIVITY =
  36.  *  DATE      FLAG       DEFECT  CHANGE DESCRIPTION
  37.  *  --------  --------   ------  --------------------------------------
  38.  *  08/22/94  @V91985    91985   1) Mask errors for reads of sector 0 length 1
  39.  *                               from the kernel.  2) Pause while trying to
  40.  *                               access a not ready device.  3) Allow ATAPI
  41.  *                               devices to return lock status from device.
  42.  *  09/08/95  @V135221           Sam Detweiler - CD-ROM changer support
  43.  *
  44.  ****************************************************************************/
  45.  
  46. /*------------------------------*
  47.  * Common typedefs              *
  48.  *------------------------------*/
  49. typedef struct _UnitControlBlock   UNITCB, *NPUNITCB;
  50. typedef struct _VolChars           *NPVOLCHARS;
  51. typedef struct _BPB                BPB;
  52. typedef struct _PB_Read_Write      PB_Read_Write, FAR *PPB_Read_Write;
  53. typedef struct _Req_List_Header    Req_List_Header, FAR *PReq_List_Header;
  54. typedef struct {
  55.         USHORT (near *Strat1Near)();
  56.         BOOL   ChangerAllowed;
  57.         } CMDFUNC;
  58.  
  59. typedef struct _INITDATA     INITDATA;
  60.  
  61. #define MAX_DRIVE_LETTERS       26
  62. #define MAX_QUEUING_COUNT       16
  63. #define MAX_ADAPTERS_PER_ADD    16
  64. #define MAX_UNITS_PER_ADD       32
  65. #define MAX_IORBS_PER_DRIVE      8
  66. #define MAX_IORBS_PER_POOL      64
  67. #define INIT_POOL_SIZE          32 * 1024
  68.  
  69. /*
  70. **** Device Types returned in Get Device Parms IOCTL
  71. */
  72. #define TYPE_CDROM             0x07
  73.  
  74. #define CDROM_HSG_MODE         0x00
  75. #define CDROM_REDBOOK_MODE     0x01
  76.  
  77. #define MODE_2                 0x02
  78.  
  79. #define COMMAND_INFO_MASK 0x01
  80.  
  81. /*
  82. ** Change Media Flags
  83. */
  84. #define MEDIA_CHANGED           0xFF
  85. #define MEDIA_UNSURE_CHANGED    0x00
  86. #define MEDIA_UNCHANGED         0x01
  87.  
  88.  
  89. #define CDROM_SECTOR_SIZE        2048
  90. #define CDROM_LONG_SECTOR_SIZE   2352
  91. #define CDDA_BLOCK_LENGTH        2352
  92. #define TRACEBUF_SIZE             512
  93. #define DEFAULT_CYLINDER_COUNT 0xFFFF
  94.  
  95. #define CDROM_MUTE                0x00
  96. #define CDROM_LEFT_CHANNEL        0x01
  97. #define CDROM_RIGHT_CHANNEL       0x02
  98. #define CDROM_STEREO              0x03
  99.  
  100. #define CDBF_PAUSE                0x00
  101. #define CDBF_RESUME               0x01
  102. #define CDBF_START                0x01
  103. #define CDBF_EJECT                0x02
  104. #define CDBF_CLOSE_TRAY           0x03
  105. #define CDBF_PREVENT_REMOVAL      0x01
  106. #define CDBF_LOCK_DOOR            0x01
  107.  
  108.  
  109. #define LEAD_OUT_TRACK_NUMBER     0xAA
  110.  
  111. #define PRIMARY_VOL_DESCR_RBA     0x10
  112. #define VOL_DESCR_TERMINATOR      0xFF
  113.  
  114. /*----------------------------------------------------*
  115.  * Global DDFlags defines                             *
  116.  *----------------------------------------------------*/
  117. #define CDF_INIT_TIME           0x00000002    /* Init time flag           */
  118. #define CDF_QUIET               0x00000004    /* Quiet error fail at init */
  119. #define CDF_VERBOSE             0x00000008    /* verbose display at init  */
  120. #define CDF_INIT_COMPLETE       0x00000010    /* INIT FINISHED            */
  121. #define CDF_SINGLE_UNIT         0x00000020    /* changer devices as single*/
  122.  
  123. /*
  124. ** MACROS
  125. */
  126. #define ENABLE  _asm {sti}
  127. #define DISABLE _asm {cli}
  128. #define PUSHFLAGS _asm {pushf}
  129. #define POPFLAGS _asm {popf}
  130.  
  131. /*                                                                      @V91985
  132. ** Not   Ready Defs                                                     @V91985
  133. */                                                                   /*@V91985*/
  134. #define NO_SECONDS_BEFORE_ERROR  6                                   /*@V91985*/
  135. #define MAX_NOT_READY_RETRIES    ( NO_SECONDS_BEFORE_ERROR * 4 )     /*@V91985*/
  136. #define NOT_READY_WAIT           250                                 /*@V91985*/
  137.  
  138. /*                                                                     @V91985
  139. ** ASC not in SCSI.h                                                   @V91985
  140. */                                                                   /*@V91985*/
  141. #define ASC_MEDIUM_NOT_PRESENT   0x3A                                /*@V91985*/
  142.  
  143. #define  CDATAPI_LIMIT_64K     0x0000FFFF                            /*@151345*/
  144.  
  145.  
  146.