Enable MiscSubclassDriver.inf in Nt32Pkg
[mirror_edk2.git] / Nt32Pkg / MiscSubClassPlatformDxe / MiscSubclassDriver.h
CommitLineData
8879d432 1/*++\r
2\r
dd356cc4 3Copyright (c) 2006, Intel Corporation\r
4All rights reserved. This program and the accompanying materials\r
5are licensed and made available under the terms and conditions of the BSD License\r
6which accompanies this distribution. The full text of the license may be found at\r
7http://opensource.org/licenses/bsd-license.php\r
8\r
9THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
10WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
8879d432 11\r
12Module Name:\r
13\r
14 MiscSubclassDriver.h\r
15\r
16Abstract:\r
17\r
18 Header file for MiscSubclass Driver.\r
19\r
20--*/\r
21\r
22#ifndef _MISC_SUBCLASS_DRIVER_H\r
23#define _MISC_SUBCLASS_DRIVER_H\r
24\r
25\r
26//\r
27// Include common header file for this module.\r
28//\r
29#include "CommonHeader.h"\r
30\r
31#include <MiscDevicePath.h>\r
32\r
8879d432 33\r
34//\r
35// Data table entry update function.\r
36//\r
dd356cc4 37typedef\r
38EFI_STATUS\r
8879d432 39(EFIAPI EFI_MISC_SUBCLASS_DATA_FUNCTION) (\r
40 IN UINT16 RecordType,\r
41 IN UINT32 *RecordLen,\r
42 IN OUT EFI_MISC_SUBCLASS_RECORDS *RecordData,\r
43 OUT BOOLEAN *LogRecordData\r
44 );\r
45\r
46//\r
47// Data table entry definition.\r
48//\r
49typedef struct {\r
50 UINT16 RecordType;\r
51 UINT32 RecordLen;\r
52 VOID *RecordData;\r
53 EFI_MISC_SUBCLASS_DATA_FUNCTION *Function;\r
54} EFI_MISC_SUBCLASS_DATA_TABLE;\r
55\r
56//\r
57// Data Table extern definitions.\r
58//\r
59#define MISC_SUBCLASS_TABLE_EXTERNS(NAME1, NAME2) \\r
60 extern NAME1 NAME2 ## Data; \\r
61 extern EFI_MISC_SUBCLASS_DATA_FUNCTION NAME2 ## Function\r
62\r
63//\r
64// Data Table entries\r
65//\r
66#define MISC_SUBCLASS_TABLE_ENTRY_DATA_ONLY(NAME1, NAME2) { \\r
67 NAME1 ## _RECORD_NUMBER, sizeof (NAME1 ## _DATA), &NAME2 ## Data, NULL \\r
68 }\r
69\r
70#define MISC_SUBCLASS_TABLE_ENTRY_FUNCTION_ONLY(NAME1, NAME2) \\r
71 { \\r
72 NAME1 ## _RECORD_NUMBER, 0, NULL, &NAME2 ## Function \\r
73 }\r
74\r
75#define MISC_SUBCLASS_TABLE_ENTRY_DATA_AND_FUNCTION(NAME1, NAME2, NAME3) \\r
76 { \\r
77 NAME1 ## _RECORD_NUMBER, sizeof (NAME1 ## _DATA), &NAME2 ## Data, &NAME3 ## Function \\r
78 }\r
79\r
80//\r
81// Global definition macros.\r
82//\r
83#define MISC_SUBCLASS_TABLE_DATA(NAME1, NAME2) NAME1 NAME2 ## Data\r
84\r
85#define MISC_SUBCLASS_TABLE_FUNCTION(NAME2) \\r
86 EFI_STATUS EFIAPI NAME2 ## Function ( \\r
87 IN UINT16 RecordType, \\r
88 IN UINT32 *RecordLen, \\r
89 IN OUT EFI_MISC_SUBCLASS_RECORDS * RecordData, \\r
90 OUT BOOLEAN *LogRecordData \\r
91 )\r
92\r
93//\r
94// Data Table Array\r
95//\r
96extern EFI_MISC_SUBCLASS_DATA_TABLE mMiscSubclassDataTable[];\r
97\r
98//\r
99// Data Table Array Entries\r
100//\r
101extern UINTN mMiscSubclassDataTableEntries;\r
102\r
103#endif /* _MISC_SUBCLASS_DRIVER_H */\r
104\r
105/* eof - MiscSubclassDriver.h */\r