]>
Commit | Line | Data |
---|---|---|
1 | /** @file\r | |
2 | String support\r | |
3 | \r | |
4 | Copyright (c) 2004 - 2015, Intel Corporation. All rights reserved.<BR>\r | |
5 | 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.php\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 | \r | |
15 | #include "Ui.h"\r | |
16 | #include "Language.h"\r | |
17 | #include "FrontPage.h"\r | |
18 | \r | |
19 | EFI_HII_HANDLE gStringPackHandle;\r | |
20 | \r | |
21 | EFI_GUID mUiStringPackGuid = {\r | |
22 | 0x136a3048, 0x752a, 0x4bf6, { 0xa7, 0x57, 0x9, 0x36, 0x11, 0x95, 0x38, 0xed }\r | |
23 | };\r | |
24 | \r | |
25 | /**\r | |
26 | Initialize HII global accessor for string support.\r | |
27 | \r | |
28 | **/\r | |
29 | VOID\r | |
30 | InitializeStringSupport (\r | |
31 | VOID\r | |
32 | )\r | |
33 | {\r | |
34 | gStringPackHandle = HiiAddPackages (\r | |
35 | &mUiStringPackGuid,\r | |
36 | gImageHandle,\r | |
37 | UiAppStrings,\r | |
38 | NULL\r | |
39 | );\r | |
40 | ASSERT (gStringPackHandle != NULL);\r | |
41 | }\r | |
42 | \r | |
43 | /**\r | |
44 | Remove the string package.\r | |
45 | \r | |
46 | **/\r | |
47 | VOID\r | |
48 | UninitializeStringSupport (\r | |
49 | VOID\r | |
50 | )\r | |
51 | {\r | |
52 | HiiRemovePackages (gStringPackHandle);\r | |
53 | }\r | |
54 | \r | |
55 | /**\r | |
56 | Get string by string id from HII Interface\r | |
57 | \r | |
58 | \r | |
59 | @param Id String ID.\r | |
60 | \r | |
61 | @retval CHAR16 * String from ID.\r | |
62 | @retval NULL If error occurs.\r | |
63 | \r | |
64 | **/\r | |
65 | CHAR16 *\r | |
66 | GetStringById (\r | |
67 | IN EFI_STRING_ID Id\r | |
68 | )\r | |
69 | {\r | |
70 | return HiiGetString (gStringPackHandle, Id, NULL);\r | |
71 | }\r |