summaryrefslogtreecommitdiffstats
path: root/MdeModulePkg/Include/Library/HiiLib.h
diff options
context:
space:
mode:
Diffstat (limited to 'MdeModulePkg/Include/Library/HiiLib.h')
-rw-r--r--MdeModulePkg/Include/Library/HiiLib.h236
1 files changed, 118 insertions, 118 deletions
diff --git a/MdeModulePkg/Include/Library/HiiLib.h b/MdeModulePkg/Include/Library/HiiLib.h
index 3d87677b2f..8d0ecca46a 100644
--- a/MdeModulePkg/Include/Library/HiiLib.h
+++ b/MdeModulePkg/Include/Library/HiiLib.h
@@ -1,14 +1,14 @@
/** @file
Public include file for the HII Library
-Copyright (c) 2007 - 2013, Intel Corporation. All rights reserved.<BR>
-This program and the accompanying materials are licensed and made available under
-the terms and conditions of the BSD License that accompanies this distribution.
+Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.<BR>
+This program and the accompanying materials are licensed and made available under
+the terms and conditions of the BSD License that accompanies this distribution.
The full text of the license may be found at
-http://opensource.org/licenses/bsd-license.php.
+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.
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
**/
@@ -29,7 +29,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
If an empty list of packages is passed in, then NULL is returned. If the size of
the list of package is 0, then NULL is returned.
- The variable arguments are pointers that point to package headers defined
+ The variable arguments are pointers that point to package headers defined
by UEFI VFR compiler and StringGather tool.
#pragma pack (push, 1)
@@ -38,13 +38,13 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
EFI_HII_PACKAGE_HEADER PackageHeader;
} EDKII_AUTOGEN_PACKAGES_HEADER;
#pragma pack (pop)
-
+
@param[in] PackageListGuid The GUID of the package list.
- @param[in] DeviceHandle If not NULL, the Device Handle on which
+ @param[in] DeviceHandle If not NULL, the Device Handle on which
an instance of DEVICE_PATH_PROTOCOL is installed.
- This Device Handle uniquely defines the device that
+ This Device Handle uniquely defines the device that
the added packages are associated with.
- @param[in] ... The variable argument list that contains pointers
+ @param[in] ... The variable argument list that contains pointers
to packages terminated by a NULL.
@retval NULL An HII Handle has already been registered in the HII Database with
@@ -81,37 +81,37 @@ HiiRemovePackages (
;
/**
- This function creates a new string in String Package or updates an existing
+ This function creates a new string in String Package or updates an existing
string in a String Package. If StringId is 0, then a new string is added to
a String Package. If StringId is not zero, then a string in String Package is
updated. If SupportedLanguages is NULL, then the string is added or updated
for all the languages that the String Package supports. If SupportedLanguages
- is not NULL, then the string is added or updated for the set of languages
+ is not NULL, then the string is added or updated for the set of languages
specified by SupportedLanguages.
-
+
If HiiHandle is NULL, then ASSERT().
If String is NULL, then ASSERT().
- @param[in] HiiHandle A handle that was previously registered in the
+ @param[in] HiiHandle A handle that was previously registered in the
HII Database.
- @param[in] StringId If zero, then a new string is created in the
- String Package associated with HiiHandle. If
- non-zero, then the string specified by StringId
- is updated in the String Package associated
- with HiiHandle.
- @param[in] String A pointer to the Null-terminated Unicode string
- to add or update in the String Package associated
+ @param[in] StringId If zero, then a new string is created in the
+ String Package associated with HiiHandle. If
+ non-zero, then the string specified by StringId
+ is updated in the String Package associated
with HiiHandle.
- @param[in] SupportedLanguages A pointer to a Null-terminated ASCII string of
- language codes. If this parameter is NULL, then
- String is added or updated in the String Package
- associated with HiiHandle for all the languages
- that the String Package supports. If this
- parameter is not NULL, then String is added
- or updated in the String Package associated with
- HiiHandle for the set of languages specified by
- SupportedLanguages. The format of
- SupportedLanguages must follow the language
+ @param[in] String A pointer to the Null-terminated Unicode string
+ to add or update in the String Package associated
+ with HiiHandle.
+ @param[in] SupportedLanguages A pointer to a Null-terminated ASCII string of
+ language codes. If this parameter is NULL, then
+ String is added or updated in the String Package
+ associated with HiiHandle for all the languages
+ that the String Package supports. If this
+ parameter is not NULL, then String is added
+ or updated in the String Package associated with
+ HiiHandle for the set of languages specified by
+ SupportedLanguages. The format of
+ SupportedLanguages must follow the language
format assumed in the HII Database.
@retval 0 The string could not be added or updated in the String Package.
@@ -130,21 +130,21 @@ HiiSetString (
/**
Retrieves a string from a string package in a specific language. If the language
- is not specified, then a string from a string package in the current platform
- language is retrieved. If the string cannot be retrieved using the specified
- language or the current platform language, then the string is retrieved from
- the string package in the first language the string package supports. The
- returned string is allocated using AllocatePool(). The caller is responsible
+ is not specified, then a string from a string package in the current platform
+ language is retrieved. If the string cannot be retrieved using the specified
+ language or the current platform language, then the string is retrieved from
+ the string package in the first language the string package supports. The
+ returned string is allocated using AllocatePool(). The caller is responsible
for freeing the allocated buffer using FreePool().
-
+
If HiiHandle is NULL, then ASSERT().
If StringId is 0, then ASSERT().
@param[in] HiiHandle A handle that was previously registered in the HII Database.
- @param[in] StringId The identifier of the string to retrieved from the string
+ @param[in] StringId The identifier of the string to retrieved from the string
package associated with HiiHandle.
- @param[in] Language The language of the string to retrieve. If this parameter
- is NULL, then the current platform language is used. The
+ @param[in] Language The language of the string to retrieve. If this parameter
+ is NULL, then the current platform language is used. The
format of Language must follow the language format assumed in
the HII Database.
@@ -162,24 +162,24 @@ HiiGetString (
;
/**
- Retrieves a string from a string package named by GUID, in the specified language.
- If the language is not specified, then a string from a string package in the
- current platform language is retrieved. If the string cannot be retrieved
- using the specified language or the current platform language, then the string
- is retrieved from the string package in the first language the string package
- supports. The returned string is allocated using AllocatePool(). The caller
+ Retrieves a string from a string package named by GUID, in the specified language.
+ If the language is not specified, then a string from a string package in the
+ current platform language is retrieved. If the string cannot be retrieved
+ using the specified language or the current platform language, then the string
+ is retrieved from the string package in the first language the string package
+ supports. The returned string is allocated using AllocatePool(). The caller
is responsible for freeing the allocated buffer using FreePool().
-
+
If PackageListGuid is NULL, then ASSERT().
If StringId is 0, then ASSERT().
- @param[in] PackageListGuid The GUID of a package list that was previously
+ @param[in] PackageListGuid The GUID of a package list that was previously
registered in the HII Database.
- @param[in] StringId The identifier of the string to retrieved from the
+ @param[in] StringId The identifier of the string to retrieved from the
string package associated with PackageListGuid.
- @param[in] Language The language of the string to retrieve. If this
- parameter is NULL, then the current platform
- language is used. The format of Language must
+ @param[in] Language The language of the string to retrieve. If this
+ parameter is NULL, then the current platform
+ language is used. The format of Language must
follow the language format assumed in the HII Database.
@retval NULL The package list specified by PackageListGuid is not present in the
@@ -204,12 +204,12 @@ HiiGetPackageString (
This function allocates the returned array using AllocatePool().
The caller is responsible for freeing the array with FreePool().
- @param[in] PackageListGuid An optional parameter that is used to request
+ @param[in] PackageListGuid An optional parameter that is used to request
HII Handles associated with a specific
Package List GUID. If this parameter is NULL,
then all the HII Handles in the HII Database
are returned. If this parameter is not NULL,
- then zero or more HII Handles associated with
+ then zero or more HII Handles associated with
PackageListGuid are returned.
@retval NULL No HII handles were found in the HII database
@@ -226,7 +226,7 @@ HiiGetHiiHandles (
/**
This function allows a caller to extract the form set opcode form the Hii Handle.
- The returned buffer is allocated using AllocatePool().The caller is responsible
+ The returned buffer is allocated using AllocatePool().The caller is responsible
for freeing the allocated buffer using FreePool().
@param Handle The HII handle.
@@ -248,12 +248,12 @@ HiiGetFormSetFromHiiHandle(
);
/**
- Retrieves a pointer to a Null-terminated ASCII string containing the list
- of languages that an HII handle in the HII Database supports. The returned
+ Retrieves a pointer to a Null-terminated ASCII string containing the list
+ of languages that an HII handle in the HII Database supports. The returned
string is allocated using AllocatePool(). The caller is responsible for freeing
the returned string using FreePool(). The format of the returned string follows
the language format assumed in the HII Database.
-
+
If HiiHandle is NULL, then ASSERT().
@param[in] HiiHandle A handle that was previously registered in the HII Database.
@@ -273,23 +273,23 @@ HiiGetSupportedLanguages (
;
/**
- Allocates and returns a Null-terminated Unicode <ConfigHdr> string using routing
+ Allocates and returns a Null-terminated Unicode <ConfigHdr> string using routing
information that includes a GUID, an optional Unicode string name, and a device
- path. The string returned is allocated with AllocatePool(). The caller is
+ path. The string returned is allocated with AllocatePool(). The caller is
responsible for freeing the allocated string with FreePool().
-
+
The format of a <ConfigHdr> is as follows:
GUID=<HexCh>32&NAME=<Char>NameLength&PATH=<HexChar>DevicePathSize<Null>
@param[in] Guid The pointer to an EFI_GUID that is the routing information
- GUID. Each of the 16 bytes in Guid is converted to
+ GUID. Each of the 16 bytes in Guid is converted to
a 2 Unicode character hexadecimal string. This is
an optional parameter that may be NULL.
- @param[in] Name The pointer to a Null-terminated Unicode string that is
- the routing information NAME. This is an optional
- parameter that may be NULL. Each 16-bit Unicode
- character in Name is converted to a 4 character Unicode
+ @param[in] Name The pointer to a Null-terminated Unicode string that is
+ the routing information NAME. This is an optional
+ parameter that may be NULL. Each 16-bit Unicode
+ character in Name is converted to a 4 character Unicode
hexadecimal string.
@param[in] DriverHandle The driver handle that supports a Device Path Protocol
that is the routing information PATH. Each byte of
@@ -311,23 +311,23 @@ HiiConstructConfigHdr (
/**
Reset the default value specified by DefaultId to the driver
- configuration specified by the Request string.
+ configuration specified by the Request string.
NULL request string support depends on the ExportConfig interface of
HiiConfigRouting protocol in UEFI specification.
-
- @param Request A null-terminated Unicode string in
+
+ @param Request A null-terminated Unicode string in
<MultiConfigRequest> format. It can be NULL.
If it is NULL, all configurations for the
entirety of the current HII database will be reset.
@param DefaultId Specifies the type of defaults to retrieve.
-
+
@retval TRUE The default value was set successfully.
@retval FALSE The default value was not found.
**/
BOOLEAN
-EFIAPI
-HiiSetToDefaults (
+EFIAPI
+HiiSetToDefaults (
IN CONST EFI_STRING Request, OPTIONAL
IN UINT16 DefaultId
);
@@ -337,17 +337,17 @@ HiiSetToDefaults (
NULL request string support depends on the ExportConfig interface of
HiiConfigRouting protocol in the UEFI specification.
-
- @param Request A null-terminated Unicode string in
+
+ @param Request A null-terminated Unicode string in
<MultiConfigRequest> format. It can be NULL.
If it is NULL, all current configurations for the
entirety of the current HII database will be validated.
-
+
@retval TRUE The current configuration is valid.
@retval FALSE The current configuration is invalid.
**/
BOOLEAN
-EFIAPI
+EFIAPI
HiiValidateSettings (
IN CONST EFI_STRING Request OPTIONAL
);
@@ -377,11 +377,11 @@ HiiIsConfigHdrMatch (
Retrieves uncommitted data from the Form Browser and converts it to a binary
buffer.
- @param[in] VariableGuid The pointer to an EFI_GUID structure. This is an optional
+ @param[in] VariableGuid The pointer to an EFI_GUID structure. This is an optional
parameter that may be NULL.
- @param[in] VariableName The pointer to a Null-terminated Unicode string. This
+ @param[in] VariableName The pointer to a Null-terminated Unicode string. This
is an optional parameter that may be NULL.
- @param[in] BufferSize The length in bytes of buffer to hold retrieved data.
+ @param[in] BufferSize The length in bytes of buffer to hold retrieved data.
@param[out] Buffer The buffer of data to be updated.
@retval FALSE The uncommitted data could not be retrieved.
@@ -411,7 +411,7 @@ HiiGetBrowserData (
@param[in] RequestElement An optional field to specify which part of the
buffer data will be send back to Browser. If NULL,
the whole buffer of data will be committed to
- Browser.
+ Browser.
<RequestElement> ::= &OFFSET=<Number>&WIDTH=<Number>*
@retval FALSE The uncommitted data could not be updated.
@@ -436,9 +436,9 @@ HiiSetBrowserData (
/**
Returns a UINT64 value that contains bitfields for Hour, Minute, and Second.
- The lower 8-bits of Hour are placed in bits 0..7. The lower 8-bits of Minute
- are placed in bits 8..15, and the lower 8-bits of Second are placed in bits
- 16..23. This format was selected because it can be easily translated to
+ The lower 8-bits of Hour are placed in bits 0..7. The lower 8-bits of Minute
+ are placed in bits 8..15, and the lower 8-bits of Second are placed in bits
+ 16..23. This format was selected because it can be easily translated to
an EFI_HII_TIME structure in an EFI_IFR_TYPE_VALUE union.
@param Hour The hour value to be encoded.
@@ -452,9 +452,9 @@ HiiSetBrowserData (
/**
Returns a UINT64 value that contains bit fields for Year, Month, and Day.
- The lower 16-bits of Year are placed in bits 0..15. The lower 8-bits of Month
- are placed in bits 16..23, and the lower 8-bits of Day are placed in bits
- 24..31. This format was selected because it can be easily translated to
+ The lower 16-bits of Year are placed in bits 0..15. The lower 8-bits of Month
+ are placed in bits 16..23, and the lower 8-bits of Day are placed in bits
+ 24..31. This format was selected because it can be easily translated to
an EFI_HII_DATE structure in an EFI_IFR_TYPE_VALUE union.
@param Year The year value to be encoded.
@@ -467,7 +467,7 @@ HiiSetBrowserData (
(UINT64)((Year & 0xffff) | ((Month & 0xff) << 16) | ((Day & 0xff) << 24))
/**
- Allocates and returns a new OpCode Handle. OpCode Handles must be freed with
+ Allocates and returns a new OpCode Handle. OpCode Handles must be freed with
HiiFreeOpCodeHandle().
@retval NULL There are not enough resources to allocate a new OpCode Handle.
@@ -595,14 +595,14 @@ HiiCreateDefaultOpCode (
@param[in] OpCodeHandle The handle to the buffer of opcodes.
@param[in] Guid The pointer to EFI_GUID of this guided opcode.
- @param[in] GuidOpCode The pointer to an EFI_IFR_GUID opcode. This is an
+ @param[in] GuidOpCode The pointer to an EFI_IFR_GUID opcode. This is an
optional parameter that may be NULL. If this
- parameter is NULL, then the GUID extension
+ parameter is NULL, then the GUID extension
region of the created opcode is filled with zeros.
- If this parameter is not NULL, then the GUID
- extension region of GuidData will be copied to
+ If this parameter is not NULL, then the GUID
+ extension region of GuidData will be copied to
the GUID extension region of the created opcode.
- @param[in] OpCodeSize The size, in bytes, of created opcode. This value
+ @param[in] OpCodeSize The size, in bytes, of created opcode. This value
must be >= sizeof(EFI_IFR_GUID).
@retval NULL There is not enough space left in Buffer to add the opcode.
@@ -705,7 +705,7 @@ HiiCreateGotoOpCode (
/**
Create EFI_IFR_REF_OP, EFI_IFR_REF2_OP, EFI_IFR_REF3_OP and EFI_IFR_REF4_OP opcode.
- When RefDevicePath is not zero, EFI_IFR_REF4 opcode will be created.
+ When RefDevicePath is not zero, EFI_IFR_REF4 opcode will be created.
When RefDevicePath is zero and RefFormSetId is not NULL, EFI_IFR_REF3 opcode will be created.
When RefDevicePath is zero, RefFormSetId is NULL and RefQuestionId is not zero, EFI_IFR_REF2 opcode will be created.
When RefDevicePath is zero, RefFormSetId is NULL and RefQuestionId is zero, EFI_IFR_REF opcode will be created.
@@ -719,11 +719,11 @@ HiiCreateGotoOpCode (
@param[in] Help The string ID for Help.
@param[in] QuestionFlags The flags in Question Header
@param[in] QuestionId Question ID.
- @param[in] RefQuestionId The question on the form to which this link is referring.
+ @param[in] RefQuestionId The question on the form to which this link is referring.
If its value is zero, then the link refers to the top of the form.
- @param[in] RefFormSetId The form set to which this link is referring. If its value is NULL, and RefDevicePath is
+ @param[in] RefFormSetId The form set to which this link is referring. If its value is NULL, and RefDevicePath is
zero, then the link is to the current form set.
- @param[in] RefDevicePath The string identifier that specifies the string containing the text representation of
+ @param[in] RefDevicePath The string identifier that specifies the string containing the text representation of
the device path to which the form set containing the form specified by FormId.
If its value is zero, then the link refers to the current page.
@@ -1050,26 +1050,26 @@ HiiCreateTimeOpCode (
);
/**
- This function updates a form that has previously been registered with the HII
+ This function updates a form that has previously been registered with the HII
Database. This function will perform at most one update operation.
-
- The form to update is specified by Handle, FormSetGuid, and FormId. Binary
- comparisons of IFR opcodes are performed from the beginning of the form being
- updated until an IFR opcode is found that exactly matches the first IFR opcode
+
+ The form to update is specified by Handle, FormSetGuid, and FormId. Binary
+ comparisons of IFR opcodes are performed from the beginning of the form being
+ updated until an IFR opcode is found that exactly matches the first IFR opcode
specified by StartOpCodeHandle. The following rules are used to determine if
an insert, replace, or delete operation is performed:
-
- 1) If no matches are found, then NULL is returned.
+
+ 1) If no matches are found, then NULL is returned.
2) If a match is found, and EndOpCodeHandle is NULL, then all of the IFR opcodes
- from StartOpCodeHandle except the first opcode are inserted immediately after
+ from StartOpCodeHandle except the first opcode are inserted immediately after
the matching IFR opcode in the form to be updated.
- 3) If a match is found, and EndOpCodeHandle is not NULL, then a search is made
- from the matching IFR opcode until an IFR opcode exactly matches the first
+ 3) If a match is found, and EndOpCodeHandle is not NULL, then a search is made
+ from the matching IFR opcode until an IFR opcode exactly matches the first
IFR opcode specified by EndOpCodeHandle. If no match is found for the first
IFR opcode specified by EndOpCodeHandle, then NULL is returned. If a match
- is found, then all of the IFR opcodes between the start match and the end
+ is found, then all of the IFR opcodes between the start match and the end
match are deleted from the form being updated and all of the IFR opcodes
- from StartOpCodeHandle except the first opcode are inserted immediately after
+ from StartOpCodeHandle except the first opcode are inserted immediately after
the matching start IFR opcode. If StartOpCcodeHandle only contains one
IFR instruction, then the result of this operation will delete all of the IFR
opcodes between the start end matches.
@@ -1082,26 +1082,26 @@ HiiCreateTimeOpCode (
is an optional parameter that may be NULL.
If it is NULL, all FormSet will be updated.
@param[in] FormId The ID of the form to update.
- @param[in] StartOpCodeHandle An OpCode Handle that contains the set of IFR
+ @param[in] StartOpCodeHandle An OpCode Handle that contains the set of IFR
opcodes to be inserted or replaced in the form.
- The first IFR instruction in StartOpCodeHandle
- is used to find matching IFR opcode in the
- form.
+ The first IFR instruction in StartOpCodeHandle
+ is used to find matching IFR opcode in the
+ form.
@param[in] EndOpCodeHandle An OpCcode Handle that contains the IFR opcode
that marks the end of a replace operation in
the form. This is an optional parameter that
may be NULL. If it is NULL, then the IFR
- opcodes specified by StartOpCodeHandle are
+ opcodes specified by StartOpCodeHandle are
inserted into the form.
-
+
@retval EFI_OUT_OF_RESOURCES Not enough memory resources are allocated.
@retval EFI_NOT_FOUND The following cases will return EFI_NOT_FOUND:
- 1) The form specified by HiiHandle, FormSetGuid,
+ 1) The form specified by HiiHandle, FormSetGuid,
and FormId could not be found in the HII Database.
2) No IFR opcodes in the target form match the first
IFR opcode in StartOpCodeHandle.
- 3) EndOpCOde is not NULL, and no IFR opcodes in the
- target form following a matching start opcode match
+ 3) EndOpCOde is not NULL, and no IFR opcodes in the
+ target form following a matching start opcode match
the first IFR opcode in EndOpCodeHandle.
@retval EFI_SUCCESS The matched form is updated by StartOpcode.