]> git.proxmox.com Git - mirror_edk2.git/blobdiff - EdkCompatibilityPkg/Sample/Tools/Source/Common/EfiUtilityMsgs.h
Add in the 1st version of ECP.
[mirror_edk2.git] / EdkCompatibilityPkg / Sample / Tools / Source / Common / EfiUtilityMsgs.h
diff --git a/EdkCompatibilityPkg/Sample/Tools/Source/Common/EfiUtilityMsgs.h b/EdkCompatibilityPkg/Sample/Tools/Source/Common/EfiUtilityMsgs.h
new file mode 100644 (file)
index 0000000..2da1fe5
--- /dev/null
@@ -0,0 +1,135 @@
+/*++\r
+\r
+Copyright (c) 2004, Intel Corporation                                                         \r
+All rights reserved. This program and the accompanying materials                          \r
+are licensed and made available under the terms and conditions of the BSD License         \r
+which accompanies this distribution.  The full text of the license may be found at        \r
+http://opensource.org/licenses/bsd-license.php                                            \r
+                                                                                          \r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,                     \r
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.             \r
+\r
+Module Name:\r
+\r
+  EfiUtilityMsgs.h\r
+\r
+Abstract:\r
+\r
+  Defines and prototypes for common EFI utility error and debug messages.\r
+  \r
+--*/\r
+\r
+#ifndef _EFI_UTILITY_MSGS_H_\r
+#define _EFI_UTILITY_MSGS_H_\r
+\r
+//\r
+// Status codes returned by EFI utility programs and functions\r
+//\r
+#define STATUS_SUCCESS  0\r
+#define STATUS_WARNING  1\r
+#define STATUS_ERROR    2\r
+#define VOID void \r
+\r
+typedef int STATUS;\r
+\r
+#ifdef __cplusplus\r
+extern "C" {\r
+#endif\r
+//\r
+// When we call Error() or Warning(), the module keeps track of the worst\r
+// case reported. GetUtilityStatus() will get the worst-case results, which\r
+// can be used as the return value from the app.\r
+//\r
+STATUS\r
+GetUtilityStatus (\r
+  void\r
+  );\r
+\r
+//\r
+// If someone prints an error message and didn't specify a source file name,\r
+// then we print the utility name instead. However they must tell us the\r
+// utility name early on via this function.\r
+//\r
+void\r
+SetUtilityName (\r
+  INT8 *ProgramName\r
+  )\r
+;\r
+\r
+void\r
+Error (\r
+  INT8    *FileName,\r
+  UINT32  LineNumber,\r
+  UINT32  ErrorCode,\r
+  INT8    *OffendingText,\r
+  INT8    *MsgFmt,\r
+  ...\r
+  )\r
+;\r
+\r
+void\r
+Warning (\r
+  INT8    *FileName,\r
+  UINT32  LineNumber,\r
+  UINT32  ErrorCode,\r
+  INT8    *OffendingText,\r
+  INT8    *MsgFmt,\r
+  ...\r
+  )\r
+;\r
+\r
+void\r
+DebugMsg (\r
+  INT8    *FileName,\r
+  UINT32  LineNumber,\r
+  UINT32  MsgLevel,\r
+  INT8    *OffendingText,\r
+  INT8    *MsgFmt,\r
+  ...\r
+  )\r
+;\r
+\r
+void\r
+SetDebugMsgMask (\r
+  UINT32    MsgMask\r
+  )\r
+;\r
+\r
+void\r
+ParserSetPosition (\r
+  INT8    *SourceFileName,\r
+  UINT32  LineNum\r
+  )\r
+;\r
+\r
+void\r
+ParserError (\r
+  UINT32  ErrorCode,\r
+  INT8    *OffendingText,\r
+  INT8    *MsgFmt,\r
+  ...\r
+  )\r
+;\r
+\r
+void\r
+ParserWarning (\r
+  UINT32  ErrorCode,\r
+  INT8    *OffendingText,\r
+  INT8    *MsgFmt,\r
+  ...\r
+  )\r
+;\r
+\r
+void\r
+SetPrintLimits (\r
+  UINT32  NumErrors,\r
+  UINT32  NumWarnings,\r
+  UINT32  NumWarningsPlusErrors\r
+  )\r
+;\r
+\r
+#ifdef __cplusplus\r
+}\r
+#endif\r
+\r
+#endif // #ifndef _EFI_UTILITY_MSGS_H_\r