]> git.proxmox.com Git - mirror_edk2.git/blob - MdeModulePkg/Universal/Network/MnpDxe/ComponentName.h
Fix the comments to follow UEFI Spec regarding how to check an EFI_HANDLE is valid...
[mirror_edk2.git] / MdeModulePkg / Universal / Network / MnpDxe / ComponentName.h
1 /** @file
2 The header file of UEFI Component Name(2) protocol.
3
4 Copyright (c) 2004 - 2011, 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
25 /**
26 Retrieves a Unicode string that is the user readable name of the driver.
27
28 This function retrieves the user readable name of a driver in the form of a
29 Unicode string. If the driver specified by This has a user readable name in
30 the language specified by Language, then a pointer to the driver name is
31 returned in DriverName, and EFI_SUCCESS is returned. If the driver specified
32 by This does not support the language specified by Language,
33 then EFI_UNSUPPORTED is returned.
34
35 @param[in] This A pointer to the EFI_COMPONENT_NAME2_PROTOCOL or
36 EFI_COMPONENT_NAME_PROTOCOL instance.
37
38 @param[in] Language A pointer to a Null-terminated ASCII string
39 array indicating the language. This is the
40 language of the driver name that the caller is
41 requesting, and it must match one of the
42 languages specified in SupportedLanguages. The
43 number of languages supported by a driver is up
44 to the driver writer. Language is specified
45 in RFC 4646 or ISO 639-2 language code format.
46
47 @param[out] DriverName A pointer to the Unicode string to return.
48 This Unicode string is the name of the
49 driver specified by This in the language
50 specified by Language.
51
52 @retval EFI_SUCCESS The Unicode string for the Driver specified by
53 This and the language specified by Language was
54 returned in DriverName.
55
56 @retval EFI_INVALID_PARAMETER Language is NULL.
57
58 @retval EFI_INVALID_PARAMETER DriverName is NULL.
59
60 @retval EFI_UNSUPPORTED The driver specified by This does not support
61 the language specified by Language.
62
63 **/
64 EFI_STATUS
65 EFIAPI
66 MnpComponentNameGetDriverName (
67 IN EFI_COMPONENT_NAME_PROTOCOL *This,
68 IN CHAR8 *Language,
69 OUT CHAR16 **DriverName
70 );
71
72 /**
73 Retrieves a Unicode string that is the user readable name of the controller
74 that is being managed by a driver.
75
76 This function retrieves the user readable name of the controller specified by
77 ControllerHandle and ChildHandle in the form of a Unicode string. If the
78 driver specified by This has a user readable name in the language specified by
79 Language, then a pointer to the controller name is returned in ControllerName,
80 and EFI_SUCCESS is returned. If the driver specified by This is not currently
81 managing the controller specified by ControllerHandle and ChildHandle,
82 then EFI_UNSUPPORTED is returned. If the driver specified by This does not
83 support the language specified by Language, then EFI_UNSUPPORTED is returned.
84 Currently not implemented.
85
86 @param[in] This A pointer to the EFI_COMPONENT_NAME2_PROTOCOL or
87 EFI_COMPONENT_NAME_PROTOCOL instance.
88
89 @param[in] ControllerHandle The handle of a controller that the driver
90 specified by This is managing. This handle
91 specifies the controller whose name is to be
92 returned.
93
94 @param[in] ChildHandle The handle of the child controller to retrieve
95 the name of. This is an optional parameter that
96 may be NULL. It will be NULL for device
97 drivers. It will also be NULL for a bus drivers
98 that wish to retrieve the name of the bus
99 controller. It will not be NULL for a bus
100 driver that wishes to retrieve the name of a
101 child controller.
102
103 @param[in] Language A pointer to a Null-terminated ASCII string
104 array indicating the language. This is the
105 language of the driver name that the caller is
106 requesting, and it must match one of the
107 languages specified in SupportedLanguages. The
108 number of languages supported by a driver is up
109 to the driver writer. Language is specified in
110 RFC 4646 or ISO 639-2 language code format.
111
112 @param[out] ControllerName A pointer to the Unicode string to return.
113 This Unicode string is the name of the
114 controller specified by ControllerHandle and
115 ChildHandle in the language specified by
116 Language from the point of view of the driver
117 specified by This.
118
119 @retval EFI_SUCCESS The Unicode string for the user readable name
120 specified by This, ControllerHandle, ChildHandle,
121 and Language was returned in ControllerName.
122
123 @retval EFI_INVALID_PARAMETER ControllerHandle is NULL.
124
125 @retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it is not a valid
126 EFI_HANDLE.
127
128 @retval EFI_INVALID_PARAMETER Language is NULL.
129
130 @retval EFI_INVALID_PARAMETER ControllerName is NULL.
131
132 @retval EFI_UNSUPPORTED The driver specified by This is not currently
133 managing the controller specified by
134 ControllerHandle and ChildHandle.
135
136 @retval EFI_UNSUPPORTED The driver specified by This does not support
137 the language specified by Language.
138
139 **/
140 EFI_STATUS
141 EFIAPI
142 MnpComponentNameGetControllerName (
143 IN EFI_COMPONENT_NAME_PROTOCOL *This,
144 IN EFI_HANDLE ControllerHandle,
145 IN EFI_HANDLE ChildHandle OPTIONAL,
146 IN CHAR8 *Language,
147 OUT CHAR16 **ControllerName
148 );
149
150 #endif