]> git.proxmox.com Git - mirror_edk2.git/blame - MdeModulePkg/Application/UiApp/String.c
MdeModulePkg: Convert all .uni files to utf-8
[mirror_edk2.git] / MdeModulePkg / Application / UiApp / String.c
CommitLineData
143f0b1d
ED
1/** @file\r
2 String support\r
3\r
afc244a5 4Copyright (c) 2004 - 2015, Intel Corporation. All rights reserved.<BR>\r
143f0b1d
ED
5This program and the accompanying materials\r
6are licensed and made available under the terms and conditions of the BSD License\r
7which accompanies this distribution. The full text of the license may be found at\r
8http://opensource.org/licenses/bsd-license.php\r
9\r
10THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
11WITHOUT 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
19EFI_HII_HANDLE gStringPackHandle;\r
20\r
21EFI_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
29VOID\r
30InitializeStringSupport (\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
3194d76f
DB
43/**\r
44 Remove the string package.\r
45\r
46**/\r
143f0b1d
ED
47VOID\r
48UninitializeStringSupport (\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
65CHAR16 *\r
66GetStringById (\r
67 IN EFI_STRING_ID Id\r
68 )\r
69{\r
70 return HiiGetString (gStringPackHandle, Id, NULL);\r
71}\r