]> git.proxmox.com Git - mirror_edk2.git/blob - Tools/Source/TianoTools/Common/EfiUtilityMsgs.h
777cacf7717c147d9dbd13c64fe5076e30ce946c
[mirror_edk2.git] / Tools / Source / TianoTools / Common / EfiUtilityMsgs.h
1 /*++
2
3 Copyright (c) 2004, 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 EfiUtilityMsgs.h
15
16 Abstract:
17
18 Defines and prototypes for common EFI utility error and debug messages.
19
20 --*/
21
22 #include <Base.h>
23 #include <UefiBaseTypes.h>
24
25 #ifndef _EFI_UTILITY_MSGS_H_
26 #define _EFI_UTILITY_MSGS_H_
27
28 //
29 // Status codes returned by EFI utility programs and functions
30 //
31 #define STATUS_SUCCESS 0
32 #define STATUS_WARNING 1
33 #define STATUS_ERROR 2
34 #define VOID void
35
36 typedef int STATUS;
37
38 #ifdef __cplusplus
39 extern "C" {
40 #endif
41 //
42 // When we call Error() or Warning(), the module keeps track of the worst
43 // case reported. GetUtilityStatus() will get the worst-case results, which
44 // can be used as the return value from the app.
45 //
46 STATUS
47 GetUtilityStatus (
48 void
49 );
50
51 //
52 // If someone prints an error message and didn't specify a source file name,
53 // then we print the utility name instead. However they must tell us the
54 // utility name early on via this function.
55 //
56 void
57 SetUtilityName (
58 CHAR8 *ProgramName
59 )
60 ;
61
62 void
63 Error (
64 CHAR8 *FileName,
65 UINT32 LineNumber,
66 UINT32 ErrorCode,
67 CHAR8 *OffendingText,
68 CHAR8 *MsgFmt,
69 ...
70 )
71 ;
72
73 void
74 Warning (
75 CHAR8 *FileName,
76 UINT32 LineNumber,
77 UINT32 ErrorCode,
78 CHAR8 *OffendingText,
79 CHAR8 *MsgFmt,
80 ...
81 )
82 ;
83
84 void
85 DebugMsg (
86 CHAR8 *FileName,
87 UINT32 LineNumber,
88 UINT32 MsgLevel,
89 CHAR8 *OffendingText,
90 CHAR8 *MsgFmt,
91 ...
92 )
93 ;
94
95 void
96 SetDebugMsgMask (
97 UINT32 MsgMask
98 )
99 ;
100
101 void
102 ParserSetPosition (
103 CHAR8 *SourceFileName,
104 UINT32 LineNum
105 )
106 ;
107
108 void
109 ParserError (
110 UINT32 ErrorCode,
111 CHAR8 *OffendingText,
112 CHAR8 *MsgFmt,
113 ...
114 )
115 ;
116
117 void
118 ParserWarning (
119 UINT32 ErrorCode,
120 CHAR8 *OffendingText,
121 CHAR8 *MsgFmt,
122 ...
123 )
124 ;
125
126 void
127 SetPrintLimits (
128 UINT32 NumErrors,
129 UINT32 NumWarnings,
130 UINT32 NumWarningsPlusErrors
131 )
132 ;
133
134 #ifdef __cplusplus
135 }
136 #endif
137
138 #endif // #ifndef _EFI_UTILITY_MSGS_H_