Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

190 lines
5.3 KiB

  1. /******************************************************************************
  2. **
  3. ** Copyright 1999 Adaptec, Inc., All Rights Reserved.
  4. **
  5. ** This software contains the valuable trade secrets of Adaptec. The
  6. ** software is protected under copyright laws as an unpublished work of
  7. ** Adaptec. Notice is for informational purposes only and does not imply
  8. ** publication. The user of this software may make copies of the software
  9. ** for use with parts manufactured by Adaptec or under license from Adaptec
  10. ** and for no other use.
  11. **
  12. ******************************************************************************/
  13. /******************************************************************************
  14. **
  15. ** Module Name: BurnV.h
  16. **
  17. ******************************************************************************/
  18. #ifndef _BURNV_H_
  19. #define _BURNV_H_
  20. /*
  21. ** Make sure structures are byte aligned and fields are undecorated.
  22. */
  23. #ifdef __cplusplus
  24. extern "C" {
  25. #endif //__cplusplus
  26. #include "ImapiPub.h"
  27. #include "ScsiThings.h"
  28. /*
  29. * Constant declarations.
  30. */
  31. #define PHOENIX_WRITER_DECLSPEC
  32. #define BURNENGV_CDB_BYTES 16
  33. #define BURNENG_ERROR_INFO_DATABYTES 32
  34. #define BURNENG_ERROR_INFO_SENSEBYTES 14
  35. #define BURNENG_ERROR_INFO_PRIVATEBYTES 32
  36. /*
  37. ** Make sure we have the stuff we need to declare IOCTLs. The device code
  38. ** is below, and then each of the IOCTLs is defined alone with its constants
  39. ** and structures below.
  40. */
  41. #ifndef CTL_CODE
  42. #define CTL_CODE( DeviceType, Function, Method, Access ) ( \
  43. ((DeviceType) << 16) | ((Access) << 14) | ((Function) << 2) | (Method) \
  44. )
  45. #define METHOD_BUFFERED 0
  46. #define METHOD_IN_DIRECT 1
  47. #define METHOD_OUT_DIRECT 2
  48. #define METHOD_NEITHER 3
  49. #define FILE_ANY_ACCESS 0
  50. #define FILE_SPECIAL_ACCESS (FILE_ANY_ACCESS)
  51. #define FILE_READ_ACCESS ( 0x0001 ) // file & pipe
  52. #define FILE_WRITE_ACCESS ( 0x0002 ) // file & pipe
  53. #endif
  54. /*
  55. * Typedefs.
  56. */
  57. typedef enum {
  58. eWriterErrorNone = 0,
  59. eWriterBurnStarted,
  60. eWriterBurnengError,
  61. eWriterDeviceUnsupported,
  62. eWriterImapiFailure,
  63. eWriterMediaNonerasable,
  64. eWriterMediaNotPresent,
  65. eWriterMediaNonwritable,
  66. eWriterTargetScsiError,
  67. eWriterTargetUnknownResponseTIB,
  68. eWin32Error,
  69. eWin32OverlappedError,
  70. eWriterAlloc,
  71. eWriterBufferSize,
  72. eWriterIntFnTab,
  73. eWriterIntImapi,
  74. eWriterIntList,
  75. eWriterInvalidData,
  76. eWriterBadHandle,
  77. eWriterInvalidParam,
  78. eWriterBurnError,
  79. eWriterGenFailure,
  80. eWriterRegistryError,
  81. eWriterStashFileOpen,
  82. eWriterBadSectionClose,
  83. eWriterPrematureTermination,
  84. eWriterWriteError,
  85. eWriterReadFileError,
  86. eWriterThreadCreationError,
  87. eWriterLossOfStreaming,
  88. eWriterClosingSession,
  89. eWriterWriteProtectedMedia,
  90. eWriterUnableToWriteToMedia,
  91. eWriterErrorMAX
  92. } WRITER_ERROR_TYPE, *PWRITER_ERROR_TYPE;
  93. typedef struct {
  94. WRITER_ERROR_TYPE dwBurnEngineError;
  95. IMAPIDRV_SRB srbErrored;
  96. UCHAR ucaDataBuffer[ BURNENG_ERROR_INFO_DATABYTES ];
  97. ULONGLONG Reserved1; // alignment
  98. UCHAR ucaSenseInfoBuffer[ BURNENG_ERROR_INFO_SENSEBYTES ] ;
  99. ULONGLONG Reserved2; // alignment
  100. UCHAR ucaPrivateBuffer[ BURNENG_ERROR_INFO_PRIVATEBYTES ];
  101. } BURNENG_ERROR_STATUS, *PBURNENG_ERROR_STATUS;
  102. /*
  103. typedef struct {
  104. DWORD dwWriteSpeed;
  105. DWORD dwAudioGapSize;
  106. DWORD dwaReserved[ 3 ];
  107. } WRITERV_SETTABLE_PROPERTIES, *PWRITERV_SETTABLE_PROPERTIES;
  108. */
  109. typedef enum {
  110. eOrderMethodMotorola = 1,
  111. eOrderMethodMAX
  112. } BURNENGV_AUDIO_BYTE_ORDERING_METHOD, *PBURNENGV_AUDIO_BYTE_ORDERING_METHOD;
  113. typedef struct _tag_WriteParameters
  114. {
  115. DWORD dwByteReorderingMethod;
  116. DWORD dwaReserved1[2];
  117. BYTE bySectionCloseCDBLen;
  118. BYTE bySectionCloseCDBAcceptErrorSenseKey;
  119. BYTE bySectionCloseCDBAcceptErrorASC;
  120. BYTE byWriteCDBLen;
  121. BYTE byaReserved3[2];
  122. BYTE byaSectionCloseCDB[BURNENGV_CDB_BYTES];
  123. BYTE byaWriteCDB[BURNENGV_CDB_BYTES];
  124. } BURNENGV_WRITE_PARAMETERS, *PBURNENGV_WRITE_PARAMETERS;
  125. typedef struct _tag_ScsiInfo
  126. {
  127. UCHAR SrbStatus;
  128. SCSI_SENSE_DATA scsiSenseData;
  129. } BURNENGV_IMAPI_SCSI_INFO, *PBURNENGV_IMAPI_SCSI_INFO;
  130. typedef union _tag_ErrorExtraInfo
  131. {
  132. DWORD dwWin32Error;
  133. BURNENGV_IMAPI_SCSI_INFO imapiScsiError;
  134. BURNENG_ERROR_STATUS engErrorStatus;
  135. } BURNENGV_ERROR_EXTRA_INFO, *PBURNENGV_ERROR_EXTRA_INFO;
  136. typedef struct _tag_ErrorInfo
  137. {
  138. DWORD errorType;
  139. BURNENGV_ERROR_EXTRA_INFO info;
  140. } WRITER_ERROR_INFO, *PWRITER_ERROR_INFO;
  141. typedef enum
  142. {
  143. evBurnProgressNoError = 0,
  144. evBurnProgressNotStarted,
  145. evBurnProgressBurning,
  146. evBurnProgressComplete,
  147. evBurnProgressError,
  148. evBurnProgressLossOfStreamingError,
  149. evBurnProgressMediaWriteProtect, // i.e. 8/10X RW media in a 4X RW drive
  150. evBurnProgressUnableToWriteToMedia,
  151. evBurnProgressBadHandle
  152. } BURNENGV_PROGRESS_STATUS, *PBURNENGV_PROGRESS_STATUS;
  153. /*
  154. ** Restore compiler default packing and close off the C declarations.
  155. */
  156. #ifdef __cplusplus
  157. }
  158. #endif //__cplusplus
  159. #endif //_BURNV_H_