]> git.proxmox.com Git - mirror_edk2.git/blame - MdeModulePkg/Bus/Pci/XhciDxe/ComponentName.h
MdeModulePkg: Replace BSD License with BSD+Patent License
[mirror_edk2.git] / MdeModulePkg / Bus / Pci / XhciDxe / ComponentName.h
CommitLineData
92870c98 1/** @file\r
2\r
3 This file contains the delarations for componet name routines.\r
4\r
5Copyright (c) 2011, Intel Corporation. All rights reserved.<BR>\r
9d510e61 6SPDX-License-Identifier: BSD-2-Clause-Patent\r
92870c98 7\r
8**/\r
9\r
10#ifndef _EFI_COMPONENT_NAME_H_\r
11#define _EFI_COMPONENT_NAME_H_\r
12\r
13/**\r
14 Retrieves a Unicode string that is the user readable name of the driver.\r
15\r
16 This function retrieves the user readable name of a driver in the form of a\r
17 Unicode string. If the driver specified by This has a user readable name in\r
18 the language specified by Language, then a pointer to the driver name is\r
19 returned in DriverName, and EFI_SUCCESS is returned. If the driver specified\r
20 by This does not support the language specified by Language,\r
21 then EFI_UNSUPPORTED is returned.\r
22\r
23 @param This[in] A pointer to the EFI_COMPONENT_NAME2_PROTOCOL or\r
24 EFI_COMPONENT_NAME_PROTOCOL instance.\r
25\r
26 @param Language[in] A pointer to a Null-terminated ASCII string\r
27 array indicating the language. This is the\r
28 language of the driver name that the caller is\r
29 requesting, and it must match one of the\r
30 languages specified in SupportedLanguages. The\r
31 number of languages supported by a driver is up\r
32 to the driver writer. Language is specified\r
33 in RFC 4646 or ISO 639-2 language code format.\r
34\r
35 @param DriverName[out] A pointer to the Unicode string to return.\r
36 This Unicode string is the name of the\r
37 driver specified by This in the language\r
38 specified by Language.\r
39\r
40 @retval EFI_SUCCESS The Unicode string for the Driver specified by\r
41 This and the language specified by Language was\r
42 returned in DriverName.\r
43\r
44 @retval EFI_INVALID_PARAMETER Language is NULL.\r
45\r
46 @retval EFI_INVALID_PARAMETER DriverName is NULL.\r
47\r
48 @retval EFI_UNSUPPORTED The driver specified by This does not support\r
49 the language specified by Language.\r
50\r
51**/\r
52EFI_STATUS\r
53EFIAPI\r
54XhciComponentNameGetDriverName (\r
55 IN EFI_COMPONENT_NAME_PROTOCOL *This,\r
56 IN CHAR8 *Language,\r
57 OUT CHAR16 **DriverName\r
58 );\r
59\r
60\r
61/**\r
62 Retrieves a Unicode string that is the user readable name of the controller\r
63 that is being managed by a driver.\r
64\r
65 This function retrieves the user readable name of the controller specified by\r
66 ControllerHandle and ChildHandle in the form of a Unicode string. If the\r
67 driver specified by This has a user readable name in the language specified by\r
68 Language, then a pointer to the controller name is returned in ControllerName,\r
69 and EFI_SUCCESS is returned. If the driver specified by This is not currently\r
70 managing the controller specified by ControllerHandle and ChildHandle,\r
71 then EFI_UNSUPPORTED is returned. If the driver specified by This does not\r
72 support the language specified by Language, then EFI_UNSUPPORTED is returned.\r
73\r
74 @param This[in] A pointer to the EFI_COMPONENT_NAME2_PROTOCOL or\r
75 EFI_COMPONENT_NAME_PROTOCOL instance.\r
76\r
77 @param ControllerHandle[in] The handle of a controller that the driver\r
78 specified by This is managing. This handle\r
79 specifies the controller whose name is to be\r
80 returned.\r
81\r
82 @param ChildHandle[in] The handle of the child controller to retrieve\r
83 the name of. This is an optional parameter that\r
84 may be NULL. It will be NULL for device\r
85 drivers. It will also be NULL for a bus drivers\r
86 that wish to retrieve the name of the bus\r
87 controller. It will not be NULL for a bus\r
88 driver that wishes to retrieve the name of a\r
89 child controller.\r
90\r
91 @param Language[in] A pointer to a Null-terminated ASCII string\r
92 array indicating the language. This is the\r
93 language of the driver name that the caller is\r
94 requesting, and it must match one of the\r
95 languages specified in SupportedLanguages. The\r
96 number of languages supported by a driver is up\r
97 to the driver writer. Language is specified in\r
98 RFC 4646 or ISO 639-2 language code format.\r
99\r
100 @param ControllerName[out] A pointer to the Unicode string to return.\r
101 This Unicode string is the name of the\r
102 controller specified by ControllerHandle and\r
103 ChildHandle in the language specified by\r
104 Language from the point of view of the driver\r
105 specified by This.\r
106\r
107 @retval EFI_SUCCESS The Unicode string for the user readable name in\r
108 the language specified by Language for the\r
109 driver specified by This was returned in\r
110 DriverName.\r
111\r
112 @retval EFI_INVALID_PARAMETER ControllerHandle is not a valid EFI_HANDLE.\r
113\r
114 @retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it is not a valid\r
115 EFI_HANDLE.\r
116\r
117 @retval EFI_INVALID_PARAMETER Language is NULL.\r
118\r
119 @retval EFI_INVALID_PARAMETER ControllerName is NULL.\r
120\r
121 @retval EFI_UNSUPPORTED The driver specified by This is not currently\r
122 managing the controller specified by\r
123 ControllerHandle and ChildHandle.\r
124\r
125 @retval EFI_UNSUPPORTED The driver specified by This does not support\r
126 the language specified by Language.\r
127\r
128**/\r
129EFI_STATUS\r
130EFIAPI\r
131XhciComponentNameGetControllerName (\r
132 IN EFI_COMPONENT_NAME_PROTOCOL *This,\r
133 IN EFI_HANDLE ControllerHandle,\r
134 IN EFI_HANDLE ChildHandle OPTIONAL,\r
135 IN CHAR8 *Language,\r
136 OUT CHAR16 **ControllerName\r
137 );\r
138\r
139#endif\r
140\r