2 The DriverEntryPoint and Unload for HttpUtilities driver.
4 Copyright (c) 2015, Intel Corporation. All rights reserved.<BR>
6 This program and the accompanying materials
7 are licensed and made available under the terms and conditions of the BSD License
8 which accompanies this distribution. The full text of the license may be found at
9 http://opensource.org/licenses/bsd-license.php.
11 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
12 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
16 #include "HttpUtilitiesDxe.h"
22 @param ImageHandle Handle that identifies the image to be unloaded.
24 @retval EFI_SUCCESS The image has been unloaded.
25 @retval EFI_INVALID_PARAMETER ImageHandle is not a valid image handle.
30 HttpUtilitiesDxeUnload (
31 IN EFI_HANDLE ImageHandle
36 EFI_HANDLE
*HandleBuffer
;
38 EFI_HTTP_UTILITIES_PROTOCOL
*HttpUtilitiesProtocol
;
44 // Locate all the handles with HttpUtilities protocol.
46 Status
= gBS
->LocateHandleBuffer (
48 &gEfiHttpUtilitiesProtocolGuid
,
53 if (EFI_ERROR (Status
)) {
57 for (Index
= 0; Index
< HandleNum
; Index
++) {
59 // Firstly, find HttpUtilitiesProtocol interface
61 Status
= gBS
->OpenProtocol (
63 &gEfiHttpUtilitiesProtocolGuid
,
64 (VOID
**) &HttpUtilitiesProtocol
,
67 EFI_OPEN_PROTOCOL_BY_HANDLE_PROTOCOL
69 if (EFI_ERROR (Status
)) {
74 // Then, uninstall HttpUtilities interface
76 Status
= gBS
->UninstallMultipleProtocolInterfaces (
78 &gEfiHttpUtilitiesProtocolGuid
, HttpUtilitiesProtocol
,
81 if (EFI_ERROR (Status
)) {
91 This is the declaration of an EFI image entry point. This entry point is
92 the same for UEFI Applications, UEFI OS Loaders, and UEFI Drivers including
93 both device drivers and bus drivers.
95 @param ImageHandle The firmware allocated handle for the UEFI image.
96 @param SystemTable A pointer to the EFI System Table.
98 @retval EFI_SUCCESS The operation completed successfully.
99 @retval Others An unexpected error occurred.
103 HttpUtilitiesDxeDriverEntryPoint (
104 IN EFI_HANDLE ImageHandle
,
105 IN EFI_SYSTEM_TABLE
*SystemTable
115 // Install the HttpUtilities Protocol onto Handle
117 Status
= gBS
->InstallMultipleProtocolInterfaces (
119 &gEfiHttpUtilitiesProtocolGuid
,
120 &mHttpUtilitiesProtocol
,