00001 /** @file 00002 UEFI Component Name 2 Protocol as defined in the UEFI 2.1 specification. 00003 This protocol is used to retrieve user readable names of drivers 00004 and controllers managed by UEFI Drivers. 00005 00006 Copyright (c) 2006 - 2008, Intel Corporation 00007 All rights reserved. This program and the accompanying materials 00008 are licensed and made available under the terms and conditions of the BSD License 00009 which accompanies this distribution. 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_NAME2_H__ 00018 #define __EFI_COMPONENT_NAME2_H__ 00019 00020 /// 00021 /// Global ID for the Component Name Protocol 00022 /// 00023 #define EFI_COMPONENT_NAME2_PROTOCOL_GUID \ 00024 {0x6a7a5cff, 0xe8d9, 0x4f70, { 0xba, 0xda, 0x75, 0xab, 0x30, 0x25, 0xce, 0x14 } } 00025 00026 typedef struct _EFI_COMPONENT_NAME2_PROTOCOL EFI_COMPONENT_NAME2_PROTOCOL; 00027 00028 00029 /** 00030 Retrieves a Unicode string that is the user readable name of 00031 the EFI Driver. 00032 00033 @param This A pointer to the 00034 EFI_COMPONENT_NAME2_PROTOCOL instance. 00035 00036 @param Language A pointer to a Null-terminated ASCII string 00037 array indicating the language. This is the 00038 language of the driver name that the caller 00039 is requesting, and it must match one of the 00040 languages specified in SupportedLanguages. 00041 The number of languages supported by a 00042 driver is up to the driver writer. Language 00043 is specified in RFC 3066 language code 00044 format. 00045 00046 @param DriverName A pointer to the Unicode string to return. 00047 This Unicode string is the name of the 00048 driver specified by This in the language 00049 specified by Language. 00050 00051 @retval EFI_SUCCESS The Unicode string for the 00052 Driver specified by This and the 00053 language specified by Language 00054 was returned in DriverName. 00055 00056 @retval EFI_INVALID_PARAMETER Language is NULL. 00057 00058 @retval EFI_INVALID_PARAMETER DriverName is NULL. 00059 00060 @retval EFI_UNSUPPORTED The driver specified by This 00061 does not support the language 00062 specified by Language. 00063 00064 **/ 00065 typedef 00066 EFI_STATUS 00067 (EFIAPI *EFI_COMPONENT_NAME2_GET_DRIVER_NAME)( 00068 IN EFI_COMPONENT_NAME2_PROTOCOL *This, 00069 IN CHAR8 *Language, 00070 OUT CHAR16 **DriverName 00071 ); 00072 00073 00074 /** 00075 Retrieves a Unicode string that is the user readable name of 00076 the controller that is being managed by an EFI Driver. 00077 00078 @param This A pointer to the 00079 EFI_COMPONENT_NAME2_PROTOCOL instance. 00080 00081 @param ControllerHandle The handle of a controller that the 00082 driver specified by This is managing. 00083 This handle specifies the controller 00084 whose name is to be returned. 00085 00086 @param ChildHandle The handle of the child controller to 00087 retrieve the name of. This is an 00088 optional parameter that may be NULL. 00089 It will be NULL for device drivers. 00090 It will also be NULL for a bus 00091 drivers that wish to retrieve the 00092 name of the bus controller. It will 00093 not be NULL for a bus driver that 00094 wishes to retrieve the name of a 00095 child controller. 00096 00097 @param Language A pointer to a Null-terminated ASCII 00098 string array indicating the language. 00099 This is the language of the driver 00100 name that the caller is requesting, 00101 and it must match one of the 00102 languages specified in 00103 SupportedLanguages. The number of 00104 languages supported by a driver is up 00105 to the driver writer. Language is 00106 specified in RFC 3066 language code 00107 format. 00108 00109 @param ControllerName A pointer to the Unicode string to 00110 return. This Unicode string is the 00111 name of the controller specified by 00112 ControllerHandle and ChildHandle in 00113 the language specified by Language 00114 from the point of view of the driver 00115 specified by This. 00116 00117 @retval EFI_SUCCESS The Unicode string for the user 00118 readable name in the language 00119 specified by Language for the 00120 driver specified by This was 00121 returned in DriverName. 00122 00123 @retval EFI_INVALID_PARAMETER ControllerHandle is not a valid 00124 EFI_HANDLE. 00125 00126 @retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it 00127 is not a valid EFI_HANDLE. 00128 00129 @retval EFI_INVALID_PARAMETER Language is NULL. 00130 00131 @retval EFI_INVALID_PARAMETER ControllerName is NULL. 00132 00133 @retval EFI_UNSUPPORTED The driver specified by This is 00134 not currently managing the 00135 controller specified by 00136 ControllerHandle and 00137 ChildHandle. 00138 00139 @retval EFI_UNSUPPORTED The driver specified by This 00140 does not support the language 00141 specified by Language. 00142 00143 **/ 00144 typedef 00145 EFI_STATUS 00146 (EFIAPI *EFI_COMPONENT_NAME2_GET_CONTROLLER_NAME)( 00147 IN EFI_COMPONENT_NAME2_PROTOCOL *This, 00148 IN EFI_HANDLE ControllerHandle, 00149 IN EFI_HANDLE ChildHandle OPTIONAL, 00150 IN CHAR8 *Language, 00151 OUT CHAR16 **ControllerName 00152 ); 00153 00154 /// 00155 /// This protocol is used to retrieve user readable names of drivers 00156 /// and controllers managed by UEFI Drivers. 00157 /// 00158 struct _EFI_COMPONENT_NAME2_PROTOCOL { 00159 EFI_COMPONENT_NAME2_GET_DRIVER_NAME GetDriverName; 00160 EFI_COMPONENT_NAME2_GET_CONTROLLER_NAME GetControllerName; 00161 00162 /// 00163 /// A Null-terminated ASCII string array that contains one or more 00164 /// supported language codes. This is the list of language codes that 00165 /// this protocol supports. The number of languages supported by a 00166 /// driver is up to the driver writer. SupportedLanguages is 00167 /// specified in RFC 3066 format. 00168 /// 00169 CHAR8 *SupportedLanguages; 00170 }; 00171 00172 extern EFI_GUID gEfiComponentName2ProtocolGuid; 00173 00174 #endif
1.5.7.1