X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=MdeModulePkg%2FUniversal%2FHiiDatabaseDxe%2FHiiDatabase.h;h=783fc7ecc132e3b9d31172be9960628c12142798;hb=c8ad2d7a296c851c2a91519f80dab479df0fdf46;hp=f19813298edfff2d11d0d7639751db57c448d4fd;hpb=ac644614683362804223844048c5be1a2adfa6b7;p=mirror_edk2.git diff --git a/MdeModulePkg/Universal/HiiDatabaseDxe/HiiDatabase.h b/MdeModulePkg/Universal/HiiDatabaseDxe/HiiDatabase.h index f19813298e..783fc7ecc1 100644 --- a/MdeModulePkg/Universal/HiiDatabaseDxe/HiiDatabase.h +++ b/MdeModulePkg/Universal/HiiDatabaseDxe/HiiDatabase.h @@ -1,7 +1,8 @@ /** @file +Private structures definitions in HiiDatabase. -Copyright (c) 2007, Intel Corporation -All rights reserved. This program and the accompanying materials +Copyright (c) 2007 - 2011, Intel Corporation. All rights reserved.
+This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at http://opensource.org/licenses/bsd-license.php @@ -9,25 +10,13 @@ http://opensource.org/licenses/bsd-license.php THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -Module Name: - - HiiDatabase.h - -Abstract: - - Private structures definitions in HiiDatabase. - -Revision History - - **/ #ifndef __HII_DATABASE_PRIVATE_H__ #define __HII_DATABASE_PRIVATE_H__ -#include +#include -#include #include #include #include @@ -38,6 +27,7 @@ Revision History #include #include +#include #include @@ -47,11 +37,10 @@ Revision History #include #include #include - -#define HII_DATABASE_NOTIFY_GUID \ - { \ - 0xc1c76, 0xd79e, 0x42fe, {0x86, 0xb, 0x8b, 0xe8, 0x7b, 0x3e, 0x7a, 0x78} \ - } +#include +#include +#include +#include #define MAX_STRING_LENGTH 1024 #define MAX_FONT_NAME_LEN 256 @@ -67,6 +56,37 @@ Revision History #define BITMAP_LEN_8_BIT(Width, Height) ((Width) * (Height)) #define BITMAP_LEN_24_BIT(Width, Height) ((Width) * (Height) * 3) +// +// IFR data structure +// +// BASE_CR (a, IFR_DEFAULT_VALUE_DATA, Entry) to get the whole structure. + +typedef struct { + LIST_ENTRY Entry; // Link to VarStorage + EFI_GUID Guid; + CHAR16 *Name; + EFI_VARSTORE_ID VarStoreId; + UINT16 Size; + LIST_ENTRY BlockEntry; // Link to its Block array +} IFR_VARSTORAGE_DATA; + +typedef struct { + LIST_ENTRY Entry; // Link to Block array + UINT16 Offset; + UINT16 Width; + EFI_QUESTION_ID QuestionId; + UINT8 OpCode; + UINT8 Scope; + LIST_ENTRY DefaultValueEntry; // Link to its default value array +} IFR_BLOCK_DATA; + +typedef struct { + LIST_ENTRY Entry; + UINT8 OpCode; + UINT16 DefaultId; + UINT64 Value; +} IFR_DEFAULT_DATA; + // // Storage types // @@ -74,7 +94,7 @@ Revision History #define EFI_HII_VARSTORE_NAME_VALUE 1 #define EFI_HII_VARSTORE_EFI_VARIABLE 2 -#define HII_FORMSET_STORAGE_SIGNATURE EFI_SIGNATURE_32 ('H', 'S', 'T', 'G') +#define HII_FORMSET_STORAGE_SIGNATURE SIGNATURE_32 ('H', 'S', 'T', 'G') typedef struct { UINTN Signature; LIST_ENTRY Entry; @@ -88,13 +108,11 @@ typedef struct { UINT16 Size; } HII_FORMSET_STORAGE; -#define HII_FORMSET_STORAGE_FROM_LINK(a) CR (a, HII_FORMSET_STORAGE, Link, HII_FORMSET_STORAGE_SIGNATURE) - // // String Package definitions // -#define HII_STRING_PACKAGE_SIGNATURE EFI_SIGNATURE_32 ('h','i','s','p') +#define HII_STRING_PACKAGE_SIGNATURE SIGNATURE_32 ('h','i','s','p') typedef struct _HII_STRING_PACKAGE_INSTANCE { UINTN Signature; EFI_HII_STRING_PACKAGE_HDR *StringPkgHdr; @@ -102,12 +120,13 @@ typedef struct _HII_STRING_PACKAGE_INSTANCE { LIST_ENTRY StringEntry; LIST_ENTRY FontInfoList; // local font info list UINT8 FontId; + EFI_STRING_ID MaxStringId; // record StringId } HII_STRING_PACKAGE_INSTANCE; // // Form Package definitions // -#define HII_IFR_PACKAGE_SIGNATURE EFI_SIGNATURE_32 ('h','f','r','p') +#define HII_IFR_PACKAGE_SIGNATURE SIGNATURE_32 ('h','f','r','p') typedef struct _HII_IFR_PACKAGE_INSTANCE { UINTN Signature; EFI_HII_PACKAGE_HEADER FormPkgHdr; @@ -118,7 +137,7 @@ typedef struct _HII_IFR_PACKAGE_INSTANCE { // // Simple Font Package definitions // -#define HII_S_FONT_PACKAGE_SIGNATURE EFI_SIGNATURE_32 ('h','s','f','p') +#define HII_S_FONT_PACKAGE_SIGNATURE SIGNATURE_32 ('h','s','f','p') typedef struct _HII_SIMPLE_FONT_PACKAGE_INSTANCE { UINTN Signature; EFI_HII_SIMPLE_FONT_PACKAGE_HDR *SimpleFontPkgHdr; @@ -128,16 +147,18 @@ typedef struct _HII_SIMPLE_FONT_PACKAGE_INSTANCE { // // Font Package definitions // -#define HII_FONT_PACKAGE_SIGNATURE EFI_SIGNATURE_32 ('h','i','f','p') +#define HII_FONT_PACKAGE_SIGNATURE SIGNATURE_32 ('h','i','f','p') typedef struct _HII_FONT_PACKAGE_INSTANCE { UINTN Signature; EFI_HII_FONT_PACKAGE_HDR *FontPkgHdr; + UINT16 Height; + UINT16 BaseLine; UINT8 *GlyphBlock; LIST_ENTRY FontEntry; LIST_ENTRY GlyphInfoList; } HII_FONT_PACKAGE_INSTANCE; -#define HII_GLYPH_INFO_SIGNATURE EFI_SIGNATURE_32 ('h','g','i','s') +#define HII_GLYPH_INFO_SIGNATURE SIGNATURE_32 ('h','g','i','s') typedef struct _HII_GLYPH_INFO { UINTN Signature; LIST_ENTRY Entry; @@ -145,7 +166,7 @@ typedef struct _HII_GLYPH_INFO { EFI_HII_GLYPH_INFO Cell; } HII_GLYPH_INFO; -#define HII_FONT_INFO_SIGNATURE EFI_SIGNATURE_32 ('h','l','f','i') +#define HII_FONT_INFO_SIGNATURE SIGNATURE_32 ('h','l','f','i') typedef struct _HII_FONT_INFO { UINTN Signature; LIST_ENTRY Entry; @@ -153,7 +174,7 @@ typedef struct _HII_FONT_INFO { UINT8 FontId; } HII_FONT_INFO; -#define HII_GLOBAL_FONT_INFO_SIGNATURE EFI_SIGNATURE_32 ('h','g','f','i') +#define HII_GLOBAL_FONT_INFO_SIGNATURE SIGNATURE_32 ('h','g','f','i') typedef struct _HII_GLOBAL_FONT_INFO { UINTN Signature; LIST_ENTRY Entry; @@ -179,7 +200,7 @@ typedef struct _HII_IMAGE_PACKAGE_INSTANCE { // // Keyboard Layout Pacakge definitions // -#define HII_KB_LAYOUT_PACKAGE_SIGNATURE EFI_SIGNATURE_32 ('h','k','l','p') +#define HII_KB_LAYOUT_PACKAGE_SIGNATURE SIGNATURE_32 ('h','k','l','p') typedef struct _HII_KEYBOARD_LAYOUT_PACKAGE_INSTANCE { UINTN Signature; UINT8 *KeyboardPkg; @@ -189,7 +210,7 @@ typedef struct _HII_KEYBOARD_LAYOUT_PACKAGE_INSTANCE { // // Guid Package definitions // -#define HII_GUID_PACKAGE_SIGNATURE EFI_SIGNATURE_32 ('h','i','g','p') +#define HII_GUID_PACKAGE_SIGNATURE SIGNATURE_32 ('h','i','g','p') typedef struct _HII_GUID_PACKAGE_INSTANCE { UINTN Signature; UINT8 *GuidPkg; @@ -212,7 +233,7 @@ typedef struct _HII_DATABASE_PACKAGE_LIST_INSTANCE { UINT8 *DevicePathPkg; } HII_DATABASE_PACKAGE_LIST_INSTANCE; -#define HII_HANDLE_SIGNATURE EFI_SIGNATURE_32 ('h','i','h','l') +#define HII_HANDLE_SIGNATURE SIGNATURE_32 ('h','i','h','l') typedef struct { UINTN Signature; @@ -220,7 +241,7 @@ typedef struct { UINTN Key; } HII_HANDLE; -#define HII_DATABASE_RECORD_SIGNATURE EFI_SIGNATURE_32 ('h','i','d','r') +#define HII_DATABASE_RECORD_SIGNATURE SIGNATURE_32 ('h','i','d','r') typedef struct _HII_DATABASE_RECORD { UINTN Signature; @@ -230,7 +251,7 @@ typedef struct _HII_DATABASE_RECORD { LIST_ENTRY DatabaseEntry; } HII_DATABASE_RECORD; -#define HII_DATABASE_NOTIFY_SIGNATURE EFI_SIGNATURE_32 ('h','i','d','n') +#define HII_DATABASE_NOTIFY_SIGNATURE SIGNATURE_32 ('h','i','d','n') typedef struct _HII_DATABASE_NOTIFY { UINTN Signature; @@ -242,16 +263,14 @@ typedef struct _HII_DATABASE_NOTIFY { LIST_ENTRY DatabaseNotifyEntry; } HII_DATABASE_NOTIFY; -#define HII_DATABASE_PRIVATE_DATA_SIGNATURE EFI_SIGNATURE_32 ('H', 'i', 'D', 'p') +#define HII_DATABASE_PRIVATE_DATA_SIGNATURE SIGNATURE_32 ('H', 'i', 'D', 'p') typedef struct _HII_DATABASE_PRIVATE_DATA { UINTN Signature; LIST_ENTRY DatabaseList; LIST_ENTRY DatabaseNotifyList; EFI_HII_FONT_PROTOCOL HiiFont; -#ifndef DISABLE_UNUSED_HII_PROTOCOLS EFI_HII_IMAGE_PROTOCOL HiiImage; -#endif EFI_HII_STRING_PROTOCOL HiiString; EFI_HII_DATABASE_PROTOCOL HiiDatabase; EFI_HII_CONFIG_ROUTING_PROTOCOL ConfigRouting; @@ -303,7 +322,7 @@ typedef struct _HII_DATABASE_PRIVATE_DATA { // /** - This function checks whether a handle is a valid EFI_HII_HANDLE + This function checks whether a handle is a valid EFI_HII_HANDLE. @param Handle Pointer to a EFI_HII_HANDLE @@ -314,8 +333,7 @@ typedef struct _HII_DATABASE_PRIVATE_DATA { BOOLEAN IsHiiHandleValid ( EFI_HII_HANDLE Handle - ) -; + ); /** @@ -347,10 +365,33 @@ IsFontInfoExisted ( IN EFI_FONT_INFO_MASK *FontInfoMask, OPTIONAL IN EFI_FONT_HANDLE FontHandle, OPTIONAL OUT HII_GLOBAL_FONT_INFO **GlobalFontInfo OPTIONAL + ); + +/** + + This function invokes the matching registered function. + + @param Private HII Database driver private structure. + @param NotifyType The type of change concerning the database. + @param PackageInstance Points to the package referred to by the notification. + @param PackageType Package type + @param Handle The handle of the package list which contains the specified package. + + @retval EFI_SUCCESS Already checked all registered function and invoked + if matched. + @retval EFI_INVALID_PARAMETER Any input parameter is not valid. + +**/ +EFI_STATUS +InvokeRegisteredFunction ( + IN HII_DATABASE_PRIVATE_DATA *Private, + IN EFI_HII_DATABASE_NOTIFY_TYPE NotifyType, + IN VOID *PackageInstance, + IN UINT8 PackageType, + IN EFI_HII_HANDLE Handle ) ; - /** Retrieve system default font and color. @@ -371,15 +412,15 @@ GetSystemFont ( IN HII_DATABASE_PRIVATE_DATA *Private, OUT EFI_FONT_DISPLAY_INFO **FontInfo, OUT UINTN *FontInfoSize OPTIONAL - ) -; + ); /** Parse all string blocks to find a String block specified by StringId. If StringId = (EFI_STRING_ID) (-1), find out all EFI_HII_SIBT_FONT blocks - within this string package and backup its information. - If StringId = 0, output the string id of last string block (EFI_HII_SIBT_END). + within this string package and backup its information. If LastStringId is + specified, the string id of last string block will also be output. + If StringId = 0, output the string id of last string block (EFI_HII_SIBT_STRING). @param Private Hii database private structure. @param StringPackage Hii string package instance. @@ -389,7 +430,8 @@ GetSystemFont ( @param StringBlockAddr Output the block address of found string block. @param StringTextOffset Offset, relative to the found block address, of the string text information. - @param LastStringId Output the last string id when StringId = 0. + @param LastStringId Output the last string id when StringId = 0 or StringId = -1. + @param StartStringId The first id in the skip block which StringId in the block. @retval EFI_SUCCESS The string text and font is retrieved successfully. @@ -407,9 +449,9 @@ FindStringBlock ( OUT UINT8 *BlockType, OPTIONAL OUT UINT8 **StringBlockAddr, OPTIONAL OUT UINTN *StringTextOffset, OPTIONAL - OUT EFI_STRING_ID *LastStringId OPTIONAL - ) -; + OUT EFI_STRING_ID *LastStringId, OPTIONAL + OUT EFI_STRING_ID *StartStringId OPTIONAL + ); /** @@ -440,8 +482,35 @@ FindGlyphBlock ( OUT UINT8 **GlyphBuffer, OPTIONAL OUT EFI_HII_GLYPH_INFO *Cell, OPTIONAL OUT UINTN *GlyphBufferLen OPTIONAL - ) -; + ); + +/** + This function exports Form packages to a buffer. + This is a internal function. + + @param Private Hii database private structure. + @param Handle Identification of a package list. + @param PackageList Pointer to a package list which will be exported. + @param UsedSize The length of buffer be used. + @param BufferSize Length of the Buffer. + @param Buffer Allocated space for storing exported data. + @param ResultSize The size of the already exported content of this + package list. + + @retval EFI_SUCCESS Form Packages are exported successfully. + @retval EFI_INVALID_PARAMETER Any input parameter is invalid. + +**/ +EFI_STATUS +ExportFormPackages ( + IN HII_DATABASE_PRIVATE_DATA *Private, + IN EFI_HII_HANDLE Handle, + IN HII_DATABASE_PACKAGE_LIST_INSTANCE *PackageList, + IN UINTN UsedSize, + IN UINTN BufferSize, + IN OUT VOID *Buffer, + IN OUT UINTN *ResultSize + ); // // EFI_HII_FONT_PROTOCOL protocol interfaces @@ -468,7 +537,10 @@ FindGlyphBlock ( will be allocated to hold the generated image and the pointer updated on exit. It is the caller's responsibility to free this buffer. - @param BltX,BLTY Specifies the offset from the left and top edge + @param BltX Together with BltX, Specifies the offset from the left and top edge + of the image of the first character cell in the + image. + @param BltY Together with BltY, Specifies the offset from the left and top edge of the image of the first character cell in the image. @param RowInfoArray If this is non-NULL on entry, then on exit, this @@ -495,7 +567,8 @@ FindGlyphBlock ( @retval EFI_SUCCESS The string was successfully rendered. @retval EFI_OUT_OF_RESOURCES Unable to allocate an output buffer for RowInfoArray or Blt. - @retval EFI_INVALID_PARAMETER The String was NULL. + @retval EFI_INVALID_PARAMETER The String or Blt. + @retval EFI_INVALID_PARAMETER Flags were invalid combination.. **/ EFI_STATUS @@ -511,8 +584,7 @@ HiiStringToImage ( OUT EFI_HII_ROW_INFO **RowInfoArray OPTIONAL, OUT UINTN *RowInfoArraySize OPTIONAL, OUT UINTN *ColumnInfoArray OPTIONAL - ) -; + ); /** @@ -540,7 +612,10 @@ HiiStringToImage ( will be allocated to hold the generated image and the pointer updated on exit. It is the caller's responsibility to free this buffer. - @param BltX,BLTY Specifies the offset from the left and top edge + @param BltX Together with BltX, Specifies the offset from the left and top edge + of the image of the first character cell in the + image. + @param BltY Together with BltY, Specifies the offset from the left and top edge of the image of the first character cell in the image. @param RowInfoArray If this is non-NULL on entry, then on exit, this @@ -567,7 +642,10 @@ HiiStringToImage ( @retval EFI_SUCCESS The string was successfully rendered. @retval EFI_OUT_OF_RESOURCES Unable to allocate an output buffer for RowInfoArray or Blt. - @retval EFI_INVALID_PARAMETER The String was NULL. + @retval EFI_INVALID_PARAMETER The Blt or PackageList was NULL. + @retval EFI_INVALID_PARAMETER Flags were invalid combination. + @retval EFI_NOT_FOUND The specified PackageList is not in the Database or the stringid is not + in the specified PackageList. **/ EFI_STATUS @@ -585,8 +663,7 @@ HiiStringIdToImage ( OUT EFI_HII_ROW_INFO **RowInfoArray OPTIONAL, OUT UINTN *RowInfoArraySize OPTIONAL, OUT UINTN *ColumnInfoArray OPTIONAL - ) -; + ); /** @@ -619,8 +696,7 @@ HiiGetGlyph ( IN CONST EFI_FONT_DISPLAY_INFO *StringInfo, OUT EFI_IMAGE_OUTPUT **Blt, OUT UINTN *Baseline OPTIONAL - ) -; + ); /** @@ -635,7 +711,8 @@ HiiGetGlyph ( returned font handle or points to NULL if there are no more matching fonts. @param StringInfoIn Upon entry, points to the font to return - information about. + information about. If NULL, then the information about the system default + font will be returned. @param StringInfoOut Upon return, contains the matching font's information. If NULL, then no information is returned. It's caller's responsibility to free @@ -647,20 +724,19 @@ HiiGetGlyph ( @retval EFI_SUCCESS Matching font returned successfully. @retval EFI_NOT_FOUND No matching font was found. @retval EFI_INVALID_PARAMETER StringInfoIn is NULL. + @retval EFI_INVALID_PARAMETER StringInfoIn->FontInfoMask is an invalid combination. @retval EFI_OUT_OF_RESOURCES There were insufficient resources to complete the request. - **/ EFI_STATUS EFIAPI HiiGetFontInfo ( IN CONST EFI_HII_FONT_PROTOCOL *This, IN OUT EFI_FONT_HANDLE *FontHandle, - IN CONST EFI_FONT_DISPLAY_INFO *StringInfoIn, + IN CONST EFI_FONT_DISPLAY_INFO *StringInfoIn, OPTIONAL OUT EFI_FONT_DISPLAY_INFO **StringInfoOut, IN CONST EFI_STRING String OPTIONAL - ) -; + ); // // EFI_HII_IMAGE_PROTOCOL interfaces @@ -692,8 +768,7 @@ HiiNewImage ( IN EFI_HII_HANDLE PackageList, OUT EFI_IMAGE_ID *ImageId, IN CONST EFI_IMAGE_INPUT *Image - ) -; + ); /** @@ -706,15 +781,15 @@ HiiNewImage ( @param ImageId The image's id,, which is unique within PackageList. @param Image Points to the image. - @param ImageSize On entry, points to the size of the buffer - pointed to by Image, in bytes. On return, points - to the length of the image, in bytes. @retval EFI_SUCCESS The new image was returned successfully. @retval EFI_NOT_FOUND The image specified by ImageId is not available. + The specified PackageList is not in the database. @retval EFI_BUFFER_TOO_SMALL The buffer specified by ImageSize is too small to hold the image. @retval EFI_INVALID_PARAMETER The Image or ImageSize was NULL. + @retval EFI_OUT_OF_RESOURCES The bitmap could not be retrieved because there was not + enough memory. **/ EFI_STATUS @@ -723,10 +798,8 @@ HiiGetImage ( IN CONST EFI_HII_IMAGE_PROTOCOL *This, IN EFI_HII_HANDLE PackageList, IN EFI_IMAGE_ID ImageId, - OUT EFI_IMAGE_INPUT *Image, - OUT UINTN *ImageSize - ) -; + OUT EFI_IMAGE_INPUT *Image + ); /** @@ -741,7 +814,7 @@ HiiGetImage ( @retval EFI_SUCCESS The new image was updated successfully. @retval EFI_NOT_FOUND The image specified by ImageId is not in the - database. + database. The specified PackageList is not in the database. @retval EFI_INVALID_PARAMETER The Image was NULL. **/ @@ -752,8 +825,7 @@ HiiSetImage ( IN EFI_HII_HANDLE PackageList, IN EFI_IMAGE_ID ImageId, IN CONST EFI_IMAGE_INPUT *Image - ) -; + ); /** @@ -772,6 +844,9 @@ HiiSetImage ( a buffer will be allocated to hold the generated image and the pointer updated on exit. It is the caller's responsibility to free this buffer. + @param BltX Specifies the offset from the left and top edge + of the output image of the first pixel in the + image. @param BltY Specifies the offset from the left and top edge of the output image of the first pixel in the image. @@ -791,8 +866,7 @@ HiiDrawImage ( IN OUT EFI_IMAGE_OUTPUT **Blt, IN UINTN BltX, IN UINTN BltY - ) -; + ); /** @@ -815,15 +889,18 @@ HiiDrawImage ( allocated to hold the generated image and the pointer updated on exit. It is the caller's responsibility to free this buffer. + @param BltX Specifies the offset from the left and top edge + of the output image of the first pixel in the + image. @param BltY Specifies the offset from the left and top edge of the output image of the first pixel in the image. @retval EFI_SUCCESS The image was successfully drawn. @retval EFI_OUT_OF_RESOURCES Unable to allocate an output buffer for Blt. - @retval EFI_INVALID_PARAMETER The Image was NULL. - @retval EFI_NOT_FOUND The specified packagelist could not be found in - current database. + @retval EFI_INVALID_PARAMETER The Blt was NULL. + @retval EFI_NOT_FOUND The image specified by ImageId is not in the database. + The specified PackageList is not in the database. **/ EFI_STATUS @@ -886,8 +963,7 @@ HiiNewString ( IN CONST CHAR16 *LanguageName, OPTIONAL IN CONST EFI_STRING String, IN CONST EFI_FONT_INFO *StringFontInfo OPTIONAL - ) -; + ); /** @@ -914,7 +990,9 @@ HiiNewString ( @retval EFI_NOT_FOUND The string specified by StringId is not available. @retval EFI_NOT_FOUND The string specified by StringId is available but - not in the specified language. + not in the specified language. + The specified PackageList is not in the database. + @retval EFI_INVALID_LANGUAGE - The string specified by StringId is available but @retval EFI_BUFFER_TOO_SMALL The buffer specified by StringSize is too small to hold the string. @retval EFI_INVALID_PARAMETER The String or Language or StringSize was NULL. @@ -932,8 +1010,7 @@ HiiGetString ( OUT EFI_STRING String, IN OUT UINTN *StringSize, OUT EFI_FONT_INFO **StringFontInfo OPTIONAL - ) -; + ); /** @@ -967,8 +1044,7 @@ HiiSetString ( IN CONST CHAR8 *Language, IN CONST EFI_STRING String, IN CONST EFI_FONT_INFO *StringFontInfo OPTIONAL - ) -; + ); /** @@ -978,7 +1054,8 @@ HiiSetString ( @param This A pointer to the EFI_HII_STRING_PROTOCOL instance. @param PackageList The package list to examine. - @param Languages Points to the buffer to hold the returned string. + @param Languages Points to the buffer to hold the returned + null-terminated ASCII string. @param LanguagesSize On entry, points to the size of the buffer pointed to by Languages, in bytes. On return, points to the length of Languages, in bytes. @@ -999,8 +1076,7 @@ HiiGetLanguages ( IN EFI_HII_HANDLE PackageList, IN OUT CHAR8 *Languages, IN OUT UINTN *LanguagesSize - ) -; + ); /** @@ -1011,26 +1087,30 @@ HiiGetLanguages ( @param This A pointer to the EFI_HII_STRING_PROTOCOL instance. @param PackageList The package list to examine. - @param FirstLanguage Points to the primary language. - @param SecondaryLanguages Points to the buffer to hold the returned list of - secondary languages for the specified - FirstLanguage. If there are no secondary - languages, the function returns successfully, + @param PrimaryLanguage Points to the null-terminated ASCII string that specifies + the primary language. Languages are specified in the + format specified in Appendix M of the UEFI 2.0 specification. + @param SecondaryLanguages Points to the buffer to hold the returned null-terminated + ASCII string that describes the list of + secondary languages for the specified + PrimaryLanguage. If there are no secondary + languages, the function returns successfully, but this is set to NULL. - @param SecondaryLanguageSize On entry, points to the size of the buffer - pointed to by SecondLanguages, in bytes. On - return, points to the length of SecondLanguages + @param SecondaryLanguagesSize On entry, points to the size of the buffer + pointed to by SecondaryLanguages, in bytes. On + return, points to the length of SecondaryLanguages in bytes. @retval EFI_SUCCESS Secondary languages were correctly returned. - @retval EFI_INVALID_PARAMETER FirstLanguage or SecondLanguages or - SecondLanguagesSize was NULL. - @retval EFI_BUFFER_TOO_SMALL The buffer specified by SecondLanguagesSize is + @retval EFI_INVALID_PARAMETER PrimaryLanguage or SecondaryLanguages or + SecondaryLanguagesSize was NULL. + @retval EFI_BUFFER_TOO_SMALL The buffer specified by SecondaryLanguagesSize is too small to hold the returned information. - SecondLanguageSize is updated to hold the size of + SecondaryLanguageSize is updated to hold the size of the buffer required. - @retval EFI_NOT_FOUND The language specified by FirstLanguage is not + @retval EFI_INVALID_LANGUAGE The language specified by PrimaryLanguage is not present in the specified package list. + @retval EFI_NOT_FOUND The specified PackageList is not in the Database. **/ EFI_STATUS @@ -1038,11 +1118,10 @@ EFIAPI HiiGetSecondaryLanguages ( IN CONST EFI_HII_STRING_PROTOCOL *This, IN EFI_HII_HANDLE PackageList, - IN CONST CHAR8 *FirstLanguage, - IN OUT CHAR8 *SecondLanguages, - IN OUT UINTN *SecondLanguagesSize - ) -; + IN CONST CHAR8 *PrimaryLanguage, + IN OUT CHAR8 *SecondaryLanguages, + IN OUT UINTN *SecondaryLanguagesSize + ); // // EFI_HII_DATABASE_PROTOCOL protocol interfaces @@ -1059,6 +1138,8 @@ HiiGetSecondaryLanguages ( @param PackageList A pointer to an EFI_HII_PACKAGE_LIST_HEADER structure. @param DriverHandle Associate the package list with this EFI handle. + If a NULL is specified, this data will not be associate + with any drivers and cannot have a callback induced. @param Handle A pointer to the EFI_HII_HANDLE instance. @retval EFI_SUCCESS The package list associated with the Handle was @@ -1073,10 +1154,9 @@ EFIAPI HiiNewPackageList ( IN CONST EFI_HII_DATABASE_PROTOCOL *This, IN CONST EFI_HII_PACKAGE_LIST_HEADER *PackageList, - IN CONST EFI_HANDLE DriverHandle, + IN CONST EFI_HANDLE DriverHandle, OPTIONAL OUT EFI_HII_HANDLE *Handle - ) -; + ); /** @@ -1091,9 +1171,7 @@ HiiNewPackageList ( @retval EFI_SUCCESS The data associated with the Handle was removed from the HII database. - @retval EFI_NOT_FOUND The specified PackageList could not be found in - database. - @retval EFI_INVALID_PARAMETER The Handle was not valid. + @retval EFI_NOT_FOUND The specified Handle is not in database. **/ EFI_STATUS @@ -1101,8 +1179,7 @@ EFIAPI HiiRemovePackageList ( IN CONST EFI_HII_DATABASE_PROTOCOL *This, IN EFI_HII_HANDLE Handle - ) -; + ); /** @@ -1119,9 +1196,8 @@ HiiRemovePackageList ( @retval EFI_SUCCESS The HII database was successfully updated. @retval EFI_OUT_OF_RESOURCES Unable to allocate enough memory for the updated database. - @retval EFI_INVALID_PARAMETER Handle or PackageList was NULL. - @retval EFI_NOT_FOUND The Handle was not valid or could not be found in - database. + @retval EFI_INVALID_PARAMETER PackageList was NULL. + @retval EFI_NOT_FOUND The specified Handle is not in database. **/ EFI_STATUS @@ -1130,8 +1206,7 @@ HiiUpdatePackageList ( IN CONST EFI_HII_DATABASE_PROTOCOL *This, IN EFI_HII_HANDLE Handle, IN CONST EFI_HII_PACKAGE_LIST_HEADER *PackageList - ) -; + ); /** @@ -1154,6 +1229,7 @@ HiiUpdatePackageList ( @param Handle An array of EFI_HII_HANDLE instances returned. @retval EFI_SUCCESS The matching handles are outputed successfully. + HandleBufferLength is updated with the actual length. @retval EFI_BUFFER_TO_SMALL The HandleBufferLength parameter indicates that Handle is too small to support the number of handles. HandleBufferLength is updated with a @@ -1161,6 +1237,10 @@ HiiUpdatePackageList ( @retval EFI_NOT_FOUND No matching handle could not be found in database. @retval EFI_INVALID_PARAMETER Handle or HandleBufferLength was NULL. + @retval EFI_INVALID_PARAMETER PackageType is not a EFI_HII_PACKAGE_TYPE_GUID but + PackageGuid is not NULL, PackageType is a EFI_HII_ + PACKAGE_TYPE_GUID but PackageGuid is NULL. + **/ EFI_STATUS @@ -1171,8 +1251,7 @@ HiiListPackageLists ( IN CONST EFI_GUID *PackageGuid, IN OUT UINTN *HandleBufferLength, OUT EFI_HII_HANDLE *Handle - ) -; + ); /** @@ -1209,8 +1288,7 @@ HiiExportPackageLists ( IN EFI_HII_HANDLE Handle, IN OUT UINTN *BufferSize, OUT EFI_HII_PACKAGE_LIST_HEADER *Buffer - ) -; + ); /** @@ -1258,8 +1336,7 @@ HiiRegisterPackageNotify ( IN CONST EFI_HII_DATABASE_NOTIFY PackageNotifyFn, IN EFI_HII_DATABASE_NOTIFY_TYPE NotifyType, OUT EFI_HANDLE *NotifyHandle - ) -; + ); /** @@ -1267,11 +1344,12 @@ HiiRegisterPackageNotify ( @param This A pointer to the EFI_HII_DATABASE_PROTOCOL instance. - @param NotifyHandle The handle of the notification function being + @param NotificationHandle The handle of the notification function being unregistered. @retval EFI_SUCCESS Notification is unregistered successfully. - @retval EFI_INVALID_PARAMETER The Handle is invalid. + @retval EFI_NOT_FOUND The incoming notification handle does not exist + in current hii database. **/ EFI_STATUS @@ -1279,8 +1357,7 @@ EFIAPI HiiUnregisterPackageNotify ( IN CONST EFI_HII_DATABASE_PROTOCOL *This, IN EFI_HANDLE NotificationHandle - ) -; + ); /** @@ -1312,8 +1389,7 @@ HiiFindKeyboardLayouts ( IN CONST EFI_HII_DATABASE_PROTOCOL *This, IN OUT UINT16 *KeyGuidBufferLength, OUT EFI_GUID *KeyGuidBuffer - ) -; + ); /** @@ -1344,8 +1420,7 @@ HiiGetKeyboardLayout ( IN CONST EFI_GUID *KeyGuid, IN OUT UINT16 *KeyboardLayoutLength, OUT EFI_HII_KEYBOARD_LAYOUT *KeyboardLayout - ) -; + ); /** @@ -1370,8 +1445,7 @@ EFIAPI HiiSetKeyboardLayout ( IN CONST EFI_HII_DATABASE_PROTOCOL *This, IN CONST EFI_GUID *KeyGuid - ) -; + ); /** @@ -1396,8 +1470,7 @@ HiiGetPackageListHandle ( IN CONST EFI_HII_DATABASE_PROTOCOL *This, IN EFI_HII_HANDLE PackageListHandle, OUT EFI_HANDLE *DriverHandle - ) -; + ); // // EFI_HII_CONFIG_ROUTING_PROTOCOL interfaces @@ -1450,8 +1523,7 @@ HiiConfigRoutingExtractConfig ( IN CONST EFI_STRING Request, OUT EFI_STRING *Progress, OUT EFI_STRING *Results - ) -; + ); /** @@ -1480,8 +1552,7 @@ EFIAPI HiiConfigRoutingExportConfig ( IN CONST EFI_HII_CONFIG_ROUTING_PROTOCOL *This, OUT EFI_STRING *Results - ) -; + ); /** @@ -1511,12 +1582,11 @@ HiiConfigRoutingExportConfig ( **/ EFI_STATUS EFIAPI -HiiConfigRoutingRoutConfig ( +HiiConfigRoutingRouteConfig ( IN CONST EFI_HII_CONFIG_ROUTING_PROTOCOL *This, IN CONST EFI_STRING Configuration, OUT EFI_STRING *Progress - ) -; + ); @@ -1568,8 +1638,7 @@ HiiBlockToConfig ( IN CONST UINTN BlockSize, OUT EFI_STRING *Config, OUT EFI_STRING *Progress - ) -; + ); /** @@ -1626,8 +1695,7 @@ HiiConfigToBlock ( IN OUT UINT8 *Block, IN OUT UINTN *BlockSize, OUT EFI_STRING *Progress - ) -; + ); /** @@ -1680,15 +1748,28 @@ HiiGetAltCfg ( IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePath, IN CONST UINT16 *AltCfgId, OUT EFI_STRING *AltCfgResp + ); + + +/** + Compare whether two names of languages are identical. + + @param Language1 Name of language 1 from StringPackage + @param Language2 Name of language 2 to be compared with language 1. + + @retval TRUE same + @retval FALSE not same + +**/ +BOOLEAN +HiiCompareLanguage ( + IN CHAR8 *Language1, + IN CHAR8 *Language2 ) ; - // // Global variables // extern EFI_EVENT gHiiKeyboardLayoutChanged; - -#include "R8Lib.h" - #endif