home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / cdrom.zip / DDK / BASE / SRC / VDEV / VCDROM / ctrlblk.h < prev    next >
C/C++ Source or Header  |  1996-06-18  |  8KB  |  252 lines

  1. /**************************************************************************
  2.  *
  3.  * SOURCE FILE NAME = CtrlBlk.h
  4.  *
  5.  * DESCRIPTIVE NAME = Control block structures
  6.  *
  7.  * Copyright : COPYRIGHT IBM CORPORATION, 1991, 1992
  8.  *             Copyright Microsoft Corporation, 1990
  9.  *             LICENSED MATERIAL - PROGRAM PROPERTY OF IBM
  10.  *             REFER TO COPYRIGHT INSTRUCTION FORM#G120-2083
  11.  *             RESTRICTED MATERIALS OF IBM
  12.  *             IBM CONFIDENTIAL
  13.  *
  14.  * VERSION = V2.0
  15.  *
  16.  * DATE        08/23/91, dtf
  17.  *
  18.  * DESCRIPTION
  19.  *
  20.  * FUNCTIONS   Define the DOS control blocks for
  21.  *                 1. Ioctl Input  (3)
  22.  *                 2. Ioctl Output (12)
  23.  *
  24.  * ENTRY POINTS:
  25.  *
  26.  * DEPENDENCIES:
  27.  *
  28.  * NOTES
  29.  *
  30.  *
  31.  * STRUCTURES
  32.  *
  33.  * EXTERNAL REFERENCES
  34.  *
  35.  * EXTERNAL FUNCTIONS
  36.  *
  37.  * CHANGE ACTIVITY =
  38.  *  DATE      FLAG        APAR   CHANGE DESCRIPTION
  39.  *  --------  ----------  -----  --------------------------------------
  40.  *  mm/dd/yy  @Vr.mpppxx  xxxxx  xxxxxxx
  41.  *
  42.  *  04/04/95  @V113078           Allow raw Read_Longs.  These Read_Longs do use
  43.  *                               the File System as they are non-standard
  44.  *                               sector sizes (2352).  However, there is a
  45.  *                               direct IOCTL to the device manager to read
  46.  *                               this type of sector (Cat 80 Fun 72)
  47.  *
  48.  ****************************************************************************/
  49.  
  50.  
  51. /*
  52. ** Read Ioctl request codes
  53. */
  54. #define RADDR       0
  55. #define LOCHEAD     1
  56. /* reserved         2 */
  57. #define ERRSTAT     3
  58. #define AUDINFOIN   4
  59. #define DRVBYTESIN  5
  60. #define DEVSTAT     6
  61. #define SECTSIZE    7
  62. #define VOLSIZE     8
  63. #define MEDCHNG     9
  64. #define DISKINFO    10
  65. #define TNOINFO     11
  66. #define QINFO       12
  67. #define SUBCHANINFO 13
  68. #define UPCCODE     14
  69. #define AUDSTAT     15
  70.  
  71. /*
  72. ** Device Status Flags
  73. */
  74. #define DOOR_OPEN                   0x0001
  75. #define DOOR_UNLOCKED               0x0002
  76. #define RAW_READING_SUPPORT         0x0004
  77. #define READ_WRITE_SUPPORT          0x0008
  78. #define PLAY_TRACKS_SUPPORT         0x0010
  79. #define INTERLEAVING_SUPPORT        0x0020
  80. /* RESERVED                         0x0040 */
  81. #define PREFETCHING_SUPPORT         0x0080
  82. #define AUDIO_MANIPULATION_SUPPORT  0x0100
  83. #define REDBOOK_SUPPORT             0x0200
  84.  
  85. /*
  86. ** Data Modes
  87. */
  88. #define COOKED_MODE                 0
  89. #define RAW_MODE                    1
  90. #define HSG_ADDRESS                 0
  91. #define REDBOOK_ADDRESS             1
  92.  
  93. /*
  94. ** Read Ioctl request control blocks
  95. */
  96. struct Raddr {                          /* return address of device header */
  97.             UCHAR       control_code;
  98.             F16PVOID    *device_header;
  99. };
  100.  
  101. struct LocHead {                        /* location of head */
  102.             UCHAR       control_code;
  103.             UCHAR       address_mode;
  104.             ULONG       head_location;
  105. };
  106.  
  107. struct ErrStat {                        /* error statistics */
  108.             UCHAR       control_code;
  109.             /* not yet defined */
  110. };
  111.  
  112. struct AudInfo {                        /* audio channel info */
  113.             UCHAR       control_code;
  114.             UCHAR       input_0;
  115.             UCHAR       volume_0;
  116.             UCHAR       input_1;
  117.             UCHAR       volume_1;
  118.             UCHAR       input_2;
  119.             UCHAR       volume_2;
  120.             UCHAR       input_3;
  121.             UCHAR       volume_3;
  122. };
  123.  
  124. struct DrvBytesIn {                     /* read drive bytes */
  125.             UCHAR       control_code;
  126.             UCHAR       bytes_read;
  127.             char        read_buffer[128];
  128. };
  129.  
  130. struct DevStat {                        /* device status */
  131.             UCHAR       control_code;
  132.             ULONG       device_parameters;
  133. };
  134.  
  135. struct SectSize {                       /* return sector size */
  136.             UCHAR       control_code;
  137.             UCHAR       read_mode;
  138.             USHORT      sector_size;
  139. };
  140.  
  141. struct VolSize {                        /* return volume size */
  142.             UCHAR       control_code;
  143.             USHORT      volume_size;
  144. };
  145.  
  146. struct MedChng {                        /* media changed */
  147.             UCHAR       control_code;
  148.             UCHAR       media_byte;
  149. };
  150.  
  151. struct DiskInfo {                       /* audio disk info */
  152.             UCHAR       control_code;
  153.             UCHAR       lowest_track;
  154.             UCHAR       highest_track;
  155.             ULONG       leadout_track_start;
  156. };
  157.  
  158. struct TnoInfo {                        /* audio track info */
  159.             UCHAR       control_code;
  160.             UCHAR       track_number;
  161.             ULONG       track_start;
  162.             UCHAR       track_control;
  163. };
  164.  
  165. struct QInfo {                          /* audio Q-channel info */
  166.             UCHAR       control_code;
  167.             UCHAR       control;
  168.             UCHAR       track_number;
  169.             UCHAR       point;
  170.                                         /* running time on the track */
  171.             UCHAR       minutes;
  172.             UCHAR       seconds;
  173.             UCHAR       frames;
  174.             UCHAR       zero;
  175.                                         /* running time on the disk */
  176.             UCHAR       amin;
  177.             UCHAR       asec;
  178.             UCHAR       aframe;
  179. };
  180.  
  181. struct SubChanInfo {                    /* audio sub-channel info */
  182.             UCHAR       control_code;
  183.             ULONG       start_frame_address;
  184.             F16PVOID    *tranfer_area;
  185.             ULONG       number_of_sectors;
  186. };
  187.  
  188. struct UPCCode {                        /* UPC code */
  189.             UCHAR       control_code;
  190.             UCHAR       control;
  191.             char        UPC_code[7];
  192.             UCHAR       zero;
  193.             UCHAR       aframe;
  194. };
  195.  
  196. struct AudStat {                        /* audio status info */
  197.             UCHAR       control_code;
  198.             USHORT      audio_status;
  199.             ULONG       last_start_location;
  200.             ULONG       last_end_location;
  201. };
  202.  
  203. /*------------------------------------------------*
  204.  * Cat 0x80, Func 0x72: Read Long                 *
  205.  *------------------------------------------------*/               /*@V113078*/
  206. typedef struct ReadLong {                                          /*@V113078*/
  207.         ULONG       ID_code;                                       /*@V113078*/
  208.         UCHAR       address_mode;                                  /*@V113078*/
  209.         USHORT      transfer_count;                                /*@V113078*/
  210.         ULONG       start_sector;                                  /*@V113078*/
  211.         UCHAR       reserved;                                      /*@V113078*/
  212.         UCHAR       interleave_size;                               /*@V113078*/
  213.         UCHAR       interleave_skip_factor;                        /*@V113078*/
  214. } FAR * PREADLONGPARMS;                                            /*@V113078*/
  215.  
  216. /*
  217. ** Write Ioctl request codes
  218. */
  219. #define EJECT       0
  220. #define LOCKDOOR    1
  221. #define RESETDRV    2
  222. #define AUDINFOOUT  3
  223. #define DRVBYTESOUT 4
  224. #define CLOSETRAY   5
  225.  
  226. /*
  227. ** Write Ioctl request control blocks
  228. */
  229. struct Eject {                          /* eject disk */
  230.             UCHAR       control_code;
  231. };
  232.  
  233. struct LockDoor {                       /* lock/unlock door */
  234.             UCHAR       control_code;
  235.             UCHAR       lock_function;
  236. };
  237.  
  238. struct ResetDrv {                       /* reset drive */
  239.             UCHAR       control_code;
  240. };
  241.  
  242. /* struct AudInfo (see above) */        /* audio channel control */
  243.  
  244. struct DrvBytesOut {                    /* write device control string */
  245.             UCHAR       control_code;
  246.                                         /* variable size control string */
  247. };
  248.  
  249. struct CloseTray {                      /* close tray */
  250.             UCHAR       control_code;
  251. };
  252.