1*f334afcfSToomas Soome /** @file 2*f334afcfSToomas Soome EFI_DEVICE_PATH_TO_TEXT_PROTOCOL as defined in UEFI 2.0. 3*f334afcfSToomas Soome This protocol provides service to convert device nodes and paths to text. 4*f334afcfSToomas Soome 5*f334afcfSToomas Soome Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR> 6*f334afcfSToomas Soome SPDX-License-Identifier: BSD-2-Clause-Patent 7*f334afcfSToomas Soome 8*f334afcfSToomas Soome **/ 9*f334afcfSToomas Soome 10*f334afcfSToomas Soome #ifndef __DEVICE_PATH_TO_TEXT_PROTOCOL_H__ 11*f334afcfSToomas Soome #define __DEVICE_PATH_TO_TEXT_PROTOCOL_H__ 12*f334afcfSToomas Soome 13*f334afcfSToomas Soome /// 14*f334afcfSToomas Soome /// Device Path To Text protocol 15*f334afcfSToomas Soome /// 16*f334afcfSToomas Soome #define EFI_DEVICE_PATH_TO_TEXT_PROTOCOL_GUID \ 17*f334afcfSToomas Soome { \ 18*f334afcfSToomas Soome 0x8b843e20, 0x8132, 0x4852, {0x90, 0xcc, 0x55, 0x1a, 0x4e, 0x4a, 0x7f, 0x1c } \ 19*f334afcfSToomas Soome } 20*f334afcfSToomas Soome 21*f334afcfSToomas Soome /** 22*f334afcfSToomas Soome Convert a device node to its text representation. 23*f334afcfSToomas Soome 24*f334afcfSToomas Soome @param DeviceNode Points to the device node to be converted. 25*f334afcfSToomas Soome @param DisplayOnly If DisplayOnly is TRUE, then the shorter text representation 26*f334afcfSToomas Soome of the display node is used, where applicable. If DisplayOnly 27*f334afcfSToomas Soome is FALSE, then the longer text representation of the display node 28*f334afcfSToomas Soome is used. 29*f334afcfSToomas Soome @param AllowShortcuts If AllowShortcuts is TRUE, then the shortcut forms of text 30*f334afcfSToomas Soome representation for a device node can be used, where applicable. 31*f334afcfSToomas Soome 32*f334afcfSToomas Soome @retval a_pointer a pointer to the allocated text representation of the device node data 33*f334afcfSToomas Soome @retval NULL if DeviceNode is NULL or there was insufficient memory. 34*f334afcfSToomas Soome 35*f334afcfSToomas Soome **/ 36*f334afcfSToomas Soome typedef 37*f334afcfSToomas Soome CHAR16 * 38*f334afcfSToomas Soome (EFIAPI *EFI_DEVICE_PATH_TO_TEXT_NODE)( 39*f334afcfSToomas Soome IN CONST EFI_DEVICE_PATH_PROTOCOL *DeviceNode, 40*f334afcfSToomas Soome IN BOOLEAN DisplayOnly, 41*f334afcfSToomas Soome IN BOOLEAN AllowShortcuts 42*f334afcfSToomas Soome ); 43*f334afcfSToomas Soome 44*f334afcfSToomas Soome /** 45*f334afcfSToomas Soome Convert a device path to its text representation. 46*f334afcfSToomas Soome 47*f334afcfSToomas Soome @param DevicePath Points to the device path to be converted. 48*f334afcfSToomas Soome @param DisplayOnly If DisplayOnly is TRUE, then the shorter text representation 49*f334afcfSToomas Soome of the display node is used, where applicable. If DisplayOnly 50*f334afcfSToomas Soome is FALSE, then the longer text representation of the display node 51*f334afcfSToomas Soome is used. 52*f334afcfSToomas Soome @param AllowShortcuts The AllowShortcuts is FALSE, then the shortcut forms of 53*f334afcfSToomas Soome text representation for a device node cannot be used. 54*f334afcfSToomas Soome 55*f334afcfSToomas Soome @retval a_pointer a pointer to the allocated text representation of the device node. 56*f334afcfSToomas Soome @retval NULL if DevicePath is NULL or there was insufficient memory. 57*f334afcfSToomas Soome 58*f334afcfSToomas Soome **/ 59*f334afcfSToomas Soome typedef 60*f334afcfSToomas Soome CHAR16 * 61*f334afcfSToomas Soome (EFIAPI *EFI_DEVICE_PATH_TO_TEXT_PATH)( 62*f334afcfSToomas Soome IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePath, 63*f334afcfSToomas Soome IN BOOLEAN DisplayOnly, 64*f334afcfSToomas Soome IN BOOLEAN AllowShortcuts 65*f334afcfSToomas Soome ); 66*f334afcfSToomas Soome 67*f334afcfSToomas Soome /// 68*f334afcfSToomas Soome /// This protocol converts device paths and device nodes to text. 69*f334afcfSToomas Soome /// 70*f334afcfSToomas Soome typedef struct { 71*f334afcfSToomas Soome EFI_DEVICE_PATH_TO_TEXT_NODE ConvertDeviceNodeToText; 72*f334afcfSToomas Soome EFI_DEVICE_PATH_TO_TEXT_PATH ConvertDevicePathToText; 73*f334afcfSToomas Soome } EFI_DEVICE_PATH_TO_TEXT_PROTOCOL; 74*f334afcfSToomas Soome 75*f334afcfSToomas Soome extern EFI_GUID gEfiDevicePathToTextProtocolGuid; 76*f334afcfSToomas Soome 77*f334afcfSToomas Soome #endif 78