]> git.proxmox.com Git - mirror_edk2.git/blob - MdePkg/Include/Protocol/ComponentName.h
Updated headers to follow coding standard
[mirror_edk2.git] / MdePkg / Include / Protocol / ComponentName.h
1 /** @file
2 EFI Component Name Protocol
3
4 Copyright (c) 2006, Intel Corporation
5 All rights reserved. This program and the accompanying materials
6 are licensed and made available under the terms and conditions of the BSD License
7 which accompanies this distribution. The full text of the license may be found at
8 http://opensource.org/licenses/bsd-license.php
9
10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
12
13 **/
14
15 #ifndef __EFI_COMPONENT_NAME_H__
16 #define __EFI_COMPONENT_NAME_H__
17
18 //
19 // Global ID for the Component Name Protocol
20 //
21 #define EFI_COMPONENT_NAME_PROTOCOL_GUID \
22 { \
23 0x107a772c, 0xd5e1, 0x11d4, {0x9a, 0x46, 0x0, 0x90, 0x27, 0x3f, 0xc1, 0x4d } \
24 }
25
26 typedef struct _EFI_COMPONENT_NAME_PROTOCOL EFI_COMPONENT_NAME_PROTOCOL;
27
28
29 /**
30 Retrieves a Unicode string that is the user readable name of the EFI Driver.
31
32 @param This A pointer to the EFI_COMPONENT_NAME_PROTOCOL instance.
33 @param Language A pointer to a three character ISO 639-2 language identifier.
34 This is the language of the driver name that that the caller
35 is requesting, and it must match one of the languages specified
36 in SupportedLanguages. The number of languages supported by a
37 driver is up to the driver writer.
38 @param DriverName A pointer to the Unicode string to return. This Unicode string
39 is the name of the driver specified by This in the language
40 specified by Language.
41
42 @retval EFI_SUCCESS The Unicode string for the Driver specified by This
43 and the language specified by Language was returned
44 in DriverName.
45 @retval EFI_INVALID_PARAMETER Language is NULL.
46 @retval EFI_INVALID_PARAMETER DriverName is NULL.
47 @retval EFI_UNSUPPORTED The driver specified by This does not support the
48 language specified by Language.
49
50 **/
51 typedef
52 EFI_STATUS
53 (EFIAPI *EFI_COMPONENT_NAME_GET_DRIVER_NAME) (
54 IN EFI_COMPONENT_NAME_PROTOCOL *This,
55 IN CHAR8 *Language,
56 OUT CHAR16 **DriverName
57 );
58
59
60 /**
61 Retrieves a Unicode string that is the user readable name of the controller
62 that is being managed by an EFI Driver.
63
64 @param This A pointer to the EFI_COMPONENT_NAME_PROTOCOL instance.
65 @param ControllerHandle The handle of a controller that the driver specified by
66 This is managing. This handle specifies the controller
67 whose name is to be returned.
68 @param ChildHandle The handle of the child controller to retrieve the name
69 of. This is an optional parameter that may be NULL. It
70 will be NULL for device drivers. It will also be NULL
71 for a bus drivers that wish to retrieve the name of the
72 bus controller. It will not be NULL for a bus driver
73 that wishes to retrieve the name of a child controller.
74 @param Language A pointer to a three character ISO 639-2 language
75 identifier. This is the language of the controller name
76 that that the caller is requesting, and it must match one
77 of the languages specified in SupportedLanguages. The
78 number of languages supported by a driver is up to the
79 driver writer.
80 @param ControllerName A pointer to the Unicode string to return. This Unicode
81 string is the name of the controller specified by
82 ControllerHandle and ChildHandle in the language specified
83 by Language from the point of view of the driver specified
84 by This.
85
86 @retval EFI_SUCCESS The Unicode string for the user readable name in the
87 language specified by Language for the driver
88 specified by This was returned in DriverName.
89 @retval EFI_INVALID_PARAMETER ControllerHandle is not a valid EFI_HANDLE.
90 @retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it is not a valid EFI_HANDLE.
91 @retval EFI_INVALID_PARAMETER Language is NULL.
92 @retval EFI_INVALID_PARAMETER ControllerName is NULL.
93 @retval EFI_UNSUPPORTED The driver specified by This is not currently managing
94 the controller specified by ControllerHandle and
95 ChildHandle.
96 @retval EFI_UNSUPPORTED The driver specified by This does not support the
97 language specified by Language.
98
99 **/
100 typedef
101 EFI_STATUS
102 (EFIAPI *EFI_COMPONENT_NAME_GET_CONTROLLER_NAME) (
103 IN EFI_COMPONENT_NAME_PROTOCOL *This,
104 IN EFI_HANDLE ControllerHandle,
105 IN EFI_HANDLE ChildHandle OPTIONAL,
106 IN CHAR8 *Language,
107 OUT CHAR16 **ControllerName
108 );
109
110 //
111 // Interface structure for the Component Name Protocol
112 //
113 struct _EFI_COMPONENT_NAME_PROTOCOL {
114 EFI_COMPONENT_NAME_GET_DRIVER_NAME GetDriverName;
115 EFI_COMPONENT_NAME_GET_CONTROLLER_NAME GetControllerName;
116 CHAR8 *SupportedLanguages;
117 };
118
119 extern EFI_GUID gEfiComponentNameProtocolGuid;
120
121 #endif