2 This file defines the EDKII HTTP Callback Protocol interface.
4 Copyright (c) 2021, Intel Corporation. All rights reserved.<BR>
5 SPDX-License-Identifier: BSD-2-Clause-Patent
8 #ifndef EDKII_HTTP_CALLBACK_H_
9 #define EDKII_HTTP_CALLBACK_H_
11 #define EDKII_HTTP_CALLBACK_PROTOCOL_GUID \
13 0x611114f1, 0xa37b, 0x4468, {0xa4, 0x36, 0x5b, 0xdd, 0xa1, 0x6a, 0xa2, 0x40} \
16 typedef struct _EDKII_HTTP_CALLBACK_PROTOCOL EDKII_HTTP_CALLBACK_PROTOCOL
;
19 /// EDKII_HTTP_CALLBACK_EVENT
23 /// The Status of DNS Event to retrieve the host address.
25 /// EFI_SUCCESS Operation succeeded.
26 /// EFI_OUT_OF_RESOURCES Failed to allocate needed resources.
27 /// EFI_DEVICE_ERROR An unexpected network error occurred.
28 /// Others Other errors as indicated.
33 /// The Status of Event to initiate a nonblocking TCP connection request.
35 /// EFI_SUCCESS The connection request is successfully initiated.
36 /// EFI_NOT_STARTED This EFI TCP Protocol instance has not been configured.
37 /// EFI_DEVICE_ERROR An unexpected system or network error occurred.
38 /// Others Other errors as indicated.
43 /// The Status of Event to connect one TLS session by finishing the TLS handshake process.
45 /// EFI_SUCCESS The TLS session is established.
46 /// EFI_OUT_OF_RESOURCES Can't allocate memory resources.
47 /// EFI_ABORTED TLS session state is incorrect.
48 /// Others Other error as indicated.
50 HttpEventTlsConnectSession
,
53 /// The Status of Event to initialize Http session
55 /// EFI_SUCCESS The initialization of session is done.
56 /// Others Other error as indicated.
59 } EDKII_HTTP_CALLBACK_EVENT
;
62 Callback function that is invoked when HTTP event occurs.
64 @param[in] This Pointer to the EDKII_HTTP_CALLBACK_PROTOCOL instance.
65 @param[in] Event The event that occurs in the current state.
66 @param[in] EventStatus The Status of Event, EFI_SUCCESS or other errors.
70 (EFIAPI
*EDKII_HTTP_CALLBACK
)(
71 IN EDKII_HTTP_CALLBACK_PROTOCOL
*This
,
72 IN EDKII_HTTP_CALLBACK_EVENT Event
,
73 IN EFI_STATUS EventStatus
77 /// EFI HTTP Callback Protocol is invoked when HTTP event occurs.
79 struct _EDKII_HTTP_CALLBACK_PROTOCOL
{
80 EDKII_HTTP_CALLBACK Callback
;
83 extern EFI_GUID gEdkiiHttpCallbackProtocolGuid
;
85 #endif /* EDKII_HTTP_CALLBACK_H_ */