summaryrefslogtreecommitdiff
path: root/MdeModulePkg/Include/Protocol/Print.h
blob: b640cb0b2f4286b1fe702d062692fa10297c3803 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
/*++

Copyright (c) 2006 - 2007, Intel Corporation
All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution.  The full text of the license may be found at
http://opensource.org/licenses/bsd-license.php

THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.

Module Name:

  Print.h

Abstract:

  This file defines the Print protocol

--*/

#ifndef __PPRINT_H__
#define __PPRINT_H__

#define EFI_PRINT_PROTOCOL_GUID  \
   { 0x5bcc3dbc, 0x8c57, 0x450a, { 0xbb, 0xc, 0xa1, 0xc0, 0xbd, 0xde, 0x48, 0xc } }

//
// Forward reference for pure ANSI compatability
//
typedef struct _EFI_PRINT_PROTOCOL  EFI_PRINT_PROTOCOL;


typedef
UINTN
(EFIAPI *UNI_VSPRINT) (
  OUT CHAR16        *StartOfBuffer,
  IN  UINTN         BufferSize,
  IN  CONST CHAR16  *FormatString,
  IN  VA_LIST       Marker
  );

typedef
UINTN
(EFIAPI *UNI_VSPRINT_ASCII) (
  OUT CHAR16       *StartOfBuffer,
  IN  UINTN        BufferSize,
  IN  CONST CHAR8  *FormatString,
  IN  VA_LIST      Marker
  );

typedef
UINTN
(EFIAPI *VALUE_TO_UNISTRING) (
  IN OUT CHAR16  *Buffer,
  IN UINTN       Flags,
  IN INT64       Value,
  IN UINTN       Width
  );

typedef
UINTN
(EFIAPI *ASCII_VSPRINT) (
  OUT CHAR8         *StartOfBuffer,
  IN  UINTN         BufferSize,
  IN  CONST CHAR8   *FormatString,
  IN  VA_LIST       Marker
  );

typedef
UINTN
(EFIAPI *ASCII_VSPRINT_UNI) (
  OUT CHAR8         *StartOfBuffer,
  IN  UINTN         BufferSize,
  IN  CONST CHAR16  *FormatString,
  IN  VA_LIST       Marker
  );

typedef
UINTN
(EFIAPI *VALUE_TO_ASCIISTRING) (
  IN OUT CHAR8  *Buffer,
  IN UINTN      Flags,
  IN INT64      Value,
  IN UINTN      Width
  );

struct _EFI_PRINT_PROTOCOL {
  UNI_VSPRINT               VSPrint;
  UNI_VSPRINT_ASCII         UniVSPrintAscii;
  VALUE_TO_UNISTRING        UniValueToString;                         
  ASCII_VSPRINT             AsciiVSPrint;          
  ASCII_VSPRINT_UNI         AsciiVSPrintUni;
  VALUE_TO_ASCIISTRING      AsciiValueToString;
};

extern EFI_GUID gEfiPrintProtocolGuid;

#endif