]> git.proxmox.com Git - mirror_edk2.git/blob - MdePkg/Library/IfrSupportLib/UefiIfrCommon.c
Retire GenBin directory since we have created EdkShellPkg and its own DSC file to...
[mirror_edk2.git] / MdePkg / Library / IfrSupportLib / UefiIfrCommon.c
1 /** @file
2 Utility functions which helps in opcode creation, HII configuration string manipulations,
3 pop up window creations, setup browser persistence data set and get.
4
5 Copyright (c) 2007 - 2008, Intel Corporation
6 All rights reserved. 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
10
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.
13
14 **/
15
16 #include "UefiIfrLibraryInternal.h"
17
18 EFI_HII_DATABASE_PROTOCOL *gIfrLibHiiDatabase;
19 EFI_HII_STRING_PROTOCOL *gIfrLibHiiString;
20
21
22 /**
23 IfrSupportLib's constructor. It locates the required protocol:
24 gEfiHiiDatabaseProtocolGuid and gEfiHiiStringProtocolGuid.
25
26 @param ImageHandle The firmware allocated handle for the EFI image.
27
28 @param SystemTable A pointer to the EFI System Table.
29
30 @retval EFI_SUCCESS This function always completes successfully.
31
32 **/
33 EFI_STATUS
34 EFIAPI
35 IfrSupportLibConstructor (
36 IN EFI_HANDLE ImageHandle,
37 IN EFI_SYSTEM_TABLE *SystemTable
38 )
39 {
40 EFI_STATUS Status;
41
42 Status = gBS->LocateProtocol (&gEfiHiiDatabaseProtocolGuid, NULL, (VOID **) &gIfrLibHiiDatabase);
43 ASSERT_EFI_ERROR (Status);
44
45 Status = gBS->LocateProtocol (&gEfiHiiStringProtocolGuid, NULL, (VOID **) &gIfrLibHiiString);
46 ASSERT_EFI_ERROR (Status);
47
48 return EFI_SUCCESS;
49 }
50
51