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