ReactOS 0.4.15-dev-5669-g09dde2c
minitape.h
Go to the documentation of this file.
1/*
2 * minitape.h
3 *
4 * Minitape driver interface
5 *
6 * This file is part of the w32api package.
7 *
8 * Contributors:
9 * Created by Casper S. Hornstrup <chorns@users.sourceforge.net>
10 *
11 * THIS SOFTWARE IS NOT COPYRIGHTED
12 *
13 * This source code is offered for use in the public domain. You may
14 * use, modify or distribute it freely.
15 *
16 * This code is distributed in the hope that it will be useful but
17 * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
18 * DISCLAIMED. This includes but is not limited to warranties of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
20 *
21 */
22#ifndef _MINITAPE_
23#define _MINITAPE_
24
25#ifdef __cplusplus
26extern "C" {
27#endif
28
29#pragma pack(push,4)
30
31#define MEDIA_ERASEABLE 0x00000001
32#define MEDIA_WRITE_ONCE 0x00000002
33#define MEDIA_READ_ONLY 0x00000004
34#define MEDIA_READ_WRITE 0x00000008
35#define MEDIA_WRITE_PROTECTED 0x00000100
36#define MEDIA_CURRENTLY_MOUNTED 0x80000000
37
38typedef enum _TAPE_STATUS {
71
72#define INQUIRYDATABUFFERSIZE 36
73
74#ifndef _INQUIRYDATA_DEFINED /* also in scsi.h */
75#define _INQUIRYDATA_DEFINED
76
77typedef struct _INQUIRYDATA {
82 __GNU_EXTENSION union {
84 __GNU_EXTENSION struct {
88 };
89 };
113 UCHAR VendorId[8];
114 UCHAR ProductId[16];
117 UCHAR Reserved3[40];
119
120#endif /* _INQUIRYDATA_DEFINED */
121
155
156typedef BOOLEAN
158 _In_ PINQUIRYDATA InquiryData,
159 _In_ PMODE_CAPABILITIES_PAGE ModeCapabilitiesPage);
160
161typedef VOID
163 _In_ PVOID MinitapeExtension,
164 _In_ PINQUIRYDATA InquiryData,
165 _In_ PMODE_CAPABILITIES_PAGE ModeCapabilitiesPage);
166
167typedef VOID
169 _In_ PVOID MinitapeExtension,
171 _Inout_ PTAPE_STATUS TapeStatus);
172
175 _Inout_ PVOID MinitapeExtension,
176 _Inout_ PVOID CommandExtension,
177 _Inout_ PVOID CommandParameters,
179 _In_ ULONG CallNumber,
180 _In_ TAPE_STATUS StatusOfLastCommand,
181 _Inout_ PULONG RetryFlags);
182
183#define TAPE_RETRY_MASK 0x0000FFFF
184#define IGNORE_ERRORS 0x00010000
185#define RETURN_ERRORS 0x00020000
186
187typedef struct _TAPE_INIT_DATA {
208
209typedef struct _TAPE_PHYS_POSITION {
213
214#pragma pack(pop)
215
216#ifdef __cplusplus
217}
218#endif
219
220#endif /* _MINITAPE_ */
unsigned char BOOLEAN
#define __GNU_EXTENSION
Definition: _mingw_mac.h:135
#define VOID
Definition: acefi.h:82
_In_ PSCSI_REQUEST_BLOCK Srb
Definition: cdrom.h:989
struct _MODE_CAPABILITIES_PAGE * PMODE_CAPABILITIES_PAGE
struct _INQUIRYDATA * PINQUIRYDATA
enum _TAPE_STATUS TAPE_STATUS
struct _TAPE_PHYS_POSITION PTAPE_PHYS_POSITION
struct _MODE_CAPABILITIES_PAGE MODE_CAPABILITIES_PAGE
TAPE_STATUS(NTAPI * TAPE_PROCESS_COMMAND_ROUTINE)(_Inout_ PVOID MinitapeExtension, _Inout_ PVOID CommandExtension, _Inout_ PVOID CommandParameters, _Inout_ PSCSI_REQUEST_BLOCK Srb, _In_ ULONG CallNumber, _In_ TAPE_STATUS StatusOfLastCommand, _Inout_ PULONG RetryFlags)
Definition: minitape.h:174
enum _TAPE_STATUS * PTAPE_STATUS
struct _TAPE_INIT_DATA TAPE_INIT_DATA
struct _TAPE_PHYS_POSITION TAPE_PHYS_POSITION
_TAPE_STATUS
Definition: minitape.h:38
@ TAPE_STATUS_MEDIA_CHANGED
Definition: minitape.h:47
@ TAPE_STATUS_IO_TIMEOUT
Definition: minitape.h:64
@ TAPE_STATUS_INVALID_BLOCK_LENGTH
Definition: minitape.h:63
@ TAPE_STATUS_FILEMARK_DETECTED
Definition: minitape.h:50
@ TAPE_STATUS_NO_SUCH_DEVICE
Definition: minitape.h:62
@ TAPE_STATUS_UNRECOGNIZED_MEDIA
Definition: minitape.h:58
@ TAPE_STATUS_SUCCESS
Definition: minitape.h:42
@ TAPE_STATUS_SETMARK_DETECTED
Definition: minitape.h:49
@ TAPE_STATUS_SEND_SRB_AND_CALLBACK
Definition: minitape.h:39
@ TAPE_STATUS_CALLBACK
Definition: minitape.h:40
@ TAPE_STATUS_CLEANER_CARTRIDGE_INSTALLED
Definition: minitape.h:69
@ TAPE_STATUS_INSUFFICIENT_RESOURCES
Definition: minitape.h:43
@ TAPE_STATUS_IO_DEVICE_ERROR
Definition: minitape.h:57
@ TAPE_STATUS_BEGINNING_OF_MEDIA
Definition: minitape.h:51
@ TAPE_STATUS_INVALID_PARAMETER
Definition: minitape.h:46
@ TAPE_STATUS_INVALID_DEVICE_REQUEST
Definition: minitape.h:45
@ TAPE_STATUS_BUFFER_OVERFLOW
Definition: minitape.h:53
@ TAPE_STATUS_DEVICE_DATA_ERROR
Definition: minitape.h:61
@ TAPE_STATUS_EOM_OVERFLOW
Definition: minitape.h:55
@ TAPE_STATUS_DATA_OVERRUN
Definition: minitape.h:66
@ TAPE_STATUS_NO_MEDIA
Definition: minitape.h:56
@ TAPE_STATUS_REQUIRES_CLEANING
Definition: minitape.h:68
@ TAPE_STATUS_NO_DATA_DETECTED
Definition: minitape.h:54
@ TAPE_STATUS_MEDIA_WRITE_PROTECTED
Definition: minitape.h:60
@ TAPE_STATUS_END_OF_MEDIA
Definition: minitape.h:52
@ TAPE_STATUS_NOT_IMPLEMENTED
Definition: minitape.h:44
@ TAPE_STATUS_DEVICE_BUSY
Definition: minitape.h:67
@ TAPE_STATUS_DEVICE_NOT_CONNECTED
Definition: minitape.h:65
@ TAPE_STATUS_DEVICE_NOT_READY
Definition: minitape.h:59
@ TAPE_STATUS_BUS_RESET
Definition: minitape.h:48
@ TAPE_STATUS_CHECK_TEST_UNIT_READY
Definition: minitape.h:41
VOID(NTAPI * TAPE_EXTENSION_INIT_ROUTINE)(_In_ PVOID MinitapeExtension, _In_ PINQUIRYDATA InquiryData, _In_ PMODE_CAPABILITIES_PAGE ModeCapabilitiesPage)
Definition: minitape.h:162
BOOLEAN(NTAPI * TAPE_VERIFY_INQUIRY_ROUTINE)(_In_ PINQUIRYDATA InquiryData, _In_ PMODE_CAPABILITIES_PAGE ModeCapabilitiesPage)
Definition: minitape.h:157
struct _TAPE_INIT_DATA * PTAPE_INIT_DATA
struct _INQUIRYDATA INQUIRYDATA
VOID(NTAPI * TAPE_ERROR_ROUTINE)(_In_ PVOID MinitapeExtension, _In_ PSCSI_REQUEST_BLOCK Srb, _Inout_ PTAPE_STATUS TapeStatus)
Definition: minitape.h:168
#define _Inout_
Definition: ms_sal.h:378
#define _In_
Definition: ms_sal.h:308
#define BOOLEAN
Definition: pedump.c:73
UCHAR Versions
Definition: cdrw_hw.h:1120
UCHAR CommandQueue
Definition: cdrw_hw.h:1125
UCHAR NormACA
Definition: minitape.h:92
UCHAR TransferDisable
Definition: minitape.h:107
UCHAR MultiPort
Definition: minitape.h:101
UCHAR Synchronous
Definition: cdrw_hw.h:1128
UCHAR Addr32
Definition: minitape.h:98
UCHAR ECMAVersion
Definition: minitape.h:86
UCHAR RemovableMedia
Definition: cdrw_hw.h:1119
UCHAR AERC
Definition: minitape.h:94
UCHAR ProductId[16]
Definition: cdrw_hw.h:1133
UCHAR ReservedBit3
Definition: minitape.h:104
UCHAR LinkedCommands
Definition: cdrw_hw.h:1127
UCHAR ProductRevisionLevel[4]
Definition: cdrw_hw.h:1134
UCHAR DeviceTypeModifier
Definition: cdrw_hw.h:1118
UCHAR TerminateTask
Definition: minitape.h:93
UCHAR AckReqQ
Definition: minitape.h:99
UCHAR ISOVersion
Definition: minitape.h:87
UCHAR EnclosureServices
Definition: minitape.h:103
UCHAR RelativeAddressing
Definition: cdrw_hw.h:1131
UCHAR Wide16Bit
Definition: cdrw_hw.h:1129
UCHAR ReservedBit2
Definition: minitape.h:102
UCHAR Wide32Bit
Definition: cdrw_hw.h:1130
UCHAR VendorId[8]
Definition: cdrw_hw.h:1132
UCHAR ResponseDataFormat
Definition: cdrw_hw.h:1121
UCHAR Reserved[2]
Definition: cdrw_hw.h:1123
UCHAR DeviceType
Definition: cdrw_hw.h:1116
UCHAR DeviceTypeQualifier
Definition: cdrw_hw.h:1117
UCHAR Addr16
Definition: minitape.h:97
UCHAR MediumChanger
Definition: minitape.h:100
UCHAR VendorSpecific[20]
Definition: cdrw_hw.h:1135
UCHAR HiSupport
Definition: minitape.h:91
UCHAR SoftReset
Definition: cdrw_hw.h:1124
UCHAR ANSIVersion
Definition: minitape.h:85
UCHAR AdditionalLength
Definition: cdrw_hw.h:1122
UCHAR Reserved3[40]
Definition: cdrw_hw.h:1136
UCHAR MaximumStoredDefectedListEntries[2]
Definition: minitape.h:149
UCHAR ContinuousTransferLimit[2]
Definition: minitape.h:150
UCHAR MaximumSpeedSupported[2]
Definition: minitape.h:148
UCHAR CurrentSpeedSelected[2]
Definition: minitape.h:151
TAPE_PROCESS_COMMAND_ROUTINE PreProcessReadWrite
Definition: minitape.h:206
TAPE_PROCESS_COMMAND_ROUTINE GetPosition
Definition: minitape.h:199
TAPE_PROCESS_COMMAND_ROUTINE GetStatus
Definition: minitape.h:200
TAPE_PROCESS_COMMAND_ROUTINE SetDriveParameters
Definition: minitape.h:202
TAPE_PROCESS_COMMAND_ROUTINE CreatePartition
Definition: minitape.h:195
TAPE_PROCESS_COMMAND_ROUTINE Erase
Definition: minitape.h:196
ULONG DefaultTimeOutValue
Definition: minitape.h:192
ULONG MinitapeExtensionSize
Definition: minitape.h:190
TAPE_ERROR_ROUTINE TapeError
Definition: minitape.h:193
TAPE_EXTENSION_INIT_ROUTINE ExtensionInit
Definition: minitape.h:191
TAPE_PROCESS_COMMAND_ROUTINE GetMediaParameters
Definition: minitape.h:198
TAPE_PROCESS_COMMAND_ROUTINE SetMediaParameters
Definition: minitape.h:203
ULONG CommandExtensionSize
Definition: minitape.h:194
TAPE_VERIFY_INQUIRY_ROUTINE VerifyInquiry
Definition: minitape.h:188
TAPE_PROCESS_COMMAND_ROUTINE WriteMarks
Definition: minitape.h:205
TAPE_PROCESS_COMMAND_ROUTINE SetPosition
Definition: minitape.h:204
TAPE_PROCESS_COMMAND_ROUTINE GetDriveParameters
Definition: minitape.h:197
BOOLEAN QueryModeCapabilitiesPage
Definition: minitape.h:189
TAPE_PROCESS_COMMAND_ROUTINE Prepare
Definition: minitape.h:201
ULONG SeekBlockAddress
Definition: minitape.h:210
uint32_t * PULONG
Definition: typedefs.h:59
#define NTAPI
Definition: typedefs.h:36
uint32_t ULONG
Definition: typedefs.h:59
_In_ WDFMEMORY _Out_opt_ size_t * BufferSize
Definition: wdfmemory.h:254
unsigned char UCHAR
Definition: xmlstorage.h:181