[KS]
[reactos.git] / reactos / drivers / ksfilter / ks / kstypes.h
1 #pragma once
2
3 #include <ntddk.h>
4 #include <ks.h>
5
6 typedef struct
7 {
8 KoCreateObjectHandler CreateObjectHandler;
9 }KO_DRIVER_EXTENSION, *PKO_DRIVER_EXTENSION;
10
11 typedef struct
12 {
13 const KSDEVICE_DESCRIPTOR *Descriptor;
14 }KS_DRIVER_EXTENSION, *PKS_DRIVER_EXTENSION;
15
16 typedef struct
17 {
18 KSOBJECT_HEADER ObjectHeader;
19 KSOBJECT_CREATE_ITEM CreateItem;
20 }KO_OBJECT_HEADER, *PKO_OBJECT_HEADER;
21
22
23 typedef struct
24 {
25 KSDISPATCH_TABLE DispatchTable;
26 KSOBJECTTYPE Type;
27
28 LONG ItemListCount;
29 LIST_ENTRY ItemList;
30
31 UNICODE_STRING ObjectClass;
32 PUNKNOWN Unknown;
33 PVOID ObjectType;
34
35 PDEVICE_OBJECT TargetDevice;
36 LIST_ENTRY TargetDeviceListEntry;
37
38 PDEVICE_OBJECT ParentDeviceObject;
39
40 PFNKSCONTEXT_DISPATCH PowerDispatch;
41 PVOID PowerContext;
42 LIST_ENTRY PowerDispatchEntry;
43 PKSOBJECT_CREATE_ITEM OriginalCreateItem;
44 ACCESS_MASK AccessMask;
45
46 }KSIOBJECT_HEADER, *PKSIOBJECT_HEADER;
47
48 typedef struct
49 {
50 LIST_ENTRY Entry;
51 PKSOBJECT_CREATE_ITEM CreateItem;
52 PFNKSITEMFREECALLBACK ItemFreeCallback;
53 LONG ReferenceCount;
54 LIST_ENTRY ObjectItemList;
55 }CREATE_ITEM_ENTRY, *PCREATE_ITEM_ENTRY;
56
57 typedef struct
58 {
59 KSOBJECTTYPE Type;
60 PKSDEVICE KsDevice;
61 PRKMUTEX ControlMutex;
62 LIST_ENTRY EventList;
63 KSPIN_LOCK EventListLock;
64 PUNKNOWN ClientAggregate;
65 PUNKNOWN OuterUnknown;
66 union
67 {
68 PKSDEVICE KsDevice;
69 PKSFILTERFACTORY KsFilterFactory;
70 PKSFILTER KsFilter;
71 }Parent;
72
73 union
74 {
75 PKSFILTERFACTORY FilterFactory;
76 PKSFILTER Filter;
77 PKSPIN Pin;
78 }Next;
79
80 union
81 {
82 PKSFILTERFACTORY FilterFactory;
83 PKSFILTER Filter;
84 }FirstChild;
85
86 }KSBASIC_HEADER, *PKSBASIC_HEADER;
87
88 typedef struct
89 {
90 KSBASIC_HEADER BasicHeader;
91 KSDEVICE KsDevice;
92
93 LONG ref;
94 ERESOURCE SecurityLock;
95
96 LONG ItemListCount;
97 LIST_ENTRY ItemList;
98
99 ULONG DeviceIndex;
100 PDEVICE_OBJECT PnpDeviceObject;
101 PDEVICE_OBJECT BaseDevice;
102
103 KSTARGET_STATE TargetState;
104 LIST_ENTRY TargetDeviceList;
105
106 KMUTEX DeviceMutex;
107 KMUTEX BagMutex;
108
109 LIST_ENTRY PowerDispatchList;
110 LIST_ENTRY ObjectBags;
111
112 PADAPTER_OBJECT AdapterObject;
113 ULONG MaxMappingsByteCount;
114 ULONG MappingTableStride;
115
116 }KSIDEVICE_HEADER, *PKSIDEVICE_HEADER;
117
118 typedef struct
119 {
120 PKSIDEVICE_HEADER DeviceHeader;
121
122 }DEVICE_EXTENSION, *PDEVICE_EXTENSION;
123
124 typedef struct
125 {
126 LIST_ENTRY Entry;
127 UNICODE_STRING SymbolicLink;
128 CLSID DeviceInterfaceClass;
129 }SYMBOLIC_LINK_ENTRY, *PSYMBOLIC_LINK_ENTRY;
130
131 typedef struct
132 {
133 PKSIDEVICE_HEADER DeviceHeader;
134 PIO_WORKITEM WorkItem;
135 }PNP_POSTSTART_CONTEXT, *PPNP_POSTSTART_CONTEXT;
136
137 typedef struct
138 {
139 PIRP Irp;
140 KEVENT Event;
141 }KSREMOVE_BUS_INTERFACE_CTX, *PKSREMOVE_BUS_INTERFACE_CTX;
142
143 typedef struct
144 {
145 PLIST_ENTRY List;
146 PFILE_OBJECT FileObject;
147 PKSEVENT_ENTRY EventEntry;
148 PIRP Irp;
149 }KSEVENT_CTX, *PKSEVENT_CTX;
150
151 typedef BOOLEAN (NTAPI *PKSEVENT_SYNCHRONIZED_ROUTINE)(PKSEVENT_CTX Context);
152
153 typedef struct
154 {
155 BOOLEAN Enabled;
156
157 PDEVICE_OBJECT PnpDeviceObject;
158 PDEVICE_OBJECT PhysicalDeviceObject;
159 PDEVICE_OBJECT BusDeviceObject;
160
161 UNICODE_STRING ServicePath;
162 UNICODE_STRING SymbolicLinkName;
163
164 WCHAR BusIdentifier[1];
165 }BUS_ENUM_DEVICE_EXTENSION, *PBUS_ENUM_DEVICE_EXTENSION;
166
167 typedef struct
168 {
169 PUCHAR FilterData;
170 ULONG FilterLength;
171 ULONG FilterOffset;
172
173 PUCHAR DataCache;
174 ULONG DataLength;
175 ULONG DataOffset;
176
177 }KSPCACHE_DESCRIPTOR, *PKSPCACHE_DESCRIPTOR;
178
179 typedef struct
180 {
181 DWORD dwVersion;
182 DWORD dwMerit;
183 DWORD dwPins;
184 DWORD dwUnused;
185 }KSPCACHE_FILTER_HEADER, *PKSPCACHE_FILTER_HEADER;
186
187 typedef struct
188 {
189 ULONG Signature;
190 ULONG Flags;
191 ULONG Instances;
192 ULONG MediaTypes;
193 ULONG Mediums;
194 DWORD Category;
195 }KSPCACHE_PIN_HEADER, *PKSPCACHE_PIN_HEADER;
196
197
198 typedef struct
199 {
200 ULONG Signature;
201 ULONG dwUnused;
202 ULONG OffsetMajor;
203 ULONG OffsetMinor;
204 }KSPCACHE_DATARANGE, *PKSPCACHE_DATARANGE;
205
206
207 typedef struct
208 {
209 CLSID Medium;
210 ULONG dw1;
211 ULONG dw2;
212 }KSPCACHE_MEDIUM;
213