]> git.proxmox.com Git - mirror_edk2.git/commitdiff
Retire Print protocol in MdeModulePkg and update Print2 protocol to provide full...
authorqhuang8 <qhuang8@6f19259b-4bc3-4df7-8a09-765794883524>
Mon, 23 Feb 2009 02:58:46 +0000 (02:58 +0000)
committerqhuang8 <qhuang8@6f19259b-4bc3-4df7-8a09-765794883524>
Mon, 23 Feb 2009 02:58:46 +0000 (02:58 +0000)
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@7564 6f19259b-4bc3-4df7-8a09-765794883524

MdeModulePkg/Include/Protocol/Print.h [deleted file]
MdeModulePkg/Include/Protocol/Print2.h

diff --git a/MdeModulePkg/Include/Protocol/Print.h b/MdeModulePkg/Include/Protocol/Print.h
deleted file mode 100644 (file)
index 3e26c52..0000000
+++ /dev/null
@@ -1,78 +0,0 @@
-/** @file\r
-\r
-  The lite print protocol defines only one print function to \r
-  print the format unicode string.\r
-\r
-Copyright (c) 2006 - 2008, 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
-**/\r
-\r
-#ifndef __PPRINT_H__\r
-#define __PPRINT_H__\r
-\r
-#define EFI_PRINT_PROTOCOL_GUID  \\r
-   { 0xdf2d868e, 0x32fc, 0x4cf0, {0x8e, 0x6b, 0xff, 0xd9, 0x5d, 0x13, 0x43, 0xd0} }\r
-\r
-//\r
-// Forward reference for pure ANSI compatability\r
-//\r
-typedef struct _EFI_PRINT_PROTOCOL  EFI_PRINT_PROTOCOL;\r
-\r
-/**\r
-  Produces a Null-terminated Unicode string in an output buffer based on \r
-  a Null-terminated Unicode format string and a VA_LIST argument list\r
-  \r
-  Produces a Null-terminated Unicode string in the output buffer specified by StartOfBuffer\r
-  and BufferSize.  \r
-  The Unicode string is produced by parsing the format string specified by FormatString.  \r
-  Arguments are pulled from the variable argument list specified by Marker based on the \r
-  contents of the format string.  \r
-  The number of Unicode characters in the produced output buffer is returned not including\r
-  the Null-terminator.\r
-  If BufferSize is 0 or 1, then no output buffer is produced and 0 is returned.\r
-\r
-  If BufferSize > 1 and StartOfBuffer is NULL, then ASSERT().\r
-  If BufferSize > 1 and StartOfBuffer is not aligned on a 16-bit boundary, then ASSERT().\r
-  If BufferSize > 1 and FormatString is NULL, then ASSERT().\r
-  If BufferSize > 1 and FormatString is not aligned on a 16-bit boundary, then ASSERT().\r
-  If PcdMaximumUnicodeStringLength is not zero, and FormatString contains more than \r
-  PcdMaximumUnicodeStringLength Unicode characters not including the Null-terminator, then\r
-  ASSERT().\r
-  If PcdMaximumUnicodeStringLength is not zero, and produced Null-terminated Unicode string\r
-  contains more than PcdMaximumUnicodeStringLength Unicode characters not including the\r
-  Null-terminator, then ASSERT().\r
-\r
-  @param  StartOfBuffer   A pointer to the output buffer for the produced Null-terminated \r
-                          Unicode string.\r
-  @param  BufferSize      The size, in bytes, of the output buffer specified by StartOfBuffer.\r
-  @param  FormatString    Null-terminated Unicode format string.\r
-  @param  Marker          VA_LIST marker for the variable argument list.\r
-  \r
-  @return The number of Unicode characters in the produced output buffer not including the\r
-          Null-terminator.\r
-\r
-**/\r
-typedef\r
-UINTN\r
-(EFIAPI *UNI_VSPRINT)(\r
-  OUT CHAR16        *StartOfBuffer,\r
-  IN  UINTN         BufferSize,\r
-  IN  CONST CHAR16  *FormatString,\r
-  IN  VA_LIST       Marker\r
-  );\r
-\r
-\r
-struct _EFI_PRINT_PROTOCOL {\r
-  UNI_VSPRINT               VSPrint;\r
-};\r
-\r
-extern EFI_GUID gEfiPrintProtocolGuid;\r
-\r
-#endif\r
index e38a390826040941164e953e742a8f7d68ba7775..30c01dc4996e3e7967d51bb10d2dc999079c021f 100644 (file)
@@ -3,7 +3,7 @@
   This print protocol defines six basic print functions to \r
   print the format unicode and ascii string.\r
 \r
   This print protocol defines six basic print functions to \r
   print the format unicode and ascii string.\r
 \r
