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