summaryrefslogtreecommitdiff
path: root/IntelFrameworkModulePkg/Universal/BdsDxe/BootMaint
diff options
context:
space:
mode:
authorrsun3 <rsun3@6f19259b-4bc3-4df7-8a09-765794883524>2009-04-14 10:47:19 +0000
committerrsun3 <rsun3@6f19259b-4bc3-4df7-8a09-765794883524>2009-04-14 10:47:19 +0000
commitcb7d01c0c9fd199742d0fed6aa69dab0c79c3338 (patch)
tree920a78778c9de452a58ee0d0df2893e7c4822bdb /IntelFrameworkModulePkg/Universal/BdsDxe/BootMaint
parent169a34619b6d583d9f2934a6a3e9caf6e5c6e355 (diff)
downloadedk2-platforms-cb7d01c0c9fd199742d0fed6aa69dab0c79c3338.tar.xz
HII Library Class interface refine.
The "HiiLib" prefix for all HII Library API function names changed to "Hii". Remove: HiiLibPreparePackageList(), replaced by HiiAddPackages() HiiLibNewString(), replaced by HiiSetString() HiiLibGetStringFromHandle(), replaced by HiiGetString() HiiLibGetStringFromToken(), replaced by HiiGetPackageString() HiiLibExtractGuidFromHiiHandle() HiiLibDevicePathToHiiHandle() HiiLibGetSupportedSecondaryLanguages() HiiLibGetSupportedLanguageNumber() HiiLibExportPackageLists() HiiLibListPackageLists() Interface change: HiiAddPackages() HiiSetString() HiiGetString() HiiGetHiiHandles() git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@8083 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'IntelFrameworkModulePkg/Universal/BdsDxe/BootMaint')
-rw-r--r--IntelFrameworkModulePkg/Universal/BdsDxe/BootMaint/BootMaint.c65
-rw-r--r--IntelFrameworkModulePkg/Universal/BdsDxe/BootMaint/UpdatePage.c8
-rw-r--r--IntelFrameworkModulePkg/Universal/BdsDxe/BootMaint/Variable.c8
3 files changed, 38 insertions, 43 deletions
diff --git a/IntelFrameworkModulePkg/Universal/BdsDxe/BootMaint/BootMaint.c b/IntelFrameworkModulePkg/Universal/BdsDxe/BootMaint/BootMaint.c
index 3f5bbc40c2..57dd2db9c5 100644
--- a/IntelFrameworkModulePkg/Universal/BdsDxe/BootMaint/BootMaint.c
+++ b/IntelFrameworkModulePkg/Universal/BdsDxe/BootMaint/BootMaint.c
@@ -128,20 +128,22 @@ CreateMenuStringToken (
for (Index = 0; Index < MenuOption->MenuNumber; Index++) {
NewMenuEntry = BOpt_GetMenuEntry (MenuOption, Index);
- HiiLibNewString (
- HiiHandle,
- &NewMenuEntry->DisplayStringToken,
- NewMenuEntry->DisplayString
- );
+ NewMenuEntry->DisplayStringToken = HiiSetString (
+ HiiHandle,
+ 0,
+ NewMenuEntry->DisplayString,
+ NULL
+ );
if (NULL == NewMenuEntry->HelpString) {
NewMenuEntry->HelpStringToken = NewMenuEntry->DisplayStringToken;
} else {
- HiiLibNewString (
- HiiHandle,
- &NewMenuEntry->HelpStringToken,
- NewMenuEntry->HelpString
- );
+ NewMenuEntry->HelpStringToken = HiiSetString (
+ HiiHandle,
+ 0,
+ NewMenuEntry->HelpString,
+ NULL
+ );
}
}
@@ -848,7 +850,6 @@ InitializeBM (
)
{
EFI_LEGACY_BIOS_PROTOCOL *LegacyBios;
- EFI_HII_PACKAGE_LIST_HEADER *PackageList;
BMM_CALLBACK_DATA *BmmCallbackInfo;
EFI_STATUS Status;
UINT8 *Ptr;
@@ -931,30 +932,26 @@ InitializeBM (
//
// Post our Boot Maint VFR binnary to the HII database.
//
- PackageList = HiiLibPreparePackageList (2, &mBootMaintGuid, BmBin, BdsDxeStrings);
- ASSERT (PackageList != NULL);
-
- Status = gHiiDatabase->NewPackageList (
- gHiiDatabase,
- PackageList,
- BmmCallbackInfo->BmmDriverHandle,
- &BmmCallbackInfo->BmmHiiHandle
- );
- FreePool (PackageList);
+ BmmCallbackInfo->BmmHiiHandle = HiiAddPackages (
+ &mBootMaintGuid,
+ BmmCallbackInfo->BmmDriverHandle,
+ BmBin,
+ BdsDxeStrings,
+ NULL
+ );
+ ASSERT (BmmCallbackInfo->BmmHiiHandle != NULL);
//
// Post our File Explorer VFR binary to the HII database.
//
- PackageList = HiiLibPreparePackageList (2, &mFileExplorerGuid, FEBin, BdsDxeStrings);
- ASSERT (PackageList != NULL);
-
- Status = gHiiDatabase->NewPackageList (
- gHiiDatabase,
- PackageList,
- BmmCallbackInfo->FeDriverHandle,
- &BmmCallbackInfo->FeHiiHandle
- );
- FreePool (PackageList);
+ BmmCallbackInfo->FeHiiHandle = HiiAddPackages (
+ &mFileExplorerGuid,
+ BmmCallbackInfo->FeDriverHandle,
+ FEBin,
+ BdsDxeStrings,
+ NULL
+ );
+ ASSERT (BmmCallbackInfo->FeHiiHandle != NULL);
//
// Allocate space for creation of Buffer
@@ -1057,8 +1054,8 @@ InitializeBM (
//
// Remove our IFR data from HII database
//
- gHiiDatabase->RemovePackageList (gHiiDatabase, BmmCallbackInfo->BmmHiiHandle);
- gHiiDatabase->RemovePackageList (gHiiDatabase, BmmCallbackInfo->FeHiiHandle);
+ HiiRemovePackages (BmmCallbackInfo->BmmHiiHandle);
+ HiiRemovePackages (BmmCallbackInfo->FeHiiHandle);
CleanUpStringDepository ();
@@ -1192,7 +1189,7 @@ GetStringTokenFromDepository (
//
NextListNode = AllocateZeroPool (sizeof (STRING_LIST_NODE));
ASSERT (NextListNode != NULL);
- HiiLibNewString (CallbackData->BmmHiiHandle, &(NextListNode->StringToken), L" ");
+ NextListNode->StringToken = HiiSetString (CallbackData->BmmHiiHandle, 0, L" ", NULL);
ASSERT (NextListNode->StringToken != 0);
StringDepository->TotalNodeNumber++;
diff --git a/IntelFrameworkModulePkg/Universal/BdsDxe/BootMaint/UpdatePage.c b/IntelFrameworkModulePkg/Universal/BdsDxe/BootMaint/UpdatePage.c
index 6831289add..3d23da1ac3 100644
--- a/IntelFrameworkModulePkg/Universal/BdsDxe/BootMaint/UpdatePage.c
+++ b/IntelFrameworkModulePkg/Universal/BdsDxe/BootMaint/UpdatePage.c
@@ -752,7 +752,7 @@ UpdateConModePage (
ASSERT ((StrLen (ModeString) + TempStringLen) < (sizeof (ModeString) / sizeof (ModeString[0])));
StrCat (ModeString, RowString);
- HiiLibNewString (CallbackData->BmmHiiHandle, &ModeToken[Index], ModeString);
+ ModeToken[Index] = HiiSetString (CallbackData->BmmHiiHandle, 0, ModeString, NULL);
IfrOptionList[Index].StringToken = ModeToken[Index];
IfrOptionList[Index].Value.u16 = (UINT16) Mode;
@@ -1246,12 +1246,10 @@ UpdateSetLegacyDeviceOrderPage (
// Create the string for oneof tag
//
UnicodeSPrint (String, sizeof (String), TypeStr, Index);
- StrRef = 0;
- HiiLibNewString (CallbackData->BmmHiiHandle, &StrRef, String);
+ StrRef = HiiSetString (CallbackData->BmmHiiHandle, 0, String, NULL);
UnicodeSPrint (String, sizeof (String), TypeStrHelp, Index);
- StrRefHelp = 0;
- HiiLibNewString (CallbackData->BmmHiiHandle, &StrRefHelp, String);
+ StrRefHelp = HiiSetString (CallbackData->BmmHiiHandle, 0, String, NULL);
CreateOneOfOpCode (
(EFI_QUESTION_ID) (Key + Index),
diff --git a/IntelFrameworkModulePkg/Universal/BdsDxe/BootMaint/Variable.c b/IntelFrameworkModulePkg/Universal/BdsDxe/BootMaint/Variable.c
index 489827f9de..6bdcee41d5 100644
--- a/IntelFrameworkModulePkg/Universal/BdsDxe/BootMaint/Variable.c
+++ b/IntelFrameworkModulePkg/Universal/BdsDxe/BootMaint/Variable.c
@@ -642,13 +642,13 @@ Var_UpdateDriverOption (
CallbackData,
DriverOptionStrDepository
);
- HiiLibNewString (HiiHandle, &NewMenuEntry->DisplayStringToken, NewMenuEntry->DisplayString);
+ NewMenuEntry->DisplayStringToken = HiiSetString (HiiHandle, 0, NewMenuEntry->DisplayString, NULL);
NewMenuEntry->HelpStringToken = GetStringTokenFromDepository (
CallbackData,
DriverOptionHelpStrDepository
);
- HiiLibNewString (HiiHandle, &NewMenuEntry->HelpStringToken, NewMenuEntry->HelpString);
+ NewMenuEntry->HelpStringToken = HiiSetString (HiiHandle, 0, NewMenuEntry->HelpString, NULL);
if (OptionalDataExist) {
Ptr += (UINT8) GetDevicePathSize (CallbackData->LoadContext->FilePathList);
@@ -814,13 +814,13 @@ Var_UpdateBootOption (
CallbackData,
BootOptionStrDepository
);
- HiiLibNewString (CallbackData->FeHiiHandle, &NewMenuEntry->DisplayStringToken, NewMenuEntry->DisplayString);
+ NewMenuEntry->DisplayStringToken = HiiSetString (CallbackData->FeHiiHandle, 0, NewMenuEntry->DisplayString, NULL);
NewMenuEntry->HelpStringToken = GetStringTokenFromDepository (
CallbackData,
BootOptionHelpStrDepository
);
- HiiLibNewString (CallbackData->FeHiiHandle, &NewMenuEntry->HelpStringToken, NewMenuEntry->HelpString);
+ NewMenuEntry->HelpStringToken = HiiSetString (CallbackData->FeHiiHandle, 0, NewMenuEntry->HelpString, NULL);
if (OptionalDataExist) {
Ptr += (UINT8) GetDevicePathSize (CallbackData->LoadContext->FilePathList);