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