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