]> git.proxmox.com Git - mirror_edk2.git/blame - MdePkg/Include/Protocol/HttpBootCallback.h
UefiCpuPkg: Move AsmRelocateApLoopStart from Mpfuncs.nasm to AmdSev.nasm
[mirror_edk2.git] / MdePkg / Include / Protocol / HttpBootCallback.h
CommitLineData
a77d109f
FS
1/** @file\r
2 This file defines the EFI HTTP Boot Callback Protocol interface.\r
3\r
9095d37b 4 Copyright (c) 2017 - 2018, Intel Corporation. All rights reserved.<BR>\r
9344f092 5 SPDX-License-Identifier: BSD-2-Clause-Patent\r
a77d109f
FS
6\r
7 @par Revision Reference:\r
8 This Protocol is introduced in UEFI Specification 2.7\r
9\r
10**/\r
11\r
12#ifndef __EFI_HTTP_BOOT_CALLBACK_H__\r
13#define __EFI_HTTP_BOOT_CALLBACK_H__\r
14\r
15#define EFI_HTTP_BOOT_CALLBACK_PROTOCOL_GUID \\r
16 { \\r
17 0xba23b311, 0x343d, 0x11e6, {0x91, 0x85, 0x58, 0x20, 0xb1, 0xd6, 0x52, 0x99} \\r
18 }\r
19\r
2f88bd3a 20typedef struct _EFI_HTTP_BOOT_CALLBACK_PROTOCOL EFI_HTTP_BOOT_CALLBACK_PROTOCOL;\r
a77d109f
FS
21\r
22///\r
23/// EFI_HTTP_BOOT_CALLBACK_DATA_TYPE\r
24///\r
25typedef enum {\r
26 ///\r
27 /// Data points to a DHCP4 packet which is about to transmit or has received.\r
28 ///\r
29 HttpBootDhcp4,\r
30 ///\r
31 /// Data points to a DHCP6 packet which is about to be transmit or has received.\r
32 ///\r
33 HttpBootDhcp6,\r
34 ///\r
671b0cea 35 /// Data points to an EFI_HTTP_MESSAGE structure, which contains a HTTP request message\r
a77d109f
FS
36 /// to be transmitted.\r
37 ///\r
38 HttpBootHttpRequest,\r
39 ///\r
9095d37b 40 /// Data points to an EFI_HTTP_MESSAGE structure, which contians a received HTTP\r
a77d109f
FS
41 /// response message.\r
42 ///\r
43 HttpBootHttpResponse,\r
44 ///\r
45 /// Part of the entity body has been received from the HTTP server. Data points to the\r
46 /// buffer of the entity body data.\r
47 ///\r
48 HttpBootHttpEntityBody,\r
671b0cea
SK
49 ///\r
50 /// Data points to the authentication information to provide to the HTTP server.\r
51 ///\r
52 HttpBootHttpAuthInfo,\r
a77d109f
FS
53 HttpBootTypeMax\r
54} EFI_HTTP_BOOT_CALLBACK_DATA_TYPE;\r
55\r
56/**\r
57 Callback function that is invoked when the HTTP Boot driver is about to transmit or has received a\r
58 packet.\r
59\r
60 This function is invoked when the HTTP Boot driver is about to transmit or has received packet.\r
61 Parameters DataType and Received specify the type of event and the format of the buffer pointed\r
62 to by Data. Due to the polling nature of UEFI device drivers, this callback function should not\r
63 execute for more than 5 ms.\r
64 The returned status code determines the behavior of the HTTP Boot driver.\r
65\r
66 @param[in] This Pointer to the EFI_HTTP_BOOT_CALLBACK_PROTOCOL instance.\r
67 @param[in] DataType The event that occurs in the current state.\r
68 @param[in] Received TRUE if the callback is being invoked due to a receive event.\r
69 FALSE if the callback is being invoked due to a transmit event.\r
70 @param[in] DataLength The length in bytes of the buffer pointed to by Data.\r
71 @param[in] Data A pointer to the buffer of data, the data type is specified by\r
72 DataType.\r
9095d37b 73\r
a77d109f
FS
74 @retval EFI_SUCCESS Tells the HTTP Boot driver to continue the HTTP Boot process.\r
75 @retval EFI_ABORTED Tells the HTTP Boot driver to abort the current HTTP Boot process.\r
76**/\r
77typedef\r
78EFI_STATUS\r
2f88bd3a 79(EFIAPI *EFI_HTTP_BOOT_CALLBACK)(\r
a77d109f
FS
80 IN EFI_HTTP_BOOT_CALLBACK_PROTOCOL *This,\r
81 IN EFI_HTTP_BOOT_CALLBACK_DATA_TYPE DataType,\r
82 IN BOOLEAN Received,\r
83 IN UINT32 DataLength,\r
84 IN VOID *Data OPTIONAL\r
2f88bd3a 85 );\r
a77d109f
FS
86\r
87///\r
9095d37b 88/// EFI HTTP Boot Callback Protocol is invoked when the HTTP Boot driver is about to transmit or\r
a77d109f
FS
89/// has received a packet. The EFI HTTP Boot Callback Protocol must be installed on the same handle\r
90/// as the Load File Protocol for the HTTP Boot.\r
91///\r
92struct _EFI_HTTP_BOOT_CALLBACK_PROTOCOL {\r
2f88bd3a 93 EFI_HTTP_BOOT_CALLBACK Callback;\r
a77d109f
FS
94};\r
95\r
2f88bd3a 96extern EFI_GUID gEfiHttpBootCallbackProtocolGuid;\r
a77d109f
FS
97\r
98#endif\r