ReactOS 0.4.15-dev-8116-gf69e256
fxdmatransactioncallbacks.hpp
Go to the documentation of this file.
1/*++
2
3Copyright (c) Microsoft Corporation
4
5Module Name:
6
7 FxDmaTransactionCallbacks.h
8
9Abstract:
10
11 This module implements the FxDmaTransaction object callbacks
12
13Environment:
14
15 kernel mode only
16
17Revision History:
18
19--*/
20
21#ifndef _FXDMATRANSACTIONCALLBACKS_H
22#define _FXDMATRANSACTIONCALLBACKS_H
23
24//
25// FxDmaTransactionProgramDma or FxDmaTransactionReserveDma callback delegate
26// These are mutually exclusive callbacks and are packed together in
27// the callback structure (C++ won't allow two classes with constructors
28// to be together in a union, so the containing class can't do the
29// packing)
30//
32
33public:
34 union {
38
40 VOID
41 ) :
43 {
44 Method.ProgramDma = NULL;
45 }
46
49 __in WDFDMATRANSACTION Transaction,
50 __in WDFDEVICE Device,
54 )
55 {
56 if (Method.ProgramDma) {
57 BOOLEAN cc;
58
60 cc = Method.ProgramDma( Transaction,
61 Device,
62 Context,
64 SgList );
66
67 return cc;
68 }
69 else {
70 return FALSE;
71 }
72 }
73
74 VOID
76 __in WDFDMATRANSACTION Transaction,
78 )
79 {
80 if (Method.ReserveDma) {
82 Method.ReserveDma( Transaction, Context );
84 }
85 }
86
87 VOID
89 VOID
90 )
91 {
92 Method.ProgramDma = NULL;
93 }
94};
95
96//
97// FxDmaTransactionConfigureChannel callback delegate
98//
99
101
102public:
104
106 VOID
107 ) :
108 FxCallback()
109 {
110 Method = NULL;
111 }
112
114 BOOLEAN
116 __in WDFDMATRANSACTION DmaTransaction,
117 __in WDFDEVICE Device,
120 __in size_t Offset,
121 __in size_t Length
122 )
123 {
124 BOOLEAN b = TRUE;
125 if (Method) {
128 CallbackEnd();
129 }
130 return b;
131 }
132};
133
134//
135// FxDmaTransactionTransferComplete callback delegate
136//
137
139
140public:
142
144 VOID
145 ) :
146 FxCallback()
147 {
148 Method = NULL;
149 }
150
151 VOID
153 __in WDFDMATRANSACTION Transaction,
154 __in WDFDEVICE Device,
158 )
159 {
160 if (Method) {
163 CallbackEnd();
164 }
165 }
166};
167
168#endif // _FXDMATRANSACTIONCALLBACKS_H
unsigned char BOOLEAN
void __inline CallbackStart(VOID)
Definition: fxcallback.hpp:64
void __inline CallbackEnd(VOID)
Definition: fxcallback.hpp:74
_Must_inspect_result_ BOOLEAN Invoke(__in WDFDMATRANSACTION DmaTransaction, __in WDFDEVICE Device, __in PVOID Context, __in_opt PMDL Mdl, __in size_t Offset, __in size_t Length)
PFN_WDF_DMA_TRANSACTION_CONFIGURE_DMA_CHANNEL Method
BOOLEAN InvokeProgramDma(__in WDFDMATRANSACTION Transaction, __in WDFDEVICE Device, __in PVOID Context, __in WDF_DMA_DIRECTION Direction, __in PSCATTER_GATHER_LIST SgList)
VOID InvokeReserveDma(__in WDFDMATRANSACTION Transaction, __in PVOID Context)
union FxDmaTransactionProgramOrReserveDma::@4346 Method
VOID Invoke(__in WDFDMATRANSACTION Transaction, __in WDFDEVICE Device, __in WDFCONTEXT Context, __in WDF_DMA_DIRECTION Direction, __in DMA_COMPLETION_STATUS Status)
PFN_WDF_DMA_TRANSACTION_DMA_TRANSFER_COMPLETE Method
#define __in
Definition: dbghelp.h:35
#define __in_opt
Definition: dbghelp.h:38
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
Status
Definition: gdiplustypes.h:25
GLboolean GLboolean GLboolean b
Definition: glext.h:6204
uint32_t cc
Definition: isohybrid.c:75
#define b
Definition: ke_i.h:79
#define _Must_inspect_result_
Definition: ms_sal.h:558
_In_ ULONG _In_ ULONG Offset
Definition: ntddpcm.h:101
_In_ ULONG _In_ ULONG _In_ ULONG Length
Definition: ntddpcm.h:102
_Must_inspect_result_ _In_ WDFDEVICE Device
Definition: wdfchildlist.h:474
enum _WDF_DMA_DIRECTION WDF_DMA_DIRECTION
EVT_WDF_DMA_TRANSACTION_DMA_TRANSFER_COMPLETE * PFN_WDF_DMA_TRANSACTION_DMA_TRANSFER_COMPLETE
_Must_inspect_result_ _In_ WDFDMAENABLER _In_opt_ PWDF_OBJECT_ATTRIBUTES _Out_ WDFDMATRANSACTION * DmaTransaction
EVT_WDF_PROGRAM_DMA * PFN_WDF_PROGRAM_DMA
EVT_WDF_RESERVE_DMA * PFN_WDF_RESERVE_DMA
WDF_EXTERN_C_START typedef _In_ WDFDEVICE _In_ WDFCONTEXT _In_ WDF_DMA_DIRECTION _In_ PSCATTER_GATHER_LIST SgList
_In_ WDFDEVICE _In_ PVOID _In_opt_ PMDL Mdl
WDF_EXTERN_C_START typedef _In_ WDFDEVICE _In_ WDFCONTEXT _In_ WDF_DMA_DIRECTION Direction
EVT_WDF_DMA_TRANSACTION_CONFIGURE_DMA_CHANNEL * PFN_WDF_DMA_TRANSACTION_CONFIGURE_DMA_CHANNEL
struct _SCATTER_GATHER_LIST * PSCATTER_GATHER_LIST
Definition: iotypes.h:2204
DMA_COMPLETION_STATUS
Definition: iotypes.h:2299