TianoCore EDK2 master
Loading...
Searching...
No Matches
Http.h
Go to the documentation of this file.
1
16#ifndef __EFI_HTTP_PROTOCOL_H__
17#define __EFI_HTTP_PROTOCOL_H__
18
19#define EFI_HTTP_SERVICE_BINDING_PROTOCOL_GUID \
20 { \
21 0xbdc8e6af, 0xd9bc, 0x4379, {0xa7, 0x2a, 0xe0, 0xc4, 0xe7, 0x5d, 0xae, 0x1c } \
22 }
23
24#define EFI_HTTP_PROTOCOL_GUID \
25 { \
26 0x7a59b29b, 0x910b, 0x4171, {0x82, 0x42, 0xa8, 0x5a, 0x0d, 0xf2, 0x5b, 0x5b } \
27 }
28
30
34typedef enum {
35 HttpVersion10,
36 HttpVersion11,
37 HttpVersionUnsupported
39
43typedef enum {
44 HttpMethodGet,
45 HttpMethodPost,
46 HttpMethodPatch,
47 HttpMethodOptions,
48 HttpMethodConnect,
49 HttpMethodHead,
50 HttpMethodPut,
51 HttpMethodDelete,
52 HttpMethodTrace,
53 HttpMethodMax
55
59typedef enum {
60 HTTP_STATUS_UNSUPPORTED_STATUS = 0,
61 HTTP_STATUS_100_CONTINUE,
62 HTTP_STATUS_101_SWITCHING_PROTOCOLS,
63 HTTP_STATUS_200_OK,
64 HTTP_STATUS_201_CREATED,
65 HTTP_STATUS_202_ACCEPTED,
66 HTTP_STATUS_203_NON_AUTHORITATIVE_INFORMATION,
67 HTTP_STATUS_204_NO_CONTENT,
68 HTTP_STATUS_205_RESET_CONTENT,
69 HTTP_STATUS_206_PARTIAL_CONTENT,
70 HTTP_STATUS_300_MULTIPLE_CHOICES,
71 HTTP_STATUS_301_MOVED_PERMANENTLY,
72 HTTP_STATUS_302_FOUND,
73 HTTP_STATUS_303_SEE_OTHER,
74 HTTP_STATUS_304_NOT_MODIFIED,
75 HTTP_STATUS_305_USE_PROXY,
76 HTTP_STATUS_307_TEMPORARY_REDIRECT,
77 HTTP_STATUS_400_BAD_REQUEST,
78 HTTP_STATUS_401_UNAUTHORIZED,
79 HTTP_STATUS_402_PAYMENT_REQUIRED,
80 HTTP_STATUS_403_FORBIDDEN,
81 HTTP_STATUS_404_NOT_FOUND,
82 HTTP_STATUS_405_METHOD_NOT_ALLOWED,
83 HTTP_STATUS_406_NOT_ACCEPTABLE,
84 HTTP_STATUS_407_PROXY_AUTHENTICATION_REQUIRED,
85 HTTP_STATUS_408_REQUEST_TIME_OUT,
86 HTTP_STATUS_409_CONFLICT,
87 HTTP_STATUS_410_GONE,
88 HTTP_STATUS_411_LENGTH_REQUIRED,
89 HTTP_STATUS_412_PRECONDITION_FAILED,
90 HTTP_STATUS_413_REQUEST_ENTITY_TOO_LARGE,
91 HTTP_STATUS_414_REQUEST_URI_TOO_LARGE,
92 HTTP_STATUS_415_UNSUPPORTED_MEDIA_TYPE,
93 HTTP_STATUS_416_REQUESTED_RANGE_NOT_SATISFIED,
94 HTTP_STATUS_417_EXPECTATION_FAILED,
95 HTTP_STATUS_500_INTERNAL_SERVER_ERROR,
96 HTTP_STATUS_501_NOT_IMPLEMENTED,
97 HTTP_STATUS_502_BAD_GATEWAY,
98 HTTP_STATUS_503_SERVICE_UNAVAILABLE,
99 HTTP_STATUS_504_GATEWAY_TIME_OUT,
100 HTTP_STATUS_505_HTTP_VERSION_NOT_SUPPORTED,
101 HTTP_STATUS_308_PERMANENT_REDIRECT
103
107typedef struct {
128 UINT16 LocalPort;
130
134typedef struct {
142 UINT16 LocalPort;
144
148
149typedef struct {
164
165 union {
176 } AccessPoint;
178
182typedef struct {
193 CHAR16 *Url;
195
199typedef struct {
205
209typedef struct {
214 CHAR8 *FieldName;
221
225typedef struct {
229 union {
240 } Data;
261 VOID *Body;
263
267typedef struct {
291
313typedef
315(EFIAPI *EFI_HTTP_GET_MODE_DATA)(
316 IN EFI_HTTP_PROTOCOL *This,
317 OUT EFI_HTTP_CONFIG_DATA *HttpConfigData
318 );
319
351typedef
353(EFIAPI *EFI_HTTP_CONFIGURE)(
354 IN EFI_HTTP_PROTOCOL *This,
355 IN EFI_HTTP_CONFIG_DATA *HttpConfigData OPTIONAL
356 );
357
382typedef
384(EFIAPI *EFI_HTTP_REQUEST)(
385 IN EFI_HTTP_PROTOCOL *This,
386 IN EFI_HTTP_TOKEN *Token
387 );
388
410typedef
412(EFIAPI *EFI_HTTP_CANCEL)(
413 IN EFI_HTTP_PROTOCOL *This,
414 IN EFI_HTTP_TOKEN *Token
415 );
416
464typedef
466(EFIAPI *EFI_HTTP_RESPONSE)(
467 IN EFI_HTTP_PROTOCOL *This,
468 IN EFI_HTTP_TOKEN *Token
469 );
470
490typedef
492(EFIAPI *EFI_HTTP_POLL)(
494 );
495
503 EFI_HTTP_GET_MODE_DATA GetModeData;
504 EFI_HTTP_CONFIGURE Configure;
505 EFI_HTTP_REQUEST Request;
506 EFI_HTTP_CANCEL Cancel;
507 EFI_HTTP_RESPONSE Response;
508 EFI_HTTP_POLL Poll;
509};
510
511extern EFI_GUID gEfiHttpServiceBindingProtocolGuid;
512extern EFI_GUID gEfiHttpProtocolGuid;
513
514#endif
UINT64 UINTN
#define OPTIONAL
Definition: Base.h:290
#define IN
Definition: Base.h:279
#define OUT
Definition: Base.h:284
EFI_STATUS(EFIAPI * EFI_HTTP_GET_MODE_DATA)(IN EFI_HTTP_PROTOCOL *This, OUT EFI_HTTP_CONFIG_DATA *HttpConfigData)
Definition: Http.h:315
EFI_HTTP_VERSION
Definition: Http.h:34
EFI_STATUS(EFIAPI * EFI_HTTP_POLL)(IN EFI_HTTP_PROTOCOL *This)
Definition: Http.h:492
EFI_HTTP_METHOD
Definition: Http.h:43
EFI_STATUS(EFIAPI * EFI_HTTP_RESPONSE)(IN EFI_HTTP_PROTOCOL *This, IN EFI_HTTP_TOKEN *Token)
Definition: Http.h:466
EFI_STATUS(EFIAPI * EFI_HTTP_CONFIGURE)(IN EFI_HTTP_PROTOCOL *This, IN EFI_HTTP_CONFIG_DATA *HttpConfigData OPTIONAL)
Definition: Http.h:353
EFI_STATUS(EFIAPI * EFI_HTTP_REQUEST)(IN EFI_HTTP_PROTOCOL *This, IN EFI_HTTP_TOKEN *Token)
Definition: Http.h:384
EFI_STATUS(EFIAPI * EFI_HTTP_CANCEL)(IN EFI_HTTP_PROTOCOL *This, IN EFI_HTTP_TOKEN *Token)
Definition: Http.h:412
EFI_HTTP_STATUS_CODE
Definition: Http.h:59
RETURN_STATUS EFI_STATUS
Definition: UefiBaseType.h:29
VOID * EFI_EVENT
Definition: UefiBaseType.h:37
EFI_HTTP_VERSION HttpVersion
Definition: Http.h:153
EFI_HTTPv6_ACCESS_POINT * IPv6Node
Definition: Http.h:175
EFI_HTTPv4_ACCESS_POINT * IPv4Node
Definition: Http.h:170
BOOLEAN LocalAddressIsIPv6
Definition: Http.h:163
UINT32 TimeOutMillisec
Definition: Http.h:157
CHAR8 * FieldValue
Definition: Http.h:219
CHAR8 * FieldName
Definition: Http.h:214
UINTN BodyLength
Definition: Http.h:256
EFI_HTTP_HEADER * Headers
Definition: Http.h:252
UINTN HeaderCount
Definition: Http.h:245
VOID * Body
Definition: Http.h:261
EFI_HTTP_RESPONSE_DATA * Response
Definition: Http.h:239
EFI_HTTP_REQUEST_DATA * Request
Definition: Http.h:234
CHAR16 * Url
Definition: Http.h:193
EFI_HTTP_METHOD Method
Definition: Http.h:186
EFI_HTTP_STATUS_CODE StatusCode
Definition: Http.h:203
EFI_EVENT Event
Definition: Http.h:273
EFI_HTTP_MESSAGE * Message
Definition: Http.h:289
EFI_STATUS Status
Definition: Http.h:285
EFI_IPv4_ADDRESS LocalSubnet
Definition: Http.h:123
EFI_IPv4_ADDRESS LocalAddress
Definition: Http.h:118
BOOLEAN UseDefaultAddress
Definition: Http.h:113
EFI_IPv6_ADDRESS LocalAddress
Definition: Http.h:138
Definition: Base.h:213