4 Part of the ReactOS project
5 (See ReactOS licence for usage restrictions/permissions)
7 This file created by Andrew Greenwood.
9 Started September 12th, 2005.
11 You may notice some structs are empty. These are just placeholders and
12 should be fleshed-out when functions are implemented that require the
16 #ifndef __INCLUDES_REACTOS_KS_H__
17 #define __INCLUDES_REACTOS_KS_H__
21 /* What's this meant to be?! */
25 /* Some unimplemented structs :) */
27 typedef struct _BUS_INTERFACE_REFERENCE
29 } BUS_INTERFACE_REFERENCE
, *PBUS_INTERFACE_REFERENCE
;
31 typedef struct _KSPIN_DESCRIPTOR
33 } KSPIN_DESCRIPTOR
, *PKSPIN_DESCRIPTOR
;
35 typedef struct _KSPIN_DESCRIPTOR_EX
37 } KSPIN_DESCRIPTOR_EX
, *PKSPIN_DESCRIPTOR_EX
;
40 /* This is just to shut the compiler up so DON'T USE IT! */
41 typedef void (*PFNKSINTERSECTHANDLER
)(void);
45 typedef struct _KS_COMPRESSION
48 ULONG RatioDenominator
;
49 ULONG RatioConstantMargin
;
50 } KS_COMPRESSION
, *PKS_COMPRESSION
;
52 typedef struct _KS_FRAMING_RANGE
57 } KS_FRAMING_RANGE
, *PKS_FRAMING_RANGE
;
59 typedef struct _KS_FRAMING_RANGE_WEIGHTED
62 } KS_FRAMING_RANGE_WEIGHTED
, *PKS_FRAMING_RANGE_WEIGHTED
;
64 typedef struct _KS_FRAMING_ITEM
73 ULONG MemoryTypeWeight
;
74 KS_FRAMING_RANGE PhysicalRange
;
75 KS_FRAMING_RANGE_WEIGHTED FramingRange
;
76 } KS_FRAMING_ITEM
, *PKS_FRAMING_ITEM
;
80 typedef struct _KSALLOCATOR_FRAMING
85 ULONG RequirementsFlags
;
92 } KSALLOCATOR_FRAMING
, *PKSALLOCATOR_FRAMING
;
94 typedef struct _KSALLOCATOR_FRAMING_EX
98 KS_COMPRESSION OutputCompression
;
100 KS_FRAMING_ITEM FramingItem
[1];
101 } KSALLOCATOR_FRAMING_EX
, *PKSALLOCATOR_FRAMING_EX
;
105 typedef struct _KSATTRIBUTE
110 } KSATTRIBUTE
, *PKSATTRIBUTE
;
114 typedef struct _KSBUFFER_ITEM
117 LIST_ENTRY BufferList;
118 } KSBUFFER_ITEM, *PKSBUFFER_ITEM;
122 typedef struct _KSIDENTIFIER
129 typedef KSIDENTIFIER KSPIN_MEDIUM
, *PKSPIN_MEDIUM
;
130 typedef KSIDENTIFIER KSPIN_INTERFACE
, *PKSPIN_INTERFACE
;
131 typedef KSIDENTIFIER KSPROPERTY
, *PKSPROPERTY
;
133 typedef struct _KSPRIORITY
136 ULONG PrioritySubClass
;
137 } KSPRIORITY
, *PKSPRIORITY
;
139 typedef struct _KSPIN_CONNECT
141 KSPIN_INTERFACE Interface
;
146 } KSPIN_CONNECT
, *PKSPIN_CONNECT
;
148 typedef struct _KSP_PIN
153 } KSP_PIN
, *PKSP_PIN
;
156 typedef struct _KSDEVICE
159 } KSDEVICE
, *PKSDEVICE
;
162 /* Device dispatch routines */
171 (*PFNKSDEVICEPNPSTART
)
175 IN PCM_RESOURCE_LIST TranslatedResourceList OPTIONAL
,
176 IN PCM_RESOURCE_LIST UntranslatedResourceList OPTIONAL
193 (*PFNKSDEVICEIRPVOID
)
200 (*PFNKSDEVICEQUERYCAPABILITIES
)
204 IN OUT PDEVICE_CAPABILITIES Capabilities
208 (*PFNKSDEVICEQUERYPOWER
)
212 IN DEVICE_POWER_STATE DeviceTo
,
213 IN DEVICE_POWER_STATE DeviceFrom
,
214 IN SYSTEM_POWER_STATE SystemTo
,
215 IN SYSTEM_POWER_STATE SystemFrom
,
216 IN POWER_ACTION Action
220 (*PFNKSDEVICESETPOWER
)
224 IN DEVICE_POWER_STATE To
,
225 IN DEVICE_POWER_STATE From
228 typedef struct _KSDEVICE_DISPATCH
230 PFNKSDEVICECREATE Add
;
231 PFNKSDEVICEPNPSTART Start
;
232 PFNKSDEVICE PostStart
;
233 PFNKSDEVICEIRP QueryStop
;
234 PFNKSDEVICEIRPVOID CancelStop
;
235 PFNKSDEVICEIRPVOID Stop
;
236 PFNKSDEVICEIRP QueryRemove
;
237 PFNKSDEVICEIRPVOID CancelRemove
;
238 PFNKSDEVICEIRPVOID Remove
;
239 PFNKSDEVICEQUERYCAPABILITIES QueryCapabilities
;
240 PFNKSDEVICEIRPVOID SurpriseRemoval
;
241 PFNKSDEVICEQUERYPOWER Querypower
;
242 PFNKSDEVICESETPOWER SetPower
;
243 } KSDEVICE_DISPATCH
, *PKSDEVICE_DISPATCH
;
247 /* Some more unimplemented stuff */
249 typedef struct _KSFILTER
251 } KSFILTER
, *PKSFILTER
;
253 typedef struct _KSPROCESSPIN_INDEXENTRY
255 } KSPROCESSPIN_INDEXENTRY
, *PKSPROCESSPIN_INDEXENTRY
;
258 /* Filter dispatch routines */
268 (*PFNKSFILTERPROCESS
)
271 IN PKSPROCESSPIN_INDEXENTRY ProcessPinsIndex
280 typedef struct _KSFILTER_DISPATCH
282 PFNKSFILTERIRP Create
;
283 PFNKSFILTERIRP Close
;
284 PFNKSFILTERPROCESS Process
;
285 PFNKSFILTERVOID Reset
;
286 } KSFILTER_DISPATCH
, *PKSFILTER_DISPATCH
;
292 typedef struct _KSAUTOMATION_TABLE
294 } KSAUTOMATION_TABLE
, *PKSAUTOMATION_TABLE
;
296 typedef struct _KSNODE_DESCRIPTOR
298 } KSNODE_DESCRIPTOR
, *PKSNODE_DESCRIPTOR
;
300 typedef struct _KSTOPOLOGY_CONNECTION
302 } KSTOPOLOGY_CONNECTION
, *PKSTOPOLOGY_CONNECTION
;
304 typedef struct _KSCOMPONENTID
306 } KSCOMPONENTID
, *PKSCOMPONENTID
;
309 /* Descriptors (filter, device, ...) */
311 typedef struct _KSFILTER_DESCRIPTOR
313 const KSFILTER_DISPATCH
* Dispatch
;
314 const KSAUTOMATION_TABLE
* AutomationTable
;
317 const GUID
* ReferenceGuid
;
318 ULONG PinDescriptorsCount
;
319 ULONG PinDescriptorSize
;
320 const KSPIN_DESCRIPTOR_EX
* PinDescriptors
;
321 ULONG CategoriesCount
;
322 const GUID
* Categories
;
323 ULONG NodeDescriptorsCount
;
324 ULONG NodeDescriptorSize
;
325 const KSNODE_DESCRIPTOR
* NodeDescriptors
;
326 ULONG ConnectionsCount
;
327 const KSTOPOLOGY_CONNECTION
* Connections
;
328 const KSCOMPONENTID
* ComponentId
;
329 } KSFILTER_DESCRIPTOR
, *PKSFILTER_DESCRIPTOR
;
331 typedef struct _KSDEVICE_DESCRIPTOR
333 const KSDEVICE_DISPATCH
* Dispatch
;
334 ULONG FilterDescriptorsCount
;
335 const KSFILTER_DESCRIPTOR
* const* FilterDescriptors
;
336 ULONG Version
; /* Doesn't appear to be in the documentation */
337 } KSDEVICE_DESCRIPTOR
, *PKSDEVICE_DESCRIPTOR
;
348 IN PDRIVER_OBJECT DriverObject
,
349 IN PUNICODE_STRING RegistryPath
,
350 IN
const KSDEVICE_DESCRIPTOR
* Descriptor OPTIONAL
);