]> git.proxmox.com Git - mirror_edk2.git/blame - MdeModulePkg/Universal/Network/IScsiDxe/ComponentName.c
update file header
[mirror_edk2.git] / MdeModulePkg / Universal / Network / IScsiDxe / ComponentName.c
CommitLineData
12618416 1/** @file\r
f69bf3f5 2 UEFI Component Name(2) protocol implementation for iSCSI.\r
6a690e23 3\r
f69bf3f5 4Copyright (c) 2004 - 2008, Intel Corporation.<BR>\r
7a444476 5All rights reserved. This program and the accompanying materials\r
6are licensed and made available under the terms and conditions of the BSD License\r
7which accompanies this distribution. The full text of the license may be found at\r
8http://opensource.org/licenses/bsd-license.php\r
9\r
10THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
11WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
6a690e23 12\r
12618416 13**/\r
6a690e23 14\r
15#include "IScsiImpl.h"\r
16\r
17//\r
18// EFI Component Name Protocol\r
19//\r
20GLOBAL_REMOVE_IF_UNREFERENCED EFI_COMPONENT_NAME_PROTOCOL gIScsiComponentName = {\r
21 IScsiComponentNameGetDriverName,\r
22 IScsiComponentNameGetControllerName,\r
23 "eng"\r
24};\r
25\r
26//\r
27// EFI Component Name 2 Protocol\r
28//\r
29GLOBAL_REMOVE_IF_UNREFERENCED EFI_COMPONENT_NAME2_PROTOCOL gIScsiComponentName2 = {\r
30 (EFI_COMPONENT_NAME2_GET_DRIVER_NAME) IScsiComponentNameGetDriverName,\r
31 (EFI_COMPONENT_NAME2_GET_CONTROLLER_NAME) IScsiComponentNameGetControllerName,\r
32 "en"\r
33};\r
34\r
35GLOBAL_REMOVE_IF_UNREFERENCED EFI_UNICODE_STRING_TABLE mIScsiDriverNameTable[] = {\r
12618416 36 {"eng;en", L"iSCSI Driver"}, \r
37 {NULL, NULL}\r
6a690e23 38};\r
39\r
12618416 40/**\r
41 Retrieves a Unicode string that is the user readable name of the EFI Driver.\r
42\r
43 This function retrieves the user readable name of a driver in the form of a\r
44 Unicode string. If the driver specified by This has a user readable name in\r
45 the language specified by Language, then a pointer to the driver name is\r
46 returned in DriverName, and EFI_SUCCESS is returned. If the driver specified\r
47 by This does not support the language specified by Language,\r
48 then EFI_UNSUPPORTED is returned.\r
f69bf3f5 49 \r
50 @param[in] This A pointer to the EFI_COMPONENT_NAME_PROTOCOL instance.\r
51 @param[in] Language A pointer to a three character ISO 639-2 language identifier.\r
52 This is the language of the driver name that that the caller\r
53 is requesting, and it must match one of the languages specified\r
54 in SupportedLanguages. The number of languages supported by a\r
55 driver is up to the driver writer.\r
56 @param[out] DriverName A pointer to the Unicode string to return. This Unicode string\r
57 is the name of the driver specified by This in the language\r
58 specified by Language.\r
59\r
60 @retval 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
12618416 63 @retval EFI_INVALID_PARAMETER Language is NULL.\r
12618416 64 @retval EFI_INVALID_PARAMETER DriverName is NULL.\r
f69bf3f5 65 @retval EFI_UNSUPPORTED The driver specified by This does not support the\r
66 language specified by Language.\r
12618416 67**/\r
6a690e23 68EFI_STATUS\r
69EFIAPI\r
70IScsiComponentNameGetDriverName (\r
71 IN EFI_COMPONENT_NAME_PROTOCOL *This,\r
72 IN CHAR8 *Language,\r
73 OUT CHAR16 **DriverName\r
74 )\r
6a690e23 75{\r
76 return LookupUnicodeString2 (\r
77 Language,\r
78 This->SupportedLanguages,\r
79 mIScsiDriverNameTable,\r
80 DriverName,\r
81 (BOOLEAN)(This == &gIScsiComponentName)\r
82 );\r
83}\r
84\r
12618416 85/**\r
86 Retrieves a Unicode string that is the user readable name of the controller\r
f69bf3f5 87 that is being managed by an EFI Driver.Currently not implemented.\r
88\r
89 @param[in] This A pointer to the EFI_COMPONENT_NAME_PROTOCOL instance.\r
90 @param[in] ControllerHandle The handle of a controller that the driver specified by\r
91 This is managing. This handle specifies the controller\r
92 whose name is to be returned.\r
93 @param[in] ChildHandle The handle of the child controller to retrieve the name\r
94 of. This is an optional parameter that may be NULL. It\r
95 will be NULL for device drivers. It will also be NULL\r
96 for a bus drivers that wish to retrieve the name of the\r
97 bus controller. It will not be NULL for a bus driver\r
98 that wishes to retrieve the name of a child controller.\r
99 @param[in] Language A pointer to a three character ISO 639-2 language\r
100 identifier. This is the language of the controller name\r
101 that that the caller is requesting, and it must match one\r
102 of the languages specified in SupportedLanguages. The\r
103 number of languages supported by a driver is up to the\r
104 driver writer.\r
105 @param[out] ControllerName A pointer to the Unicode string to return. This Unicode\r
106 string is the name of the controller specified by\r
107 ControllerHandle and ChildHandle in the language specified\r
108 by Language from the point of view of the driver specified\r
109 by This.\r
110\r
111 @retval EFI_SUCCESS The Unicode string for the user readable name in the\r
112 language specified by Language for the driver\r
113 specified by This was returned in DriverName. \r
12618416 114 @retval EFI_INVALID_PARAMETER ControllerHandle is not a valid EFI_HANDLE.\r
12618416 115 @retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it is not a valid EFI_HANDLE.\r
12618416 116 @retval EFI_INVALID_PARAMETER Language is NULL.\r
12618416 117 @retval EFI_INVALID_PARAMETER ControllerName is NULL.\r
12618416 118 @retval EFI_UNSUPPORTED The driver specified by This is not currently managing\r
f69bf3f5 119 the controller specified by ControllerHandle and\r
120 ChildHandle.\r
121 @retval EFI_UNSUPPORTED The driver specified by This does not support the\r
12618416 122 language specified by Language.\r
12618416 123**/\r
6a690e23 124EFI_STATUS\r
125EFIAPI\r
126IScsiComponentNameGetControllerName (\r
127 IN EFI_COMPONENT_NAME_PROTOCOL *This,\r
128 IN EFI_HANDLE ControllerHandle,\r
129 IN EFI_HANDLE ChildHandle OPTIONAL,\r
130 IN CHAR8 *Language,\r
131 OUT CHAR16 **ControllerName\r
132 )\r
6a690e23 133{\r
134 return EFI_UNSUPPORTED;\r
135}\r