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