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