-Copyright (c) 2006 - 2008, Intel Corporation\r
+Copyright (c) 2006 - 2009, 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
 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
@@ -61,13 +61,56 @@ typedef struct _EFI_PRINT2_PROTOCOL  EFI_PRINT2_PROTOCOL;
 **/\r
 typedef\r
 UINTN\r
 **/\r
 typedef\r
 UINTN\r
-(EFIAPI *UNI_VSPRINT2)(\r
+(EFIAPI *UNICODE_VS_PRINT) (\r
   OUT CHAR16        *StartOfBuffer,\r
   IN  UINTN         BufferSize,\r
   IN  CONST CHAR16  *FormatString,\r
   IN  VA_LIST       Marker\r
   );\r
 \r
   OUT CHAR16        *StartOfBuffer,\r
   IN  UINTN         BufferSize,\r
   IN  CONST CHAR16  *FormatString,\r
   IN  VA_LIST       Marker\r
   );\r
 \r
+/**\r
+  Produces a Null-terminated Unicode string in an output buffer based on a Null-terminated \r
+  Unicode format string and variable argument list.\r
+  \r
+  Produces a Null-terminated Unicode string in the output buffer specified by StartOfBuffer\r
+  and BufferSize.\r
+  The Unicode string is produced by parsing the format string specified by FormatString.\r
+  Arguments are pulled from the variable argument list based on the contents of the format string.\r
+  The number of Unicode characters in the produced output buffer is returned not including\r
+  the Null-terminator.\r
+  If BufferSize is 0 or 1, then no output buffer is produced and 0 is returned.\r
+\r
+  If BufferSize > 1 and StartOfBuffer is NULL, then ASSERT().\r
+  If BufferSize > 1 and StartOfBuffer is not aligned on a 16-bit boundary, then ASSERT().\r
+  If BufferSize > 1 and FormatString is NULL, then ASSERT().\r
+  If BufferSize > 1 and FormatString is not aligned on a 16-bit boundary, then ASSERT().\r
+  If PcdMaximumUnicodeStringLength is not zero, and FormatString contains more than \r
+  PcdMaximumUnicodeStringLength Unicode characters not including the Null-terminator, then\r
+  ASSERT().\r
+  If PcdMaximumUnicodeStringLength is not zero, and produced Null-terminated Unicode string\r
+  contains more than PcdMaximumUnicodeStringLength Unicode characters not including the\r
+  Null-terminator, then ASSERT().\r
+\r
+  @param  StartOfBuffer   A pointer to the output buffer for the produced Null-terminated \r
+                          Unicode string.\r
+  @param  BufferSize      The size, in bytes, of the output buffer specified by StartOfBuffer.\r
+  @param  FormatString    Null-terminated Unicode format string.\r
+  @param  ...             Variable argument list whose contents are accessed based on the \r
+                          format string specified by FormatString.\r
+  \r
+  @return The number of Unicode characters in the produced output buffer not including the\r
+          Null-terminator.\r
+\r
+**/\r
+typedef\r
+UINTN\r
+(EFIAPI *UNICODE_S_PRINT) (\r
+  OUT CHAR16        *StartOfBuffer,\r
+  IN  UINTN         BufferSize,\r
+  IN  CONST CHAR16  *FormatString,\r
+  ...\r
+  );\r
+\r
 /**\r
   Produces a Null-terminated Unicode string in an output buffer based on a Null-terminated\r
   ASCII format string and a VA_LIST argument list\r
 /**\r
   Produces a Null-terminated Unicode string in an output buffer based on a Null-terminated\r
   ASCII format string and a VA_LIST argument list\r
@@ -103,13 +146,56 @@ UINTN
 **/\r
 typedef\r
 UINTN\r
 **/\r
 typedef\r
 UINTN\r
