]> git.proxmox.com Git - mirror_edk2.git/blame - EdkModulePkg/Bus/Pci/PciBus/Dxe/ComponentName.c
Fix capitalization.
[mirror_edk2.git] / EdkModulePkg / Bus / Pci / PciBus / Dxe / ComponentName.c
CommitLineData
878ddf1f 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
f0ec738d 20#include "pcibus.h"\r
878ddf1f 21\r
22//\r
23// EFI Component Name Protocol\r
24//\r
25EFI_COMPONENT_NAME_PROTOCOL gPciBusComponentName = {\r
26 PciBusComponentNameGetDriverName,\r
27 PciBusComponentNameGetControllerName,\r
28 "eng"\r
29};\r
30\r
31STATIC EFI_UNICODE_STRING_TABLE mPciBusDriverNameTable[] = {\r
32 { "eng", (CHAR16 *) L"PCI Bus Driver" },\r
33 { NULL , NULL }\r
34};\r
35\r
36EFI_STATUS\r
37EFIAPI\r
38PciBusComponentNameGetDriverName (\r
39 IN EFI_COMPONENT_NAME_PROTOCOL *This,\r
40 IN CHAR8 *Language,\r
41 OUT CHAR16 **DriverName\r
42 )\r
43/*++\r
44\r
45 Routine Description:\r
46 Retrieves a Unicode string that is the user readable name of the EFI Driver.\r
47\r
48 Arguments:\r
49 This - A pointer to the EFI_COMPONENT_NAME_PROTOCOL instance.\r
50 Language - A pointer to a three character ISO 639-2 language identifier.\r
51 This is the language of the driver name that that the caller \r
52 is requesting, and it must match one of the languages specified\r
53 in SupportedLanguages. The number of languages supported by a \r
54 driver is up to the driver writer.\r
55 DriverName - A pointer to the Unicode string to return. This Unicode string\r
56 is the name of the driver specified by This in the language \r
57 specified by Language.\r
58\r
59 Returns:\r
60 EFI_SUCCESS - The Unicode string for the Driver specified by This\r
61 and the language specified by Language was returned \r
62 in DriverName.\r
63 EFI_INVALID_PARAMETER - Language is NULL.\r
64 EFI_INVALID_PARAMETER - DriverName is NULL.\r
65 EFI_UNSUPPORTED - The driver specified by This does not support the \r
66 language specified by Language.\r
67\r
68--*/\r
69{\r
70 return LookupUnicodeString (\r
71 Language,\r
72 gPciBusComponentName.SupportedLanguages,\r
73 mPciBusDriverNameTable,\r
74 DriverName\r
75 );\r
76}\r
77\r
78EFI_STATUS\r
79EFIAPI\r
80PciBusComponentNameGetControllerName (\r
81 IN EFI_COMPONENT_NAME_PROTOCOL *This,\r
82 IN EFI_HANDLE ControllerHandle,\r
83 IN EFI_HANDLE ChildHandle OPTIONAL,\r
84 IN CHAR8 *Language,\r
85 OUT CHAR16 **ControllerName\r
86 )\r
87/*++\r
88\r
89 Routine Description:\r
90 Retrieves a Unicode string that is the user readable name of the controller\r
91 that is being managed by an EFI Driver.\r
92\r
93 Arguments:\r
94 This - A pointer to the EFI_COMPONENT_NAME_PROTOCOL instance.\r
95 ControllerHandle - The handle of a controller that the driver specified by \r
96 This is managing. This handle specifies the controller \r
97 whose name is to be returned.\r
98 ChildHandle - The handle of the child controller to retrieve the name \r
99 of. This is an optional parameter that may be NULL. It \r
100 will be NULL for device drivers. It will also be NULL \r
101 for a bus drivers that wish to retrieve the name of the \r
102 bus controller. It will not be NULL for a bus driver \r
103 that wishes to retrieve the name of a child controller.\r
104 Language - A pointer to a three character ISO 639-2 language \r
105 identifier. This is the language of the controller name \r
106 that that the caller is requesting, and it must match one\r
107 of the languages specified in SupportedLanguages. The \r
108 number of languages supported by a driver is up to the \r
109 driver writer.\r
110 ControllerName - A pointer to the Unicode string to return. This Unicode\r
111 string is the name of the controller specified by \r
112 ControllerHandle and ChildHandle in the language specified\r
113 by Language from the point of view of the driver specified\r
114 by This. \r
115\r
116 Returns:\r
117 EFI_SUCCESS - The Unicode string for the user readable name in the \r
118 language specified by Language for the driver \r
119 specified by This was returned in DriverName.\r
120 EFI_INVALID_PARAMETER - ControllerHandle is not a valid EFI_HANDLE.\r
121 EFI_INVALID_PARAMETER - ChildHandle is not NULL and it is not a valid EFI_HANDLE.\r
122 EFI_INVALID_PARAMETER - Language is NULL.\r
123 EFI_INVALID_PARAMETER - ControllerName is NULL.\r
124 EFI_UNSUPPORTED - The driver specified by This is not currently managing \r
125 the controller specified by ControllerHandle and \r
126 ChildHandle.\r
127 EFI_UNSUPPORTED - The driver specified by This does not support the \r
128 language specified by Language.\r
129\r
130--*/\r
131{\r
132 return EFI_UNSUPPORTED;\r
133}\r