1 /** @file 2 The header file of UEFI Component Name(2) protocol. 3 4 Copyright (c) 2004 - 2012, Intel Corporation. All rights reserved.<BR> 5 This program and the accompanying materials 6 are licensed and made available under the terms and conditions 7 of the BSD License which accompanies this distribution. The full 8 text of the license may be found at<BR> 9 http://opensource.org/licenses/bsd-license.php 10 11 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 12 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 13 14 **/ 15 16 #ifndef _COMPONENT_NAME_H_ 17 #define _COMPONENT_NAME_H_ 18 19 #include <Protocol/ComponentName.h> 20 #include <Protocol/ComponentName2.h> 21 22 extern EFI_COMPONENT_NAME2_PROTOCOL gMnpComponentName2; 23 extern EFI_COMPONENT_NAME_PROTOCOL gMnpComponentName; 24 extern EFI_UNICODE_STRING_TABLE *gMnpControllerNameTable; 25 26 /** 27 Retrieves a Unicode string that is the user readable name of the driver. 28 29 This function retrieves the user readable name of a driver in the form of a 30 Unicode string. If the driver specified by This has a user readable name in 31 the language specified by Language, then a pointer to the driver name is 32 returned in DriverName, and EFI_SUCCESS is returned. If the driver specified 33 by This does not support the language specified by Language, 34 then EFI_UNSUPPORTED is returned. 35 36 @param[in] This A pointer to the EFI_COMPONENT_NAME2_PROTOCOL or 37 EFI_COMPONENT_NAME_PROTOCOL instance. 38 39 @param[in] Language A pointer to a Null-terminated ASCII string 40 array indicating the language. This is the 41 language of the driver name that the caller is 42 requesting, and it must match one of the 43 languages specified in SupportedLanguages. The 44 number of languages supported by a driver is up 45 to the driver writer. Language is specified 46 in RFC 4646 or ISO 639-2 language code format. 47 48 @param[out] DriverName A pointer to the Unicode string to return. 49 This Unicode string is the name of the 50 driver specified by This in the language 51 specified by Language. 52 53 @retval EFI_SUCCESS The Unicode string for the Driver specified by 54 This and the language specified by Language was 55 returned in DriverName. 56 57 @retval EFI_INVALID_PARAMETER Language is NULL. 58 59 @retval EFI_INVALID_PARAMETER DriverName is NULL. 60 61 @retval EFI_UNSUPPORTED The driver specified by This does not support 62 the language specified by Language. 63 64 **/ 65 EFI_STATUS 66 EFIAPI 67 MnpComponentNameGetDriverName ( 68 IN EFI_COMPONENT_NAME_PROTOCOL *This, 69 IN CHAR8 *Language, 70 OUT CHAR16 **DriverName 71 ); 72 73 /** 74 Retrieves a Unicode string that is the user readable name of the controller 75 that is being managed by a driver. 76 77 This function retrieves the user readable name of the controller specified by 78 ControllerHandle and ChildHandle in the form of a Unicode string. If the 79 driver specified by This has a user readable name in the language specified by 80 Language, then a pointer to the controller name is returned in ControllerName, 81 and EFI_SUCCESS is returned. If the driver specified by This is not currently 82 managing the controller specified by ControllerHandle and ChildHandle, 83 then EFI_UNSUPPORTED is returned. If the driver specified by This does not 84 support the language specified by Language, then EFI_UNSUPPORTED is returned. 85 Currently not implemented. 86 87 @param[in] This A pointer to the EFI_COMPONENT_NAME2_PROTOCOL or 88 EFI_COMPONENT_NAME_PROTOCOL instance. 89 90 @param[in] ControllerHandle The handle of a controller that the driver 91 specified by This is managing. This handle 92 specifies the controller whose name is to be 93 returned. 94 95 @param[in] ChildHandle The handle of the child controller to retrieve 96 the name of. This is an optional parameter that 97 may be NULL. It will be NULL for device 98 drivers. It will also be NULL for a bus drivers 99 that wish to retrieve the name of the bus 100 controller. It will not be NULL for a bus 101 driver that wishes to retrieve the name of a 102 child controller. 103 104 @param[in] Language A pointer to a Null-terminated ASCII string 105 array indicating the language. This is the 106 language of the driver name that the caller is 107 requesting, and it must match one of the 108 languages specified in SupportedLanguages. The 109 number of languages supported by a driver is up 110 to the driver writer. Language is specified in 111 RFC 4646 or ISO 639-2 language code format. 112 113 @param[out] ControllerName A pointer to the Unicode string to return. 114 This Unicode string is the name of the 115 controller specified by ControllerHandle and 116 ChildHandle in the language specified by 117 Language from the point of view of the driver 118 specified by This. 119 120 @retval EFI_SUCCESS The Unicode string for the user readable name 121 specified by This, ControllerHandle, ChildHandle, 122 and Language was returned in ControllerName. 123 124 @retval EFI_INVALID_PARAMETER ControllerHandle is NULL. 125 126 @retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it is not a valid 127 EFI_HANDLE. 128 129 @retval EFI_INVALID_PARAMETER Language is NULL. 130 131 @retval EFI_INVALID_PARAMETER ControllerName is NULL. 132 133 @retval EFI_UNSUPPORTED The driver specified by This is not currently 134 managing the controller specified by 135 ControllerHandle and ChildHandle. 136 137 @retval EFI_UNSUPPORTED The driver specified by This does not support 138 the language specified by Language. 139 140 **/ 141 EFI_STATUS 142 EFIAPI 143 MnpComponentNameGetControllerName ( 144 IN EFI_COMPONENT_NAME_PROTOCOL *This, 145 IN EFI_HANDLE ControllerHandle, 146 IN EFI_HANDLE ChildHandle OPTIONAL, 147 IN CHAR8 *Language, 148 OUT CHAR16 **ControllerName 149 ); 150 151 #endif 152