1 /** @file
2 String support
3
4 Copyright (c) 2004 - 2010, Intel Corporation. All rights reserved.<BR>
5 This program and the accompanying materials
6 are licensed and made available under the terms and conditions of the BSD License
7 which accompanies this distribution. The full text of the license may be found at
8 http://opensource.org/licenses/bsd-license.php
9
10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
12
13 **/
14
15 #include "Bds.h"
16 #include "Language.h"
17 #include "FrontPage.h"
18
19 EFI_HII_HANDLE gStringPackHandle;
20
21 EFI_GUID mBdsStringPackGuid = {
22 0x7bac95d3, 0xddf, 0x42f3, {0x9e, 0x24, 0x7c, 0x64, 0x49, 0x40, 0x37, 0x9a}
23 };
24
25 /**
26 Initialize HII global accessor for string support.
27
28 **/
29 VOID
InitializeStringSupport(VOID)30 InitializeStringSupport (
31 VOID
32 )
33 {
34 gStringPackHandle = HiiAddPackages (
35 &mBdsStringPackGuid,
36 gImageHandle,
37 BdsDxeStrings,
38 NULL
39 );
40 ASSERT (gStringPackHandle != NULL);
41 }
42
43 /**
44 Get string by string id from HII Interface
45
46
47 @param Id String ID.
48
49 @retval CHAR16 * String from ID.
50 @retval NULL If error occurs.
51
52 **/
53 CHAR16 *
GetStringById(IN EFI_STRING_ID Id)54 GetStringById (
55 IN EFI_STRING_ID Id
56 )
57 {
58 return HiiGetString (gStringPackHandle, Id, NULL);
59 }
60