]> git.proxmox.com Git - mirror_edk2.git/blame - MdeModulePkg/Universal/Console/ConPlatformDxe/ComponentName.c
Adjust directory structures.
[mirror_edk2.git] / MdeModulePkg / Universal / Console / ConPlatformDxe / ComponentName.c
CommitLineData
95276127 1/*++\r
2\r
3Copyright (c) 2006, Intel Corporation \r
4All rights reserved. This program and the accompanying materials \r
5are licensed and made available under the terms and conditions of the BSD License \r
6which accompanies this distribution. The full text of the license may be found at \r
7http://opensource.org/licenses/bsd-license.php \r
8 \r
9THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
10WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r
11\r
12Module Name:\r
13\r
14 ComponentName.c\r
15\r
16Abstract:\r
17\r
18--*/\r
19\r
20//\r
21// Include common header file for this module.\r
22//\r
23\r
24\r
859b72fa 25#include <ConPlatform.h>\r
95276127 26\r
27//\r
28// EFI Component Name Protocol\r
29//\r
30EFI_COMPONENT_NAME_PROTOCOL gConPlatformComponentName = {\r
31 ConPlatformComponentNameGetDriverName,\r
32 ConPlatformComponentNameGetControllerName,\r
33 "eng"\r
34};\r
35\r
36STATIC EFI_UNICODE_STRING_TABLE mConPlatformDriverNameTable[] = {\r
37 {\r
38 "eng",\r
39 L"Platform Console Management Driver"\r
40 },\r
41 {\r
42 NULL,\r
43 NULL\r
44 }\r
45};\r
46\r
47EFI_STATUS\r
48EFIAPI\r
49ConPlatformComponentNameGetDriverName (\r
50 IN EFI_COMPONENT_NAME_PROTOCOL *This,\r
51 IN CHAR8 *Language,\r
52 OUT CHAR16 **DriverName\r
53 )\r
54/*++\r
55\r
56 Routine Description:\r
57 Retrieves a Unicode string that is the user readable name of the EFI Driver.\r
58\r
59 Arguments:\r
60 This - A pointer to the EFI_COMPONENT_NAME_PROTOCOL instance.\r
61 Language - A pointer to a three character ISO 639-2 language identifier.\r
62 This is the language of the driver name that that the caller \r
63 is requesting, and it must match one of the languages specified\r
64 in SupportedLanguages. The number of languages supported by a \r
65 driver is up to the driver writer.\r
66 DriverName - A pointer to the Unicode string to return. This Unicode string\r
67 is the name of the driver specified by This in the language \r
68 specified by Language.\r
69\r
70 Returns:\r
71 EFI_SUCCESS - The Unicode string for the Driver specified by This\r
72 and the language specified by Language was returned \r
73 in DriverName.\r
74 EFI_INVALID_PARAMETER - Language is NULL.\r
75 EFI_INVALID_PARAMETER - DriverName is NULL.\r
76 EFI_UNSUPPORTED - The driver specified by This does not support the \r
77 language specified by Language.\r
78\r
79--*/\r
80{\r
81 return LookupUnicodeString (\r
82 Language,\r
83 gConPlatformComponentName.SupportedLanguages,\r
84 mConPlatformDriverNameTable,\r
85 DriverName\r
86 );\r
87}\r
88\r
89EFI_STATUS\r
90EFIAPI\r
91ConPlatformComponentNameGetControllerName (\r
92 IN EFI_COMPONENT_NAME_PROTOCOL *This,\r
93 IN EFI_HANDLE ControllerHandle,\r
94 IN EFI_HANDLE ChildHandle OPTIONAL,\r
95 IN CHAR8 *Language,\r
96 OUT CHAR16 **ControllerName\r
97 )\r
98/*++\r
99\r
100 Routine Description:\r
101 Retrieves a Unicode string that is the user readable name of the controller\r
102 that is being managed by an EFI Driver.\r
103\r
104 Arguments:\r
105 This - A pointer to the EFI_COMPONENT_NAME_PROTOCOL instance.\r
106 ControllerHandle - The handle of a controller that the driver specified by \r
107 This is managing. This handle specifies the controller \r
108 whose name is to be returned.\r
109 ChildHandle - The handle of the child controller to retrieve the name \r
110 of. This is an optional parameter that may be NULL. It \r
111 will be NULL for device drivers. It will also be NULL \r
112 for a bus drivers that wish to retrieve the name of the \r
113 bus controller. It will not be NULL for a bus driver \r
114 that wishes to retrieve the name of a child controller.\r
115 Language - A pointer to a three character ISO 639-2 language \r
116 identifier. This is the language of the controller name \r
117 that that the caller is requesting, and it must match one\r
118 of the languages specified in SupportedLanguages. The \r
119 number of languages supported by a driver is up to the \r
120 driver writer.\r
121 ControllerName - A pointer to the Unicode string to return. This Unicode\r
122 string is the name of the controller specified by \r
123 ControllerHandle and ChildHandle in the language \r
124 specified by Language from the point of view of the \r
125 driver specified by This. \r
126\r
127 Returns:\r
128 EFI_SUCCESS - The Unicode string for the user readable name in the\r
129 language specified by Language for the driver \r
130 specified by This was returned in DriverName.\r
131 EFI_INVALID_PARAMETER - ControllerHandle is not a valid EFI_HANDLE.\r
132 EFI_INVALID_PARAMETER - ChildHandle is not NULL and it is not a valid \r
133 EFI_HANDLE.\r
134 EFI_INVALID_PARAMETER - Language is NULL.\r
135 EFI_INVALID_PARAMETER - ControllerName is NULL.\r
136 EFI_UNSUPPORTED - The driver specified by This is not currently \r
137 managing the controller specified by \r
138 ControllerHandle and ChildHandle.\r
139 EFI_UNSUPPORTED - The driver specified by This does not support the \r
140 language specified by Language.\r
141\r
142--*/\r
143{\r
144 return EFI_UNSUPPORTED;\r
145}\r