]> git.proxmox.com Git - mirror_edk2.git/blobdiff - OldMdePkg/Include/Protocol/DevicePathToText.h
Moved the MdePkg to OldMdePkg so that new code in MdePkg does not break existing...
[mirror_edk2.git] / OldMdePkg / Include / Protocol / DevicePathToText.h
diff --git a/OldMdePkg/Include/Protocol/DevicePathToText.h b/OldMdePkg/Include/Protocol/DevicePathToText.h
new file mode 100644 (file)
index 0000000..d888562
--- /dev/null
@@ -0,0 +1,86 @@
+/** @file\r
+  EFI_DEVICE_PATH_TO_TEXT_PROTOCOL as defined in UEFI 2.0.  \r
+  This protocol provides service to convert device nodes and paths to text.\r
+\r
+  Copyright (c) 2006, Intel Corporation                                                         \r
+  All rights reserved. This program and the accompanying materials                          \r
+  are licensed and made available under the terms and conditions of the BSD License         \r
+  which accompanies this distribution.  The full text of the license may be found at        \r
+  http://opensource.org/licenses/bsd-license.php                                            \r
+\r
+  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,                     \r
+  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.             \r
+\r
+  Module Name:  DevicePathToText.h\r
+\r
+**/\r
+\r
+#ifndef __DEVICE_PATH_TO_TEXT_PROTOCOL_H__\r
+#define __DEVICE_PATH_TO_TEXT_PROTOCOL_H__\r
+\r
+//\r
+// Device Path To Text protocol\r
+//\r
+#define EFI_DEVICE_PATH_TO_TEXT_PROTOCOL_GUID \\r
+  { \\r
+    0x8b843e20, 0x8132, 0x4852, {0x90, 0xcc, 0x55, 0x1a, 0x4e, 0x4a, 0x7f, 0x1c } \\r
+  }\r
+\r
+/**\r
+  Convert a device node to its text representation.\r
+\r
+  @param  DeviceNode     Points to the device node to be converted.\r
+  @param  DisplayOnly    If DisplayOnly is TRUE, then the shorter text representation\r
+                         of the display node is used, where applicable. If DisplayOnly\r
+                         is FALSE, then the longer text representation of the display node\r
+                         is used.\r
+  @param  AllowShortcuts If AllowShortcuts is TRUE, then the shortcut forms of text\r
+                         representation for a device node can be used, where applicable.\r
+\r
+  @retval a_pointer      a pointer to the allocated text representation of the device node data\r
+  @retval NULL           if DeviceNode is NULL or there was insufficient memory.\r
+\r
+**/\r
+typedef\r
+CHAR16*\r
+(EFIAPI *EFI_DEVICE_PATH_TO_TEXT_NODE) (\r
+  IN CONST EFI_DEVICE_PATH_PROTOCOL   *DeviceNode,\r
+  IN BOOLEAN                          DisplayOnly,\r
+  IN BOOLEAN                          AllowShortcuts\r
+  )\r
+;      \r
+\r
+/**\r
+  Convert a device path to its text representation.\r
+\r
+  @param  DevicePath     Points to the device path to be converted.\r
+  @param  DisplayOnly    If DisplayOnly is TRUE, then the shorter text representation\r
+                         of the display node is used, where applicable. If DisplayOnly\r
+                         is FALSE, then the longer text representation of the display node\r
+                         is used.  \r
+  @param  AllowShortcuts The AllowShortcuts is FALSE, then the shortcut forms of\r
+                         text representation for a device node cannot be used.\r
+\r
+  @retval a_pointer      a pointer to the allocated text representation of the device node.\r
+  @retval NULL           if DevicePath is NULL or there was insufficient memory.\r
+\r
+**/\r
+typedef\r
+CHAR16*\r
+(EFIAPI *EFI_DEVICE_PATH_TO_TEXT_PATH) (\r
+  IN CONST EFI_DEVICE_PATH_PROTOCOL   *DevicePath,\r
+  IN BOOLEAN                          DisplayOnly,\r
+  IN BOOLEAN                          AllowShortcuts\r
+  )\r
+;    \r
+\r
+typedef struct {\r
+  EFI_DEVICE_PATH_TO_TEXT_NODE        ConvertDeviceNodeToText;\r
+  EFI_DEVICE_PATH_TO_TEXT_PATH        ConvertDevicePathToText;\r
+} EFI_DEVICE_PATH_TO_TEXT_PROTOCOL;\r
+\r
+extern EFI_GUID gEfiDevicePathToTextProtocolGuid;\r
+\r
+#endif\r
+\r
+\r