]> git.proxmox.com Git - mirror_edk2.git/blob - MdePkg/Include/Protocol/DevicePathToText.h
Import Pal.h and Sal.h.
[mirror_edk2.git] / MdePkg / Include / Protocol / DevicePathToText.h
1 /** @file
2 EFI_DEVICE_PATH_TO_TEXT_PROTOCOL as defined in UEFI 2.0.
3 This protocol provides service to convert device nodes and paths to text.
4
5 Copyright (c) 2006, Intel Corporation
6 All rights reserved. This program and the accompanying materials
7 are licensed and made available under the terms and conditions of the BSD License
8 which accompanies this distribution. The full text of the license may be found at
9 http://opensource.org/licenses/bsd-license.php
10
11 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
12 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
13
14 Module Name: DevicePathToText.h
15
16 **/
17
18 #ifndef __DEVICE_PATH_TO_TEXT_PROTOCOL_H__
19 #define __DEVICE_PATH_TO_TEXT_PROTOCOL_H__
20
21 #include <Protocol/DevicePath.h>
22
23 //
24 // Device Path To Text protocol
25 //
26 #define EFI_DEVICE_PATH_TO_TEXT_PROTOCOL_GUID \
27 { \
28 0x8b843e20, 0x8132, 0x4852, {0x90, 0xcc, 0x55, 0x1a, 0x4e, 0x4a, 0x7f, 0x1c } \
29 }
30
31 /**
32 Convert a device node to its text representation.
33
34 @param DeviceNode Points to the device node to be converted.
35 @param DisplayOnly If DisplayOnly is TRUE, then the shorter text representation
36 of the display node is used, where applicable. If DisplayOnly
37 is FALSE, then the longer text representation of the display node
38 is used.
39 @param AllowShortcuts If AllowShortcuts is TRUE, then the shortcut forms of text
40 representation for a device node can be used, where applicable.
41
42 @retval a_pointer a pointer to the allocated text representation of the device node data
43 @retval NULL if DeviceNode is NULL or there was insufficient memory.
44
45 **/
46 typedef
47 CHAR16*
48 (EFIAPI *EFI_DEVICE_PATH_TO_TEXT_NODE) (
49 IN CONST EFI_DEVICE_PATH_PROTOCOL *DeviceNode,
50 IN BOOLEAN DisplayOnly,
51 IN BOOLEAN AllowShortcuts
52 )
53 ;
54
55 /**
56 Convert a device path to its text representation.
57
58 @param DevicePath Points to the device path to be converted.
59 @param DisplayOnly If DisplayOnly is TRUE, then the shorter text representation
60 of the display node is used, where applicable. If DisplayOnly
61 is FALSE, then the longer text representation of the display node
62 is used.
63 @param AllowShortcuts The AllowShortcuts is FALSE, then the shortcut forms of
64 text representation for a device node cannot be used.
65
66 @retval a_pointer a pointer to the allocated text representation of the device node.
67 @retval NULL if DevicePath is NULL or there was insufficient memory.
68
69 **/
70 typedef
71 CHAR16*
72 (EFIAPI *EFI_DEVICE_PATH_TO_TEXT_PATH) (
73 IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePath,
74 IN BOOLEAN DisplayOnly,
75 IN BOOLEAN AllowShortcuts
76 )
77 ;
78
79 typedef struct {
80 EFI_DEVICE_PATH_TO_TEXT_NODE ConvertDeviceNodeToText;
81 EFI_DEVICE_PATH_TO_TEXT_PATH ConvertDevicePathToText;
82 } EFI_DEVICE_PATH_TO_TEXT_PROTOCOL;
83
84 extern EFI_GUID gEfiDevicePathToTextProtocolGuid;
85
86 #endif
87
88