fc039f13fe1f15072cc38789f42ff1575e6146b4
[reactos.git] / reactos / drivers / ksfilter / ks / ksfunc.h
1 #pragma once
2
3 #include "ksiface.h"
4 #include "kstypes.h"
5
6 #define TAG_KSDEVICE 'DESK'
7 #define TAG_KSOBJECT_TAG 'HOSK'
8
9 VOID
10 CompleteRequest(
11 PIRP Irp,
12 CCHAR PriorityBoost);
13
14
15
16 NTSTATUS
17 NTAPI
18 KspCreateObjectType(
19 IN HANDLE ParentHandle,
20 IN LPWSTR ObjectType,
21 PVOID CreateParameters,
22 UINT CreateParametersSize,
23 IN ACCESS_MASK DesiredAccess,
24 OUT PHANDLE NodeHandle);
25
26 NTSTATUS
27 NTAPI
28 KspCreateFilterFactory(
29 IN PDEVICE_OBJECT DeviceObject,
30 IN const KSFILTER_DESCRIPTOR *Descriptor,
31 IN PWSTR RefString OPTIONAL,
32 IN PSECURITY_DESCRIPTOR SecurityDescriptor OPTIONAL,
33 IN ULONG CreateItemFlags,
34 IN PFNKSFILTERFACTORYPOWER SleepCallback OPTIONAL,
35 IN PFNKSFILTERFACTORYPOWER WakeCallback OPTIONAL,
36 OUT PKSFILTERFACTORY *FilterFactory OPTIONAL);
37
38 NTSTATUS
39 NTAPI
40 IKsDevice_Create(
41 IN PDEVICE_OBJECT DeviceObject,
42 IN PIRP Irp);
43
44 NTSTATUS
45 NTAPI
46 IKsDevice_Pnp(
47 IN PDEVICE_OBJECT DeviceObject,
48 IN PIRP Irp);
49
50 NTSTATUS
51 NTAPI
52 IKsDevice_Power(
53 IN PDEVICE_OBJECT DeviceObject,
54 IN PIRP Irp);
55
56 NTSTATUS
57 NTAPI
58 KspCreateFilter(
59 IN PDEVICE_OBJECT DeviceObject,
60 IN PIRP Irp,
61 IN IKsFilterFactory *iface);
62
63 NTSTATUS
64 KspSetDeviceInterfacesState(
65 IN PLIST_ENTRY ListHead,
66 IN BOOL Enable);
67
68 NTSTATUS
69 KspFreeDeviceInterfaces(
70 IN PLIST_ENTRY ListHead);
71
72 NTSTATUS
73 KspRegisterDeviceInterfaces(
74 IN PDEVICE_OBJECT PhysicalDeviceObject,
75 IN ULONG CategoriesCount,
76 IN GUID const*Categories,
77 IN PUNICODE_STRING ReferenceString,
78 OUT PLIST_ENTRY SymbolicLinkList);
79
80 NTSTATUS
81 KspForwardIrpSynchronous(
82 IN PDEVICE_OBJECT DeviceObject,
83 IN PIRP Irp);
84
85 PVOID
86 AllocateItem(
87 IN POOL_TYPE PoolType,
88 IN SIZE_T NumberOfBytes);
89
90 VOID
91 FreeItem(
92 IN PVOID Item);
93
94 KSDDKAPI
95 NTSTATUS
96 NTAPI
97 KspPinPropertyHandler(
98 IN PIRP Irp,
99 IN PKSPROPERTY Property,
100 IN OUT PVOID Data,
101 IN ULONG DescriptorsCount,
102 IN const KSPIN_DESCRIPTOR* Descriptors,
103 IN ULONG DescriptorSize);
104
105
106 NTSTATUS
107 FindMatchingCreateItem(
108 PLIST_ENTRY ListHead,
109 PUNICODE_STRING String,
110 OUT PCREATE_ITEM_ENTRY *OutCreateItem);
111
112 NTSTATUS
113 KspCopyCreateRequest(
114 IN PIRP Irp,
115 IN LPWSTR ObjectClass,
116 IN OUT PULONG Size,
117 OUT PVOID * Result);
118
119 NTSTATUS
120 KspCreatePin(
121 IN PDEVICE_OBJECT DeviceObject,
122 IN PIRP Irp,
123 IN PKSDEVICE KsDevice,
124 IN IKsFilterFactory * FilterFactory,
125 IN IKsFilter* Filter,
126 IN PKSPIN_CONNECT Connect,
127 IN KSPIN_DESCRIPTOR_EX* Descriptor);
128
129 NTSTATUS
130 KspAddCreateItemToList(
131 OUT PLIST_ENTRY ListHead,
132 IN ULONG ItemsCount,
133 IN PKSOBJECT_CREATE_ITEM ItemsList);
134
135 VOID
136 KspFreeCreateItems(
137 IN PLIST_ENTRY ListHead);
138
139 NTSTATUS
140 KspPropertyHandler(
141 IN PIRP Irp,
142 IN ULONG PropertySetsCount,
143 IN const KSPROPERTY_SET* PropertySet,
144 IN PFNKSALLOCATOR Allocator OPTIONAL,
145 IN ULONG PropertyItemSize OPTIONAL);
146
147 NTSTATUS
148 NTAPI
149 IKsFilterFactory_Create(
150 IN PDEVICE_OBJECT DeviceObject,
151 IN PIRP Irp);
152
153 NTSTATUS
154 KspSetFilterFactoriesState(
155 IN PKSIDEVICE_HEADER DeviceHeader,
156 IN BOOLEAN NewState);
157
158 NTSTATUS
159 NTAPI
160 KspMethodHandlerWithAllocator(
161 IN PIRP Irp,
162 IN ULONG MethodSetsCount,
163 IN const KSMETHOD_SET *MethodSet,
164 IN PFNKSALLOCATOR Allocator OPTIONAL,
165 IN ULONG MethodItemSize OPTIONAL);
166
167 VOID
168 IKsFilter_AddPin(
169 PKSFILTER Filter,
170 PKSPIN Pin);
171
172 VOID
173 IKsFilter_RemovePin(
174 PKSFILTER Filter,
175 PKSPIN Pin);
176
177 NTSTATUS
178 KspEnableEvent(
179 IN PIRP Irp,
180 IN ULONG EventSetsCount,
181 IN PKSEVENT_SET EventSet,
182 IN OUT PLIST_ENTRY EventsList OPTIONAL,
183 IN KSEVENTS_LOCKTYPE EventsFlags OPTIONAL,
184 IN PVOID EventsLock OPTIONAL,
185 IN PFNKSALLOCATOR Allocator OPTIONAL,
186 IN ULONG EventItemSize OPTIONAL);
187
188 NTSTATUS
189 KspValidateConnectRequest(
190 IN PIRP Irp,
191 IN ULONG DescriptorsCount,
192 IN PVOID Descriptors,
193 IN ULONG DescriptorSize,
194 OUT PKSPIN_CONNECT* Connect);
195
196 NTSTATUS
197 KspReadMediaCategory(
198 IN LPGUID Category,
199 PKEY_VALUE_PARTIAL_INFORMATION *OutInformation);
200