iPXE
|
00001 /** @file 00002 EFI Component Name Protocol as defined in the EFI 1.1 specification. 00003 This protocol is used to retrieve user readable names of EFI Drivers 00004 and controllers managed by EFI Drivers. 00005 00006 Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR> 00007 This program and the accompanying materials are licensed and made available under 00008 the terms and conditions of the BSD License that accompanies this distribution. 00009 The full text of the license may be found at 00010 http://opensource.org/licenses/bsd-license.php. 00011 00012 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 00013 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 00014 00015 **/ 00016 00017 #ifndef __EFI_COMPONENT_NAME_H__ 00018 #define __EFI_COMPONENT_NAME_H__ 00019 00020 FILE_LICENCE ( BSD3 ); 00021 00022 /// 00023 /// The global ID for the Component Name Protocol. 00024 /// 00025 #define EFI_COMPONENT_NAME_PROTOCOL_GUID \ 00026 { \ 00027 0x107a772c, 0xd5e1, 0x11d4, {0x9a, 0x46, 0x0, 0x90, 0x27, 0x3f, 0xc1, 0x4d } \ 00028 } 00029 00030 typedef struct _EFI_COMPONENT_NAME_PROTOCOL EFI_COMPONENT_NAME_PROTOCOL; 00031 00032 00033 /** 00034 Retrieves a Unicode string that is the user-readable name of the EFI Driver. 00035 00036 @param This A pointer to the EFI_COMPONENT_NAME_PROTOCOL instance. 00037 @param Language A pointer to a three-character ISO 639-2 language identifier. 00038 This is the language of the driver name that that the caller 00039 is requesting, and it must match one of the languages specified 00040 in SupportedLanguages. The number of languages supported by a 00041 driver is up to the driver writer. 00042 @param DriverName A pointer to the Unicode string to return. This Unicode string 00043 is the name of the driver specified by This in the language 00044 specified by Language. 00045 00046 @retval EFI_SUCCESS The Unicode string for the Driver specified by This 00047 and the language specified by Language was returned 00048 in DriverName. 00049 @retval EFI_INVALID_PARAMETER Language is NULL. 00050 @retval EFI_INVALID_PARAMETER DriverName is NULL. 00051 @retval EFI_UNSUPPORTED The driver specified by This does not support the 00052 language specified by Language. 00053 00054 **/ 00055 typedef 00056 EFI_STATUS 00057 (EFIAPI *EFI_COMPONENT_NAME_GET_DRIVER_NAME)( 00058 IN EFI_COMPONENT_NAME_PROTOCOL *This, 00059 IN CHAR8 *Language, 00060 OUT CHAR16 **DriverName 00061 ); 00062 00063 00064 /** 00065 Retrieves a Unicode string that is the user readable name of the controller 00066 that is being managed by an EFI Driver. 00067 00068 @param This A pointer to the EFI_COMPONENT_NAME_PROTOCOL instance. 00069 @param ControllerHandle The handle of a controller that the driver specified by 00070 This is managing. This handle specifies the controller 00071 whose name is to be returned. 00072 @param ChildHandle The handle of the child controller to retrieve the name 00073 of. This is an optional parameter that may be NULL. It 00074 will be NULL for device drivers. It will also be NULL 00075 for a bus drivers that wish to retrieve the name of the 00076 bus controller. It will not be NULL for a bus driver 00077 that wishes to retrieve the name of a child controller. 00078 @param Language A pointer to a three character ISO 639-2 language 00079 identifier. This is the language of the controller name 00080 that the caller is requesting, and it must match one 00081 of the languages specified in SupportedLanguages. The 00082 number of languages supported by a driver is up to the 00083 driver writer. 00084 @param ControllerName A pointer to the Unicode string to return. This Unicode 00085 string is the name of the controller specified by 00086 ControllerHandle and ChildHandle in the language specified 00087 by Language, from the point of view of the driver specified 00088 by This. 00089 00090 @retval EFI_SUCCESS The Unicode string for the user-readable name in the 00091 language specified by Language for the driver 00092 specified by This was returned in DriverName. 00093 @retval EFI_INVALID_PARAMETER ControllerHandle is NULL. 00094 @retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it is not a valid EFI_HANDLE. 00095 @retval EFI_INVALID_PARAMETER Language is NULL. 00096 @retval EFI_INVALID_PARAMETER ControllerName is NULL. 00097 @retval EFI_UNSUPPORTED The driver specified by This is not currently managing 00098 the controller specified by ControllerHandle and 00099 ChildHandle. 00100 @retval EFI_UNSUPPORTED The driver specified by This does not support the 00101 language specified by Language. 00102 00103 **/ 00104 typedef 00105 EFI_STATUS 00106 (EFIAPI *EFI_COMPONENT_NAME_GET_CONTROLLER_NAME)( 00107 IN EFI_COMPONENT_NAME_PROTOCOL *This, 00108 IN EFI_HANDLE ControllerHandle, 00109 IN EFI_HANDLE ChildHandle OPTIONAL, 00110 IN CHAR8 *Language, 00111 OUT CHAR16 **ControllerName 00112 ); 00113 00114 /// 00115 /// This protocol is used to retrieve user readable names of drivers 00116 /// and controllers managed by UEFI Drivers. 00117 /// 00118 struct _EFI_COMPONENT_NAME_PROTOCOL { 00119 EFI_COMPONENT_NAME_GET_DRIVER_NAME GetDriverName; 00120 EFI_COMPONENT_NAME_GET_CONTROLLER_NAME GetControllerName; 00121 /// 00122 /// A Null-terminated ASCII string that contains one or more 00123 /// ISO 639-2 language codes. This is the list of language codes 00124 /// that this protocol supports. 00125 /// 00126 CHAR8 *SupportedLanguages; 00127 }; 00128 00129 extern EFI_GUID gEfiComponentNameProtocolGuid; 00130 00131 #endif