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