]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Driver.h
MdeModulePkg: Clean up source files
[mirror_edk2.git] / MdeModulePkg / Universal / Network / Mtftp4Dxe / Mtftp4Driver.h
index b6eba0cea6ed784b0dcd89950d68d3b581a8969b..cd7675ec8196056bac10e15c9cacdc6d664ca525 100644 (file)
 /** @file\r
+  Mtftp drivers function header.\r
 \r
-Copyright (c) 2006 - 2007, Intel Corporation\r
-All rights reserved. This program and the accompanying materials\r
+Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>\r
+This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
 which accompanies this distribution.  The full text of the license may be found at\r
-http://opensource.org/licenses/bsd-license.php\r
+http://opensource.org/licenses/bsd-license.php<BR>\r
 \r
 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \r
-Module Name:\r
-\r
-  Mtftp4Driver.h\r
-\r
-Abstract:\r
-\r
-\r
 **/\r
 \r
 #ifndef __EFI_MTFTP4_DRIVER_H__\r
 #define __EFI_MTFTP4_DRIVER_H__\r
 \r
-#include <PiDxe.h>\r
+#include <Uefi.h>\r
 \r
 #include <Protocol/ServiceBinding.h>\r
 \r
 #include <Library/NetLib.h>\r
 #include <Library/UefiLib.h>\r
+#include <Library/UefiDriverEntryPoint.h>\r
+\r
+extern EFI_COMPONENT_NAME_PROTOCOL   gMtftp4ComponentName;\r
+extern EFI_COMPONENT_NAME2_PROTOCOL  gMtftp4ComponentName2;\r
+extern EFI_DRIVER_BINDING_PROTOCOL   gMtftp4DriverBinding;\r
+extern EFI_UNICODE_STRING_TABLE      *gMtftp4ControllerNameTable;\r
+\r
+/**\r
+  Test whether MTFTP driver support this controller.\r
 \r
+  @param  This                   The MTFTP driver binding instance\r
+  @param  Controller             The controller to test\r
+  @param  RemainingDevicePath    The remaining device path\r
 \r
+  @retval EFI_SUCCESS            The controller has UDP service binding protocol\r
+                                 installed, MTFTP can support it.\r
+  @retval Others                 MTFTP can't support the controller.\r
+\r
+**/\r
 EFI_STATUS\r
+EFIAPI\r
 Mtftp4DriverBindingSupported (\r
-  IN EFI_DRIVER_BINDING_PROTOCOL  *This,\r
-  IN EFI_HANDLE                   Controller,\r
-  IN EFI_DEVICE_PATH_PROTOCOL     *RemainingDevicePath\r
+  IN EFI_DRIVER_BINDING_PROTOCOL    *This,\r
+  IN EFI_HANDLE                     Controller,\r
+  IN EFI_DEVICE_PATH_PROTOCOL       *RemainingDevicePath\r
   );\r
 \r
+/**\r
+  Start the MTFTP driver on this controller.\r
+\r
+  MTFTP driver will install a MTFTP SERVICE BINDING protocol on the supported\r
+  controller, which can be used to create/destroy MTFTP children.\r
+\r
+  @param  This                   The MTFTP driver binding protocol.\r
+  @param  Controller             The controller to manage.\r
+  @param  RemainingDevicePath    Remaining device path.\r
+\r
+  @retval EFI_ALREADY_STARTED    The MTFTP service binding protocol has been\r
+                                 started  on the controller.\r
+  @retval EFI_SUCCESS            The MTFTP service binding is installed on the\r
+                                 controller.\r
+\r
+**/\r
 EFI_STATUS\r
+EFIAPI\r
 Mtftp4DriverBindingStart (\r
   IN EFI_DRIVER_BINDING_PROTOCOL  *This,\r
   IN EFI_HANDLE                   Controller,\r
   IN EFI_DEVICE_PATH_PROTOCOL     *RemainingDevicePath\r
   );\r
 \r
+/**\r
+  Stop the MTFTP driver on controller. The controller is a UDP\r
+  child handle.\r
+\r
+  @param  This                   The MTFTP driver binding protocol\r
+  @param  Controller             The controller to stop\r
+  @param  NumberOfChildren       The number of children\r
+  @param  ChildHandleBuffer      The array of the child handle.\r
+\r
+  @retval EFI_SUCCESS            The driver is stopped on the controller.\r
+  @retval EFI_DEVICE_ERROR       Failed to stop the driver on the controller.\r
+\r
+**/\r
 EFI_STATUS\r
+EFIAPI\r
 Mtftp4DriverBindingStop (\r
-  IN  EFI_DRIVER_BINDING_PROTOCOL *This,\r
-  IN  EFI_HANDLE                  Controller,\r
-  IN  UINTN                       NumberOfChildren,\r
-  IN  EFI_HANDLE                  *ChildHandleBuffer\r
+  IN EFI_DRIVER_BINDING_PROTOCOL *This,\r
+  IN EFI_HANDLE                  Controller,\r
+  IN UINTN                       NumberOfChildren,\r
+  IN EFI_HANDLE                  *ChildHandleBuffer\r
   );\r
 \r
+/**\r
+  Create a MTFTP child for the service binding instance, then\r
+  install the MTFTP protocol to the ChildHandle.\r
+\r
+  @param  This                   The MTFTP service binding instance.\r
+  @param  ChildHandle            The Child handle to install the MTFTP protocol.\r
+\r
+  @retval EFI_INVALID_PARAMETER  The parameter is invalid.\r
+  @retval EFI_OUT_OF_RESOURCES   Failed to allocate resource for the new child.\r
+  @retval EFI_SUCCESS            The child is successfully create.\r
+\r
+**/\r
 EFI_STATUS\r
+EFIAPI\r
 Mtftp4ServiceBindingCreateChild (\r
-  IN EFI_SERVICE_BINDING_PROTOCOL *This,\r
-  IN OUT EFI_HANDLE               *ChildHandle\r
+  IN EFI_SERVICE_BINDING_PROTOCOL  *This,\r
+  IN EFI_HANDLE                *ChildHandle\r
   );\r
 \r
+/**\r
+  Destroy one of the service binding's child.\r
+\r
+  @param  This                   The service binding instance\r
+  @param  ChildHandle            The child handle to destroy\r
+\r
+  @retval EFI_INVALID_PARAMETER  The parameter is invaid.\r
+  @retval EFI_UNSUPPORTED        The child may have already been destroyed.\r
+  @retval EFI_SUCCESS            The child is destroyed and removed from the\r
+                                 parent's child list.\r
+\r
+**/\r
 EFI_STATUS\r
+EFIAPI\r
 Mtftp4ServiceBindingDestroyChild (\r
   IN EFI_SERVICE_BINDING_PROTOCOL *This,\r
   IN EFI_HANDLE                   ChildHandle\r
   );\r
 \r
-extern EFI_COMPONENT_NAME_PROTOCOL   gMtftp4ComponentName;\r
-extern EFI_COMPONENT_NAME2_PROTOCOL  gMtftp4ComponentName2;\r
-extern EFI_DRIVER_BINDING_PROTOCOL   gMtftp4DriverBinding;\r
+\r
 \r
 #endif\r