|
@@ -0,0 +1,87 @@
|
|
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 - 2008, Intel Corporation. All rights reserved.<BR>
|
|
6
|
+ 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
|
+**/
|
|
15
|
+
|
|
16
|
+#ifndef __DEVICE_PATH_TO_TEXT_PROTOCOL_H__
|
|
17
|
+#define __DEVICE_PATH_TO_TEXT_PROTOCOL_H__
|
|
18
|
+
|
|
19
|
+FILE_LICENCE ( BSD3 );
|
|
20
|
+
|
|
21
|
+///
|
|
22
|
+/// Device Path To Text protocol
|
|
23
|
+///
|
|
24
|
+#define EFI_DEVICE_PATH_TO_TEXT_PROTOCOL_GUID \
|
|
25
|
+ { \
|
|
26
|
+ 0x8b843e20, 0x8132, 0x4852, {0x90, 0xcc, 0x55, 0x1a, 0x4e, 0x4a, 0x7f, 0x1c } \
|
|
27
|
+ }
|
|
28
|
+
|
|
29
|
+/**
|
|
30
|
+ Convert a device node to its text representation.
|
|
31
|
+
|
|
32
|
+ @param DeviceNode Points to the device node to be converted.
|
|
33
|
+ @param DisplayOnly If DisplayOnly is TRUE, then the shorter text representation
|
|
34
|
+ of the display node is used, where applicable. If DisplayOnly
|
|
35
|
+ is FALSE, then the longer text representation of the display node
|
|
36
|
+ is used.
|
|
37
|
+ @param AllowShortcuts If AllowShortcuts is TRUE, then the shortcut forms of text
|
|
38
|
+ representation for a device node can be used, where applicable.
|
|
39
|
+
|
|
40
|
+ @retval a_pointer a pointer to the allocated text representation of the device node data
|
|
41
|
+ @retval NULL if DeviceNode is NULL or there was insufficient memory.
|
|
42
|
+
|
|
43
|
+**/
|
|
44
|
+typedef
|
|
45
|
+CHAR16*
|
|
46
|
+(EFIAPI *EFI_DEVICE_PATH_TO_TEXT_NODE)(
|
|
47
|
+ IN CONST EFI_DEVICE_PATH_PROTOCOL *DeviceNode,
|
|
48
|
+ IN BOOLEAN DisplayOnly,
|
|
49
|
+ IN BOOLEAN AllowShortcuts
|
|
50
|
+ );
|
|
51
|
+
|
|
52
|
+/**
|
|
53
|
+ Convert a device path to its text representation.
|
|
54
|
+
|
|
55
|
+ @param DevicePath Points to the device path to be converted.
|
|
56
|
+ @param DisplayOnly If DisplayOnly is TRUE, then the shorter text representation
|
|
57
|
+ of the display node is used, where applicable. If DisplayOnly
|
|
58
|
+ is FALSE, then the longer text representation of the display node
|
|
59
|
+ is used.
|
|
60
|
+ @param AllowShortcuts The AllowShortcuts is FALSE, then the shortcut forms of
|
|
61
|
+ text representation for a device node cannot be used.
|
|
62
|
+
|
|
63
|
+ @retval a_pointer a pointer to the allocated text representation of the device node.
|
|
64
|
+ @retval NULL if DevicePath is NULL or there was insufficient memory.
|
|
65
|
+
|
|
66
|
+**/
|
|
67
|
+typedef
|
|
68
|
+CHAR16*
|
|
69
|
+(EFIAPI *EFI_DEVICE_PATH_TO_TEXT_PATH)(
|
|
70
|
+ IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePath,
|
|
71
|
+ IN BOOLEAN DisplayOnly,
|
|
72
|
+ IN BOOLEAN AllowShortcuts
|
|
73
|
+ );
|
|
74
|
+
|
|
75
|
+///
|
|
76
|
+/// This protocol converts device paths and device nodes to text.
|
|
77
|
+///
|
|
78
|
+typedef struct {
|
|
79
|
+ EFI_DEVICE_PATH_TO_TEXT_NODE ConvertDeviceNodeToText;
|
|
80
|
+ EFI_DEVICE_PATH_TO_TEXT_PATH ConvertDevicePathToText;
|
|
81
|
+} EFI_DEVICE_PATH_TO_TEXT_PROTOCOL;
|
|
82
|
+
|
|
83
|
+extern EFI_GUID gEfiDevicePathToTextProtocolGuid;
|
|
84
|
+
|
|
85
|
+#endif
|
|
86
|
+
|
|
87
|
+
|