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