]>
Commit | Line | Data |
---|---|---|
f8cd287b | 1 | /**@file\r |
c3902377 | 2 | \r |
f8cd287b | 3 | Copyright (c) 2006 - 2007, Intel Corporation. <BR>\r |
4 | All rights reserved. This program and the accompanying materials\r | |
5 | are licensed and made available under the terms and conditions of the BSD License\r | |
6 | which accompanies this distribution. The full text of the license may be found at\r | |
7 | http://opensource.org/licenses/bsd-license.php\r | |
c3902377 | 8 | \r |
f8cd287b | 9 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r |
10 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r | |
c3902377 | 11 | \r |
f8cd287b | 12 | **/\r |
c3902377 | 13 | \r |
14 | #include "ComponentName.h"\r | |
15 | \r | |
16 | //\r | |
17 | // EFI Component Name Protocol\r | |
18 | //\r | |
19 | EFI_COMPONENT_NAME_PROTOCOL gIsaBusComponentName = {\r | |
20 | IsaBusComponentNameGetDriverName,\r | |
21 | IsaBusComponentNameGetControllerName,\r | |
22 | "eng"\r | |
23 | };\r | |
24 | \r | |
25 | STATIC EFI_UNICODE_STRING_TABLE mIsaBusDriverNameTable[] = {\r | |
26 | {\r | |
27 | "eng",\r | |
28 | L"ISA Bus Driver"\r | |
29 | },\r | |
30 | {\r | |
31 | NULL,\r | |
32 | NULL\r | |
33 | }\r | |
34 | };\r | |
35 | \r | |
36 | EFI_STATUS\r | |
37 | EFIAPI\r | |
38 | IsaBusComponentNameGetDriverName (\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 | gIsaBusComponentName.SupportedLanguages,\r | |
73 | mIsaBusDriverNameTable,\r | |
74 | DriverName\r | |
75 | );\r | |
76 | }\r | |
77 | \r | |
78 | EFI_STATUS\r | |
79 | EFIAPI\r | |
80 | IsaBusComponentNameGetControllerName (\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 \r | |
113 | specified by Language from the point of view of the \r | |
114 | driver specified 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 \r | |
122 | EFI_HANDLE.\r | |
123 | EFI_INVALID_PARAMETER - Language is NULL.\r | |
124 | EFI_INVALID_PARAMETER - ControllerName is NULL.\r | |
125 | EFI_UNSUPPORTED - The driver specified by This is not currently \r | |
126 | managing the controller specified by \r | |
127 | ControllerHandle and ChildHandle.\r | |
128 | EFI_UNSUPPORTED - The driver specified by This does not support the \r | |
129 | language specified by Language.\r | |
130 | \r | |
131 | --*/\r | |
132 | {\r | |
133 | return EFI_UNSUPPORTED;\r | |
134 | }\r |