-(EFIAPI *UNI_VSPRINT_ASCII)(\r
+(EFIAPI *UNICODE_VS_PRINT_ASCII_FORMAT) (\r
   OUT CHAR16       *StartOfBuffer,\r
   IN  UINTN        BufferSize,\r
   IN  CONST CHAR8  *FormatString,\r
   IN  VA_LIST      Marker\r
   );\r
 \r
   OUT CHAR16       *StartOfBuffer,\r
   IN  UINTN        BufferSize,\r
   IN  CONST CHAR8  *FormatString,\r
   IN  VA_LIST      Marker\r
   );\r
 \r
+/**\r
+  Produces a Null-terminated Unicode string in an output buffer based on a Null-terminated \r
+  ASCII format string and  variable argument list.\r
+  \r
+  Produces a Null-terminated Unicode string in the output buffer specified by StartOfBuffer\r
+  and BufferSize.\r
+  The Unicode string is produced by parsing the format string specified by FormatString.\r
+  Arguments are pulled from the variable argument list based on the contents of the \r
+  format string.\r
+  The number of Unicode characters in the produced output buffer is returned not including\r
+  the Null-terminator.\r
+  If BufferSize is 0 or 1, then no output buffer is produced and 0 is returned.\r
+\r
+  If BufferSize > 1 and StartOfBuffer is NULL, then ASSERT().\r
+  If BufferSize > 1 and StartOfBuffer is not aligned on a 16-bit boundary, then ASSERT().\r
+  If BufferSize > 1 and FormatString is NULL, then ASSERT().\r
+  If PcdMaximumAsciiStringLength is not zero, and FormatString contains more than\r
+  PcdMaximumAsciiStringLength ASCII characters not including the Null-terminator, then\r
+  ASSERT().\r
+  If PcdMaximumUnicodeStringLength is not zero, and produced Null-terminated Unicode string\r
+  contains more than PcdMaximumUnicodeStringLength Unicode characters not including the\r
+  Null-terminator, then ASSERT().\r
+\r
+  @param  StartOfBuffer   A pointer to the output buffer for the produced Null-terminated \r
+                          Unicode string.\r
+  @param  BufferSize      The size, in bytes, of the output buffer specified by StartOfBuffer.\r
+  @param  FormatString    Null-terminated ASCII format string.\r
+  @param  ...             Variable argument list whose contents are accessed based on the \r
+                          format string specified by FormatString.\r
+  \r
+  @return The number of Unicode characters in the produced output buffer not including the\r
+          Null-terminator.\r
+\r
+**/\r
+typedef\r
+UINTN\r
+(EFIAPI *UNICODE_S_PRINT_ASCII_FORMAT) (\r
+  OUT CHAR16       *StartOfBuffer,\r
+  IN  UINTN        BufferSize,\r
+  IN  CONST CHAR8  *FormatString,\r
+  ...\r
+  );\r
+\r
 /**\r
   Converts a decimal value to a Null-terminated Unicode string.\r
   \r
 /**\r
   Converts a decimal value to a Null-terminated Unicode string.\r
   \r
@@ -153,7 +239,7 @@ UINTN
 **/\r
 typedef\r
 UINTN\r
 **/\r
 typedef\r
 UINTN\r
