]>
Commit | Line | Data |
---|---|---|
45a3634c | 1 | /** @file\r |
2 | \r | |
3 | The lite print protocol defines only one print function to \r | |
4 | print the format unicode string.\r | |
5 | \r | |
584d5652 HT |
6 | Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>\r |
7 | This program and the accompanying materials\r | |
45a3634c | 8 | are licensed and made available under the terms and conditions of the BSD License\r |
9 | which accompanies this distribution. The full text of the license may be found at\r | |
63436673 | 10 | http://opensource.org/licenses/bsd-license.php.\r |
45a3634c | 11 | \r |
12 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r | |
13 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r | |
14 | \r | |
15 | **/\r | |
16 | \r | |
17 | #ifndef __PPRINT_H__\r | |
18 | #define __PPRINT_H__\r | |
19 | \r | |
20 | #define EFI_PRINT_PROTOCOL_GUID \\r | |
21 | { 0xdf2d868e, 0x32fc, 0x4cf0, {0x8e, 0x6b, 0xff, 0xd9, 0x5d, 0x13, 0x43, 0xd0} }\r | |
22 | \r | |
23 | //\r | |
24 | // Forward reference for pure ANSI compatability\r | |
25 | //\r | |
26 | typedef struct _EFI_PRINT_PROTOCOL EFI_PRINT_PROTOCOL;\r | |
27 | \r | |
28 | /**\r | |
63436673 | 29 | Produces a Null-terminated Unicode string in an output buffer, based on \r |
30 | a Null-terminated Unicode format string and a VA_LIST argument list.\r | |
45a3634c | 31 | \r |
32 | Produces a Null-terminated Unicode string in the output buffer specified by StartOfBuffer\r | |
33 | and BufferSize. \r | |
34 | The Unicode string is produced by parsing the format string specified by FormatString. \r | |
35 | Arguments are pulled from the variable argument list specified by Marker based on the \r | |
36 | contents of the format string. \r | |
63436673 | 37 | The number of Unicode characters in the produced output buffer is returned, not including\r |
45a3634c | 38 | the Null-terminator.\r |
63436673 | 39 | If BufferSize is 0 or 1, then no output buffer is produced, and 0 is returned.\r |
45a3634c | 40 | \r |
41 | If BufferSize > 1 and StartOfBuffer is NULL, then ASSERT().\r | |
42 | If BufferSize > 1 and StartOfBuffer is not aligned on a 16-bit boundary, then ASSERT().\r | |
43 | If BufferSize > 1 and FormatString is NULL, then ASSERT().\r | |
44 | If BufferSize > 1 and FormatString is not aligned on a 16-bit boundary, then ASSERT().\r | |
45 | If PcdMaximumUnicodeStringLength is not zero, and FormatString contains more than \r | |
46 | PcdMaximumUnicodeStringLength Unicode characters not including the Null-terminator, then\r | |
47 | ASSERT().\r | |
48 | If PcdMaximumUnicodeStringLength is not zero, and produced Null-terminated Unicode string\r | |
63436673 | 49 | contains more than PcdMaximumUnicodeStringLength Unicode characters, not including the\r |
45a3634c | 50 | Null-terminator, then ASSERT().\r |
51 | \r | |
52 | @param StartOfBuffer A pointer to the output buffer for the produced Null-terminated \r | |
53 | Unicode string.\r | |
54 | @param BufferSize The size, in bytes, of the output buffer specified by StartOfBuffer.\r | |
63436673 | 55 | @param FormatString A Null-terminated Unicode format string.\r |
45a3634c | 56 | @param Marker VA_LIST marker for the variable argument list.\r |
57 | \r | |
58 | @return The number of Unicode characters in the produced output buffer not including the\r | |
59 | Null-terminator.\r | |
60 | \r | |
61 | **/\r | |
62 | typedef\r | |
63 | UINTN\r | |
64 | (EFIAPI *UNI_VSPRINT)(\r | |
65 | OUT CHAR16 *StartOfBuffer,\r | |
66 | IN UINTN BufferSize,\r | |
67 | IN CONST CHAR16 *FormatString,\r | |
68 | IN VA_LIST Marker\r | |
69 | );\r | |
70 | \r | |
a45d1619 | 71 | /**\r |
63436673 | 72 | EFI_PRINT_PROTOCOL provides one service to produce a Null-terminated Unicode string,\r |
73 | based on a Null-terminated Unicode format string and a VA_LIST argument list, and fills into \r | |
74 | the buffer as output.\r | |
a45d1619 | 75 | **/\r |
45a3634c | 76 | struct _EFI_PRINT_PROTOCOL {\r |
77 | UNI_VSPRINT VSPrint;\r | |
78 | };\r | |
79 | \r | |
80 | extern EFI_GUID gEfiPrintProtocolGuid;\r | |
81 | \r | |
82 | #endif\r |