Mtftp6Driver.h 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146
  1. /** @file
  2. Driver Binding functions and Service Binding functions
  3. declaration for Mtftp6 Driver.
  4. Copyright (c) 2009 - 2012, Intel Corporation. All rights reserved.<BR>
  5. SPDX-License-Identifier: BSD-2-Clause-Patent
  6. **/
  7. #ifndef __EFI_MTFTP6_DRIVER_H__
  8. #define __EFI_MTFTP6_DRIVER_H__
  9. #include <Protocol/ServiceBinding.h>
  10. extern EFI_COMPONENT_NAME_PROTOCOL gMtftp6ComponentName;
  11. extern EFI_COMPONENT_NAME2_PROTOCOL gMtftp6ComponentName2;
  12. extern EFI_UNICODE_STRING_TABLE *gMtftp6ControllerNameTable;
  13. /**
  14. Test to see if this driver supports Controller. This service
  15. is called by the EFI boot service ConnectController(). In
  16. order to make drivers as small as possible, there are a few calling
  17. restrictions for this service. ConnectController() must
  18. follow these calling restrictions. If any other agent wishes to call
  19. Supported(), it must also follow these calling restrictions.
  20. @param[in] This Protocol instance pointer.
  21. @param[in] Controller Handle of device to test.
  22. @param[in] RemainingDevicePath Optional parameter use to pick a specific child
  23. device to start.
  24. @retval EFI_SUCCESS This driver supports this device.
  25. @retval Others This driver does not support this device.
  26. **/
  27. EFI_STATUS
  28. EFIAPI
  29. Mtftp6DriverBindingSupported (
  30. IN EFI_DRIVER_BINDING_PROTOCOL *This,
  31. IN EFI_HANDLE Controller,
  32. IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath
  33. );
  34. /**
  35. Start this driver on Controller. This service is called by the
  36. EFI boot service ConnectController(). In order to make
  37. drivers as small as possible, there are calling restrictions for
  38. this service. ConnectController() must follow these
  39. calling restrictions. If any other agent wishes to call Start() it
  40. must also follow these calling restrictions.
  41. @param[in] This Protocol instance pointer.
  42. @param[in] Controller Handle of device to bind driver to.
  43. @param[in] RemainingDevicePath Optional parameter use to pick a specific child
  44. device to start.
  45. @retval EFI_SUCCESS This driver is added to Controller.
  46. @retval EFI_ALREADY_STARTED This driver is already running on Controller.
  47. @retval Others This driver does not support this device.
  48. **/
  49. EFI_STATUS
  50. EFIAPI
  51. Mtftp6DriverBindingStart (
  52. IN EFI_DRIVER_BINDING_PROTOCOL *This,
  53. IN EFI_HANDLE Controller,
  54. IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath
  55. );
  56. /**
  57. Stop this driver on Controller. This service is called by the
  58. EFI boot service DisconnectController(). In order to
  59. make drivers as small as possible, there are calling
  60. restrictions for this service. DisconnectController()
  61. must follow these calling restrictions. If any other agent wishes
  62. to call Stop(), it must also follow these calling restrictions.
  63. @param[in] This Protocol instance pointer.
  64. @param[in] Controller Handle of device to stop driver on
  65. @param[in] NumberOfChildren Number of Handles in ChildHandleBuffer. If number of
  66. children is zero, stop the entire bus driver.
  67. @param[in] ChildHandleBuffer List of Child Handles to Stop.
  68. @retval EFI_SUCCESS This driver is removed Controller.
  69. @retval EFI_DEVICE_ERROR An unexpected error.
  70. @retval Others This driver was not removed from this device.
  71. **/
  72. EFI_STATUS
  73. EFIAPI
  74. Mtftp6DriverBindingStop (
  75. IN EFI_DRIVER_BINDING_PROTOCOL *This,
  76. IN EFI_HANDLE Controller,
  77. IN UINTN NumberOfChildren,
  78. IN EFI_HANDLE *ChildHandleBuffer
  79. );
  80. /**
  81. Creates a child handle and installs a protocol.
  82. The CreateChild() function installs a protocol on ChildHandle.
  83. If ChildHandle is a pointer to NULL, then a new handle is created and returned in ChildHandle.
  84. If ChildHandle is not a pointer to NULL, then the protocol installs on the existing ChildHandle.
  85. @param[in] This Pointer to the EFI_SERVICE_BINDING_PROTOCOL instance.
  86. @param[in, out] ChildHandle Pointer to the handle of the child to create. If it is NULL,
  87. then a new handle is created. If it is a pointer to an existing
  88. UEFI handle, then the protocol is added to the existing UEFI handle.
  89. @retval EFI_SUCCESS The protocol was added to ChildHandle.
  90. @retval EFI_INVALID_PARAMETER ChildHandle is NULL.
  91. @retval Others The child handle was not created.
  92. **/
  93. EFI_STATUS
  94. EFIAPI
  95. Mtftp6ServiceBindingCreateChild (
  96. IN EFI_SERVICE_BINDING_PROTOCOL *This,
  97. IN OUT EFI_HANDLE *ChildHandle
  98. );
  99. /**
  100. Destroys a child handle with a protocol installed on it.
  101. The DestroyChild() function does the opposite of CreateChild(). It removes a protocol
  102. that was installed by CreateChild() from ChildHandle. If the removed protocol is the
  103. last protocol on ChildHandle, then ChildHandle is destroyed.
  104. @param[in] This Pointer to the EFI_SERVICE_BINDING_PROTOCOL instance.
  105. @param[in] ChildHandle Handle of the child to destroy.
  106. @retval EFI_SUCCESS The protocol was removed from ChildHandle.
  107. @retval EFI_UNSUPPORTED ChildHandle does not support the protocol that is being removed.
  108. @retval EFI_INVALID_PARAMETER Child handle is NULL.
  109. @retval Others The child handle was not destroyed
  110. **/
  111. EFI_STATUS
  112. EFIAPI
  113. Mtftp6ServiceBindingDestroyChild (
  114. IN EFI_SERVICE_BINDING_PROTOCOL *This,
  115. IN EFI_HANDLE ChildHandle
  116. );
  117. #endif