]> git.proxmox.com Git - mirror_edk2.git/blame - StdLib/SocketDxe/Socket.h
BaseTools/Capsule: Do not support -o with --dump-info
[mirror_edk2.git] / StdLib / SocketDxe / Socket.h
CommitLineData
d7ce7006 1/** @file\r
2 Definitions for the Socket layer driver.\r
3\r
4 Copyright (c) 2011, Intel Corporation\r
5 All rights reserved. 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\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#ifndef _SOCKET_H_\r
15#define _SOCKET_H_\r
16\r
17#include <Library/UefiDriverEntryPoint.h>\r
18#include <Efi/EfiSocketLib.h>\r
19\r
20#include <Protocol/LoadedImage.h>\r
21\r
22//------------------------------------------------------------------------------\r
23// Protocol Declarations\r
24//------------------------------------------------------------------------------\r
25\r
a88c3163 26extern EFI_COMPONENT_NAME_PROTOCOL mComponentName; ///< Component name protocol declaration\r
27extern EFI_COMPONENT_NAME2_PROTOCOL mComponentName2; ///< Component name 2 protocol declaration\r
28extern EFI_DRIVER_BINDING_PROTOCOL mDriverBinding; ///< Driver binding protocol declaration\r
d7ce7006 29extern EFI_SERVICE_BINDING_PROTOCOL mServiceBinding; ///< Service binding protocol delcaration\r
30\r
31//------------------------------------------------------------------------------\r
32// Driver Binding Protocol Support\r
33//------------------------------------------------------------------------------\r
34\r
35/**\r
36 Stop this driver on Controller by removing NetworkInterfaceIdentifier protocol and\r
37 closing the DevicePath and PciIo protocols on Controller.\r
38\r
39 @param [in] pThis Protocol instance pointer.\r
40 @param [in] Controller Handle of device to stop driver on.\r
41 @param [in] NumberOfChildren How many children need to be stopped.\r
42 @param [in] pChildHandleBuffer Not used.\r
43\r
44 @retval EFI_SUCCESS This driver is removed Controller.\r
45 @retval EFI_DEVICE_ERROR The device could not be stopped due to a device error.\r
46 @retval other This driver was not removed from this device.\r
47\r
48**/\r
49EFI_STATUS\r
50EFIAPI\r
51DriverStop (\r
52 IN EFI_DRIVER_BINDING_PROTOCOL * pThis,\r
53 IN EFI_HANDLE Controller,\r
54 IN UINTN NumberOfChildren,\r
55 IN EFI_HANDLE * pChildHandleBuffer\r
56 );\r
57\r
58//------------------------------------------------------------------------------\r
59// EFI Component Name Protocol Support\r
60//------------------------------------------------------------------------------\r
61\r
62/**\r
63 Retrieves a Unicode string that is the user readable name of the driver.\r
64\r
65 This function retrieves the user readable name of a driver in the form of a\r
66 Unicode string. If the driver specified by This has a user readable name in\r
67 the language specified by Language, then a pointer to the driver name is\r
68 returned in DriverName, and EFI_SUCCESS is returned. If the driver specified\r
69 by This does not support the language specified by Language,\r
70 then EFI_UNSUPPORTED is returned.\r
71\r
72 @param [in] pThis A pointer to the EFI_COMPONENT_NAME2_PROTOCOL or\r
73 EFI_COMPONENT_NAME_PROTOCOL instance.\r
74 @param [in] pLanguage A pointer to a Null-terminated ASCII string\r
75 array indicating the language. This is the\r
76 language of the driver name that the caller is\r
77 requesting, and it must match one of the\r
78 languages specified in SupportedLanguages. The\r
79 number of languages supported by a driver is up\r
80 to the driver writer. Language is specified\r
81 in RFC 3066 or ISO 639-2 language code format.\r
82 @param [out] ppDriverName A pointer to the Unicode string to return.\r
83 This Unicode string is the name of the\r
84 driver specified by This in the language\r
85 specified by Language.\r
86\r
87 @retval EFI_SUCCESS The Unicode string for the Driver specified by\r
88 This and the language specified by Language was\r
89 returned in DriverName.\r
90 @retval EFI_INVALID_PARAMETER Language is NULL.\r
91 @retval EFI_INVALID_PARAMETER DriverName is NULL.\r
92 @retval EFI_UNSUPPORTED The driver specified by This does not support\r
93 the language specified by Language.\r
94\r
95**/\r
96EFI_STATUS\r
97EFIAPI\r
98GetDriverName (\r
99 IN EFI_COMPONENT_NAME_PROTOCOL * pThis,\r
100 IN CHAR8 * pLanguage,\r
101 OUT CHAR16 ** ppDriverName\r
102 );\r
103\r
104\r
105/**\r
106 Retrieves a Unicode string that is the user readable name of the controller\r
107 that is being managed by a driver.\r
108\r
109 This function retrieves the user readable name of the controller specified by\r
110 ControllerHandle and ChildHandle in the form of a Unicode string. If the\r
111 driver specified by This has a user readable name in the language specified by\r
112 Language, then a pointer to the controller name is returned in ControllerName,\r
113 and EFI_SUCCESS is returned. If the driver specified by This is not currently\r
114 managing the controller specified by ControllerHandle and ChildHandle,\r
115 then EFI_UNSUPPORTED is returned. If the driver specified by This does not\r
116 support the language specified by Language, then EFI_UNSUPPORTED is returned.\r
117\r
118 @param [in] pThis A pointer to the EFI_COMPONENT_NAME2_PROTOCOL or\r
119 EFI_COMPONENT_NAME_PROTOCOL instance.\r
120 @param [in] ControllerHandle The handle of a controller that the driver\r
121 specified by This is managing. This handle\r
122 specifies the controller whose name is to be\r
123 returned.\r
124 @param [in] ChildHandle The handle of the child controller to retrieve\r
125 the name of. This is an optional parameter that\r
126 may be NULL. It will be NULL for device\r
127 drivers. It will also be NULL for a bus drivers\r
128 that wish to retrieve the name of the bus\r
129 controller. It will not be NULL for a bus\r
130 driver that wishes to retrieve the name of a\r
131 child controller.\r
132 @param [in] pLanguage A pointer to a Null-terminated ASCII string\r
133 array indicating the language. This is the\r
134 language of the driver name that the caller is\r
135 requesting, and it must match one of the\r
136 languages specified in SupportedLanguages. The\r
137 number of languages supported by a driver is up\r
138 to the driver writer. Language is specified in\r
139 RFC 3066 or ISO 639-2 language code format.\r
140 @param [out] ppControllerName A pointer to the Unicode string to return.\r
141 This Unicode string is the name of the\r
142 controller specified by ControllerHandle and\r
143 ChildHandle in the language specified by\r
144 Language from the point of view of the driver\r
145 specified by This.\r
146\r
147 @retval EFI_SUCCESS The Unicode string for the user readable name in\r
148 the language specified by Language for the\r
149 driver specified by This was returned in\r
150 DriverName.\r
151 @retval EFI_INVALID_PARAMETER ControllerHandle is not a valid EFI_HANDLE.\r
152 @retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it is not a valid\r
153 EFI_HANDLE.\r
154 @retval EFI_INVALID_PARAMETER Language is NULL.\r
155 @retval EFI_INVALID_PARAMETER ControllerName is NULL.\r
156 @retval EFI_UNSUPPORTED The driver specified by This is not currently\r
157 managing the controller specified by\r
158 ControllerHandle and ChildHandle.\r
159 @retval EFI_UNSUPPORTED The driver specified by This does not support\r
160 the language specified by Language.\r
161\r
162**/\r
163EFI_STATUS\r
164EFIAPI\r
165GetControllerName (\r
166 IN EFI_COMPONENT_NAME_PROTOCOL * pThis,\r
167 IN EFI_HANDLE ControllerHandle,\r
168 IN OPTIONAL EFI_HANDLE ChildHandle,\r
169 IN CHAR8 * pLanguage,\r
170 OUT CHAR16 ** ppControllerName\r
171 );\r
172\r
173//------------------------------------------------------------------------------\r
174\r
175#endif // _SOCKET_H_\r