Update EFI_CAPSULE_HEADER definition.
[mirror_edk2.git] / Nt32Pkg / MiscSubClassPlatformDxe / 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 //
27 // Include common header file for this module.
28 //
29 #include "CommonHeader.h"
30
31 #include <MiscDevicePath.h>
32
33 //
34 // Autogen string file
35 //
36 #include <MiscSubclassStrDefs.h>
37
38 //
39 // Data table entry update function.
40 //
41 typedef
42 EFI_STATUS
43 (EFIAPI EFI_MISC_SUBCLASS_DATA_FUNCTION) (
44 IN UINT16 RecordType,
45 IN UINT32 *RecordLen,
46 IN OUT EFI_MISC_SUBCLASS_RECORDS *RecordData,
47 OUT BOOLEAN *LogRecordData
48 );
49
50 //
51 // Data table entry definition.
52 //
53 typedef struct {
54 UINT16 RecordType;
55 UINT32 RecordLen;
56 VOID *RecordData;
57 EFI_MISC_SUBCLASS_DATA_FUNCTION *Function;
58 } EFI_MISC_SUBCLASS_DATA_TABLE;
59
60 //
61 // Data Table extern definitions.
62 //
63 #define MISC_SUBCLASS_TABLE_EXTERNS(NAME1, NAME2) \
64 extern NAME1 NAME2 ## Data; \
65 extern EFI_MISC_SUBCLASS_DATA_FUNCTION NAME2 ## Function
66
67 //
68 // Data Table entries
69 //
70 #define MISC_SUBCLASS_TABLE_ENTRY_DATA_ONLY(NAME1, NAME2) { \
71 NAME1 ## _RECORD_NUMBER, sizeof (NAME1 ## _DATA), &NAME2 ## Data, NULL \
72 }
73
74 #define MISC_SUBCLASS_TABLE_ENTRY_FUNCTION_ONLY(NAME1, NAME2) \
75 { \
76 NAME1 ## _RECORD_NUMBER, 0, NULL, &NAME2 ## Function \
77 }
78
79 #define MISC_SUBCLASS_TABLE_ENTRY_DATA_AND_FUNCTION(NAME1, NAME2, NAME3) \
80 { \
81 NAME1 ## _RECORD_NUMBER, sizeof (NAME1 ## _DATA), &NAME2 ## Data, &NAME3 ## Function \
82 }
83
84 //
85 // Global definition macros.
86 //
87 #define MISC_SUBCLASS_TABLE_DATA(NAME1, NAME2) NAME1 NAME2 ## Data
88
89 #define MISC_SUBCLASS_TABLE_FUNCTION(NAME2) \
90 EFI_STATUS EFIAPI NAME2 ## Function ( \
91 IN UINT16 RecordType, \
92 IN UINT32 *RecordLen, \
93 IN OUT EFI_MISC_SUBCLASS_RECORDS * RecordData, \
94 OUT BOOLEAN *LogRecordData \
95 )
96
97 //
98 // Data Table Array
99 //
100 extern EFI_MISC_SUBCLASS_DATA_TABLE mMiscSubclassDataTable[];
101
102 //
103 // Data Table Array Entries
104 //
105 extern UINTN mMiscSubclassDataTableEntries;
106
107 #endif /* _MISC_SUBCLASS_DRIVER_H */
108
109 /* eof - MiscSubclassDriver.h */