Path: blob/main/sys/contrib/edk2/Include/Protocol/ComponentName.h
96339 views
/** @file1EFI Component Name Protocol as defined in the EFI 1.1 specification.2This protocol is used to retrieve user readable names of EFI Drivers3and controllers managed by EFI Drivers.45Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>6SPDX-License-Identifier: BSD-2-Clause-Patent78**/910#ifndef __EFI_COMPONENT_NAME_H__11#define __EFI_COMPONENT_NAME_H__1213///14/// The global ID for the Component Name Protocol.15///16#define EFI_COMPONENT_NAME_PROTOCOL_GUID \17{ \180x107a772c, 0xd5e1, 0x11d4, {0x9a, 0x46, 0x0, 0x90, 0x27, 0x3f, 0xc1, 0x4d } \19}2021typedef struct _EFI_COMPONENT_NAME_PROTOCOL EFI_COMPONENT_NAME_PROTOCOL;2223/**24Retrieves a Unicode string that is the user-readable name of the EFI Driver.2526@param This A pointer to the EFI_COMPONENT_NAME_PROTOCOL instance.27@param Language A pointer to a three-character ISO 639-2 language identifier.28This is the language of the driver name that that the caller29is requesting, and it must match one of the languages specified30in SupportedLanguages. The number of languages supported by a31driver is up to the driver writer.32@param DriverName A pointer to the Unicode string to return. This Unicode string33is the name of the driver specified by This in the language34specified by Language.3536@retval EFI_SUCCESS The Unicode string for the Driver specified by This37and the language specified by Language was returned38in DriverName.39@retval EFI_INVALID_PARAMETER Language is NULL.40@retval EFI_INVALID_PARAMETER DriverName is NULL.41@retval EFI_UNSUPPORTED The driver specified by This does not support the42language specified by Language.4344**/45typedef46EFI_STATUS47(EFIAPI *EFI_COMPONENT_NAME_GET_DRIVER_NAME)(48IN EFI_COMPONENT_NAME_PROTOCOL *This,49IN CHAR8 *Language,50OUT CHAR16 **DriverName51);5253/**54Retrieves a Unicode string that is the user readable name of the controller55that is being managed by an EFI Driver.5657@param This A pointer to the EFI_COMPONENT_NAME_PROTOCOL instance.58@param ControllerHandle The handle of a controller that the driver specified by59This is managing. This handle specifies the controller60whose name is to be returned.61@param ChildHandle The handle of the child controller to retrieve the name62of. This is an optional parameter that may be NULL. It63will be NULL for device drivers. It will also be NULL64for a bus drivers that wish to retrieve the name of the65bus controller. It will not be NULL for a bus driver66that wishes to retrieve the name of a child controller.67@param Language A pointer to a three character ISO 639-2 language68identifier. This is the language of the controller name69that the caller is requesting, and it must match one70of the languages specified in SupportedLanguages. The71number of languages supported by a driver is up to the72driver writer.73@param ControllerName A pointer to the Unicode string to return. This Unicode74string is the name of the controller specified by75ControllerHandle and ChildHandle in the language specified76by Language, from the point of view of the driver specified77by This.7879@retval EFI_SUCCESS The Unicode string for the user-readable name in the80language specified by Language for the driver81specified by This was returned in DriverName.82@retval EFI_INVALID_PARAMETER ControllerHandle is NULL.83@retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it is not a valid EFI_HANDLE.84@retval EFI_INVALID_PARAMETER Language is NULL.85@retval EFI_INVALID_PARAMETER ControllerName is NULL.86@retval EFI_UNSUPPORTED The driver specified by This is not currently managing87the controller specified by ControllerHandle and88ChildHandle.89@retval EFI_UNSUPPORTED The driver specified by This does not support the90language specified by Language.9192**/93typedef94EFI_STATUS95(EFIAPI *EFI_COMPONENT_NAME_GET_CONTROLLER_NAME)(96IN EFI_COMPONENT_NAME_PROTOCOL *This,97IN EFI_HANDLE ControllerHandle,98IN EFI_HANDLE ChildHandle OPTIONAL,99IN CHAR8 *Language,100OUT CHAR16 **ControllerName101);102103///104/// This protocol is used to retrieve user readable names of drivers105/// and controllers managed by UEFI Drivers.106///107struct _EFI_COMPONENT_NAME_PROTOCOL {108EFI_COMPONENT_NAME_GET_DRIVER_NAME GetDriverName;109EFI_COMPONENT_NAME_GET_CONTROLLER_NAME GetControllerName;110///111/// A Null-terminated ASCII string that contains one or more112/// ISO 639-2 language codes. This is the list of language codes113/// that this protocol supports.114///115CHAR8 *SupportedLanguages;116};117118extern EFI_GUID gEfiComponentNameProtocolGuid;119120#endif121122123