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