-(EFIAPI *VALUE_TO_UNISTRING)(\r
+(EFIAPI *UNICODE_VALUE_TO_STRING) (\r
   IN OUT CHAR16  *Buffer,\r
   IN UINTN       Flags,\r
   IN INT64       Value,\r
   IN OUT CHAR16  *Buffer,\r
   IN UINTN       Flags,\r
   IN INT64       Value,\r
@@ -194,13 +280,55 @@ UINTN
 **/\r
 typedef\r
 UINTN\r
 **/\r
 typedef\r
 UINTN\r
-(EFIAPI *ASCII_VSPRINT)(\r
+(EFIAPI *ASCII_VS_PRINT) (\r
   OUT CHAR8         *StartOfBuffer,\r
   IN  UINTN         BufferSize,\r
   IN  CONST CHAR8   *FormatString,\r
   IN  VA_LIST       Marker\r
   );\r
 \r
   OUT CHAR8         *StartOfBuffer,\r
   IN  UINTN         BufferSize,\r
   IN  CONST CHAR8   *FormatString,\r
   IN  VA_LIST       Marker\r
   );\r
 \r
+/**\r
+  Produces a Null-terminated ASCII string in an output buffer based on a Null-terminated\r
+  ASCII format string and  variable argument list.\r
+  \r
+  Produces a Null-terminated ASCII string in the output buffer specified by StartOfBuffer\r
+  and BufferSize.\r
+  The ASCII string is produced by parsing the format string specified by FormatString.\r
+  Arguments are pulled from the variable argument list based on the contents of the \r
+  format string.\r
+  The number of ASCII characters in the produced output buffer is returned not including\r
+  the Null-terminator.\r
+  If BufferSize is 0, then no output buffer is produced and 0 is returned.\r
+\r
+  If BufferSize > 0 and StartOfBuffer is NULL, then ASSERT().\r
+  If BufferSize > 0 and FormatString is NULL, then ASSERT().\r
+  If PcdMaximumAsciiStringLength is not zero, and FormatString contains more than\r
+  PcdMaximumAsciiStringLength ASCII characters not including the Null-terminator, then\r
+  ASSERT().\r
+  If PcdMaximumAsciiStringLength is not zero, and produced Null-terminated ASCII string\r
+  contains more than PcdMaximumAsciiStringLength ASCII characters not including the\r
+  Null-terminator, then ASSERT().\r
+\r
+  @param  StartOfBuffer   A pointer to the output buffer for the produced Null-terminated \r
+                          ASCII string.\r
+  @param  BufferSize      The size, in bytes, of the output buffer specified by StartOfBuffer.\r
+  @param  FormatString    Null-terminated ASCII format string.\r
+  @param  ...             Variable argument list whose contents are accessed based on the \r
+                          format string specified by FormatString.\r
+   \r
+  @return The number of ASCII characters in the produced output buffer not including the\r
+          Null-terminator.\r
+\r
+**/\r
+typedef\r
+UINTN\r
+(EFIAPI *ASCII_S_PRINT) (\r
+  OUT CHAR8        *StartOfBuffer,\r
+  IN  UINTN        BufferSize,\r
+  IN  CONST CHAR8  *FormatString,\r
+  ...\r
+  );\r
+\r
 /**\r
   Produces a Null-terminated ASCII string in an output buffer based on a Null-terminated\r
   Unicode format string and a VA_LIST argument list.\r
 /**\r
   Produces a Null-terminated ASCII string in an output buffer based on a Null-terminated\r
   Unicode format string and a VA_LIST argument list.\r
@@ -236,13 +364,56 @@ UINTN
 **/\r
 typedef\r
 UINTN\r
 **/\r
 typedef\r
 UINTN\r
-(EFIAPI *ASCII_VSPRINT_UNI)(\r
+(EFIAPI *ASCII_VS_PRINT_UNICODE_FORMAT) (\r
   OUT CHAR8         *StartOfBuffer,\r
   IN  UINTN         BufferSize,\r
   IN  CONST CHAR16  *FormatString,\r
   IN  VA_LIST       Marker\r
   );\r
 \r
   OUT CHAR8         *StartOfBuffer,\r
   IN  UINTN         BufferSize,\r
   IN  CONST CHAR16  *FormatString,\r
   IN  VA_LIST       Marker\r
   );\r
 \r
+/**\r
+  Produces a Null-terminated ASCII string in an output buffer based on a Null-terminated\r
+  Unicode format string and  variable argument list.\r
+  \r
+  Produces a Null-terminated ASCII string in the output buffer specified by StartOfBuffer\r
+  and BufferSize.\r
+  The ASCII string is produced by parsing the format string specified by FormatString.\r
+  Arguments are pulled from the variable argument list based on the contents of the \r
+  format string.\r
+  The number of ASCII characters in the produced output buffer is returned not including\r
+  the Null-terminator.\r
+  If BufferSize is 0, then no output buffer is produced and 0 is returned.\r
+\r
+  If BufferSize > 0 and StartOfBuffer is NULL, then ASSERT().\r
+  If BufferSize > 0 and FormatString is NULL, then ASSERT().\r
+  If BufferSize > 0 and FormatString is not aligned on a 16-bit boundary, then ASSERT().\r
+  If PcdMaximumUnicodeStringLength is not zero, and FormatString contains more than\r
+  PcdMaximumUnicodeStringLength Unicode characters not including the Null-terminator, then\r
+  ASSERT().\r
+  If PcdMaximumAsciiStringLength is not zero, and produced Null-terminated ASCII string\r
+  contains more than PcdMaximumAsciiStringLength ASCII characters not including the\r
+  Null-terminator, then ASSERT().\r
+\r
+  @param  StartOfBuffer   A pointer to the output buffer for the produced Null-terminated \r
+                          ASCII string.\r
+  @param  BufferSize      The size, in bytes, of the output buffer specified by StartOfBuffer.\r
+  @param  FormatString    Null-terminated Unicode format string.\r
+  @param  ...             Variable argument list whose contents are accessed based on the \r
+                          format string specified by FormatString.\r
+  \r
+  @return The number of ASCII characters in the produced output buffer not including the\r
+          Null-terminator.\r
+\r
+**/\r
+typedef\r
+UINTN\r
+(EFIAPI *ASCII_S_PRINT_UNICODE_FORMAT) (\r
+  OUT CHAR8         *StartOfBuffer,\r
+  IN  UINTN         BufferSize,\r
+  IN  CONST CHAR16  *FormatString,\r
+  ...\r
+  );\r
+\r
 /**\r
   Converts a decimal value to a Null-terminated ASCII string.\r
   \r
 /**\r
   Converts a decimal value to a Null-terminated ASCII string.\r
   \r
@@ -285,20 +456,24 @@ UINTN
 **/\r
 typedef\r
 UINTN\r
 **/\r
 typedef\r
 UINTN\r
-(EFIAPI *VALUE_TO_ASCIISTRING)(\r
-  IN OUT CHAR8  *Buffer,\r
-  IN UINTN      Flags,\r
-  IN INT64      Value,\r
-  IN UINTN      Width\r
+(EFIAPI *ASCII_VALUE_TO_STRING) (\r
+  OUT CHAR8      *Buffer,\r
+  IN  UINTN      Flags,\r
+  IN  INT64      Value,\r
+  IN  UINTN      Width\r
   );\r
 \r
 struct _EFI_PRINT2_PROTOCOL {\r
   );\r
 \r
 struct _EFI_PRINT2_PROTOCOL {\r
-  UNI_VSPRINT2              VSPrint;\r
-  UNI_VSPRINT_ASCII         UniVSPrintAscii;\r
-  VALUE_TO_UNISTRING        UniValueToString;                         \r
-  ASCII_VSPRINT             AsciiVSPrint;          \r
-  ASCII_VSPRINT_UNI         AsciiVSPrintUni;\r
-  VALUE_TO_ASCIISTRING      AsciiValueToString;\r
+  UNICODE_VS_PRINT                 UnicodeVSPrint;\r
+  UNICODE_S_PRINT                  UnicodeSPrint;\r
+  UNICODE_VS_PRINT_ASCII_FORMAT    UnicodeVSPrintAsciiFormat;\r
+  UNICODE_S_PRINT_ASCII_FORMAT     UnicodeSPrintAsciiFormat;\r
+  UNICODE_VALUE_TO_STRING          UnicodeValueToString;\r
+  ASCII_VS_PRINT                   AsciiVSPrint;\r
+  ASCII_S_PRINT                    AsciiSPrint;\r
+  ASCII_VS_PRINT_UNICODE_FORMAT    AsciiVSPrintUnicodeFormat;\r
+  ASCII_S_PRINT_UNICODE_FORMAT     AsciiSPrintUnicodeFormat;\r
+  ASCII_VALUE_TO_STRING            AsciiValueToString;\r
 };\r
 \r
 extern EFI_GUID gEfiPrint2ProtocolGuid;\r
 };\r
 \r
 extern EFI_GUID gEfiPrint2ProtocolGuid;\r