ReactOS  0.4.14-dev-554-g2f8d847
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 
13 typedef 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 
83 struct 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 
161 struct 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,
179  IN PVOID Create,
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,
195  IN PULONG Data) PURE;
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,
205  IN BOOL Enable) PURE;
206 
207  STDMETHOD_(PKSPROCESSPIN_INDEXENTRY, GetProcessDispatch)(THIS);
208 };
209 
210 /*****************************************************************************
211  * IKsFilterFactory
212  *****************************************************************************
213  */
214 
215 #undef INTERFACE
216 #define INTERFACE IKsFilterFactory
217 
218 DECLARE_INTERFACE_(IKsFilterFactory, IUnknown)
219 {
221 
222  STDMETHOD_(KSFILTERFACTORY*, GetStruct)(THIS) PURE;
223 
224  STDMETHOD_(NTSTATUS, SetDeviceClassesState)(THIS_
226 
229  IN const KSFILTER_DESCRIPTOR *Descriptor,
230  IN PWSTR RefString OPTIONAL,
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 
247 DECLARE_INTERFACE_(IKsPowerNotify, IUnknown)
248 {
250 
253 
255 };
256 
257 
258 /*****************************************************************************
259  * IKsDevice
260  *****************************************************************************
261  */
262 
263 #undef INTERFACE
264 #define INTERFACE IKsDevice
265 
266 struct 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 
319 DECLARE_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 
BOOL WINAPI SHIM_OBJ_NAME() Notify(DWORD fdwReason, PVOID ptr)
#define IN
Definition: typedefs.h:38
VOID WINAPI DECLSPEC_HOTPATCH Sleep(IN DWORD dwMilliseconds)
Definition: synch.c:790
#define DEFINE_ABSTRACT_UNKNOWN()
Definition: ksiface.h:5
#define THIS_
Definition: basetyps.h:65
_In_ PKSPIN_CONNECT Connect
Definition: ks.h:4536
_Out_ PULONG NumberOfMapRegisters
Definition: halfuncs.h:209
struct _Entry Entry
Definition: kefuncs.h:640
#define THIS
Definition: basetyps.h:66
_In_ PIRP Irp
Definition: csq.h:116
_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:182
uint16_t * PWSTR
Definition: typedefs.h:54
_In_ BOOLEAN Create
Definition: pstypes.h:511
LONG NTSTATUS
Definition: precomp.h:26
_In_ ULONGLONG _In_ ULONGLONG _In_ BOOLEAN Enable
Definition: ntddpcm.h:140
struct KSIOBJECT_BAG * PKSIOBJECT_BAG
PRKMUTEX BagMutex
Definition: ksiface.h:17
static VOID Wake(USHORT Csn)
Definition: hardware.c:100
_In_ SYSTEM_POWER_STATE _In_ ULONG _In_ BOOLEAN Asynchronous
Definition: ntpoapi.h:303
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned char BOOLEAN
_In_ LPGUID _In_ PVOID Data
Definition: classpnp.h:778
KSPIN_DATAFLOW
Definition: ks.h:1248
LIST_ENTRY ObjectList
Definition: ksiface.h:16
enum _DEVICE_POWER_STATE DEVICE_POWER_STATE
PVOID DeviceHeader
Definition: ksiface.h:18
IN PDCB IN VBO IN ULONG IN BOOLEAN Pin
Definition: fatprocs.h:415
static IUnknown Object
Definition: main.c:512
Definition: typedefs.h:117
DECLARE_INTERFACE_(IKsAllocator, IUnknown)
Definition: ksiface.h:30
IN PDEVICE_OBJECT DeviceObject
Definition: fatprocs.h:1560
LIST_ENTRY Entry
Definition: ksiface.h:15
enum State_ State
Definition: pofuncs.h:54
KSSTATE
Definition: ks.h:1214
Definition: sacdrv.h:267
static PFAST_MUTEX Mutex
Definition: timer.c:22
BOOL Initialize(HINSTANCE hInstance)
Definition: msconfig.c:341
#define OPTIONAL
Definition: typedefs.h:40
unsigned int * PULONG
Definition: retypes.h:1
#define PURE
Definition: basetyps.h:64
struct _KSPROCESSPIN_INDEXENTRY * PKSPROCESSPIN_INDEXENTRY
Definition: ks.h:3028
_Must_inspect_result_ _In_ PLARGE_INTEGER _In_ PLARGE_INTEGER _In_ ULONG _In_ PFILE_OBJECT _In_ PVOID Process
Definition: fsrtlfuncs.h:219
#define OUT
Definition: typedefs.h:39
_In_ PDEVICE_OBJECT _In_ ULONG _In_ PDRIVER_CONTROL ExecutionRoutine
Definition: iofuncs.h:1393
struct tagContext Context
Definition: acpixf.h:1030
unsigned int ULONG
Definition: retypes.h:1
#define const
Definition: zconf.h:230
DRIVER_CONTROL * PDRIVER_CONTROL
Definition: iotypes.h:192
#define STDMETHOD_(t, m)
Definition: basetyps.h:63
DataFlow
KSRESET
Definition: ks.h:1226
_In_ PSTORAGE_PROPERTY_ID _Outptr_ PSTORAGE_DESCRIPTOR_HEADER * Descriptor
Definition: classpnp.h:966