]> git.proxmox.com Git - mirror_edk2.git/blame - MdeModulePkg/Universal/Network/IScsiDxe/ComponentName.h
unified "iSCSI" in all comments
[mirror_edk2.git] / MdeModulePkg / Universal / Network / IScsiDxe / ComponentName.h
CommitLineData
b263ee17 1/** @file\r
2 The header file of UEFI Component Name(2) protocol.\r
3\r
4Copyright (c) 2004 - 2007, Intel Corporation.<BR>\r
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
12\r
13**/\r
14\r
15#ifndef _COMPONENT_NAME_H_\r
16#define _COMPONENT_NAME_H_\r
17\r
18#include <Protocol/ComponentName.h>\r
19#include <Protocol/ComponentName2.h>\r
20\r
21extern EFI_COMPONENT_NAME2_PROTOCOL gIScsiComponentName2;\r
22extern EFI_COMPONENT_NAME_PROTOCOL gIScsiComponentName;\r
23\r
24//\r
55a64ae0 25// EFI Component Name Protocol for iSCSI driver.\r
b263ee17 26//\r
27\r
28/**\r
29 Retrieves a Unicode string that is the user readable name of the EFI Driver.\r
30\r
31 This function retrieves the user readable name of a driver in the form of a\r
32 Unicode string. If the driver specified by This has a user readable name in\r
33 the language specified by Language, then a pointer to the driver name is\r
34 returned in DriverName, and EFI_SUCCESS is returned. If the driver specified\r
35 by This does not support the language specified by Language,\r
36 then EFI_UNSUPPORTED is returned.\r
37 \r
38 @param[in] This A pointer to the EFI_COMPONENT_NAME_PROTOCOL instance.\r
55a64ae0 39 @param[in] Language A pointer to a three characters ISO 639-2 language identifier.\r
b263ee17 40 This is the language of the driver name that that the caller\r
41 is requesting, and it must match one of the languages specified\r
42 in SupportedLanguages. The number of languages supported by a\r
43 driver is up to the driver writer.\r
44 @param[out] DriverName A pointer to the Unicode string to return. This Unicode string\r
45 is the name of the driver specified by This in the language\r
46 specified by Language.\r
47\r
48 @retval EFI_SUCCESS The Unicode string for the Driver specified by This\r
49 and the language specified by Language was returned\r
50 in DriverName.\r
51 @retval EFI_INVALID_PARAMETER Language is NULL.\r
52 @retval EFI_INVALID_PARAMETER DriverName is NULL.\r
53 @retval EFI_UNSUPPORTED The driver specified by This does not support the\r
54 language specified by Language.\r
55**/\r
56EFI_STATUS\r
57EFIAPI\r
58IScsiComponentNameGetDriverName (\r
59 IN EFI_COMPONENT_NAME_PROTOCOL *This,\r
60 IN CHAR8 *Language,\r
61 OUT CHAR16 **DriverName\r
62 );\r
63\r
64/**\r
65 Retrieves a Unicode string that is the user readable name of the controller\r
55a64ae0 66 that is being managed by an EFI Driver. Currently not implemented.\r
b263ee17 67\r
68 @param[in] This A pointer to the EFI_COMPONENT_NAME_PROTOCOL instance.\r
69 @param[in] ControllerHandle The handle of a controller that the driver specified by\r
70 This is managing. This handle specifies the controller\r
71 whose name is to be returned.\r
72 @param[in] ChildHandle The handle of the child controller to retrieve the name\r
73 of. This is an optional parameter that may be NULL. It\r
74 will be NULL for device drivers. It will also be NULL\r
75 for a bus drivers that wish to retrieve the name of the\r
76 bus controller. It will not be NULL for a bus driver\r
77 that wishes to retrieve the name of a child controller.\r
55a64ae0 78 @param[in] Language A pointer to a three characters ISO 639-2 language\r
b263ee17 79 identifier. This is the language of the controller name\r
80 that that the caller is requesting, and it must match one\r
81 of the languages specified in SupportedLanguages. The\r
82 number of languages supported by a driver is up to the\r
83 driver writer.\r
84 @param[out] ControllerName A pointer to the Unicode string to return. This Unicode\r
85 string is the name of the controller specified by\r
86 ControllerHandle and ChildHandle in the language specified\r
87 by Language from the point of view of the driver specified\r
88 by This.\r
89\r
90 @retval EFI_SUCCESS The Unicode string for the user readable name in the\r
91 language specified by Language for the driver\r
92 specified by This was returned in DriverName. \r
93 @retval EFI_INVALID_PARAMETER ControllerHandle is not a valid EFI_HANDLE.\r
94 @retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it is not a valid EFI_HANDLE.\r
95 @retval EFI_INVALID_PARAMETER Language is NULL.\r
96 @retval EFI_INVALID_PARAMETER ControllerName is NULL.\r
97 @retval EFI_UNSUPPORTED The driver specified by This is not currently managing\r
98 the controller specified by ControllerHandle and\r
99 ChildHandle.\r
100 @retval EFI_UNSUPPORTED The driver specified by This does not support the\r
101 language specified by Language.\r
102**/\r
103EFI_STATUS\r
104EFIAPI\r
105IScsiComponentNameGetControllerName (\r
106 IN EFI_COMPONENT_NAME_PROTOCOL *This,\r
107 IN EFI_HANDLE ControllerHandle,\r
108 IN EFI_HANDLE ChildHandle OPTIONAL,\r
109 IN CHAR8 *Language,\r
110 OUT CHAR16 **ControllerName\r
111 );\r
112 \r
113//\r
55a64ae0 114// EFI iSCSI Initiator Name Protocol for IScsi driver.\r
b263ee17 115//\r
116\r
117/**\r
118 Retrieves the current set value of iSCSI Initiator Name.\r
119\r
120 @param[in] This Pointer to the EFI_ISCSI_INITIATOR_NAME_PROTOCOL instance.\r
121 @param[in, out] BufferSize Size of the buffer in bytes pointed to by Buffer / Actual size of the\r
122 variable data buffer.\r
123 @param[out] Buffer Pointer to the buffer for data to be read.\r
124\r
125 @retval EFI_SUCCESS Data was successfully retrieved into the provided buffer and the\r
126 BufferSize was sufficient to handle the iSCSI initiator name\r
127 @retval EFI_BUFFER_TOO_SMALL BufferSize is too small for the result.\r
128 @retval EFI_INVALID_PARAMETER BufferSize or Buffer is NULL.\r
129 @retval EFI_DEVICE_ERROR The iSCSI initiator name could not be retrieved due to a hardware error.\r
130 @retval Others Other errors as indicated.\r
131**/\r
132EFI_STATUS\r
133EFIAPI\r
134IScsiGetInitiatorName (\r
135 IN EFI_ISCSI_INITIATOR_NAME_PROTOCOL *This,\r
136 IN OUT UINTN *BufferSize,\r
137 OUT VOID *Buffer\r
138 );\r
139\r
140/**\r
141 Sets the iSCSI Initiator Name.\r
142\r
143 @param[in] This Pointer to the EFI_ISCSI_INITIATOR_NAME_PROTOCOL instance.\r
144 @param[in, out] BufferSize Size of the buffer in bytes pointed to by Buffer.\r
145 @param[in] Buffer Pointer to the buffer for data to be written.\r
146\r
147 @retval EFI_SUCCESS Data was successfully stored by the protocol.\r
148 @retval EFI_UNSUPPORTED Platform policies do not allow for data to be written.\r
149 Currently not implemented.\r
150 @retval EFI_INVALID_PARAMETER BufferSize or Buffer is NULL, or BufferSize exceeds the maximum allowed limit.\r
151 @retval EFI_DEVICE_ERROR The data could not be stored due to a hardware error.\r
152 @retval EFI_OUT_OF_RESOURCES Not enough storage is available to hold the data.\r
153 @retval EFI_PROTOCOL_ERROR Input iSCSI initiator name does not adhere to RFC 3720\r
154 (and other related protocols)\r
155 @retval Others Other errors as indicated.\r
156**/\r
157EFI_STATUS\r
158EFIAPI\r
159IScsiSetInitiatorName (\r
160 IN EFI_ISCSI_INITIATOR_NAME_PROTOCOL *This,\r
161 IN OUT UINTN *BufferSize,\r
162 IN VOID *Buffer\r
163 );\r
164\r
165#endif\r