TianoCore EDK2 master
Loading...
Searching...
No Matches
RestEx.h
Go to the documentation of this file.
1
18#ifndef EFI_REST_EX_PROTOCOL_H_
19#define EFI_REST_EX_PROTOCOL_H_
20
21#include <Protocol/Http.h>
22
23//
24// GUID definitions
25//
26#define EFI_REST_EX_SERVICE_BINDING_PROTOCOL_GUID \
27 { \
28 0x456bbe01, 0x99d0, 0x45ea, {0xbb, 0x5f, 0x16, 0xd8, 0x4b, 0xed, 0xc5, 0x59 } \
29 }
30
31#define EFI_REST_EX_PROTOCOL_GUID \
32 { \
33 0x55648b91, 0xe7d, 0x40a3, {0xa9, 0xb3, 0xa8, 0x15, 0xd7, 0xea, 0xdf, 0x97 } \
34 }
35
37
38// *******************************************************
39// EFI_REST_EX_SERVICE_INFO_VER
40// *******************************************************
41typedef struct {
42 UINT8 Major;
43 UINT8 Minor;
45
46// *******************************************************
47// EFI_REST_EX_SERVICE_INFO_HEADER
48// *******************************************************
49typedef struct {
50 UINT32 Length;
51 EFI_REST_EX_SERVICE_INFO_VER RestServiceInfoVer;
53
54// *******************************************************
55// EFI_REST_EX_SERVICE_TYPE
56// *******************************************************
57typedef enum {
58 EfiRestExServiceUnspecific = 1,
59 EfiRestExServiceRedfish,
60 EfiRestExServiceOdata,
61 EfiRestExServiceVendorSpecific = 0xff,
62 EfiRestExServiceTypeMax
63} EFI_REST_EX_SERVICE_TYPE;
64
65// *******************************************************
66// EFI_REST_EX_SERVICE_ACCESS_MODE
67// *******************************************************
68typedef enum {
69 EfiRestExServiceInBandAccess = 1,
70 EfiRestExServiceOutOfBandAccess = 2,
71 EfiRestExServiceModeMax
72} EFI_REST_EX_SERVICE_ACCESS_MODE;
73
74// *******************************************************
75// EFI_REST_EX_CONFIG_TYPE
76// *******************************************************
77typedef enum {
78 EfiRestExConfigHttp,
79 EfiRestExConfigUnspecific,
80 EfiRestExConfigTypeMax
81} EFI_REST_EX_CONFIG_TYPE;
82
83// *******************************************************
84// EFI_REST_EX_SERVICE_INFO v1.0
85// *******************************************************
86typedef struct {
87 EFI_REST_EX_SERVICE_INFO_HEADER EfiRestExServiceInfoHeader;
88 EFI_REST_EX_SERVICE_TYPE RestServiceType;
89 EFI_REST_EX_SERVICE_ACCESS_MODE RestServiceAccessMode;
90 EFI_GUID VendorRestServiceName;
91 UINT32 VendorSpecificDataLength;
92 UINT8 *VendorSpecifcData;
93 EFI_REST_EX_CONFIG_TYPE RestExConfigType;
94 UINT8 RestExConfigDataLength;
96
97// *******************************************************
98// EFI_REST_EX_SERVICE_INFO
99// *******************************************************
100typedef union {
101 EFI_REST_EX_SERVICE_INFO_HEADER EfiRestExServiceInfoHeader;
102 EFI_REST_EX_SERVICE_INFO_V_1_0 EfiRestExServiceInfoV10;
104
105// *******************************************************
106// EFI_REST_EX_HTTP_CONFIG_DATA
107// *******************************************************
108typedef struct {
109 EFI_HTTP_CONFIG_DATA HttpConfigData;
110 UINT32 SendReceiveTimeout;
112
113// *******************************************************
114// EFI_REST_EX_CONFIG_DATA
115// *******************************************************
116typedef UINT8 *EFI_REST_EX_CONFIG_DATA;
117
118// *******************************************************
119// EFI_REST_EX_TOKEN
120// *******************************************************
121typedef struct {
122 EFI_EVENT Event;
123 EFI_STATUS Status;
124 EFI_HTTP_MESSAGE *ResponseMessage;
126
147typedef
149(EFIAPI *EFI_REST_SEND_RECEIVE)(
151 IN EFI_HTTP_MESSAGE *RequestMessage,
152 OUT EFI_HTTP_MESSAGE *ResponseMessage
153 );
154
177typedef
179(EFIAPI *EFI_REST_GET_TIME)(
181 OUT EFI_TIME *Time
182 );
183
215typedef
219 OUT EFI_REST_EX_SERVICE_INFO **RestExServiceInfo
220 );
221
248typedef
252 OUT EFI_REST_EX_CONFIG_DATA *RestExConfigData
253 );
254
286typedef
288(EFIAPI *EFI_REST_EX_CONFIGURE)(
290 IN EFI_REST_EX_CONFIG_DATA RestExConfigData
291 );
292
324typedef
328 IN EFI_HTTP_MESSAGE *RequestMessage OPTIONAL,
329 IN EFI_REST_EX_TOKEN *RestExToken,
330 IN UINTN *TimeOutInMilliSeconds OPTIONAL
331 );
332
359typedef
363 IN EFI_HTTP_MESSAGE *RequestMessage OPTIONAL,
364 IN EFI_REST_EX_TOKEN *RestExToken
365 );
366
379 EFI_REST_SEND_RECEIVE SendReceive;
380 EFI_REST_GET_TIME GetServiceTime;
381 EFI_REST_EX_GET_SERVICE GetService;
382 EFI_REST_EX_GET_MODE_DATA GetModeData;
383 EFI_REST_EX_CONFIGURE Configure;
384 EFI_REST_EX_ASYNC_SEND_RECEIVE AyncSendReceive;
385 EFI_REST_EX_EVENT_SERVICE EventService;
386};
387
388extern EFI_GUID gEfiRestExServiceBindingProtocolGuid;
389extern EFI_GUID gEfiRestExProtocolGuid;
390
391#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_REST_SEND_RECEIVE)(IN EFI_REST_EX_PROTOCOL *This, IN EFI_HTTP_MESSAGE *RequestMessage, OUT EFI_HTTP_MESSAGE *ResponseMessage)
Definition: RestEx.h:149
EFI_STATUS(EFIAPI * EFI_REST_EX_EVENT_SERVICE)(IN EFI_REST_EX_PROTOCOL *This, IN EFI_HTTP_MESSAGE *RequestMessage OPTIONAL, IN EFI_REST_EX_TOKEN *RestExToken)
Definition: RestEx.h:361
EFI_STATUS(EFIAPI * EFI_REST_EX_GET_SERVICE)(IN EFI_REST_EX_PROTOCOL *This, OUT EFI_REST_EX_SERVICE_INFO **RestExServiceInfo)
Definition: RestEx.h:217
EFI_STATUS(EFIAPI * EFI_REST_EX_ASYNC_SEND_RECEIVE)(IN EFI_REST_EX_PROTOCOL *This, IN EFI_HTTP_MESSAGE *RequestMessage OPTIONAL, IN EFI_REST_EX_TOKEN *RestExToken, IN UINTN *TimeOutInMilliSeconds OPTIONAL)
Definition: RestEx.h:326
EFI_STATUS(EFIAPI * EFI_REST_GET_TIME)(IN EFI_REST_EX_PROTOCOL *This, OUT EFI_TIME *Time)
Definition: RestEx.h:179
EFI_STATUS(EFIAPI * EFI_REST_EX_GET_MODE_DATA)(IN EFI_REST_EX_PROTOCOL *This, OUT EFI_REST_EX_CONFIG_DATA *RestExConfigData)
Definition: RestEx.h:250
EFI_STATUS(EFIAPI * EFI_REST_EX_CONFIGURE)(IN EFI_REST_EX_PROTOCOL *This, IN EFI_REST_EX_CONFIG_DATA RestExConfigData)
Definition: RestEx.h:288
RETURN_STATUS EFI_STATUS
Definition: UefiBaseType.h:29
VOID * EFI_EVENT
Definition: UefiBaseType.h:37
Definition: Base.h:213