]> git.proxmox.com Git - mirror_edk2.git/blame - MdePkg/Include/Protocol/Http.h
MdePkg/Include/Protocol/Tls.h: pack structures from the TLS RFC
[mirror_edk2.git] / MdePkg / Include / Protocol / Http.h
CommitLineData
cff298f4 1/** @file\r
2 This file defines the EFI HTTP Protocol interface. It is split into\r
3 the following two main sections:\r
4 HTTP Service Binding Protocol (HTTPSB)\r
5 HTTP Protocol (HTTP)\r
6\r
fd49f2c1 7 Copyright (c) 2016 - 2017, Intel Corporation. All rights reserved.<BR>\r
8ab9f769 8 (C) Copyright 2015-2017 Hewlett Packard Enterprise Development LP<BR>\r
cff298f4 9 This program and the accompanying materials\r
10 are licensed and made available under the terms and conditions of the BSD License\r
11 which accompanies this distribution. The full text of the license may be found at\r
12 http://opensource.org/licenses/bsd-license.php\r
13\r
14 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
15 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
16\r
17 @par Revision Reference:\r
18 This Protocol is introduced in UEFI Specification 2.5\r
19\r
20**/\r
21\r
22#ifndef __EFI_HTTP_PROTOCOL_H__\r
23#define __EFI_HTTP_PROTOCOL_H__\r
24\r
25#define EFI_HTTP_SERVICE_BINDING_PROTOCOL_GUID \\r
26 { \\r
27 0xbdc8e6af, 0xd9bc, 0x4379, {0xa7, 0x2a, 0xe0, 0xc4, 0xe7, 0x5d, 0xae, 0x1c } \\r
28 }\r
29\r
30#define EFI_HTTP_PROTOCOL_GUID \\r
31 { \\r
32 0x7a59b29b, 0x910b, 0x4171, {0x82, 0x42, 0xa8, 0x5a, 0x0d, 0xf2, 0x5b, 0x5b } \\r
33 }\r
34\r
35typedef struct _EFI_HTTP_PROTOCOL EFI_HTTP_PROTOCOL;\r
36\r
37///\r
38/// EFI_HTTP_VERSION\r
39///\r
40typedef enum {\r
41 HttpVersion10,\r
42 HttpVersion11,\r
43 HttpVersionUnsupported\r
44} EFI_HTTP_VERSION;\r
45\r
46///\r
47/// EFI_HTTP_METHOD\r
48///\r
49typedef enum {\r
50 HttpMethodGet,\r
51 HttpMethodPost,\r
52 HttpMethodPatch,\r
53 HttpMethodOptions,\r
54 HttpMethodConnect,\r
55 HttpMethodHead,\r
56 HttpMethodPut,\r
57 HttpMethodDelete,\r
cfc46163
SEHM
58 HttpMethodTrace,\r
59 HttpMethodMax\r
cff298f4 60} EFI_HTTP_METHOD;\r
61\r
62///\r
63/// EFI_HTTP_STATUS_CODE\r
64///\r
65typedef enum {\r
66 HTTP_STATUS_UNSUPPORTED_STATUS = 0,\r
67 HTTP_STATUS_100_CONTINUE,\r
68 HTTP_STATUS_101_SWITCHING_PROTOCOLS,\r
69 HTTP_STATUS_200_OK,\r
70 HTTP_STATUS_201_CREATED,\r
71 HTTP_STATUS_202_ACCEPTED,\r
72 HTTP_STATUS_203_NON_AUTHORITATIVE_INFORMATION,\r
73 HTTP_STATUS_204_NO_CONTENT,\r
74 HTTP_STATUS_205_RESET_CONTENT,\r
75 HTTP_STATUS_206_PARTIAL_CONTENT,\r
3310ca8f 76 HTTP_STATUS_300_MULTIPLE_CHOICES,\r
cff298f4 77 HTTP_STATUS_301_MOVED_PERMANENTLY,\r
78 HTTP_STATUS_302_FOUND,\r
79 HTTP_STATUS_303_SEE_OTHER,\r
80 HTTP_STATUS_304_NOT_MODIFIED,\r
81 HTTP_STATUS_305_USE_PROXY,\r
82 HTTP_STATUS_307_TEMPORARY_REDIRECT,\r
83 HTTP_STATUS_400_BAD_REQUEST,\r
84 HTTP_STATUS_401_UNAUTHORIZED,\r
85 HTTP_STATUS_402_PAYMENT_REQUIRED,\r
86 HTTP_STATUS_403_FORBIDDEN,\r
87 HTTP_STATUS_404_NOT_FOUND,\r
88 HTTP_STATUS_405_METHOD_NOT_ALLOWED,\r
89 HTTP_STATUS_406_NOT_ACCEPTABLE,\r
90 HTTP_STATUS_407_PROXY_AUTHENTICATION_REQUIRED,\r
91 HTTP_STATUS_408_REQUEST_TIME_OUT,\r
92 HTTP_STATUS_409_CONFLICT,\r
93 HTTP_STATUS_410_GONE,\r
94 HTTP_STATUS_411_LENGTH_REQUIRED,\r
95 HTTP_STATUS_412_PRECONDITION_FAILED,\r
96 HTTP_STATUS_413_REQUEST_ENTITY_TOO_LARGE,\r
97 HTTP_STATUS_414_REQUEST_URI_TOO_LARGE,\r
8cfd008e 98 HTTP_STATUS_415_UNSUPPORTED_MEDIA_TYPE,\r
cff298f4 99 HTTP_STATUS_416_REQUESTED_RANGE_NOT_SATISFIED,\r
100 HTTP_STATUS_417_EXPECTATION_FAILED,\r
101 HTTP_STATUS_500_INTERNAL_SERVER_ERROR,\r
8cfd008e 102 HTTP_STATUS_501_NOT_IMPLEMENTED,\r
cff298f4 103 HTTP_STATUS_502_BAD_GATEWAY,\r
104 HTTP_STATUS_503_SERVICE_UNAVAILABLE,\r
105 HTTP_STATUS_504_GATEWAY_TIME_OUT,\r
8ab9f769 106 HTTP_STATUS_505_HTTP_VERSION_NOT_SUPPORTED,\r
107 HTTP_STATUS_308_PERMANENT_REDIRECT\r
cff298f4 108} EFI_HTTP_STATUS_CODE;\r
109\r
110///\r
111/// EFI_HTTPv4_ACCESS_POINT\r
112///\r
113typedef struct {\r
114 ///\r
115 /// Set to TRUE to instruct the EFI HTTP instance to use the default address\r
116 /// information in every TCP connection made by this instance. In addition, when set\r
34d00172 117 /// to TRUE, LocalAddress and LocalSubnet are ignored.\r
cff298f4 118 ///\r
119 BOOLEAN UseDefaultAddress;\r
120 ///\r
121 /// If UseDefaultAddress is set to FALSE, this defines the local IP address to be\r
122 /// used in every TCP connection opened by this instance.\r
123 ///\r
124 EFI_IPv4_ADDRESS LocalAddress;\r
125 ///\r
126 /// If UseDefaultAddress is set to FALSE, this defines the local subnet to be used\r
127 /// in every TCP connection opened by this instance.\r
128 ///\r
129 EFI_IPv4_ADDRESS LocalSubnet;\r
130 ///\r
34d00172 131 /// This defines the local port to be used in\r
cff298f4 132 /// every TCP connection opened by this instance.\r
133 ///\r
134 UINT16 LocalPort;\r
135} EFI_HTTPv4_ACCESS_POINT;\r
136\r
137///\r
138/// EFI_HTTPv6_ACCESS_POINT\r
139///\r
140typedef struct {\r
141 ///\r
142 /// Local IP address to be used in every TCP connection opened by this instance.\r
143 ///\r
144 EFI_IPv6_ADDRESS LocalAddress;\r
145 ///\r
146 /// Local port to be used in every TCP connection opened by this instance.\r
147 ///\r
148 UINT16 LocalPort;\r
149} EFI_HTTPv6_ACCESS_POINT;\r
150\r
151///\r
152/// EFI_HTTP_CONFIG_DATA_ACCESS_POINT\r
153///\r
154\r
155\r
156typedef struct {\r
157 ///\r
158 /// HTTP version that this instance will support.\r
159 ///\r
160 EFI_HTTP_VERSION HttpVersion;\r
161 ///\r
162 /// Time out (in milliseconds) when blocking for requests.\r
163 ///\r
164 UINT32 TimeOutMillisec;\r
165 ///\r
166 /// Defines behavior of EFI DNS and TCP protocols consumed by this instance. If\r
167 /// FALSE, this instance will use EFI_DNS4_PROTOCOL and EFI_TCP4_PROTOCOL. If TRUE,\r
168 /// this instance will use EFI_DNS6_PROTOCOL and EFI_TCP6_PROTOCOL.\r
169 ///\r
170 BOOLEAN LocalAddressIsIPv6;\r
171\r
172 union {\r
173 ///\r
174 /// When LocalAddressIsIPv6 is FALSE, this points to the local address, subnet, and\r
175 /// port used by the underlying TCP protocol.\r
176 ///\r
177 EFI_HTTPv4_ACCESS_POINT *IPv4Node;\r
178 ///\r
179 /// When LocalAddressIsIPv6 is TRUE, this points to the local IPv6 address and port\r
180 /// used by the underlying TCP protocol.\r
181 ///\r
182 EFI_HTTPv6_ACCESS_POINT *IPv6Node;\r
183 } AccessPoint;\r
184} EFI_HTTP_CONFIG_DATA;\r
185\r
186///\r
187/// EFI_HTTP_REQUEST_DATA\r
188///\r
189typedef struct {\r
190 ///\r
191 /// The HTTP method (e.g. GET, POST) for this HTTP Request.\r
192 ///\r
193 EFI_HTTP_METHOD Method;\r
194 ///\r
195 /// The URI of a remote host. From the information in this field, the HTTP instance\r
196 /// will be able to determine whether to use HTTP or HTTPS and will also be able to\r
197 /// determine the port number to use. If no port number is specified, port 80 (HTTP)\r
198 /// is assumed. See RFC 3986 for more details on URI syntax.\r
199 ///\r
200 CHAR16 *Url;\r
201} EFI_HTTP_REQUEST_DATA;\r
202\r
203///\r
204/// EFI_HTTP_RESPONSE_DATA\r
205///\r
206typedef struct {\r
207 ///\r
208 /// Response status code returned by the remote host.\r
209 ///\r
210 EFI_HTTP_STATUS_CODE StatusCode;\r
211} EFI_HTTP_RESPONSE_DATA;\r
212\r
213///\r
214/// EFI_HTTP_HEADER\r
215///\r
216typedef struct {\r
217 ///\r
218 /// Null terminated string which describes a field name. See RFC 2616 Section 14 for\r
219 /// detailed information about field names.\r
220 ///\r
221 CHAR8 *FieldName;\r
222 ///\r
223 /// Null terminated string which describes the corresponding field value. See RFC 2616\r
224 /// Section 14 for detailed information about field values.\r
225 ///\r
226 CHAR8 *FieldValue;\r
227} EFI_HTTP_HEADER;\r
228\r
229///\r
230/// EFI_HTTP_MESSAGE\r
231///\r
232typedef struct {\r
233 ///\r
234 /// HTTP message data.\r
235 ///\r
236 union {\r
237 ///\r
238 /// When the token is used to send a HTTP request, Request is a pointer to storage that\r
239 /// contains such data as URL and HTTP method.\r
240 ///\r
241 EFI_HTTP_REQUEST_DATA *Request;\r
242 ///\r
243 /// When used to await a response, Response points to storage containing HTTP response\r
244 /// status code.\r
245 ///\r
246 EFI_HTTP_RESPONSE_DATA *Response;\r
247 } Data;\r
248 ///\r
249 /// Number of HTTP header structures in Headers list. On request, this count is\r
250 /// provided by the caller. On response, this count is provided by the HTTP driver.\r
251 ///\r
252 UINTN HeaderCount;\r
253 ///\r
254 /// Array containing list of HTTP headers. On request, this array is populated by the\r
255 /// caller. On response, this array is allocated and populated by the HTTP driver. It\r
256 /// is the responsibility of the caller to free this memory on both request and\r
257 /// response.\r
258 ///\r
259 EFI_HTTP_HEADER *Headers;\r
260 ///\r
261 /// Length in bytes of the HTTP body. This can be zero depending on the HttpMethod type.\r
262 ///\r
263 UINTN BodyLength;\r
264 ///\r
265 /// Body associated with the HTTP request or response. This can be NULL depending on\r
266 /// the HttpMethod type.\r
267 ///\r
268 VOID *Body;\r
269} EFI_HTTP_MESSAGE;\r
270\r
271\r
272///\r
273/// EFI_HTTP_TOKEN\r
274///\r
275typedef struct {\r
276 ///\r
277 /// This Event will be signaled after the Status field is updated by the EFI HTTP\r
278 /// Protocol driver. The type of Event must be EFI_NOTIFY_SIGNAL. The Task Priority\r
279 /// Level (TPL) of Event must be lower than or equal to TPL_CALLBACK.\r
280 ///\r
281 EFI_EVENT Event;\r
282 ///\r
283 /// Status will be set to one of the following value if the HTTP request is\r
284 /// successfully sent or if an unexpected error occurs:\r
285 /// EFI_SUCCESS: The HTTP request was successfully sent to the remote host.\r
10a3840f
ZL
286 /// EFI_HTTP_ERROR: The response message was successfully received but contains a\r
287 /// HTTP error. The response status code is returned in token.\r
cff298f4 288 /// EFI_ABORTED: The HTTP request was cancelled by the caller and removed from\r
289 /// the transmit queue.\r
290 /// EFI_TIMEOUT: The HTTP request timed out before reaching the remote host.\r
291 /// EFI_DEVICE_ERROR: An unexpected system or network error occurred.\r
292 ///\r
293 EFI_STATUS Status;\r
294 ///\r
295 /// Pointer to storage containing HTTP message data.\r
296 ///\r
297 EFI_HTTP_MESSAGE *Message;\r
298} EFI_HTTP_TOKEN;\r
299\r
300/**\r
301 Returns the operational parameters for the current HTTP child instance.\r
302\r
303 The GetModeData() function is used to read the current mode data (operational\r
304 parameters) for this HTTP protocol instance.\r
305\r
306 @param[in] This Pointer to EFI_HTTP_PROTOCOL instance.\r
307 @param[out] HttpConfigData Point to buffer for operational parameters of this\r
bf06b383
JW
308 HTTP instance. It is the responsibility of the caller \r
309 to allocate the memory for HttpConfigData and \r
310 HttpConfigData->AccessPoint.IPv6Node/IPv4Node. In fact, \r
311 it is recommended to allocate sufficient memory to record \r
312 IPv6Node since it is big enough for all possibilities.\r
cff298f4 313\r
314 @retval EFI_SUCCESS Operation succeeded.\r
315 @retval EFI_INVALID_PARAMETER This is NULL.\r
34d00172 316 HttpConfigData is NULL.\r
bf06b383
JW
317 HttpConfigData->AccessPoint.IPv4Node or \r
318 HttpConfigData->AccessPoint.IPv6Node is NULL.\r
34d00172 319 @retval EFI_NOT_STARTED This EFI HTTP Protocol instance has not been started.\r
cff298f4 320**/\r
321typedef\r
322EFI_STATUS\r
fd49f2c1 323(EFIAPI *EFI_HTTP_GET_MODE_DATA)(\r
cff298f4 324 IN EFI_HTTP_PROTOCOL *This,\r
325 OUT EFI_HTTP_CONFIG_DATA *HttpConfigData\r
326 );\r
327\r
328/**\r
329 Initialize or brutally reset the operational parameters for this EFI HTTP instance.\r
330\r
331 The Configure() function does the following:\r
332 When HttpConfigData is not NULL Initialize this EFI HTTP instance by configuring\r
333 timeout, local address, port, etc.\r
334 When HttpConfigData is NULL, reset this EFI HTTP instance by closing all active\r
335 connections with remote hosts, canceling all asynchronous tokens, and flush request\r
336 and response buffers without informing the appropriate hosts.\r
337\r
34d00172
ZL
338 No other EFI HTTP function can be executed by this instance until the Configure()\r
339 function is executed and returns successfully.\r
cff298f4 340\r
341 @param[in] This Pointer to EFI_HTTP_PROTOCOL instance.\r
342 @param[in] HttpConfigData Pointer to the configure data to configure the instance.\r
343\r
344 @retval EFI_SUCCESS Operation succeeded.\r
345 @retval EFI_INVALID_PARAMETER One or more of the following conditions is TRUE:\r
346 This is NULL.\r
347 HttpConfigData->LocalAddressIsIPv6 is FALSE and\r
bf06b383 348 HttpConfigData->AccessPoint.IPv4Node is NULL.\r
cff298f4 349 HttpConfigData->LocalAddressIsIPv6 is TRUE and\r
bf06b383 350 HttpConfigData->AccessPoint.IPv6Node is NULL.\r
cff298f4 351 @retval EFI_ALREADY_STARTED Reinitialize this HTTP instance without calling\r
352 Configure() with NULL to reset it.\r
353 @retval EFI_DEVICE_ERROR An unexpected system or network error occurred.\r
354 @retval EFI_OUT_OF_RESOURCES Could not allocate enough system resources when\r
355 executing Configure().\r
356 @retval EFI_UNSUPPORTED One or more options in ConfigData are not supported\r
357 in the implementation.\r
358**/\r
359typedef\r
360EFI_STATUS\r
fd49f2c1 361(EFIAPI *EFI_HTTP_CONFIGURE)(\r
cff298f4 362 IN EFI_HTTP_PROTOCOL *This,\r
fd49f2c1 363 IN EFI_HTTP_CONFIG_DATA *HttpConfigData OPTIONAL\r
cff298f4 364 );\r
365\r
366/**\r
367 The Request() function queues an HTTP request to this HTTP instance, \r
368 similar to Transmit() function in the EFI TCP driver. When the HTTP request is sent\r
369 successfully, or if there is an error, Status in token will be updated and Event will\r
370 be signaled.\r
371\r
372 @param[in] This Pointer to EFI_HTTP_PROTOCOL instance.\r
373 @param[in] Token Pointer to storage containing HTTP request token.\r
374\r
375 @retval EFI_SUCCESS Outgoing data was processed.\r
376 @retval EFI_NOT_STARTED This EFI HTTP Protocol instance has not been started.\r
377 @retval EFI_DEVICE_ERROR An unexpected system or network error occurred.\r
378 @retval EFI_TIMEOUT Data was dropped out of the transmit or receive queue.\r
379 @retval EFI_INVALID_PARAMETER One or more of the following conditions is TRUE:\r
380 This is NULL.\r
34d00172 381 Token is NULL.\r
cff298f4 382 Token->Message is NULL.\r
383 Token->Message->Body is not NULL,\r
384 Token->Message->BodyLength is non-zero, and\r
385 Token->Message->Data is NULL, but a previous call to\r
386 Request()has not been completed successfully.\r
34d00172
ZL
387 @retval EFI_OUT_OF_RESOURCES Could not allocate enough system resources.\r
388 @retval EFI_UNSUPPORTED The HTTP method is not supported in current implementation.\r
cff298f4 389**/\r
390typedef\r
391EFI_STATUS\r
392(EFIAPI *EFI_HTTP_REQUEST) (\r
393 IN EFI_HTTP_PROTOCOL *This,\r
394 IN EFI_HTTP_TOKEN *Token\r
395 );\r
396\r
397/**\r
398 Abort an asynchronous HTTP request or response token.\r
399\r
400 The Cancel() function aborts a pending HTTP request or response transaction. If\r
401 Token is not NULL and the token is in transmit or receive queues when it is being\r
402 cancelled, its Token->Status will be set to EFI_ABORTED and then Token->Event will\r
403 be signaled. If the token is not in one of the queues, which usually means that the\r
404 asynchronous operation has completed, EFI_NOT_FOUND is returned. If Token is NULL,\r
405 all asynchronous tokens issued by Request() or Response() will be aborted.\r
406\r
407 @param[in] This Pointer to EFI_HTTP_PROTOCOL instance.\r
408 @param[in] Token Point to storage containing HTTP request or response\r
409 token.\r
410\r
411 @retval EFI_SUCCESS Request and Response queues are successfully flushed.\r
412 @retval EFI_INVALID_PARAMETER This is NULL.\r
413 @retval EFI_NOT_STARTED This instance hasn't been configured.\r
cff298f4 414 @retval EFI_NOT_FOUND The asynchronous request or response token is not\r
415 found.\r
416 @retval EFI_UNSUPPORTED The implementation does not support this function.\r
417**/\r
418typedef\r
419EFI_STATUS\r
420(EFIAPI *EFI_HTTP_CANCEL)(\r
421 IN EFI_HTTP_PROTOCOL *This,\r
422 IN EFI_HTTP_TOKEN *Token\r
423 );\r
424\r
425/**\r
426 The Response() function queues an HTTP response to this HTTP instance, similar to\r
34d00172 427 Receive() function in the EFI TCP driver. When the HTTP Response is received successfully,\r
cff298f4 428 or if there is an error, Status in token will be updated and Event will be signaled.\r
429\r
430 The HTTP driver will queue a receive token to the underlying TCP instance. When data\r
431 is received in the underlying TCP instance, the data will be parsed and Token will\r
432 be populated with the response data. If the data received from the remote host\r
433 contains an incomplete or invalid HTTP header, the HTTP driver will continue waiting\r
434 (asynchronously) for more data to be sent from the remote host before signaling\r
435 Event in Token.\r
436\r
437 It is the responsibility of the caller to allocate a buffer for Body and specify the\r
438 size in BodyLength. If the remote host provides a response that contains a content\r
439 body, up to BodyLength bytes will be copied from the receive buffer into Body and\r
440 BodyLength will be updated with the amount of bytes received and copied to Body. This\r
441 allows the client to download a large file in chunks instead of into one contiguous\r
442 block of memory. Similar to HTTP request, if Body is not NULL and BodyLength is\r
443 non-zero and all other fields are NULL or 0, the HTTP driver will queue a receive\r
444 token to underlying TCP instance. If data arrives in the receive buffer, up to\r
445 BodyLength bytes of data will be copied to Body. The HTTP driver will then update\r
446 BodyLength with the amount of bytes received and copied to Body.\r
447\r
448 If the HTTP driver does not have an open underlying TCP connection with the host\r
449 specified in the response URL, Request() will return EFI_ACCESS_DENIED. This is\r
450 consistent with RFC 2616 recommendation that HTTP clients should attempt to maintain\r
451 an open TCP connection between client and host.\r
452\r
453 @param[in] This Pointer to EFI_HTTP_PROTOCOL instance.\r
454 @param[in] Token Pointer to storage containing HTTP response token.\r
455\r
456 @retval EFI_SUCCESS Allocation succeeded.\r
457 @retval EFI_NOT_STARTED This EFI HTTP Protocol instance has not been\r
458 initialized.\r
459 @retval EFI_INVALID_PARAMETER One or more of the following conditions is TRUE:\r
460 This is NULL.\r
34d00172 461 Token is NULL.\r
cff298f4 462 Token->Message->Headers is NULL.\r
463 Token->Message is NULL.\r
464 Token->Message->Body is not NULL,\r
465 Token->Message->BodyLength is non-zero, and\r
466 Token->Message->Data is NULL, but a previous call to\r
467 Response() has not been completed successfully.\r
34d00172 468 @retval EFI_OUT_OF_RESOURCES Could not allocate enough system resources.\r
cff298f4 469 @retval EFI_ACCESS_DENIED An open TCP connection is not present with the host\r
470 specified by response URL.\r
471**/\r
472typedef\r
473EFI_STATUS\r
474(EFIAPI *EFI_HTTP_RESPONSE) (\r
475 IN EFI_HTTP_PROTOCOL *This,\r
476 IN EFI_HTTP_TOKEN *Token\r
477 );\r
478\r
479/**\r
480 The Poll() function can be used by network drivers and applications to increase the\r
481 rate that data packets are moved between the communication devices and the transmit\r
482 and receive queues.\r
483\r
484 In some systems, the periodic timer event in the managed network driver may not poll\r
485 the underlying communications device fast enough to transmit and/or receive all data\r
486 packets without missing incoming packets or dropping outgoing packets. Drivers and\r
487 applications that are experiencing packet loss should try calling the Poll() function\r
488 more often.\r
489\r
490 @param[in] This Pointer to EFI_HTTP_PROTOCOL instance.\r
491\r
492 @retval EFI_SUCCESS Incoming or outgoing data was processed..\r
493 @retval EFI_DEVICE_ERROR An unexpected system or network error occurred\r
494 @retval EFI_INVALID_PARAMETER This is NULL.\r
495 @retval EFI_NOT_READY No incoming or outgoing data is processed.\r
34d00172 496 @retval EFI_NOT_STARTED This EFI HTTP Protocol instance has not been started.\r
cff298f4 497**/\r
498typedef\r
499EFI_STATUS\r
500(EFIAPI *EFI_HTTP_POLL) (\r
501 IN EFI_HTTP_PROTOCOL *This\r
502 );\r
503\r
504///\r
505/// The EFI HTTP protocol is designed to be used by EFI drivers and applications to\r
506/// create and transmit HTTP Requests, as well as handle HTTP responses that are\r
507/// returned by a remote host. This EFI protocol uses and relies on an underlying EFI\r
508/// TCP protocol.\r
509///\r
510struct _EFI_HTTP_PROTOCOL {\r
511 EFI_HTTP_GET_MODE_DATA GetModeData;\r
512 EFI_HTTP_CONFIGURE Configure;\r
513 EFI_HTTP_REQUEST Request;\r
514 EFI_HTTP_CANCEL Cancel;\r
515 EFI_HTTP_RESPONSE Response;\r
516 EFI_HTTP_POLL Poll;\r
517};\r
518\r
519extern EFI_GUID gEfiHttpServiceBindingProtocolGuid;\r
520extern EFI_GUID gEfiHttpProtocolGuid;\r
521\r
522#endif\r