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