10499b37cSWarner Losh /** @file 20499b37cSWarner Losh EFI_DEVICE_PATH_TO_TEXT_PROTOCOL as defined in UEFI 2.0. 30499b37cSWarner Losh This protocol provides service to convert device nodes and paths to text. 40499b37cSWarner Losh 54a14dfccSMitchell Horne Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR> 64a14dfccSMitchell Horne SPDX-License-Identifier: BSD-2-Clause-Patent 70499b37cSWarner Losh 80499b37cSWarner Losh **/ 90499b37cSWarner Losh 100499b37cSWarner Losh #ifndef __DEVICE_PATH_TO_TEXT_PROTOCOL_H__ 110499b37cSWarner Losh #define __DEVICE_PATH_TO_TEXT_PROTOCOL_H__ 120499b37cSWarner Losh 130499b37cSWarner Losh /// 140499b37cSWarner Losh /// Device Path To Text protocol 150499b37cSWarner Losh /// 160499b37cSWarner Losh #define EFI_DEVICE_PATH_TO_TEXT_PROTOCOL_GUID \ 170499b37cSWarner Losh { \ 180499b37cSWarner Losh 0x8b843e20, 0x8132, 0x4852, {0x90, 0xcc, 0x55, 0x1a, 0x4e, 0x4a, 0x7f, 0x1c } \ 190499b37cSWarner Losh } 200499b37cSWarner Losh 210499b37cSWarner Losh /** 220499b37cSWarner Losh Convert a device node to its text representation. 230499b37cSWarner Losh 240499b37cSWarner Losh @param DeviceNode Points to the device node to be converted. 250499b37cSWarner Losh @param DisplayOnly If DisplayOnly is TRUE, then the shorter text representation 260499b37cSWarner Losh of the display node is used, where applicable. If DisplayOnly 270499b37cSWarner Losh is FALSE, then the longer text representation of the display node 280499b37cSWarner Losh is used. 290499b37cSWarner Losh @param AllowShortcuts If AllowShortcuts is TRUE, then the shortcut forms of text 300499b37cSWarner Losh representation for a device node can be used, where applicable. 310499b37cSWarner Losh 320499b37cSWarner Losh @retval a_pointer a pointer to the allocated text representation of the device node data 330499b37cSWarner Losh @retval NULL if DeviceNode is NULL or there was insufficient memory. 340499b37cSWarner Losh 350499b37cSWarner Losh **/ 360499b37cSWarner Losh typedef 370499b37cSWarner Losh CHAR16 * 380499b37cSWarner Losh (EFIAPI *EFI_DEVICE_PATH_TO_TEXT_NODE)( 390499b37cSWarner Losh IN CONST EFI_DEVICE_PATH_PROTOCOL *DeviceNode, 400499b37cSWarner Losh IN BOOLEAN DisplayOnly, 410499b37cSWarner Losh IN BOOLEAN AllowShortcuts 420499b37cSWarner Losh ); 430499b37cSWarner Losh 440499b37cSWarner Losh /** 450499b37cSWarner Losh Convert a device path to its text representation. 460499b37cSWarner Losh 470499b37cSWarner Losh @param DevicePath Points to the device path to be converted. 480499b37cSWarner Losh @param DisplayOnly If DisplayOnly is TRUE, then the shorter text representation 490499b37cSWarner Losh of the display node is used, where applicable. If DisplayOnly 500499b37cSWarner Losh is FALSE, then the longer text representation of the display node 510499b37cSWarner Losh is used. 520499b37cSWarner Losh @param AllowShortcuts The AllowShortcuts is FALSE, then the shortcut forms of 530499b37cSWarner Losh text representation for a device node cannot be used. 540499b37cSWarner Losh 550499b37cSWarner Losh @retval a_pointer a pointer to the allocated text representation of the device node. 560499b37cSWarner Losh @retval NULL if DevicePath is NULL or there was insufficient memory. 570499b37cSWarner Losh 580499b37cSWarner Losh **/ 590499b37cSWarner Losh typedef 600499b37cSWarner Losh CHAR16 * 610499b37cSWarner Losh (EFIAPI *EFI_DEVICE_PATH_TO_TEXT_PATH)( 620499b37cSWarner Losh IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePath, 630499b37cSWarner Losh IN BOOLEAN DisplayOnly, 640499b37cSWarner Losh IN BOOLEAN AllowShortcuts 650499b37cSWarner Losh ); 660499b37cSWarner Losh 670499b37cSWarner Losh /// 680499b37cSWarner Losh /// This protocol converts device paths and device nodes to text. 690499b37cSWarner Losh /// 700499b37cSWarner Losh typedef struct { 710499b37cSWarner Losh EFI_DEVICE_PATH_TO_TEXT_NODE ConvertDeviceNodeToText; 720499b37cSWarner Losh EFI_DEVICE_PATH_TO_TEXT_PATH ConvertDevicePathToText; 730499b37cSWarner Losh } EFI_DEVICE_PATH_TO_TEXT_PROTOCOL; 740499b37cSWarner Losh 750499b37cSWarner Losh extern EFI_GUID gEfiDevicePathToTextProtocolGuid; 760499b37cSWarner Losh 770499b37cSWarner Losh #endif 78