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