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,
102 HTTP_STATUS_429_TOO_MANY_REQUESTS
104
108typedef struct {
129 UINT16 LocalPort;
131
135typedef struct {
143 UINT16 LocalPort;
145
149
150typedef struct {
165
166 union {
177 } AccessPoint;
179
183typedef struct {
194 CHAR16 *Url;
196
200typedef struct {
206
210typedef struct {
215 CHAR8 *FieldName;
222
226typedef struct {
230 union {
241 } Data;
262 VOID *Body;
264
268typedef struct {
292
314typedef
316(EFIAPI *EFI_HTTP_GET_MODE_DATA)(
317 IN EFI_HTTP_PROTOCOL *This,
318 OUT EFI_HTTP_CONFIG_DATA *HttpConfigData
319 );
320
352typedef
354(EFIAPI *EFI_HTTP_CONFIGURE)(
355 IN EFI_HTTP_PROTOCOL *This,
356 IN EFI_HTTP_CONFIG_DATA *HttpConfigData OPTIONAL
357 );
358
383typedef
385(EFIAPI *EFI_HTTP_REQUEST)(
386 IN EFI_HTTP_PROTOCOL *This,
387 IN EFI_HTTP_TOKEN *Token
388 );
389
411typedef
413(EFIAPI *EFI_HTTP_CANCEL)(
414 IN EFI_HTTP_PROTOCOL *This,
415 IN EFI_HTTP_TOKEN *Token
416 );
417
465typedef
467(EFIAPI *EFI_HTTP_RESPONSE)(
468 IN EFI_HTTP_PROTOCOL *This,
469 IN EFI_HTTP_TOKEN *Token
470 );
471
491typedef
493(EFIAPI *EFI_HTTP_POLL)(
495 );
496
504 EFI_HTTP_GET_MODE_DATA GetModeData;
505 EFI_HTTP_CONFIGURE Configure;
506 EFI_HTTP_REQUEST Request;
507 EFI_HTTP_CANCEL Cancel;
508 EFI_HTTP_RESPONSE Response;
509 EFI_HTTP_POLL Poll;
510};
511
512extern EFI_GUID gEfiHttpServiceBindingProtocolGuid;
513extern EFI_GUID gEfiHttpProtocolGuid;
514
515#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:316
EFI_HTTP_VERSION
Definition: Http.h:34
EFI_STATUS(EFIAPI * EFI_HTTP_POLL)(IN EFI_HTTP_PROTOCOL *This)
Definition: Http.h:493
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:467
EFI_STATUS(EFIAPI * EFI_HTTP_CONFIGURE)(IN EFI_HTTP_PROTOCOL *This, IN EFI_HTTP_CONFIG_DATA *HttpConfigData OPTIONAL)
Definition: Http.h:354
EFI_STATUS(EFIAPI * EFI_HTTP_REQUEST)(IN EFI_HTTP_PROTOCOL *This, IN EFI_HTTP_TOKEN *Token)
Definition: Http.h:385
EFI_STATUS(EFIAPI * EFI_HTTP_CANCEL)(IN EFI_HTTP_PROTOCOL *This, IN EFI_HTTP_TOKEN *Token)
Definition: Http.h:413
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:154
EFI_HTTPv6_ACCESS_POINT * IPv6Node
Definition: Http.h:176
EFI_HTTPv4_ACCESS_POINT * IPv4Node
Definition: Http.h:171
BOOLEAN LocalAddressIsIPv6
Definition: Http.h:164
UINT32 TimeOutMillisec
Definition: Http.h:158
CHAR8 * FieldValue
Definition: Http.h:220
CHAR8 * FieldName
Definition: Http.h:215
UINTN BodyLength
Definition: Http.h:257
EFI_HTTP_HEADER * Headers
Definition: Http.h:253
UINTN HeaderCount
Definition: Http.h:246
VOID * Body
Definition: Http.h:262
EFI_HTTP_RESPONSE_DATA * Response
Definition: Http.h:240
EFI_HTTP_REQUEST_DATA * Request
Definition: Http.h:235
CHAR16 * Url
Definition: Http.h:194
EFI_HTTP_METHOD Method
Definition: Http.h:187
EFI_HTTP_STATUS_CODE StatusCode
Definition: Http.h:204
EFI_EVENT Event
Definition: Http.h:274
EFI_HTTP_MESSAGE * Message
Definition: Http.h:290
EFI_STATUS Status
Definition: Http.h:286
EFI_IPv4_ADDRESS LocalSubnet
Definition: Http.h:124
EFI_IPv4_ADDRESS LocalAddress
Definition: Http.h:119
BOOLEAN UseDefaultAddress
Definition: Http.h:114
EFI_IPv6_ADDRESS LocalAddress
Definition: Http.h:139
Definition: Base.h:213