Add a script to make it easier to initialize /.git
[msysgit/historical-msysgit.git] / mingw / include / ddk / mcd.h
blobdcf13d658025de14d6e3ed3de84808fdd63e5830
1 /*
2 * mcd.h
4 * Media changer driver interface
6 * This file is part of the w32api package.
8 * Contributors:
9 * Created by Casper S. Hornstrup <chorns@users.sourceforge.net>
11 * THIS SOFTWARE IS NOT COPYRIGHTED
13 * This source code is offered for use in the public domain. You may
14 * use, modify or distribute it freely.
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.
23 #ifndef __MCD_H
24 #define __MCD_H
26 #if __GNUC__ >=3
27 #pragma GCC system_header
28 #endif
30 #ifdef __cplusplus
31 extern "C" {
32 #endif
34 #include "ntddk.h"
35 #include "srb.h"
36 #include "scsi.h"
37 #include "ntddchgr.h"
39 #if defined(_MCD_)
40 #define CHANGERAPI DECLSPEC_EXPORT
41 #else
42 #define CHANGERAPI DECLSPEC_IMPORT
43 #endif
45 #ifdef DebugPrint
46 #undef DebugPrint
47 #endif
49 #ifdef DBG
50 #define DebugPrint(x) ChangerClassDebugPrint x
51 #else
52 #define DebugPrint(x)
53 #endif
55 #define MAXIMUM_CHANGER_INQUIRY_DATA 252
57 CHANGERAPI
58 PVOID
59 DDKAPI
60 ChangerClassAllocatePool(
61 /*IN*/ POOL_TYPE PoolType,
62 /*IN*/ ULONG NumberOfBytes);
64 VOID
65 ChangerClassDebugPrint(
66 ULONG DebugPrintLevel,
67 PCCHAR DebugMessage,
68 ...);
70 CHANGERAPI
71 PVOID
72 DDKAPI
73 ChangerClassFreePool(
74 /*IN*/ PVOID PoolToFree);
76 CHANGERAPI
77 NTSTATUS
78 DDKAPI
79 ChangerClassSendSrbSynchronous(
80 /*IN*/ PDEVICE_OBJECT DeviceObject,
81 /*IN*/ PSCSI_REQUEST_BLOCK Srb,
82 /*IN*/ PVOID Buffer,
83 /*IN*/ ULONG BufferSize,
84 /*IN*/ BOOLEAN WriteToDevice);
87 typedef NTSTATUS DDKAPI
88 (*CHANGER_INITIALIZE)(
89 /*IN*/ PDEVICE_OBJECT DeviceObject);
91 typedef ULONG DDKAPI
92 (*CHANGER_EXTENSION_SIZE)(
93 VOID);
95 typedef VOID DDKAPI
96 (*CHANGER_ERROR_ROUTINE)(
97 PDEVICE_OBJECT DeviceObject,
98 PSCSI_REQUEST_BLOCK Srb,
99 NTSTATUS *Status,
100 BOOLEAN *Retry);
102 typedef NTSTATUS DDKAPI
103 (*CHANGER_COMMAND_ROUTINE)(
104 /*IN*/ PDEVICE_OBJECT DeviceObject,
105 /*IN*/ PIRP Irp);
107 typedef NTSTATUS DDKAPI
108 (*CHANGER_PERFORM_DIAGNOSTICS)(
109 /*IN*/ PDEVICE_OBJECT DeviceObject,
110 /*OUT*/ PWMI_CHANGER_PROBLEM_DEVICE_ERROR ChangerDeviceError);
112 typedef struct _MCD_INIT_DATA {
113 ULONG InitDataSize;
114 CHANGER_EXTENSION_SIZE ChangerAdditionalExtensionSize;
115 CHANGER_INITIALIZE ChangerInitialize;
116 CHANGER_ERROR_ROUTINE ChangerError;
117 CHANGER_PERFORM_DIAGNOSTICS ChangerPerformDiagnostics;
118 CHANGER_COMMAND_ROUTINE ChangerGetParameters;
119 CHANGER_COMMAND_ROUTINE ChangerGetStatus;
120 CHANGER_COMMAND_ROUTINE ChangerGetProductData;
121 CHANGER_COMMAND_ROUTINE ChangerSetAccess;
122 CHANGER_COMMAND_ROUTINE ChangerGetElementStatus;
123 CHANGER_COMMAND_ROUTINE ChangerInitializeElementStatus;
124 CHANGER_COMMAND_ROUTINE ChangerSetPosition;
125 CHANGER_COMMAND_ROUTINE ChangerExchangeMedium;
126 CHANGER_COMMAND_ROUTINE ChangerMoveMedium;
127 CHANGER_COMMAND_ROUTINE ChangerReinitializeUnit;
128 CHANGER_COMMAND_ROUTINE ChangerQueryVolumeTags;
129 } MCD_INIT_DATA, *PMCD_INIT_DATA;
131 CHANGERAPI
132 NTSTATUS
133 DDKAPI
134 ChangerClassInitialize(
135 /*IN*/ PDRIVER_OBJECT DriverObject,
136 /*IN*/ PUNICODE_STRING RegistryPath,
137 /*IN*/ PMCD_INIT_DATA MCDInitData);
139 #ifdef __cplusplus
141 #endif
143 #endif /* __MCD_H */