]> git.proxmox.com Git - mirror_edk2.git/blame - MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Driver.h
Update modules to show real dependencies on the BaseMemoryLib and MemoryAllocationLib
[mirror_edk2.git] / MdeModulePkg / Universal / Network / Mtftp4Dxe / Mtftp4Driver.h
CommitLineData
83cbd279 1/** @file\r
dab714aa 2 Mtftp drivers function header.\r
3 \r
4Copyright (c) 2006 - 2007, Intel Corporation<BR>\r
83cbd279 5All rights reserved. This program and the accompanying materials\r
6are licensed and made available under the terms and conditions of the BSD License\r
7which accompanies this distribution. The full text of the license may be found at\r
dab714aa 8http://opensource.org/licenses/bsd-license.php<BR>\r
83cbd279 9\r
10THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
11WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
12\r
83cbd279 13**/\r
14\r
15#ifndef __EFI_MTFTP4_DRIVER_H__\r
16#define __EFI_MTFTP4_DRIVER_H__\r
17\r
dab714aa 18#include <Uefi.h>\r
83cbd279 19\r
20#include <Protocol/ServiceBinding.h>\r
21\r
22#include <Library/NetLib.h>\r
23#include <Library/UefiLib.h>\r
dab714aa 24#include <Library/UefiDriverEntryPoint.h>\r
25\r
26extern EFI_COMPONENT_NAME_PROTOCOL gMtftp4ComponentName;\r
27extern EFI_COMPONENT_NAME2_PROTOCOL gMtftp4ComponentName2;\r
28extern EFI_DRIVER_BINDING_PROTOCOL gMtftp4DriverBinding;\r
83cbd279 29\r
dab714aa 30/**\r
31 Test whether MTFTP driver support this controller.\r
83cbd279 32\r
dab714aa 33 @param This The MTFTP driver binding instance\r
34 @param Controller The controller to test\r
35 @param RemainingDevicePath The remaining device path\r
36\r
37 @retval EFI_SUCCESS The controller has UDP service binding protocol\r
38 installed, MTFTP can support it.\r
39 @retval Others MTFTP can't support the controller.\r
40\r
41**/\r
83cbd279 42EFI_STATUS\r
dab714aa 43EFIAPI\r
83cbd279 44Mtftp4DriverBindingSupported (\r
dab714aa 45 IN EFI_DRIVER_BINDING_PROTOCOL *This,\r
46 IN EFI_HANDLE Controller,\r
47 IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath\r
83cbd279 48 );\r
49\r
dab714aa 50/**\r
51 Start the MTFTP driver on this controller. \r
52 \r
53 MTFTP driver will install a MTFTP SERVICE BINDING protocol on the supported\r
54 controller, which can be used to create/destroy MTFTP children.\r
55\r
56 @param This The MTFTP driver binding protocol.\r
57 @param Controller The controller to manage.\r
58 @param RemainingDevicePath Remaining device path.\r
59\r
60 @retval EFI_ALREADY_STARTED The MTFTP service binding protocol has been\r
61 started on the controller.\r
62 @retval EFI_SUCCESS The MTFTP service binding is installed on the\r
63 controller.\r
64\r
65**/\r
83cbd279 66EFI_STATUS\r
dab714aa 67EFIAPI\r
83cbd279 68Mtftp4DriverBindingStart (\r
69 IN EFI_DRIVER_BINDING_PROTOCOL *This,\r
70 IN EFI_HANDLE Controller,\r
71 IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath\r
72 );\r
73\r
dab714aa 74/**\r
75 Stop the MTFTP driver on controller. The controller is a UDP\r
76 child handle.\r
77\r
78 @param This The MTFTP driver binding protocol\r
79 @param Controller The controller to stop\r
80 @param NumberOfChildren The number of children\r
81 @param ChildHandleBuffer The array of the child handle.\r
82\r
83 @retval EFI_SUCCESS The driver is stopped on the controller.\r
84 @retval EFI_DEVICE_ERROR Failed to stop the driver on the controller.\r
85\r
86**/\r
83cbd279 87EFI_STATUS\r
dab714aa 88EFIAPI\r
83cbd279 89Mtftp4DriverBindingStop (\r
dab714aa 90 IN EFI_DRIVER_BINDING_PROTOCOL *This,\r
91 IN EFI_HANDLE Controller,\r
92 IN UINTN NumberOfChildren,\r
93 IN EFI_HANDLE *ChildHandleBuffer\r
83cbd279 94 );\r
95\r
dab714aa 96/**\r
97 Create a MTFTP child for the service binding instance, then\r
98 install the MTFTP protocol to the ChildHandle.\r
99\r
100 @param This The MTFTP service binding instance.\r
101 @param ChildHandle The Child handle to install the MTFTP protocol.\r
102\r
103 @retval EFI_INVALID_PARAMETER The parameter is invalid.\r
104 @retval EFI_OUT_OF_RESOURCES Failed to allocate resource for the new child.\r
105 @retval EFI_SUCCESS The child is successfully create.\r
106\r
107**/\r
83cbd279 108EFI_STATUS\r
dab714aa 109EFIAPI\r
83cbd279 110Mtftp4ServiceBindingCreateChild (\r
dab714aa 111 IN EFI_SERVICE_BINDING_PROTOCOL *This,\r
112 IN EFI_HANDLE *ChildHandle\r
83cbd279 113 );\r
114\r
dab714aa 115/**\r
116 Destory one of the service binding's child.\r
117\r
118 @param This The service binding instance\r
119 @param ChildHandle The child handle to destory\r
120\r
121 @retval EFI_INVALID_PARAMETER The parameter is invaid.\r
122 @retval EFI_UNSUPPORTED The child may have already been destoried.\r
123 @retval EFI_SUCCESS The child is destoried and removed from the\r
124 parent's child list.\r
125\r
126**/\r
83cbd279 127EFI_STATUS\r
dab714aa 128EFIAPI\r
83cbd279 129Mtftp4ServiceBindingDestroyChild (\r
130 IN EFI_SERVICE_BINDING_PROTOCOL *This,\r
131 IN EFI_HANDLE ChildHandle\r
132 );\r
133\r
dab714aa 134\r
83cbd279 135\r
136#endif\r