ReactOS 0.4.15-dev-8227-g32d615f
hidparser.h
Go to the documentation of this file.
1/*
2 * PROJECT: ReactOS Universal Serial Bus Bulk Enhanced Host Controller Interface
3 * LICENSE: GPL - See COPYING in the top level directory
4 * FILE: lib/drivers/hidparser/hidparser.c
5 * PURPOSE: HID Parser
6 * PROGRAMMERS:
7 * Michael Martin (michael.martin@reactos.org)
8 * Johannes Anderwald (johannes.anderwald@reactos.org)
9 */
10
11#pragma once
12
16 IN PHIDP_REPORT_DESCRIPTOR ReportDesc,
17 IN ULONG DescLength,
20
21VOID
25
30 IN PVOID CollectionContext,
32
37 IN PVOID CollectionContext,
38 IN HIDP_REPORT_TYPE ReportType,
44
45
50 IN PVOID CollectionContext,
51 HIDP_REPORT_TYPE ReportType,
54
59 IN PVOID CollectionContext,
60 IN HIDP_REPORT_TYPE ReportType,
66
71 IN PVOID CollectionContext,
72 IN HIDP_REPORT_TYPE ReportType,
76 OUT PLONG UsageValue,
77 IN PCHAR Report,
79
80
85 IN PVOID CollectionContext,
86 IN HIDP_REPORT_TYPE ReportType,
89 IN PCHAR Report,
91
96 IN PVOID CollectionContext,
97 IN HIDP_REPORT_TYPE ReportType,
101
102HIDAPI
104NTAPI
106 IN PVOID CollectionContext,
107 OUT PHIDP_LINK_COLLECTION_NODE LinkCollectionNodes,
109
110
111HIDAPI
113NTAPI
115 IN PVOID CollectionContext,
116 IN HIDP_REPORT_TYPE ReportType,
119 IN USAGE Usage,
120 OUT PULONG UsageValue,
121 IN PCHAR Report,
123
124HIDAPI
126NTAPI
128 IN PUSAGE PreviousUsageList,
129 IN PUSAGE CurrentUsageList,
130 OUT PUSAGE BreakUsageList,
131 OUT PUSAGE MakeUsageList,
133
134
135HIDAPI
136ULONG
137NTAPI
139 IN PVOID CollectionContext,
140 IN HIDP_REPORT_TYPE ReportType,
142
143HIDAPI
145NTAPI
147 IN PVOID CollectionContext,
148 IN HIDP_REPORT_TYPE ReportType,
151 OUT USAGE *UsageList,
153 IN PCHAR Report,
155
156HIDAPI
158NTAPI
160 IN PVOID CollectionContext,
161 IN HIDP_REPORT_TYPE ReportType,
165 IN PCHAR Report,
167
168
170NTAPI
172 IN PVOID CollectionContext,
173 IN PCHAR HidPacket,
174 IN USHORT HidPacketLength,
176
178NTAPI
180 IN PVOID CollectionContext,
182
183HIDAPI
185NTAPI
187 IN PVOID CollectionContext,
188 IN HIDP_REPORT_TYPE ReportType,
191 IN USAGE Usage,
192 OUT PCHAR UsageValue,
193 IN USHORT UsageValueByteLength,
194 IN PCHAR Report,
196
197
198HIDAPI
200NTAPI
202 IN PUSAGE_AND_PAGE PreviousUsageList,
203 IN PUSAGE_AND_PAGE CurrentUsageList,
204 OUT PUSAGE_AND_PAGE BreakUsageList,
205 OUT PUSAGE_AND_PAGE MakeUsageList,
207
208HIDAPI
210NTAPI
212 IN PVOID CollectionContext,
213 IN HIDP_REPORT_TYPE ReportType,
216 IN PUSAGE UsageList,
218 IN OUT PCHAR Report,
220
221HIDAPI
223NTAPI
225 IN PUSAGE ChangedUsageList,
227 IN HIDP_KEYBOARD_DIRECTION KeyAction,
229 IN PHIDP_INSERT_SCANCODES InsertCodesProcedure,
230 IN PVOID InsertCodesContext);
231
232HIDAPI
234NTAPI
236 IN PUSAGE_AND_PAGE ChangedUsageList,
238 IN HIDP_KEYBOARD_DIRECTION KeyAction,
240 IN PHIDP_INSERT_SCANCODES InsertCodesProcedure,
241 IN PVOID InsertCodesContext);
242
243HIDAPI
245NTAPI
247 IN PVOID CollectionContext,
248 IN HIDP_REPORT_TYPE ReportType,
251 IN PUSAGE UsageList,
253 IN OUT PCHAR Report,
255
256HIDAPI
258NTAPI
260 IN PVOID CollectionContext,
261 IN HIDP_REPORT_TYPE ReportType,
264 IN USAGE Usage,
265 IN PCHAR UsageValue,
266 IN USHORT UsageValueByteLength,
267 OUT PCHAR Report,
269
270HIDAPI
272NTAPI
274 IN PVOID CollectionContext,
275 IN HIDP_REPORT_TYPE ReportType,
278 IN USAGE Usage,
279 IN ULONG UsageValue,
280 IN OUT PCHAR Report,
282
283HIDAPI
285NTAPI
287 IN PVOID CollectionContext,
288 IN HIDP_REPORT_TYPE ReportType,
291 IN USAGE Usage,
292 IN LONG UsageValue,
293 IN OUT PCHAR Report,
295
296HIDAPI
298NTAPI
300 IN PVOID CollectionContext,
301 IN HIDP_REPORT_TYPE ReportType,
304 IN OUT PCHAR Report,
306
307HIDAPI
308ULONG
309NTAPI
311 IN PVOID CollectionContext,
312 IN HIDP_REPORT_TYPE ReportType);
313
314HIDAPI
316NTAPI
318 IN PVOID CollectionContext,
319 IN HIDP_REPORT_TYPE ReportType,
321 IN OUT PCHAR Report,
323
326 IN USAGE Usage,
327 IN HIDP_KEYBOARD_DIRECTION KeyAction,
329 IN PHIDP_INSERT_SCANCODES InsertCodesProcedure,
330 IN PVOID InsertCodesContext);
331
334 IN USAGE Usage,
335 IN HIDP_KEYBOARD_DIRECTION KeyAction,
337 IN PHIDP_INSERT_SCANCODES InsertCodesProcedure,
338 IN PVOID InsertCodesContext);
339
340HIDAPI
342NTAPI
344 IN PVOID CollectionContext,
345 HIDP_REPORT_TYPE ReportType,
LONG NTSTATUS
Definition: precomp.h:26
_In_ ULONG _In_opt_ WDFREQUEST _In_opt_ PVOID _In_ size_t _In_ PVOID _In_ size_t _Out_ size_t * DataLength
Definition: cdrom.h:1444
_Must_inspect_result_ typedef _Out_ PHIDP_CAPS Capabilities
Definition: hidclass.h:103
NTSTATUS HidParser_TranslateCustUsage(IN USAGE Usage, IN HIDP_KEYBOARD_DIRECTION KeyAction, IN OUT PHIDP_KEYBOARD_MODIFIER_STATE ModifierState, IN PHIDP_INSERT_SCANCODES InsertCodesProcedure, IN PVOID InsertCodesContext)
Definition: api.c:913
HIDAPI NTSTATUS NTAPI HidParser_GetUsages(IN PVOID CollectionContext, IN HIDP_REPORT_TYPE ReportType, IN USAGE UsagePage, IN USHORT LinkCollection OPTIONAL, OUT USAGE *UsageList, IN OUT ULONG *UsageLength, IN PCHAR Report, IN ULONG ReportLength)
HIDAPI NTSTATUS NTAPI HidParser_GetCaps(IN PVOID CollectionContext, OUT PHIDP_CAPS Capabilities)
Definition: hidparser.c:193
HIDAPI NTSTATUS NTAPI HidParser_UsageListDifference(IN PUSAGE PreviousUsageList, IN PUSAGE CurrentUsageList, OUT PUSAGE BreakUsageList, OUT PUSAGE MakeUsageList, IN ULONG UsageListLength)
Definition: hidparser.c:375
HIDAPI NTSTATUS NTAPI HidParser_GetScaledUsageValue(IN PVOID CollectionContext, IN HIDP_REPORT_TYPE ReportType, IN USAGE UsagePage, IN USHORT LinkCollection OPTIONAL, IN USAGE Usage, OUT PLONG UsageValue, IN PCHAR Report, IN ULONG ReportLength)
Definition: hidparser.c:559
HIDAPI NTSTATUS NTAPI HidParser_GetUsageValueArray(IN PVOID CollectionContext, IN HIDP_REPORT_TYPE ReportType, IN USAGE UsagePage, IN USHORT LinkCollection OPTIONAL, IN USAGE Usage, OUT PCHAR UsageValue, IN USHORT UsageValueByteLength, IN PCHAR Report, IN ULONG ReportLength)
Definition: hidparser.c:959
HIDAPI NTSTATUS NTAPI HidParser_SetUsageValueArray(IN PVOID CollectionContext, IN HIDP_REPORT_TYPE ReportType, IN USAGE UsagePage, IN USHORT LinkCollection OPTIONAL, IN USAGE Usage, IN PCHAR UsageValue, IN USHORT UsageValueByteLength, OUT PCHAR Report, IN ULONG ReportLength)
Definition: hidparser.c:1030
NTSTATUS NTAPI HidParser_SysPowerCaps(IN PVOID CollectionContext, OUT PULONG OutputBuffer)
Definition: hidparser.c:947
HIDAPI NTSTATUS NTAPI HidParser_GetSpecificValueCaps(IN PVOID CollectionContext, IN HIDP_REPORT_TYPE ReportType, IN USAGE UsagePage, IN USHORT LinkCollection, IN USAGE Usage, OUT PHIDP_VALUE_CAPS ValueCaps, IN OUT PUSHORT ValueCapsLength)
Definition: hidparser.c:321
NTSTATUS NTAPI HidParser_SysPowerEvent(IN PVOID CollectionContext, IN PCHAR HidPacket, IN USHORT HidPacketLength, OUT PULONG OutputBuffer)
Definition: hidparser.c:934
NTSTATUS NTAPI HidParser_GetCollectionDescription(IN PHIDP_REPORT_DESCRIPTOR ReportDesc, IN ULONG DescLength, IN POOL_TYPE PoolType, OUT PHIDP_DEVICE_DESC DeviceDescription)
Definition: hidparser.c:18
HIDAPI NTSTATUS NTAPI HidParser_SetScaledUsageValue(IN PVOID CollectionContext, IN HIDP_REPORT_TYPE ReportType, IN USAGE UsagePage, IN USHORT LinkCollection OPTIONAL, IN USAGE Usage, IN LONG UsageValue, IN OUT PCHAR Report, IN ULONG ReportLength)
Definition: hidparser.c:1067
HIDAPI NTSTATUS NTAPI HidParser_UsageAndPageListDifference(IN PUSAGE_AND_PAGE PreviousUsageList, IN PUSAGE_AND_PAGE CurrentUsageList, OUT PUSAGE_AND_PAGE BreakUsageList, OUT PUSAGE_AND_PAGE MakeUsageList, IN ULONG UsageListLength)
Definition: hidparser.c:689
HIDAPI NTSTATUS NTAPI HidParser_SetUsageValue(IN PVOID CollectionContext, IN HIDP_REPORT_TYPE ReportType, IN USAGE UsagePage, IN USHORT LinkCollection, IN USAGE Usage, IN ULONG UsageValue, IN OUT PCHAR Report, IN ULONG ReportLength)
Definition: hidparser.c:1049
HIDAPI NTSTATUS NTAPI HidParser_GetLinkCollectionNodes(IN PVOID CollectionContext, OUT PHIDP_LINK_COLLECTION_NODE LinkCollectionNodes, IN OUT PULONG LinkCollectionNodesLength)
Definition: hidparser.c:867
HIDAPI NTSTATUS NTAPI HidParser_GetValueCaps(IN PVOID CollectionContext, HIDP_REPORT_TYPE ReportType, PHIDP_VALUE_CAPS ValueCaps, PULONG ValueCapsLength)
Definition: hidparser.c:1130
HIDAPI NTSTATUS NTAPI HidParser_SetData(IN PVOID CollectionContext, IN HIDP_REPORT_TYPE ReportType, IN PHIDP_DATA DataList, IN OUT PULONG DataLength, IN OUT PCHAR Report, IN ULONG ReportLength)
Definition: hidparser.c:1085
HIDAPI NTSTATUS NTAPI HidParser_GetUsageValue(IN PVOID CollectionContext, IN HIDP_REPORT_TYPE ReportType, IN USAGE UsagePage, IN USHORT LinkCollection, IN USAGE Usage, OUT PULONG UsageValue, IN PCHAR Report, IN ULONG ReportLength)
Definition: hidparser.c:880
HIDAPI ULONG NTAPI HidParser_MaxUsageListLength(IN PVOID CollectionContext, IN HIDP_REPORT_TYPE ReportType, IN USAGE UsagePage OPTIONAL)
Definition: hidparser.c:253
HIDAPI NTSTATUS NTAPI HidParser_TranslateUsageAndPagesToI8042ScanCodes(IN PUSAGE_AND_PAGE ChangedUsageList, IN ULONG UsageListLength, IN HIDP_KEYBOARD_DIRECTION KeyAction, IN OUT PHIDP_KEYBOARD_MODIFIER_STATE ModifierState, IN PHIDP_INSERT_SCANCODES InsertCodesProcedure, IN PVOID InsertCodesContext)
Definition: hidparser.c:614
HIDAPI NTSTATUS NTAPI HidParser_UnsetUsages(IN PVOID CollectionContext, IN HIDP_REPORT_TYPE ReportType, IN USAGE UsagePage, IN USHORT LinkCollection, IN PUSAGE UsageList, IN OUT PULONG UsageLength, IN OUT PCHAR Report, IN ULONG ReportLength)
Definition: hidparser.c:978
HIDAPI NTSTATUS NTAPI HidParser_InitializeReportForID(IN PVOID CollectionContext, IN HIDP_REPORT_TYPE ReportType, IN UCHAR ReportID, IN OUT PCHAR Report, IN ULONG ReportLength)
Definition: hidparser.c:1113
HIDAPI NTSTATUS NTAPI HidParser_TranslateUsagesToI8042ScanCodes(IN PUSAGE ChangedUsageList, IN ULONG UsageListLength, IN HIDP_KEYBOARD_DIRECTION KeyAction, IN OUT PHIDP_KEYBOARD_MODIFIER_STATE ModifierState, IN PHIDP_INSERT_SCANCODES InsertCodesProcedure, IN PVOID InsertCodesContext)
Definition: hidparser.c:996
HIDAPI NTSTATUS NTAPI HidParser_GetButtonCaps(IN PVOID CollectionContext, HIDP_REPORT_TYPE ReportType, PHIDP_BUTTON_CAPS ButtonCaps, PUSHORT ButtonCapsLength)
HIDAPI NTSTATUS NTAPI HidParser_GetSpecificButtonCaps(IN PVOID CollectionContext, IN HIDP_REPORT_TYPE ReportType, IN USAGE UsagePage, IN USHORT LinkCollection, IN USAGE Usage, OUT PHIDP_BUTTON_CAPS ButtonCaps, IN OUT PULONG ButtonCapsLength)
Definition: hidparser.c:818
NTSTATUS HidParser_TranslateKbdUsage(IN USAGE Usage, IN HIDP_KEYBOARD_DIRECTION KeyAction, IN OUT PHIDP_KEYBOARD_MODIFIER_STATE ModifierState, IN PHIDP_INSERT_SCANCODES InsertCodesProcedure, IN PVOID InsertCodesContext)
Definition: api.c:851
HIDAPI ULONG NTAPI HidParser_MaxDataListLength(IN PVOID CollectionContext, IN HIDP_REPORT_TYPE ReportType)
Definition: hidparser.c:1101
HIDAPI NTSTATUS NTAPI HidParser_GetData(IN PVOID CollectionContext, IN HIDP_REPORT_TYPE ReportType, OUT PHIDP_DATA DataList, IN OUT PULONG DataLength, IN PCHAR Report, IN ULONG ReportLength)
Definition: hidparser.c:836
VOID NTAPI HidParser_FreeCollectionDescription(IN PHIDP_DEVICE_DESC DeviceDescription)
Definition: hidparser.c:163
HIDAPI NTSTATUS NTAPI HidParser_GetUsagesEx(IN PVOID CollectionContext, IN HIDP_REPORT_TYPE ReportType, IN USHORT LinkCollection, OUT PUSAGE_AND_PAGE ButtonList, IN OUT ULONG *UsageLength, IN PCHAR Report, IN ULONG ReportLength)
Definition: hidparser.c:674
HIDAPI NTSTATUS NTAPI HidParser_SetUsages(IN PVOID CollectionContext, IN HIDP_REPORT_TYPE ReportType, IN USAGE UsagePage, IN USHORT LinkCollection, IN PUSAGE UsageList, IN OUT PULONG UsageLength, IN OUT PCHAR Report, IN ULONG ReportLength)
Definition: hidparser.c:1012
HIDAPI NTSTATUS NTAPI HidParser_GetExtendedAttributes(IN PVOID CollectionContext, IN HIDP_REPORT_TYPE ReportType, IN USHORT DataIndex, OUT PHIDP_EXTENDED_ATTRIBUTES Attributes, IN OUT PULONG LengthAttributes)
Definition: hidparser.c:852
_Must_inspect_result_ _In_ UCHAR ReportID
Definition: hidpi.h:482
_Must_inspect_result_ _Inout_ PULONG LinkCollectionNodesLength
Definition: hidpi.h:358
_Must_inspect_result_ _In_ USAGE _In_ USHORT _In_ USAGE _Out_ PHIDP_BUTTON_CAPS _Inout_ PUSHORT ButtonCapsLength
Definition: hidpi.h:386
_Must_inspect_result_ _In_ USAGE UsagePage
Definition: hidpi.h:382
_Must_inspect_result_ _In_ USAGE _In_ USHORT _In_ USAGE _Out_ PHIDP_BUTTON_CAPS ButtonCaps
Definition: hidpi.h:385
BOOLEAN(NTAPI * PHIDP_INSERT_SCANCODES)(_In_opt_ PVOID Context, _In_reads_bytes_(Length) PCHAR NewScanCodes, _In_ ULONG Length)
Definition: hidpi.h:73
_Must_inspect_result_ _In_ USHORT _Inout_updates_to_ UsageLength PUSAGE_AND_PAGE ButtonList
Definition: hidpi.h:425
_Must_inspect_result_ _In_ USAGE _In_ USHORT _In_ USAGE _Out_ PHIDP_VALUE_CAPS _Inout_ PUSHORT ValueCapsLength
Definition: hidpi.h:400
_Must_inspect_result_ _In_ USHORT _In_ PHIDP_PREPARSED_DATA _Out_writes_to_ LengthAttributes PHIDP_EXTENDED_ATTRIBUTES _Inout_ OUT PULONG LengthAttributes
Definition: hidpi.h:349
#define HIDAPI
Definition: hidpi.h:35
_Must_inspect_result_ _In_ USHORT _Inout_updates_to_ UsageLength PUSAGE_AND_PAGE _Inout_ ULONG * UsageLength
Definition: hidpi.h:426
_Must_inspect_result_ _In_ USAGE _In_ USHORT _In_ USAGE _Out_ PHIDP_VALUE_CAPS ValueCaps
Definition: hidpi.h:399
_Must_inspect_result_ _In_ ULONG UsageListLength
Definition: hidpi.h:647
_Must_inspect_result_ _Out_writes_to_ DataLength PHIDP_DATA _Inout_ PULONG _In_ PHIDP_PREPARSED_DATA _In_ ULONG ReportLength
Definition: hidpi.h:337
enum _HIDP_KEYBOARD_DIRECTION HIDP_KEYBOARD_DIRECTION
enum _HIDP_REPORT_TYPE HIDP_REPORT_TYPE
PUCHAR PHIDP_REPORT_DESCRIPTOR
Definition: hidpi.h:38
_Must_inspect_result_ _Out_writes_to_ DataLength PHIDP_DATA DataList
Definition: hidpi.h:333
_Must_inspect_result_ _In_ USAGE _In_ USHORT LinkCollection
Definition: hidpi.h:383
_Must_inspect_result_ _In_ USHORT DataIndex
Definition: hidpi.h:346
_Must_inspect_result_ _In_ USAGE _In_ USHORT _In_ USAGE Usage
Definition: hidpi.h:384
USHORT USAGE
Definition: hidusage.h:30
USHORT * PUSAGE
Definition: hidusage.h:30
long LONG
Definition: pedump.c:60
unsigned short USHORT
Definition: pedump.c:61
PULONG MinorVersion OPTIONAL
Definition: CrossNt.h:68
uint32_t * PULONG
Definition: typedefs.h:59
INT POOL_TYPE
Definition: typedefs.h:78
#define NTAPI
Definition: typedefs.h:36
uint16_t * PUSHORT
Definition: typedefs.h:56
#define IN
Definition: typedefs.h:39
int32_t * PLONG
Definition: typedefs.h:58
uint32_t ULONG
Definition: typedefs.h:59
#define OUT
Definition: typedefs.h:40
char * PCHAR
Definition: typedefs.h:51
_Must_inspect_result_ _In_ WDFDMAENABLER _In_ _In_opt_ PWDF_OBJECT_ATTRIBUTES Attributes
_Must_inspect_result_ _In_ WDFDEVICE _In_ DEVICE_REGISTRY_PROPERTY _In_ _Strict_type_match_ POOL_TYPE PoolType
Definition: wdfdevice.h:3815
_Must_inspect_result_ _In_ WDFIOTARGET _In_opt_ WDFREQUEST _In_opt_ PWDF_MEMORY_DESCRIPTOR OutputBuffer
Definition: wdfiotarget.h:863
_Must_inspect_result_ _In_ PWDFDEVICE_INIT _In_ PCUNICODE_STRING DeviceDescription
Definition: wdfpdo.h:432
unsigned char UCHAR
Definition: xmlstorage.h:181