]> git.proxmox.com Git - mirror_edk2.git/blob - BaseTools/Source/C/Common/EfiUtilityMsgs.h
BaseTools: Clear build versions to sync with buildtools/BaseTools
[mirror_edk2.git] / BaseTools / Source / C / Common / EfiUtilityMsgs.h
1 /** @file
2
3 Copyright (c) 2004 - 2008, Intel Corporation. All rights reserved.<BR>
4 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 EfiUtilityMsgs.h
15
16 Abstract:
17
18 Defines and prototypes for common EFI utility error and debug messages.
19
20 **/
21
22 #ifndef _EFI_UTILITY_MSGS_H_
23 #define _EFI_UTILITY_MSGS_H_
24
25 #include <Common/UefiBaseTypes.h>
26
27 //
28 // Log message print Level
29 //
30 #define VERBOSE_LOG_LEVEL 15
31 #define WARNING_LOG_LEVEL 15
32 #define INFO_LOG_LEVEL 20
33 #define KEY_LOG_LEVEL 40
34 #define ERROR_LOG_LEVLE 50
35
36 //
37 // Status codes returned by EFI utility programs and functions
38 //
39 #define STATUS_SUCCESS 0
40 #define STATUS_WARNING 1
41 #define STATUS_ERROR 2
42 #define VOID void
43
44 typedef int STATUS;
45
46 #define MAX_LINE_LEN 0x200
47 #define MAXIMUM_INPUT_FILE_NUM 10
48
49 #ifdef __cplusplus
50 extern "C" {
51 #endif
52 //
53 // When we call Error() or Warning(), the module keeps track of the worst
54 // case reported. GetUtilityStatus() will get the worst-case results, which
55 // can be used as the return value from the app.
56 //
57 STATUS
58 GetUtilityStatus (
59 VOID
60 );
61
62 //
63 // If someone prints an error message and didn't specify a source file name,
64 // then we print the utility name instead. However they must tell us the
65 // utility name early on via this function.
66 //
67 VOID
68 SetUtilityName (
69 CHAR8 *ProgramName
70 )
71 ;
72
73 VOID
74 PrintMessage (
75 CHAR8 *Type,
76 CHAR8 *FileName,
77 UINT32 LineNumber,
78 UINT32 MessageCode,
79 CHAR8 *Text,
80 CHAR8 *MsgFmt,
81 va_list List
82 );
83
84 VOID
85 Error (
86 CHAR8 *FileName,
87 UINT32 LineNumber,
88 UINT32 ErrorCode,
89 CHAR8 *OffendingText,
90 CHAR8 *MsgFmt,
91 ...
92 )
93 ;
94
95 VOID
96 Warning (
97 CHAR8 *FileName,
98 UINT32 LineNumber,
99 UINT32 WarningCode,
100 CHAR8 *OffendingText,
101 CHAR8 *MsgFmt,
102 ...
103 )
104 ;
105
106 VOID
107 DebugMsg (
108 CHAR8 *FileName,
109 UINT32 LineNumber,
110 UINT64 MsgLevel,
111 CHAR8 *OffendingText,
112 CHAR8 *MsgFmt,
113 ...
114 )
115 ;
116
117 VOID
118 VerboseMsg (
119 CHAR8 *MsgFmt,
120 ...
121 );
122
123 VOID
124 NormalMsg (
125 CHAR8 *MsgFmt,
126 ...
127 );
128
129 VOID
130 KeyMsg (
131 CHAR8 *MsgFmt,
132 ...
133 );
134
135 VOID
136 SetPrintLevel (
137 UINT64 LogLevel
138 );
139
140 VOID
141 ParserSetPosition (
142 CHAR8 *SourceFileName,
143 UINT32 LineNum
144 )
145 ;
146
147 VOID
148 ParserError (
149 UINT32 ErrorCode,
150 CHAR8 *OffendingText,
151 CHAR8 *MsgFmt,
152 ...
153 )
154 ;
155
156 VOID
157 ParserWarning (
158 UINT32 ErrorCode,
159 CHAR8 *OffendingText,
160 CHAR8 *MsgFmt,
161 ...
162 )
163 ;
164
165 VOID
166 SetPrintLimits (
167 UINT32 NumErrors,
168 UINT32 NumWarnings,
169 UINT32 NumWarningsPlusErrors
170 )
171 ;
172
173 #ifdef __cplusplus
174 }
175 #endif
176
177 #endif // #ifndef _EFI_UTILITY_MSGS_H_