10d1ba665SWarner Losh /** @file 20d1ba665SWarner Losh EFI_DEVICE_PATH_TO_TEXT_PROTOCOL as defined in UEFI 2.0. 30d1ba665SWarner Losh This protocol provides service to convert device nodes and paths to text. 40d1ba665SWarner Losh 5*3245fa21SMitchell Horne Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR> 6*3245fa21SMitchell Horne SPDX-License-Identifier: BSD-2-Clause-Patent 70d1ba665SWarner Losh 80d1ba665SWarner Losh **/ 90d1ba665SWarner Losh 100d1ba665SWarner Losh #ifndef __DEVICE_PATH_TO_TEXT_PROTOCOL_H__ 110d1ba665SWarner Losh #define __DEVICE_PATH_TO_TEXT_PROTOCOL_H__ 120d1ba665SWarner Losh 130d1ba665SWarner Losh /// 140d1ba665SWarner Losh /// Device Path To Text protocol 150d1ba665SWarner Losh /// 160d1ba665SWarner Losh #define EFI_DEVICE_PATH_TO_TEXT_PROTOCOL_GUID \ 170d1ba665SWarner Losh { \ 180d1ba665SWarner Losh 0x8b843e20, 0x8132, 0x4852, {0x90, 0xcc, 0x55, 0x1a, 0x4e, 0x4a, 0x7f, 0x1c } \ 190d1ba665SWarner Losh } 200d1ba665SWarner Losh 210d1ba665SWarner Losh /** 220d1ba665SWarner Losh Convert a device node to its text representation. 230d1ba665SWarner Losh 240d1ba665SWarner Losh @param DeviceNode Points to the device node to be converted. 250d1ba665SWarner Losh @param DisplayOnly If DisplayOnly is TRUE, then the shorter text representation 260d1ba665SWarner Losh of the display node is used, where applicable. If DisplayOnly 270d1ba665SWarner Losh is FALSE, then the longer text representation of the display node 280d1ba665SWarner Losh is used. 290d1ba665SWarner Losh @param AllowShortcuts If AllowShortcuts is TRUE, then the shortcut forms of text 300d1ba665SWarner Losh representation for a device node can be used, where applicable. 310d1ba665SWarner Losh 320d1ba665SWarner Losh @retval a_pointer a pointer to the allocated text representation of the device node data 330d1ba665SWarner Losh @retval NULL if DeviceNode is NULL or there was insufficient memory. 340d1ba665SWarner Losh 350d1ba665SWarner Losh **/ 360d1ba665SWarner Losh typedef 370d1ba665SWarner Losh CHAR16* 380d1ba665SWarner Losh (EFIAPI *EFI_DEVICE_PATH_TO_TEXT_NODE)( 390d1ba665SWarner Losh IN CONST EFI_DEVICE_PATH_PROTOCOL *DeviceNode, 400d1ba665SWarner Losh IN BOOLEAN DisplayOnly, 410d1ba665SWarner Losh IN BOOLEAN AllowShortcuts 420d1ba665SWarner Losh ); 430d1ba665SWarner Losh 440d1ba665SWarner Losh /** 450d1ba665SWarner Losh Convert a device path to its text representation. 460d1ba665SWarner Losh 470d1ba665SWarner Losh @param DevicePath Points to the device path to be converted. 480d1ba665SWarner Losh @param DisplayOnly If DisplayOnly is TRUE, then the shorter text representation 490d1ba665SWarner Losh of the display node is used, where applicable. If DisplayOnly 500d1ba665SWarner Losh is FALSE, then the longer text representation of the display node 510d1ba665SWarner Losh is used. 520d1ba665SWarner Losh @param AllowShortcuts The AllowShortcuts is FALSE, then the shortcut forms of 530d1ba665SWarner Losh text representation for a device node cannot be used. 540d1ba665SWarner Losh 550d1ba665SWarner Losh @retval a_pointer a pointer to the allocated text representation of the device node. 560d1ba665SWarner Losh @retval NULL if DevicePath is NULL or there was insufficient memory. 570d1ba665SWarner Losh 580d1ba665SWarner Losh **/ 590d1ba665SWarner Losh typedef 600d1ba665SWarner Losh CHAR16* 610d1ba665SWarner Losh (EFIAPI *EFI_DEVICE_PATH_TO_TEXT_PATH)( 620d1ba665SWarner Losh IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePath, 630d1ba665SWarner Losh IN BOOLEAN DisplayOnly, 640d1ba665SWarner Losh IN BOOLEAN AllowShortcuts 650d1ba665SWarner Losh ); 660d1ba665SWarner Losh 670d1ba665SWarner Losh /// 680d1ba665SWarner Losh /// This protocol converts device paths and device nodes to text. 690d1ba665SWarner Losh /// 700d1ba665SWarner Losh typedef struct { 710d1ba665SWarner Losh EFI_DEVICE_PATH_TO_TEXT_NODE ConvertDeviceNodeToText; 720d1ba665SWarner Losh EFI_DEVICE_PATH_TO_TEXT_PATH ConvertDevicePathToText; 730d1ba665SWarner Losh } EFI_DEVICE_PATH_TO_TEXT_PROTOCOL; 740d1ba665SWarner Losh 750d1ba665SWarner Losh extern EFI_GUID gEfiDevicePathToTextProtocolGuid; 760d1ba665SWarner Losh 770d1ba665SWarner Losh #endif 780d1ba665SWarner Losh 790d1ba665SWarner Losh 80