ReactOS 0.4.16-dev-258-g81860b4
ksiface.h
Go to the documentation of this file.
1#pragma once
2
3#if !defined(DEFINE_ABSTRACT_UNKNOWN)
4
5#define DEFINE_ABSTRACT_UNKNOWN() \
6 STDMETHOD_(NTSTATUS, QueryInterface)(THIS_ \
7 REFIID InterfaceId, \
8 PVOID* Interface)PURE; \
9 STDMETHOD_(ULONG,AddRef)(THIS) PURE; \
10 STDMETHOD_(ULONG,Release)(THIS) PURE;
11#endif
12
13typedef struct
14{
20
21
22/*****************************************************************************
23 * IKsAllocator
24 *****************************************************************************
25 */
26
27#undef INTERFACE
28#define INTERFACE IKsAllocator
29
31{
33
34 STDMETHOD_(NTSTATUS, DispatchDeviceIoControl)(THIS_
36 IN PIRP Irp) PURE;
37
39
40 STDMETHOD_(NTSTATUS, AllocateFrame)(THIS_
41 IN PVOID * OutFrame) PURE;
42
43 STDMETHOD_(VOID, FreeFrame)(THIS_
44 IN PVOID OutFrame) PURE;
45};
46
47
48/*****************************************************************************
49 * IKsPin
50 *****************************************************************************
51 */
52
53#undef INTERFACE
54#define INTERFACE IKsClock
55
57{
59};
60
61/*****************************************************************************
62 * IKsTransport
63 *****************************************************************************
64 */
65
66#undef INTERFACE
67#define INTERFACE IKsTransport
68
70{
72};
73
74
75/*****************************************************************************
76 * IKsPin
77 *****************************************************************************
78 */
79
80#undef INTERFACE
81#define INTERFACE IKsPin
82
83struct KSPTRANSPORTCONFIG;
84
86{
88
89 STDMETHOD_(NTSTATUS, TransferKsIrp)(THIS_
90 IN PIRP Irp,
91 IN IKsTransport **OutTransport) PURE;
92
93 STDMETHOD_(VOID, DiscardKsIrp)(THIS_
94 IN PIRP Irp,
95 IN IKsTransport * *OutTransport) PURE;
96
98 IN IKsTransport * TransportIn,
99 OUT IKsTransport ** OutTransportIn,
100 OUT IKsTransport * *OutTransportOut,
102
103 STDMETHOD_(NTSTATUS, SetDeviceState)(THIS_
104 IN KSSTATE OldState,
105 IN KSSTATE NewState,
106 IN IKsTransport * *OutTransport) PURE;
107
108 STDMETHOD_(VOID, SetResetState)(THIS_
110 OUT IKsTransport * * OutTransportOut) PURE;
111
112 STDMETHOD_(NTSTATUS, GetTransportConfig)(THIS_
113 IN struct KSPTRANSPORTCONFIG * TransportConfig,
114 OUT IKsTransport ** OutTransportIn,
115 OUT IKsTransport ** OutTransportOut) PURE;
116
117 STDMETHOD_(NTSTATUS, SetTransportConfig)(THIS_
118 IN struct KSPTRANSPORTCONFIG const * TransportConfig,
119 OUT IKsTransport ** OutTransportIn,
120 OUT IKsTransport ** OutTransportOut) PURE;
121
122 STDMETHOD_(NTSTATUS, ResetTransportConfig)(THIS_
123 OUT IKsTransport ** OutTransportIn,
124 OUT IKsTransport ** OutTransportOut) PURE;
125
126 STDMETHOD_(PKSPIN, GetStruct)(THIS) PURE;
127 STDMETHOD_(PKSPROCESSPIN, GetProcessPin)(THIS) PURE;
128 STDMETHOD_(NTSTATUS, AttemptBypass)(THIS) PURE;
129 STDMETHOD_(NTSTATUS, AttemptUnbypass)(THIS) PURE;
130
131 STDMETHOD_(VOID, GenerateConnectionEvents)(THIS_
132 IN ULONG EventMask) PURE;
133
134 STDMETHOD_(NTSTATUS, ClientSetDeviceState)(THIS_
135 IN KSSTATE StateIn,
136 IN KSSTATE StateOut) PURE;
137};
138
139/*****************************************************************************
140 * IKsQueue
141 *****************************************************************************
142 */
143
144#undef INTERFACE
145#define INTERFACE IKsQueue
146
148{
150
151};
152
153/*****************************************************************************
154 * IKsFilterFactory
155 *****************************************************************************
156 */
157
158#undef INTERFACE
159#define INTERFACE IKsFilter
160
161struct KSPROCESSPIPESECTION;
162
163
165{
167
168 STDMETHOD_(PKSFILTER, GetStruct)(THIS) PURE;
169
170 STDMETHOD_(BOOL, DoAllNecessaryPinsExist)(THIS) PURE;
171
172 STDMETHOD_(NTSTATUS, CreateNode)(THIS_
173 IN PIRP Irp,
174 IN IKsPin * Pin,
175 IN PLIST_ENTRY ListEntry) PURE;
176
177 STDMETHOD_(NTSTATUS, BindProcessPinsToPipeSection)(THIS_
178 IN struct KSPROCESSPIPESECTION *Section,
180 IN PKSPIN KsPin,
181 OUT IKsPin **Pin,
182 OUT PKSGATE *OutGate) PURE;
183
184 STDMETHOD_(NTSTATUS, UnbindProcessPinsFromPipeSection)(THIS_
185 IN struct KSPROCESSPIPESECTION *Section) PURE;
186
187 STDMETHOD_(NTSTATUS, AddProcessPin)(THIS_
188 IN PKSPROCESSPIN ProcessPin) PURE;
189
190 STDMETHOD_(NTSTATUS, RemoveProcessPin)(THIS_
191 IN PKSPROCESSPIN ProcessPin) PURE;
192
193 STDMETHOD_(BOOL, ReprepareProcessPipeSection)(THIS_
194 IN struct KSPROCESSPIPESECTION *PipeSection,
196
197 STDMETHOD_(VOID, DeliverResetState)(THIS_
198 IN struct KSPROCESSPIPESECTION *PipeSection,
200
201 STDMETHOD_(BOOL, IsFrameHolding)(THIS);
202
203 STDMETHOD_(VOID, RegisterForCopyCallbacks)(THIS_
204 IKsQueue * Queue,
206
207 STDMETHOD_(PKSPROCESSPIN_INDEXENTRY, GetProcessDispatch)(THIS);
208};
209
210/*****************************************************************************
211 * IKsFilterFactory
212 *****************************************************************************
213 */
214
215#undef INTERFACE
216#define INTERFACE IKsFilterFactory
217
218DECLARE_INTERFACE_(IKsFilterFactory, IUnknown)
219{
221
222 STDMETHOD_(KSFILTERFACTORY*, GetStruct)(THIS) PURE;
223
224 STDMETHOD_(NTSTATUS, SetDeviceClassesState)(THIS_
226
229 IN const KSFILTER_DESCRIPTOR *Descriptor,
232 IN ULONG CreateItemFlags,
233 IN PFNKSFILTERFACTORYPOWER SleepCallback OPTIONAL,
234 IN PFNKSFILTERFACTORYPOWER WakeCallback OPTIONAL,
235 OUT PKSFILTERFACTORY *FilterFactory OPTIONAL)PURE;
236};
237
238
239/*****************************************************************************
240 * IKsPowerNotify
241 *****************************************************************************
242 */
243
244#undef INTERFACE
245#define INTERFACE IKsPowerNotify
246
248{
250
253
255};
256
257
258/*****************************************************************************
259 * IKsDevice
260 *****************************************************************************
261 */
262
263#undef INTERFACE
264#define INTERFACE IKsDevice
265
266struct KSPOWER_ENTRY;
267
269{
271
272 STDMETHOD_(KSDEVICE*,GetStruct)(THIS) PURE;
273
274 STDMETHOD_(NTSTATUS, InitializeObjectBag)(THIS_
275 IN PKSIOBJECT_BAG Bag,
277
278 STDMETHOD_(NTSTATUS,AcquireDevice)(THIS) PURE;
279 STDMETHOD_(NTSTATUS,ReleaseDevice)(THIS) PURE;
280
281 STDMETHOD_(NTSTATUS, GetAdapterObject)(THIS_
283 IN PULONG MaxMappingsByteCount,
284 IN PULONG MappingTableStride) PURE;
285
286 STDMETHOD_(NTSTATUS, AddPowerEntry)(THIS_
287 IN struct KSPOWER_ENTRY * Entry,
288 IN IKsPowerNotify* Notify)PURE;
289
290 STDMETHOD_(NTSTATUS, RemovePowerEntry)(THIS_
291 IN struct KSPOWER_ENTRY * Entry)PURE;
292
293 STDMETHOD_(NTSTATUS, PinStateChange)(THIS_
294 IN KSPIN Pin,
295 IN PIRP Irp,
296 IN KSSTATE OldState,
297 IN KSSTATE NewState)PURE;
298
299 STDMETHOD_(NTSTATUS, ArbitrateAdapterChannel)(THIS_
303
304 STDMETHOD_(NTSTATUS, CheckIoCapability)(THIS_
306};
307
308#undef INTERFACE
309
310
311/*****************************************************************************
312 * IKsProcessingObject
313 *****************************************************************************
314 */
315
316#undef INTERFACE
317#define INTERFACE IKsProcessingObject
318
319DECLARE_INTERFACE_(IKsProcessingObject, IUnknown)
320{
322
323 STDMETHOD_(VOID, ProcessingObjectWork)(THIS) PURE;
324
325 STDMETHOD_(PKSGATE, GetAndGate)(THIS) PURE;
326
329
330 STDMETHOD_(VOID, Reset)(THIS) PURE;
331
332 STDMETHOD_(VOID, TriggerNotification)(THIS) PURE;
333
334};
335
336#undef INTERFACE
337
unsigned char BOOLEAN
LONG NTSTATUS
Definition: precomp.h:26
@ Create
Definition: registry.c:563
#define DECLARE_INTERFACE_(i, b)
Definition: basetyps.h:78
#define PURE
Definition: basetyps.h:64
#define THIS_
Definition: basetyps.h:65
#define THIS
Definition: basetyps.h:66
#define STDMETHOD_(t, m)
Definition: basetyps.h:63
Definition: Mutex.h:16
_In_ PIRP Irp
Definition: csq.h:116
DataFlow
BOOL WINAPI SHIM_OBJ_NAME() Notify(DWORD fdwReason, PVOID ptr)
static VOID Wake(_In_ UCHAR Csn)
Definition: hardware.c:154
IN PDCB IN VBO IN ULONG IN BOOLEAN Pin
Definition: fatprocs.h:428
unsigned int BOOL
Definition: ntddk_ex.h:94
_Must_inspect_result_ _In_ PLARGE_INTEGER _In_ PLARGE_INTEGER _In_ ULONG _In_ PFILE_OBJECT _In_ PVOID Process
Definition: fsrtlfuncs.h:223
__in WDFDEVICE __in CONST GUID __in_opt PCUNICODE_STRING RefString
@ ResetState
Definition: hdaudio.h:83
@ Unknown
Definition: i8042prt.h:114
KSRESET
Definition: ks.h:1226
struct _KSPROCESSPIN_INDEXENTRY * PKSPROCESSPIN_INDEXENTRY
Definition: ks.h:3028
KSSTATE
Definition: ks.h:1214
KSPIN_DATAFLOW
Definition: ks.h:1248
_In_ PKSPIN_CONNECT Connect
Definition: ks.h:4536
#define DEFINE_ABSTRACT_UNKNOWN()
Definition: ksiface.h:5
struct KSIOBJECT_BAG * PKSIOBJECT_BAG
_In_ ULONGLONG _In_ ULONGLONG _In_ BOOLEAN Enable
Definition: ntddpcm.h:142
_In_ SYSTEM_POWER_STATE _In_ ULONG _In_ BOOLEAN Asynchronous
Definition: ntpoapi.h:305
enum _DEVICE_POWER_STATE DEVICE_POWER_STATE
@ Close
Definition: sacdrv.h:268
base of all file and directory entries
Definition: entries.h:83
PVOID DeviceHeader
Definition: ksiface.h:18
LIST_ENTRY ObjectList
Definition: ksiface.h:16
LIST_ENTRY Entry
Definition: ksiface.h:15
PRKMUTEX BagMutex
Definition: ksiface.h:17
Definition: typedefs.h:120
VOID WINAPI DECLSPEC_HOTPATCH Sleep(IN DWORD dwMilliseconds)
Definition: synch.c:790
uint16_t * PWSTR
Definition: typedefs.h:56
#define OPTIONAL
Definition: typedefs.h:41
uint32_t * PULONG
Definition: typedefs.h:59
#define IN
Definition: typedefs.h:39
uint32_t ULONG
Definition: typedefs.h:59
#define OUT
Definition: typedefs.h:40
_Must_inspect_result_ _In_ WDFCOLLECTION _In_ WDFOBJECT Object
_In_ PDEVICE_OBJECT DeviceObject
Definition: wdfdevice.h:2055
_Must_inspect_result_ _In_ WDFDEVICE _In_ PIRP _In_ WDFQUEUE Queue
Definition: wdfdevice.h:2225
_Must_inspect_result_ _In_ WDFIORESLIST _In_ PIO_RESOURCE_DESCRIPTOR Descriptor
Definition: wdfresource.h:342
_In_ USHORT _In_ ULONG _In_ PSOCKADDR _In_ PSOCKADDR _Reserved_ ULONG _In_opt_ PVOID _In_opt_ const WSK_CLIENT_CONNECTION_DISPATCH _In_opt_ PEPROCESS _In_opt_ PETHREAD _In_opt_ PSECURITY_DESCRIPTOR SecurityDescriptor
Definition: wsk.h:191
_Out_ PULONG NumberOfMapRegisters
Definition: halfuncs.h:209
_In_ PDEVICE_OBJECT _In_ ULONG _In_ PDRIVER_CONTROL ExecutionRoutine
Definition: iofuncs.h:1399
DRIVER_CONTROL * PDRIVER_CONTROL
Definition: iotypes.h:215
static void Initialize()
Definition: xlate.c:212
#define const
Definition: zconf.h:233