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