]> git.proxmox.com Git - mirror_edk2.git/blobdiff - OldMdePkg/Include/Protocol/DevicePathFromText.h
Moved the MdePkg to OldMdePkg so that new code in MdePkg does not break existing...
[mirror_edk2.git] / OldMdePkg / Include / Protocol / DevicePathFromText.h
diff --git a/OldMdePkg/Include/Protocol/DevicePathFromText.h b/OldMdePkg/Include/Protocol/DevicePathFromText.h
new file mode 100644 (file)
index 0000000..0d1ce32
--- /dev/null
@@ -0,0 +1,73 @@
+/** @file\r
+  EFI_DEVICE_PATH_FROM_TEXT_PROTOCOL as defined in UEFI 2.0.  \r
+  This protocol provides service to convert text to device paths and device nodes.\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:  DevicePathFromText.h\r
+\r
+**/\r
+\r
+#ifndef __DEVICE_PATH_FROM_TEXT_PROTOCOL_H__\r
+#define __DEVICE_PATH_FROM_TEXT_PROTOCOL_H__\r
+\r
+//\r
+// Device Path From Text protocol\r
+//\r
+#define EFI_DEVICE_PATH_FROM_TEXT_PROTOCOL_GUID \\r
+  { \\r
+    0x5c99a21, 0xc70f, 0x4ad2, {0x8a, 0x5f, 0x35, 0xdf, 0x33, 0x43, 0xf5, 0x1e  } \\r
+  }\r
+\r
+/**\r
+  Convert text to the binary representation of a device node.\r
+\r
+  @param  TextDeviceNode TextDeviceNode points to the text representation of a device\r
+                         node. Conversion starts with the first character and continues\r
+                         until the first non-device node character.\r
+\r
+  @retval a_pointer      Pointer to the EFI device node.\r
+  @retval NULL           if TextDeviceNode is NULL or there was insufficient memory.\r
+\r
+**/\r
+typedef\r
+EFI_DEVICE_PATH_PROTOCOL*\r
+(EFIAPI *EFI_DEVICE_PATH_FROM_TEXT_NODE) (\r
+  IN CONST CHAR16                 *TextDeviceNode\r
+  )\r
+;    \r
+  \r
+\r
+/**\r
+  Convert text to the binary representation of a device node.\r
+\r
+  @param  TextDeviceNode TextDevicePath points to the text representation of a device\r
+                         path. Conversion starts with the first character and continues\r
+                         until the first non-device path character.\r
+\r
+  @retval a_pointer      Pointer to the allocated device path.\r
+  @retval NULL           if TextDeviceNode is NULL or there was insufficient memory.\r
+\r
+**/\r
+typedef\r
+EFI_DEVICE_PATH_PROTOCOL*\r
+(EFIAPI *EFI_DEVICE_PATH_FROM_TEXT_PATH) (\r
+  IN CONST CHAR16                 *TextDevicePath\r
+  )\r
+;  \r
+  \r
+typedef struct {\r
+  EFI_DEVICE_PATH_FROM_TEXT_NODE  ConvertTextToDeviceNode;\r
+  EFI_DEVICE_PATH_FROM_TEXT_PATH  ConvertTextToDevicePath;\r
+} EFI_DEVICE_PATH_FROM_TEXT_PROTOCOL;\r
+\r
+extern EFI_GUID gEfiDevicePathFromTextProtocolGuid;\r
+\r
+#endif\r