2 * PROJECT: ReactOS HID Parser Library
3 * LICENSE: GPL - See COPYING in the top level directory
4 * FILE: lib/drivers/hidparser/hidparser.c
7 * Michael Martin (michael.martin@reactos.org)
8 * Johannes Anderwald (johannes.anderwald@reactos.org)
14 TranslateHidParserStatus(
15 IN HIDPARSER_STATUS Status
)
19 case HIDPARSER_STATUS_INSUFFICIENT_RESOURCES
:
20 return HIDP_STATUS_INTERNAL_ERROR
;
21 case HIDPARSER_STATUS_NOT_IMPLEMENTED
:
22 return HIDP_STATUS_NOT_IMPLEMENTED
;
23 case HIDPARSER_STATUS_REPORT_NOT_FOUND
:
24 return HIDP_STATUS_REPORT_DOES_NOT_EXIST
;
25 case HIDPARSER_STATUS_INVALID_REPORT_LENGTH
:
26 return HIDP_STATUS_INVALID_REPORT_LENGTH
;
27 case HIDPARSER_STATUS_INVALID_REPORT_TYPE
:
28 return HIDP_STATUS_INVALID_REPORT_TYPE
;
29 case HIDPARSER_STATUS_BUFFER_TOO_SMALL
:
30 return HIDP_STATUS_BUFFER_TOO_SMALL
;
31 case HIDPARSER_STATUS_USAGE_NOT_FOUND
:
32 return HIDP_STATUS_USAGE_NOT_FOUND
;
33 case HIDPARSER_STATUS_I8042_TRANS_UNKNOWN
:
34 return HIDP_STATUS_I8042_TRANS_UNKNOWN
;
35 case HIDPARSER_STATUS_COLLECTION_NOT_FOUND
:
36 return HIDP_STATUS_NOT_IMPLEMENTED
; //FIXME
38 DPRINT1("TranslateHidParserStatus Status %ld not implemented\n", Status
);
39 return HIDP_STATUS_NOT_IMPLEMENTED
;
44 HidParser_GetCollectionDescription(
45 IN PHID_PARSER Parser
,
46 IN PHIDP_REPORT_DESCRIPTOR ReportDesc
,
48 IN POOL_TYPE PoolType
,
49 OUT PHIDP_DEVICE_DESC DeviceDescription
)
51 HIDPARSER_STATUS ParserStatus
;
52 ULONG CollectionCount
;
56 // first parse the report descriptor
58 ParserStatus
= HidParser_ParseReportDescriptor(Parser
, ReportDesc
, DescLength
);
59 if (ParserStatus
!= HIDPARSER_STATUS_SUCCESS
)
62 // failed to parse report descriptor
64 Parser
->Debug("[HIDPARSER] Failed to parse report descriptor with %x\n", ParserStatus
);
65 return TranslateHidParserStatus(ParserStatus
);
69 // get collection count
71 CollectionCount
= HidParser_NumberOfTopCollections(Parser
);
74 // FIXME: only one top level collection is supported
76 ASSERT(CollectionCount
<= 1);
77 if (CollectionCount
== 0)
80 // no top level collections found
82 return STATUS_NO_DATA_DETECTED
;
88 Parser
->Zero(DeviceDescription
, sizeof(HIDP_DEVICE_DESC
));
91 // allocate collection
93 DeviceDescription
->CollectionDesc
= (PHIDP_COLLECTION_DESC
)Parser
->Alloc(sizeof(HIDP_COLLECTION_DESC
) * CollectionCount
);
94 if (!DeviceDescription
->CollectionDesc
)
99 return STATUS_INSUFFICIENT_RESOURCES
;
103 // allocate report description
105 DeviceDescription
->ReportIDs
= (PHIDP_REPORT_IDS
)Parser
->Alloc(sizeof(HIDP_REPORT_IDS
) * CollectionCount
);
106 if (!DeviceDescription
->ReportIDs
)
111 Parser
->Free(DeviceDescription
->CollectionDesc
);
112 return STATUS_INSUFFICIENT_RESOURCES
;
115 for(Index
= 0; Index
< CollectionCount
; Index
++)
118 // init report description
120 DeviceDescription
->ReportIDs
[Index
].CollectionNumber
= Index
+ 1;
121 DeviceDescription
->ReportIDs
[Index
].ReportID
= Index
; //FIXME
122 DeviceDescription
->ReportIDs
[Index
].InputLength
= HidParser_GetReportLength(Parser
, HID_REPORT_TYPE_INPUT
);
123 DeviceDescription
->ReportIDs
[Index
].OutputLength
= HidParser_GetReportLength(Parser
, HID_REPORT_TYPE_OUTPUT
);
124 DeviceDescription
->ReportIDs
[Index
].FeatureLength
= HidParser_GetReportLength(Parser
, HID_REPORT_TYPE_FEATURE
);
127 // init collection description
129 DeviceDescription
->CollectionDesc
[Index
].CollectionNumber
= Index
+ 1;
132 // get collection usage page
134 ParserStatus
= HidParser_GetCollectionUsagePage(Parser
, Index
, &DeviceDescription
->CollectionDesc
[Index
].Usage
, &DeviceDescription
->CollectionDesc
[Index
].UsagePage
);
137 // windows seems to prepend the report id, regardless if it is required
139 DeviceDescription
->CollectionDesc
[Index
].InputLength
= (DeviceDescription
->ReportIDs
[Index
].InputLength
> 0 ? DeviceDescription
->ReportIDs
[Index
].InputLength
+ 1 : 0);
140 DeviceDescription
->CollectionDesc
[Index
].OutputLength
= (DeviceDescription
->ReportIDs
[Index
].OutputLength
> 0 ? DeviceDescription
->ReportIDs
[Index
].OutputLength
+ 1 : 0);
141 DeviceDescription
->CollectionDesc
[Index
].FeatureLength
= (DeviceDescription
->ReportIDs
[Index
].FeatureLength
> 0 ? DeviceDescription
->ReportIDs
[Index
].FeatureLength
+ 1 : 0);
144 // set preparsed data length
146 DeviceDescription
->CollectionDesc
[Index
].PreparsedDataLength
= HidParser_GetContextSize(Parser
);
147 DeviceDescription
->CollectionDesc
[Index
].PreparsedData
= Parser
->Alloc(DeviceDescription
->CollectionDesc
[Index
].PreparsedDataLength
);
148 if (!DeviceDescription
->CollectionDesc
[Index
].PreparsedData
)
153 return STATUS_INSUFFICIENT_RESOURCES
;
159 Parser
->Copy(DeviceDescription
->CollectionDesc
[Index
].PreparsedData
, Parser
->ParserContext
, DeviceDescription
->CollectionDesc
[Index
].PreparsedDataLength
);
163 // store collection & report count
165 DeviceDescription
->CollectionDescLength
= CollectionCount
;
166 DeviceDescription
->ReportIDsLength
= CollectionCount
;
171 return STATUS_SUCCESS
;
176 HidParser_FreeCollectionDescription(
177 IN PHID_PARSER Parser
,
178 IN PHIDP_DEVICE_DESC DeviceDescription
)
183 // first free all context
185 for(Index
= 0; Index
< DeviceDescription
->CollectionDescLength
; Index
++)
188 // free parser context
190 HidParser_FreeContext(Parser
, (PUCHAR
)DeviceDescription
->CollectionDesc
[Index
].PreparsedData
, DeviceDescription
->CollectionDesc
[Index
].PreparsedDataLength
);
194 // now free collection description
196 Parser
->Free(DeviceDescription
->CollectionDesc
);
199 // free report description
201 ExFreePool(DeviceDescription
->ReportIDs
);
208 IN PHID_PARSER Parser
,
209 OUT PHIDP_CAPS Capabilities
)
211 ULONG CollectionNumber
;
215 Parser
->Zero(Capabilities
, sizeof(HIDP_CAPS
));
218 // FIXME support multiple top level collections
220 CollectionNumber
= 0;
225 HidParser_GetCollectionUsagePage(Parser
, CollectionNumber
, &Capabilities
->Usage
, &Capabilities
->UsagePage
);
226 Capabilities
->InputReportByteLength
= HidParser_GetReportLength(Parser
, HID_REPORT_TYPE_INPUT
);
227 Capabilities
->OutputReportByteLength
= HidParser_GetReportLength(Parser
, HID_REPORT_TYPE_OUTPUT
);
228 Capabilities
->FeatureReportByteLength
= HidParser_GetReportLength(Parser
, HID_REPORT_TYPE_FEATURE
);
231 // always pre-prend report id
233 Capabilities
->InputReportByteLength
= (Capabilities
->InputReportByteLength
> 0 ? Capabilities
->InputReportByteLength
+ 1 : 0);
234 Capabilities
->OutputReportByteLength
= (Capabilities
->OutputReportByteLength
> 0 ? Capabilities
->OutputReportByteLength
+ 1 : 0);
235 Capabilities
->FeatureReportByteLength
= (Capabilities
->FeatureReportByteLength
> 0 ? Capabilities
->FeatureReportByteLength
+ 1 : 0);
238 // get number of link collection nodes
240 Capabilities
->NumberLinkCollectionNodes
= HidParser_GetTotalCollectionCount(Parser
);
245 Capabilities
->NumberInputDataIndices
= HidParser_GetReportItemTypeCountFromReportType(Parser
, HID_REPORT_TYPE_INPUT
, TRUE
);
246 Capabilities
->NumberOutputDataIndices
= HidParser_GetReportItemTypeCountFromReportType(Parser
, HID_REPORT_TYPE_OUTPUT
, TRUE
);
247 Capabilities
->NumberFeatureDataIndices
= HidParser_GetReportItemTypeCountFromReportType(Parser
, HID_REPORT_TYPE_FEATURE
, TRUE
);
252 Capabilities
->NumberInputValueCaps
= HidParser_GetReportItemTypeCountFromReportType(Parser
, HID_REPORT_TYPE_INPUT
, FALSE
);
253 Capabilities
->NumberOutputValueCaps
= HidParser_GetReportItemTypeCountFromReportType(Parser
, HID_REPORT_TYPE_OUTPUT
, FALSE
);
254 Capabilities
->NumberFeatureValueCaps
= HidParser_GetReportItemTypeCountFromReportType(Parser
, HID_REPORT_TYPE_FEATURE
, FALSE
);
260 Capabilities
->NumberInputButtonCaps
= HidParser_GetReportItemCountFromReportType(Parser
, HID_REPORT_TYPE_INPUT
);
261 Capabilities
->NumberOutputButtonCaps
= HidParser_GetReportItemCountFromReportType(Parser
, HID_REPORT_TYPE_OUTPUT
);
262 Capabilities
->NumberFeatureButtonCaps
= HidParser_GetReportItemCountFromReportType(Parser
, HID_REPORT_TYPE_FEATURE
);
267 return HIDP_STATUS_SUCCESS
;
273 HidParser_MaxUsageListLength(
274 IN PHID_PARSER Parser
,
275 IN HIDP_REPORT_TYPE ReportType
,
276 IN USAGE UsagePage OPTIONAL
)
279 // FIXME test what should be returned when usage page is not defined
281 if (UsagePage
== HID_USAGE_PAGE_UNDEFINED
)
294 if (ReportType
== HidP_Input
)
299 return HidParser_GetMaxUsageListLengthWithReportAndPage(Parser
, HID_REPORT_TYPE_INPUT
, UsagePage
);
301 else if (ReportType
== HidP_Output
)
306 return HidParser_GetMaxUsageListLengthWithReportAndPage(Parser
, HID_REPORT_TYPE_OUTPUT
, UsagePage
);
308 else if (ReportType
== HidP_Feature
)
313 return HidParser_GetMaxUsageListLengthWithReportAndPage(Parser
, HID_REPORT_TYPE_FEATURE
, UsagePage
);
318 // invalid report type
324 #undef HidParser_GetButtonCaps
329 HidParser_GetButtonCaps(
330 IN PHID_PARSER Parser
,
331 IN HIDP_REPORT_TYPE ReportType
,
332 IN PHIDP_BUTTON_CAPS ButtonCaps
,
333 IN PUSHORT ButtonCapsLength
)
335 return HidParser_GetSpecificButtonCaps(Parser
, ReportType
, HID_USAGE_PAGE_UNDEFINED
, HIDP_LINK_COLLECTION_UNSPECIFIED
, HID_USAGE_PAGE_UNDEFINED
, ButtonCaps
, (PULONG
)ButtonCapsLength
);
341 HidParser_GetSpecificValueCaps(
342 IN PHID_PARSER Parser
,
343 IN HIDP_REPORT_TYPE ReportType
,
345 IN USHORT LinkCollection
,
347 OUT PHIDP_VALUE_CAPS ValueCaps
,
348 IN OUT PULONG ValueCapsLength
)
350 HIDPARSER_STATUS ParserStatus
;
353 // FIXME: implement searching in specific collection
355 ASSERT(LinkCollection
== HIDP_LINK_COLLECTION_UNSPECIFIED
);
357 if (ReportType
== HidP_Input
)
362 ParserStatus
= HidParser_GetSpecificValueCapsWithReport(Parser
, HID_REPORT_TYPE_INPUT
, UsagePage
, Usage
, ValueCaps
, ValueCapsLength
);
364 else if (ReportType
== HidP_Output
)
369 ParserStatus
= HidParser_GetSpecificValueCapsWithReport(Parser
, HID_REPORT_TYPE_OUTPUT
, UsagePage
, Usage
, ValueCaps
, ValueCapsLength
);
371 else if (ReportType
== HidP_Feature
)
376 ParserStatus
= HidParser_GetSpecificValueCapsWithReport(Parser
, HID_REPORT_TYPE_FEATURE
, UsagePage
, Usage
, ValueCaps
, ValueCapsLength
);
381 // invalid report type
383 return HIDP_STATUS_INVALID_REPORT_TYPE
;
387 if (ParserStatus
== HIDPARSER_STATUS_SUCCESS
)
392 return HIDP_STATUS_SUCCESS
;
398 return TranslateHidParserStatus(ParserStatus
);
404 HidParser_UsageListDifference(
405 IN PUSAGE PreviousUsageList
,
406 IN PUSAGE CurrentUsageList
,
407 OUT PUSAGE BreakUsageList
,
408 OUT PUSAGE MakeUsageList
,
409 IN ULONG UsageListLength
)
411 ULONG Index
, SubIndex
, bFound
, BreakUsageIndex
= 0, MakeUsageIndex
= 0;
412 USAGE CurrentUsage
, Usage
;
419 /* get current usage */
420 CurrentUsage
= PreviousUsageList
[Index
];
422 /* is the end of list reached? */
426 /* start searching in current usage list */
431 /* get usage of current list */
432 Usage
= CurrentUsageList
[SubIndex
];
434 /* end of list reached? */
438 /* check if it matches the current one */
439 if (CurrentUsage
== Usage
)
446 /* move to next usage */
448 }while(SubIndex
< UsageListLength
);
450 /* was the usage found ?*/
453 /* store it in the break usage list */
454 BreakUsageList
[BreakUsageIndex
] = CurrentUsage
;
458 /* move to next usage */
461 }while(Index
< UsageListLength
);
463 /* now process the new items */
467 /* get current usage */
468 CurrentUsage
= CurrentUsageList
[Index
];
470 /* is the end of list reached? */
474 /* start searching in current usage list */
479 /* get usage of previous list */
480 Usage
= PreviousUsageList
[SubIndex
];
482 /* end of list reached? */
486 /* check if it matches the current one */
487 if (CurrentUsage
== Usage
)
494 /* move to next usage */
496 }while(SubIndex
< UsageListLength
);
498 /* was the usage found ?*/
501 /* store it in the make usage list */
502 MakeUsageList
[MakeUsageIndex
] = CurrentUsage
;
506 /* move to next usage */
509 }while(Index
< UsageListLength
);
512 /* does the break list contain empty entries */
513 if (BreakUsageIndex
< UsageListLength
)
515 /* zeroize entries */
516 RtlZeroMemory(&BreakUsageList
[BreakUsageIndex
], sizeof(USAGE
) * (UsageListLength
- BreakUsageIndex
));
519 /* does the make usage list contain empty entries */
520 if (MakeUsageIndex
< UsageListLength
)
522 /* zeroize entries */
523 RtlZeroMemory(&MakeUsageList
[MakeUsageIndex
], sizeof(USAGE
) * (UsageListLength
- MakeUsageIndex
));
527 return HIDP_STATUS_SUCCESS
;
534 IN PHID_PARSER Parser
,
535 IN HIDP_REPORT_TYPE ReportType
,
537 IN USHORT LinkCollection OPTIONAL
,
538 OUT USAGE
*UsageList
,
539 IN OUT PULONG UsageLength
,
541 IN ULONG ReportLength
)
543 HIDPARSER_STATUS ParserStatus
;
546 // FIXME: implement searching in specific collection
548 ASSERT(LinkCollection
== HIDP_LINK_COLLECTION_UNSPECIFIED
);
550 if (ReportType
== HidP_Input
)
555 ParserStatus
= HidParser_GetUsagesWithReport(Parser
, HID_REPORT_TYPE_INPUT
, UsagePage
, UsageList
, UsageLength
, Report
, ReportLength
);
557 else if (ReportType
== HidP_Output
)
562 ParserStatus
= HidParser_GetUsagesWithReport(Parser
, HID_REPORT_TYPE_OUTPUT
, UsagePage
, UsageList
, UsageLength
, Report
, ReportLength
);
564 else if (ReportType
== HidP_Feature
)
569 ParserStatus
= HidParser_GetUsagesWithReport(Parser
, HID_REPORT_TYPE_FEATURE
, UsagePage
, UsageList
, UsageLength
, Report
, ReportLength
);
574 // invalid report type
576 return HIDP_STATUS_INVALID_REPORT_TYPE
;
579 if (ParserStatus
== HIDPARSER_STATUS_SUCCESS
)
584 return HIDP_STATUS_SUCCESS
;
590 return TranslateHidParserStatus(ParserStatus
);
596 HidParser_GetScaledUsageValue(
597 IN PHID_PARSER Parser
,
598 IN HIDP_REPORT_TYPE ReportType
,
600 IN USHORT LinkCollection OPTIONAL
,
602 OUT PLONG UsageValue
,
604 IN ULONG ReportLength
)
606 HIDPARSER_STATUS ParserStatus
;
609 // FIXME: implement searching in specific collection
611 ASSERT(LinkCollection
== HIDP_LINK_COLLECTION_UNSPECIFIED
);
613 if (ReportType
== HidP_Input
)
618 ParserStatus
= HidParser_GetScaledUsageValueWithReport(Parser
, HID_REPORT_TYPE_INPUT
, UsagePage
, Usage
, UsageValue
, Report
, ReportLength
);
620 else if (ReportType
== HidP_Output
)
625 ParserStatus
= HidParser_GetScaledUsageValueWithReport(Parser
, HID_REPORT_TYPE_OUTPUT
, UsagePage
, Usage
, UsageValue
, Report
, ReportLength
);
627 else if (ReportType
== HidP_Feature
)
632 ParserStatus
= HidParser_GetScaledUsageValueWithReport(Parser
, HID_REPORT_TYPE_FEATURE
, UsagePage
, Usage
, UsageValue
, Report
, ReportLength
);
637 // invalid report type
639 return HIDP_STATUS_INVALID_REPORT_TYPE
;
642 if (ParserStatus
== HIDPARSER_STATUS_SUCCESS
)
647 return HIDP_STATUS_SUCCESS
;
653 return TranslateHidParserStatus(ParserStatus
);
659 HidParser_TranslateUsageAndPagesToI8042ScanCodes(
660 IN PHID_PARSER Parser
,
661 IN PUSAGE_AND_PAGE ChangedUsageList
,
662 IN ULONG UsageListLength
,
663 IN HIDP_KEYBOARD_DIRECTION KeyAction
,
664 IN OUT PHIDP_KEYBOARD_MODIFIER_STATE ModifierState
,
665 IN PHIDP_INSERT_SCANCODES InsertCodesProcedure
,
666 IN PVOID InsertCodesContext
)
669 HIDPARSER_STATUS Status
= HIDPARSER_STATUS_SUCCESS
;
671 for(Index
= 0; Index
< UsageListLength
; Index
++)
674 // check current usage
676 if (ChangedUsageList
[Index
].UsagePage
== HID_USAGE_PAGE_KEYBOARD
)
681 Status
= HidParser_TranslateUsage(Parser
, ChangedUsageList
[Index
].Usage
, KeyAction
, ModifierState
, InsertCodesProcedure
, InsertCodesContext
);
683 else if (ChangedUsageList
[Index
].UsagePage
== HID_USAGE_PAGE_CONSUMER
)
686 // FIXME: implement me
689 Status
= HIDPARSER_STATUS_NOT_IMPLEMENTED
;
696 DPRINT1("[HIDPARSE] Error unexpected usage page %x\n", ChangedUsageList
[Index
].UsagePage
);
697 return HIDP_STATUS_I8042_TRANS_UNKNOWN
;
703 if (Status
!= HIDPARSER_STATUS_SUCCESS
)
708 return TranslateHidParserStatus(Status
);
712 if (Status
!= HIDPARSER_STATUS_SUCCESS
)
717 return TranslateHidParserStatus(Status
);
723 return HIDP_STATUS_SUCCESS
;
730 HidParser_GetUsagesEx(
731 IN PHID_PARSER Parser
,
732 IN HIDP_REPORT_TYPE ReportType
,
733 IN USHORT LinkCollection
,
734 OUT PUSAGE_AND_PAGE ButtonList
,
735 IN OUT ULONG
*UsageLength
,
737 IN ULONG ReportLength
)
739 return HidParser_GetUsages(Parser
, ReportType
, HID_USAGE_PAGE_UNDEFINED
, LinkCollection
, (PUSAGE
)ButtonList
, UsageLength
, Report
, ReportLength
);
745 HidParser_UsageAndPageListDifference(
746 IN PUSAGE_AND_PAGE PreviousUsageList
,
747 IN PUSAGE_AND_PAGE CurrentUsageList
,
748 OUT PUSAGE_AND_PAGE BreakUsageList
,
749 OUT PUSAGE_AND_PAGE MakeUsageList
,
750 IN ULONG UsageListLength
)
752 ULONG Index
, SubIndex
, BreakUsageListIndex
= 0, MakeUsageListIndex
= 0, bFound
;
753 PUSAGE_AND_PAGE CurrentUsage
, Usage
;
757 /* process removed usages */
761 /* get usage from current index */
762 CurrentUsage
= &PreviousUsageList
[Index
];
764 /* end of list reached? */
765 if (CurrentUsage
->Usage
== 0 && CurrentUsage
->UsagePage
== 0)
768 /* search in current list */
774 Usage
= &CurrentUsageList
[SubIndex
];
776 /* end of list reached? */
777 if (Usage
->Usage
== 0 && Usage
->UsagePage
== 0)
781 if (Usage
->Usage
== CurrentUsage
->Usage
&& Usage
->UsagePage
== CurrentUsage
->UsagePage
)
787 /* move to next index */
790 }while(SubIndex
< UsageListLength
);
794 /* store it in break usage list */
795 BreakUsageList
[BreakUsageListIndex
].Usage
= CurrentUsage
->Usage
;
796 BreakUsageList
[BreakUsageListIndex
].UsagePage
= CurrentUsage
->UsagePage
;
797 BreakUsageListIndex
++;
800 /* move to next index */
803 }while(Index
< UsageListLength
);
805 /* process new usages */
809 /* get usage from current index */
810 CurrentUsage
= &CurrentUsageList
[Index
];
812 /* end of list reached? */
813 if (CurrentUsage
->Usage
== 0 && CurrentUsage
->UsagePage
== 0)
816 /* search in current list */
822 Usage
= &PreviousUsageList
[SubIndex
];
824 /* end of list reached? */
825 if (Usage
->Usage
== 0 && Usage
->UsagePage
== 0)
829 if (Usage
->Usage
== CurrentUsage
->Usage
&& Usage
->UsagePage
== CurrentUsage
->UsagePage
)
835 /* move to next index */
838 }while(SubIndex
< UsageListLength
);
842 /* store it in break usage list */
843 MakeUsageList
[MakeUsageListIndex
].Usage
= CurrentUsage
->Usage
;
844 MakeUsageList
[MakeUsageListIndex
].UsagePage
= CurrentUsage
->UsagePage
;
845 MakeUsageListIndex
++;
848 /* move to next index */
850 }while(Index
< UsageListLength
);
853 /* are there remaining free list entries */
854 if (BreakUsageListIndex
< UsageListLength
)
857 RtlZeroMemory(&BreakUsageList
[BreakUsageListIndex
], (UsageListLength
- BreakUsageListIndex
) * sizeof(USAGE_AND_PAGE
));
860 /* are there remaining free list entries */
861 if (MakeUsageListIndex
< UsageListLength
)
864 RtlZeroMemory(&MakeUsageList
[MakeUsageListIndex
], (UsageListLength
- MakeUsageListIndex
) * sizeof(USAGE_AND_PAGE
));
868 return HIDP_STATUS_SUCCESS
;
874 HidParser_GetSpecificButtonCaps(
875 IN PHID_PARSER Parser
,
876 IN HIDP_REPORT_TYPE ReportType
,
878 IN USHORT LinkCollection
,
880 OUT PHIDP_BUTTON_CAPS ButtonCaps
,
881 IN OUT PULONG ButtonCapsLength
)
885 return STATUS_NOT_IMPLEMENTED
;
893 IN HIDP_REPORT_TYPE ReportType
,
894 OUT PHIDP_DATA DataList
,
895 IN OUT PULONG DataLength
,
896 IN PHIDP_PREPARSED_DATA PreparsedData
,
898 IN ULONG ReportLength
)
902 return STATUS_NOT_IMPLEMENTED
;
908 HidParser_GetExtendedAttributes(
909 IN HIDP_REPORT_TYPE ReportType
,
911 IN PHIDP_PREPARSED_DATA PreparsedData
,
912 OUT PHIDP_EXTENDED_ATTRIBUTES Attributes
,
913 IN OUT PULONG LengthAttributes
)
917 return STATUS_NOT_IMPLEMENTED
;
923 HidParser_GetLinkCollectionNodes(
924 OUT PHIDP_LINK_COLLECTION_NODE LinkCollectionNodes
,
925 IN OUT PULONG LinkCollectionNodesLength
,
926 IN PHIDP_PREPARSED_DATA PreparsedData
)
930 return STATUS_NOT_IMPLEMENTED
;
936 HidParser_GetUsageValue(
937 IN HIDP_REPORT_TYPE ReportType
,
939 IN USHORT LinkCollection
,
941 OUT PULONG UsageValue
,
942 IN PHIDP_PREPARSED_DATA PreparsedData
,
944 IN ULONG ReportLength
)
948 return STATUS_NOT_IMPLEMENTED
;
954 HidParser_SysPowerEvent (
956 IN USHORT HidPacketLength
,
957 IN PHIDP_PREPARSED_DATA Ppd
,
958 OUT PULONG OutputBuffer
)
962 return STATUS_NOT_IMPLEMENTED
;
967 HidParser_SysPowerCaps (
968 IN PHIDP_PREPARSED_DATA Ppd
,
969 OUT PULONG OutputBuffer
)
973 return STATUS_NOT_IMPLEMENTED
;
979 HidParser_GetUsageValueArray(
980 IN HIDP_REPORT_TYPE ReportType
,
982 IN USHORT LinkCollection OPTIONAL
,
984 OUT PCHAR UsageValue
,
985 IN USHORT UsageValueByteLength
,
986 IN PHIDP_PREPARSED_DATA PreparsedData
,
988 IN ULONG ReportLength
)
992 return STATUS_NOT_IMPLEMENTED
;
998 HidParser_UnsetUsages(
999 IN HIDP_REPORT_TYPE ReportType
,
1001 IN USHORT LinkCollection
,
1002 IN PUSAGE UsageList
,
1003 IN OUT PULONG UsageLength
,
1004 IN PHIDP_PREPARSED_DATA PreparsedData
,
1005 IN OUT PCHAR Report
,
1006 IN ULONG ReportLength
)
1010 return STATUS_NOT_IMPLEMENTED
;
1016 HidParser_TranslateUsagesToI8042ScanCodes(
1017 IN PUSAGE ChangedUsageList
,
1018 IN ULONG UsageListLength
,
1019 IN HIDP_KEYBOARD_DIRECTION KeyAction
,
1020 IN OUT PHIDP_KEYBOARD_MODIFIER_STATE ModifierState
,
1021 IN PHIDP_INSERT_SCANCODES InsertCodesProcedure
,
1022 IN PVOID InsertCodesContext
)
1026 return STATUS_NOT_IMPLEMENTED
;
1032 HidParser_SetUsages(
1033 IN HIDP_REPORT_TYPE ReportType
,
1035 IN USHORT LinkCollection
,
1036 IN PUSAGE UsageList
,
1037 IN OUT PULONG UsageLength
,
1038 IN PHIDP_PREPARSED_DATA PreparsedData
,
1039 IN OUT PCHAR Report
,
1040 IN ULONG ReportLength
)
1044 return STATUS_NOT_IMPLEMENTED
;
1050 HidParser_SetUsageValueArray(
1051 IN HIDP_REPORT_TYPE ReportType
,
1053 IN USHORT LinkCollection OPTIONAL
,
1055 IN PCHAR UsageValue
,
1056 IN USHORT UsageValueByteLength
,
1057 IN PHIDP_PREPARSED_DATA PreparsedData
,
1059 IN ULONG ReportLength
)
1063 return STATUS_NOT_IMPLEMENTED
;
1069 HidParser_SetUsageValue(
1070 IN HIDP_REPORT_TYPE ReportType
,
1072 IN USHORT LinkCollection
,
1074 IN ULONG UsageValue
,
1075 IN PHIDP_PREPARSED_DATA PreparsedData
,
1076 IN OUT PCHAR Report
,
1077 IN ULONG ReportLength
)
1081 return STATUS_NOT_IMPLEMENTED
;
1087 HidParser_SetScaledUsageValue(
1088 IN HIDP_REPORT_TYPE ReportType
,
1090 IN USHORT LinkCollection OPTIONAL
,
1093 IN PHIDP_PREPARSED_DATA PreparsedData
,
1094 IN OUT PCHAR Report
,
1095 IN ULONG ReportLength
)
1099 return STATUS_NOT_IMPLEMENTED
;
1106 IN HIDP_REPORT_TYPE ReportType
,
1107 IN PHIDP_DATA DataList
,
1108 IN OUT PULONG DataLength
,
1109 IN PHIDP_PREPARSED_DATA PreparsedData
,
1110 IN OUT PCHAR Report
,
1111 IN ULONG ReportLength
)
1115 return STATUS_NOT_IMPLEMENTED
;
1121 HidParser_MaxDataListLength(
1122 IN HIDP_REPORT_TYPE ReportType
,
1123 IN PHIDP_PREPARSED_DATA PreparsedData
)
1127 return STATUS_NOT_IMPLEMENTED
;
1133 HidParser_InitializeReportForID(
1134 IN HIDP_REPORT_TYPE ReportType
,
1136 IN PHIDP_PREPARSED_DATA PreparsedData
,
1137 IN OUT PCHAR Report
,
1138 IN ULONG ReportLength
)
1142 return STATUS_NOT_IMPLEMENTED
;
1145 #undef HidParser_GetValueCaps
1150 HidParser_GetValueCaps(
1151 HIDP_REPORT_TYPE ReportType
,
1152 PHIDP_VALUE_CAPS ValueCaps
,
1153 PULONG ValueCapsLength
,
1154 PHIDP_PREPARSED_DATA PreparsedData
)
1158 return STATUS_NOT_IMPLEMENTED
;