iPXE
DevicePathToText.h
Go to the documentation of this file.
00001 /** @file
00002   EFI_DEVICE_PATH_TO_TEXT_PROTOCOL as defined in UEFI 2.0.
00003   This protocol provides service to convert device nodes and paths to text.
00004 
00005   Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR>
00006   This program and the accompanying materials
00007   are licensed and made available under the terms and conditions of the BSD License
00008   which accompanies this distribution.  The full text of the license may be found at
00009   http://opensource.org/licenses/bsd-license.php
00010 
00011   THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
00012   WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
00013 
00014 **/
00015 
00016 #ifndef __DEVICE_PATH_TO_TEXT_PROTOCOL_H__
00017 #define __DEVICE_PATH_TO_TEXT_PROTOCOL_H__
00018 
00019 FILE_LICENCE ( BSD3 );
00020 
00021 ///
00022 /// Device Path To Text protocol
00023 ///
00024 #define EFI_DEVICE_PATH_TO_TEXT_PROTOCOL_GUID \
00025   { \
00026     0x8b843e20, 0x8132, 0x4852, {0x90, 0xcc, 0x55, 0x1a, 0x4e, 0x4a, 0x7f, 0x1c } \
00027   }
00028 
00029 /**
00030   Convert a device node to its text representation.
00031 
00032   @param  DeviceNode     Points to the device node to be converted.
00033   @param  DisplayOnly    If DisplayOnly is TRUE, then the shorter text representation
00034                          of the display node is used, where applicable. If DisplayOnly
00035                          is FALSE, then the longer text representation of the display node
00036                          is used.
00037   @param  AllowShortcuts If AllowShortcuts is TRUE, then the shortcut forms of text
00038                          representation for a device node can be used, where applicable.
00039 
00040   @retval a_pointer      a pointer to the allocated text representation of the device node data
00041   @retval NULL           if DeviceNode is NULL or there was insufficient memory.
00042 
00043 **/
00044 typedef
00045 CHAR16*
00046 (EFIAPI *EFI_DEVICE_PATH_TO_TEXT_NODE)(
00047   IN CONST EFI_DEVICE_PATH_PROTOCOL   *DeviceNode,
00048   IN BOOLEAN                          DisplayOnly,
00049   IN BOOLEAN                          AllowShortcuts
00050   );
00051 
00052 /**
00053   Convert a device path to its text representation.
00054 
00055   @param  DevicePath     Points to the device path to be converted.
00056   @param  DisplayOnly    If DisplayOnly is TRUE, then the shorter text representation
00057                          of the display node is used, where applicable. If DisplayOnly
00058                          is FALSE, then the longer text representation of the display node
00059                          is used.
00060   @param  AllowShortcuts The AllowShortcuts is FALSE, then the shortcut forms of
00061                          text representation for a device node cannot be used.
00062 
00063   @retval a_pointer      a pointer to the allocated text representation of the device node.
00064   @retval NULL           if DevicePath is NULL or there was insufficient memory.
00065 
00066 **/
00067 typedef
00068 CHAR16*
00069 (EFIAPI *EFI_DEVICE_PATH_TO_TEXT_PATH)(
00070   IN CONST EFI_DEVICE_PATH_PROTOCOL   *DevicePath,
00071   IN BOOLEAN                          DisplayOnly,
00072   IN BOOLEAN                          AllowShortcuts
00073   );
00074 
00075 ///
00076 /// This protocol converts device paths and device nodes to text.
00077 ///
00078 typedef struct {
00079   EFI_DEVICE_PATH_TO_TEXT_NODE        ConvertDeviceNodeToText;
00080   EFI_DEVICE_PATH_TO_TEXT_PATH        ConvertDevicePathToText;
00081 } EFI_DEVICE_PATH_TO_TEXT_PROTOCOL;
00082 
00083 extern EFI_GUID gEfiDevicePathToTextProtocolGuid;
00084 
00085 #endif
00086 
00087