X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=MdeModulePkg%2FInclude%2FLibrary%2FHiiLib.h;h=3d87677b2fb89b36fe0370d4bf882e19839509bd;hb=4073f85d4a09e41ccdbb5efef10835d42db237e3;hp=9a040326c08ac4a86757459fe6d9f340b007b93c;hpb=7992c0b02d4bb4d166b118c63a38f98b7933bd97;p=mirror_edk2.git diff --git a/MdeModulePkg/Include/Library/HiiLib.h b/MdeModulePkg/Include/Library/HiiLib.h index 9a040326c0..3d87677b2f 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 - 2008, 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 +Copyright (c) 2007 - 2013, 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 that accompanies this distribution. +The full text of the license may be found at +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. **/ @@ -24,10 +24,10 @@ /** Registers a list of packages in the HII Database and returns the HII Handle associated with that registration. If an HII Handle has already been registered - with the same PackageListGuid, then NULL is returned. If there are not enough - resources to perform the registration, then NULL is returned. 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. + with the same PackageListGuid and DeviceHandle, then NULL is returned. If there + are not enough resources to perform the registration, then NULL is returned. + 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 by UEFI VFR compiler and StringGather tool. @@ -47,8 +47,8 @@ @param[in] ... The variable argument list that contains pointers to packages terminated by a NULL. - @retval NULL A HII Handle has already been registered in the HII Database with - the same PackageListGuid. + @retval NULL An HII Handle has already been registered in the HII Database with + the same PackageListGuid and DeviceHandle. @retval NULL The HII Handle could not be created. @retval NULL An empty list of packages was passed in. @retval NULL All packages are empty. @@ -131,7 +131,7 @@ 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 can not be retrieved using the specified + 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 @@ -164,7 +164,7 @@ 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 can not be retrieved + 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 @@ -224,6 +224,29 @@ 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 + for freeing the allocated buffer using FreePool(). + + @param Handle The HII handle. + @param Buffer On return, points to a pointer which point to the buffer that contain the formset opcode. + @param BufferSize On return, points to the length of the buffer. + + @retval EFI_OUT_OF_RESOURCES No enough memory resource is allocated. + @retval EFI_NOT_FOUND Can't find the package data for the input Handle. + @retval EFI_INVALID_PARAMETER The input parameters are not correct. + @retval EFI_SUCCESS Get the formset opcode from the hii handle successfully. + +**/ +EFI_STATUS +EFIAPI +HiiGetFormSetFromHiiHandle( + IN EFI_HII_HANDLE Handle, + OUT EFI_IFR_FORM_SET **Buffer, + OUT UINTN *BufferSize + ); + /** 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 @@ -236,9 +259,9 @@ HiiGetHiiHandles ( @param[in] HiiHandle A handle that was previously registered in the HII Database. @retval NULL HiiHandle is not registered in the HII database - @retval NULL There are not enough resources available to retrieve the suported + @retval NULL There are not enough resources available to retrieve the supported languages. - @retval NULL The list of suported languages could not be retrieved. + @retval NULL The list of supported languages could not be retrieved. @retval Other A pointer to the Null-terminated ASCII string of supported languages. **/ @@ -259,19 +282,19 @@ HiiGetSupportedLanguages ( GUID=32&NAME=NameLength&PATH=DevicePathSize - @param[in] Guid Pointer to an EFI_GUID that is the routing information + @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 - a 2 Unicode character hexidecimal string. This is + a 2 Unicode character hexadecimal string. This is an optional parameter that may be NULL. - @param[in] Name Pointer to a Null-terminated Unicode string that is + @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 - hexidecimal string. - @param[in] DriverHandle The driver handle which supports a Device Path Protocol + hexadecimal string. + @param[in] DriverHandle The driver handle that supports a Device Path Protocol that is the routing information PATH. Each byte of the Device Path associated with DriverHandle is converted - to a 2 Unicode character hexidecimal string. + to a two (Unicode) character hexadecimal string. @retval NULL DriverHandle does not support the Device Path Protocol. @retval NULL DriverHandle does not support the Device Path Protocol. @@ -295,11 +318,11 @@ HiiConstructConfigHdr ( @param Request A null-terminated Unicode string in format. It can be NULL. - If it is NULL, all configuration for the + 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 TURE The default value was set successfully. + @retval TRUE The default value was set successfully. @retval FALSE The default value was not found. **/ BOOLEAN @@ -320,8 +343,8 @@ HiiSetToDefaults ( If it is NULL, all current configurations for the entirety of the current HII database will be validated. - @retval TURE Current configuration is valid. - @retval FALSE Current configuration is invalid. + @retval TRUE The current configuration is valid. + @retval FALSE The current configuration is invalid. **/ BOOLEAN EFIAPI @@ -335,8 +358,8 @@ HiiValidateSettings ( If ConfigHdr is NULL, then ASSERT(). @param[in] ConfigHdr Either or . - @param[in] Guid GUID of the storage. - @param[in] Name NAME of the storage. + @param[in] Guid The GUID of the storage. + @param[in] Name The NAME of the storage. @retval TRUE Routing information matches . @retval FALSE Routing information does not match . @@ -354,12 +377,12 @@ HiiIsConfigHdrMatch ( Retrieves uncommitted data from the Form Browser and converts it to a binary buffer. - @param[in] VariableName Pointer to a Null-terminated Unicode string. This - is an optional parameter that may be NULL. - @param[in] VariableGuid 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] BufferSize Length in bytes of buffer to hold retrived data. - @param[out] Block Buffer of data to be updated. + @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[out] Buffer The buffer of data to be updated. @retval FALSE The uncommitted data could not be retrieved. @retval TRUE The uncommitted data was retrieved. @@ -370,8 +393,8 @@ EFIAPI HiiGetBrowserData ( IN CONST EFI_GUID *VariableGuid, OPTIONAL IN CONST CHAR16 *VariableName, OPTIONAL - IN UINTN BlockSize, - OUT UINT8 *Block + IN UINTN BufferSize, + OUT UINT8 *Buffer ); /** @@ -379,12 +402,12 @@ HiiGetBrowserData ( If Buffer is NULL, then ASSERT(). - @param[in] VariableName Pointer to a Null-terminated Unicode string. This - is an optional parameter that may be NULL. - @param[in] VariableGuid 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] BufferSize Length, in bytes, of Buffer. - @param[in] Buffer Buffer of data to commit. + @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. + @param[in] Buffer The buffer of data to commit. @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 @@ -415,7 +438,7 @@ 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 is selected because it can be easily translated to + 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. @@ -428,10 +451,10 @@ HiiSetBrowserData ( (UINT64)((Hour & 0xff) | ((Minute & 0xff) << 8) | ((Second & 0xff) << 16)) /** - Returns a UINT64 value that contains bitfields for Year, Month, and Day. + 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 is selected because it can be easily translated to + 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. @@ -458,12 +481,14 @@ HiiAllocateOpCodeHandle ( ); /** - Frees an OpCode Handle that was peviously allocated with HiiAllocateOpCodeHandle(). + Frees an OpCode Handle that was previously allocated with HiiAllocateOpCodeHandle(). When an OpCode Handle is freed, all of the opcodes associated with the OpCode Handle are also freed. If OpCodeHandle is NULL, then ASSERT(). + @param[in] OpCodeHandle The handle to the buffer of opcodes. + **/ VOID EFIAPI @@ -477,8 +502,8 @@ HiiFreeOpCodeHandle ( If OpCodeHandle is NULL, then ASSERT(). If RawBuffer is NULL, then ASSERT(); - @param[in] OpCodeHandle Handle to the buffer of opcodes. - @param[in] RawBuffer Buffer of opcodes to append. + @param[in] OpCodeHandle The handle to the buffer of opcodes. + @param[in] RawBuffer The buffer of opcodes to append. @param[in] RawBufferSize The size, in bytes, of Buffer. @retval NULL There is not enough space left in Buffer to add the opcode. @@ -517,11 +542,11 @@ HiiCreateEndOpCode ( If Type is invalid, then ASSERT(). If Flags is invalid, then ASSERT(). - @param[in] OpCodeHandle Handle to the buffer of opcodes. - @param[in] StringId StringId for the option - @param[in] Flags Flags for the option - @param[in] Type Type for the option - @param[in] Value Value for the option + @param[in] OpCodeHandle The handle to the buffer of opcodes. + @param[in] StringId StringId for the option. + @param[in] Flags The flags for the option. + @param[in] Type The type for the option. + @param[in] Value The value for the option. @retval NULL There is not enough space left in Buffer to add the opcode. @retval Other A pointer to the created opcode. @@ -543,10 +568,10 @@ HiiCreateOneOfOptionOpCode ( If OpCodeHandle is NULL, then ASSERT(). If Type is invalid, then ASSERT(). - @param[in] OpCodeHandle Handle to the buffer of opcodes. - @param[in] DefaultId DefaultId for the default - @param[in] Type Type for the default - @param[in] Value Value for the default + @param[in] OpCodeHandle The handle to the buffer of opcodes. + @param[in] DefaultId The DefaultId for the default. + @param[in] Type The type for the default. + @param[in] Value The value for the default. @retval NULL There is not enough space left in Buffer to add the opcode. @retval Other A pointer to the created opcode. @@ -568,9 +593,9 @@ HiiCreateDefaultOpCode ( If Guid is NULL, then ASSERT(). If OpCodeSize < sizeof (EFI_IFR_GUID), then ASSERT(). - @param[in] OpCodeHandle Handle to the buffer of opcodes. - @param[in] Guid Pointer to EFI_GUID of this guided opcode. - @param[in] GuidOpCode Pointer to an EFI_IFR_GUID opcode. This is an + @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 optional parameter that may be NULL. If this parameter is NULL, then the GUID extension region of the created opcode is filled with zeros. @@ -599,12 +624,12 @@ HiiCreateGuidOpCode ( If OpCodeHandle is NULL, then ASSERT(). If any reserved bits are set in QuestionFlags, then ASSERT(). - @param[in] OpCodeHandle Handle to the buffer of opcodes. - @param[in] QuestionId Question ID - @param[in] Prompt String ID for Prompt - @param[in] Help String ID for Help - @param[in] QuestionFlags Flags in Question Header - @param[in] QuestionConfig String ID for configuration + @param[in] OpCodeHandle The handle to the buffer of opcodes. + @param[in] QuestionId The Question ID. + @param[in] Prompt The String ID for Prompt. + @param[in] Help The String ID for Help. + @param[in] QuestionFlags The flags in the Question Header. + @param[in] QuestionConfig The String ID for the configuration. @retval NULL There is not enough space left in Buffer to add the opcode. @retval Other A pointer to the created opcode. @@ -628,11 +653,11 @@ HiiCreateActionOpCode ( If any reserved bits are set in Flags, then ASSERT(). If Scope > 1, then ASSERT(). - @param[in] OpCodeHandle Handle to the buffer of opcodes. - @param[in] Prompt String ID for Prompt - @param[in] Help String ID for Help - @param[in] Flags Subtitle opcode flags - @param[in] Scope 1 if this opcpde is the beginning of a new scope. + @param[in] OpCodeHandle The handle to the buffer of opcodes. + @param[in] Prompt The string ID for Prompt. + @param[in] Help The string ID for Help. + @param[in] Flags The subtitle opcode flags. + @param[in] Scope 1 if this opcode is the beginning of a new scope. 0 if this opcode is within the current scope. @retval NULL There is not enough space left in Buffer to add the opcode. @@ -655,12 +680,12 @@ HiiCreateSubTitleOpCode ( If OpCodeHandle is NULL, then ASSERT(). If any reserved bits are set in QuestionFlags, then ASSERT(). - @param[in] OpCodeHandle Handle to the buffer of opcodes. - @param[in] FormId Destination Form ID - @param[in] Prompt String ID for Prompt - @param[in] Help String ID for Help - @param[in] QuestionFlags Flags in Question Header - @param[in] QuestionId Question ID + @param[in] OpCodeHandle The handle to the buffer of opcodes. + @param[in] FormId The Destination Form ID. + @param[in] Prompt The string ID for Prompt. + @param[in] Help The string ID for Help. + @param[in] QuestionFlags The flags in Question Header + @param[in] QuestionId Question ID. @retval NULL There is not enough space left in Buffer to add the opcode. @retval Other A pointer to the created opcode. @@ -677,6 +702,49 @@ HiiCreateGotoOpCode ( IN EFI_QUESTION_ID QuestionId ); +/** + 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 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. + + If OpCodeHandle is NULL, then ASSERT(). + If any reserved bits are set in QuestionFlags, then ASSERT(). + + @param[in] OpCodeHandle The handle to the buffer of opcodes. + @param[in] RefFormId The Destination Form ID. + @param[in] Prompt The string ID for Prompt. + @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. + 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 + 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 + 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. + + @retval NULL There is not enough space left in Buffer to add the opcode. + @retval Other A pointer to the created opcode. + +**/ +UINT8 * +EFIAPI +HiiCreateGotoExOpCode ( + IN VOID *OpCodeHandle, + IN EFI_FORM_ID RefFormId, + IN EFI_STRING_ID Prompt, + IN EFI_STRING_ID Help, + IN UINT8 QuestionFlags, + IN EFI_QUESTION_ID QuestionId, + IN EFI_QUESTION_ID RefQuestionId, + IN EFI_GUID *RefFormSetId, OPTIONAL + IN EFI_STRING_ID RefDevicePath + ); + /** Create EFI_IFR_CHECKBOX_OP opcode. @@ -684,15 +752,16 @@ HiiCreateGotoOpCode ( If any reserved bits are set in QuestionFlags, then ASSERT(). If any reserved bits are set in CheckBoxFlags, then ASSERT(). - @param[in] OpCodeHandle Handle to the buffer of opcodes. - @param[in] QuestionId Question ID - @param[in] VarStoreId Storage ID - @param[in] VarOffset Offset in Storage - @param[in] Prompt String ID for Prompt - @param[in] Help String ID for Help - @param[in] QuestionFlags Flags in Question Header - @param[in] CheckBoxFlags Flags for checkbox opcode - @param[in] DefaultsOpCodeHandle Handle for a buffer of DEFAULT opcodes. This + @param[in] OpCodeHandle The handle to the buffer of opcodes. + @param[in] QuestionId The question ID. + @param[in] VarStoreId The storage ID. + @param[in] VarOffset Offset in Storage or String ID of the name (VarName) + for this name/value pair. + @param[in] Prompt The string ID for Prompt. + @param[in] Help The string ID for Help. + @param[in] QuestionFlags The flags in Question Header. + @param[in] CheckBoxFlags The flags for checkbox opcode. + @param[in] DefaultsOpCodeHandle The handle for a buffer of DEFAULT opcodes. This is an optional parameter that may be NULL. @retval NULL There is not enough space left in Buffer to add the opcode. @@ -720,18 +789,19 @@ HiiCreateCheckBoxOpCode ( If any reserved bits are set in QuestionFlags, then ASSERT(). If any reserved bits are set in NumericFlags, then ASSERT(). - @param[in] OpCodeHandle Handle to the buffer of opcodes. - @param[in] QuestionId Question ID - @param[in] VarStoreId Storage ID - @param[in] VarOffset Offset in Storage - @param[in] Prompt String ID for Prompt - @param[in] Help String ID for Help - @param[in] QuestionFlags Flags in Question Header - @param[in] NumericFlags Flags for numeric opcode - @param[in] Minimum Numeric minimum value - @param[in] Maximum Numeric maximum value - @param[in] Step Numeric step for edit - @param[in] DefaultsOpCodeHandle Handle for a buffer of DEFAULT opcodes. This + @param[in] OpCodeHandle The handle to the buffer of opcodes. + @param[in] QuestionId The question ID. + @param[in] VarStoreId The storage ID. + @param[in] VarOffset Offset in Storage or String ID of the name (VarName) + for this name/value pair. + @param[in] Prompt The string ID for Prompt. + @param[in] Help The string ID for Help. + @param[in] QuestionFlags The flags in Question Header. + @param[in] NumericFlags The flags for a numeric opcode. + @param[in] Minimum The numeric minimum value. + @param[in] Maximum The numeric maximum value. + @param[in] Step The numeric step for edit. + @param[in] DefaultsOpCodeHandle The handle for a buffer of DEFAULT opcodes. This is an optional parameter that may be NULL. @retval NULL There is not enough space left in Buffer to add the opcode. @@ -762,17 +832,18 @@ HiiCreateNumericOpCode ( If any reserved bits are set in QuestionFlags, then ASSERT(). If any reserved bits are set in StringFlags, then ASSERT(). - @param[in] OpCodeHandle Handle to the buffer of opcodes. - @param[in] QuestionId Question ID - @param[in] VarStoreId Storage ID - @param[in] VarOffset Offset in Storage - @param[in] Prompt String ID for Prompt - @param[in] Help String ID for Help - @param[in] QuestionFlags Flags in Question Header - @param[in] StringFlags Flags for string opcode - @param[in] MinSize String minimum length - @param[in] MaxSize String maximum length - @param[in] DefaultsOpCodeHandle Handle for a buffer of DEFAULT opcodes. This + @param[in] OpCodeHandle The handle to the buffer of opcodes. + @param[in] QuestionId The question ID. + @param[in] VarStoreId The storage ID. + @param[in] VarOffset Offset in Storage or String ID of the name (VarName) + for this name/value pair. + @param[in] Prompt The string ID for Prompt. + @param[in] Help The string ID for Help. + @param[in] QuestionFlags The flags in Question Header. + @param[in] StringFlags The flags for a string opcode. + @param[in] MinSize The string minimum length. + @param[in] MaxSize The string maximum length. + @param[in] DefaultsOpCodeHandle The handle for a buffer of DEFAULT opcodes. This is an optional parameter that may be NULL. @retval NULL There is not enough space left in Buffer to add the opcode. @@ -802,16 +873,17 @@ HiiCreateStringOpCode ( If any reserved bits are set in QuestionFlags, then ASSERT(). If any reserved bits are set in OneOfFlags, then ASSERT(). - @param[in] OpCodeHandle Handle to the buffer of opcodes. - @param[in] QuestionId Question ID - @param[in] VarStoreId Storage ID - @param[in] VarOffset Offset in Storage - @param[in] Prompt String ID for Prompt - @param[in] Help String ID for Help - @param[in] QuestionFlags Flags in Question Header - @param[in] OneOfFlags Flags for oneof opcode - @param[in] OptionsOpCodeHandle Handle for a buffer of ONE_OF_OPTION opcodes. - @param[in] DefaultsOpCodeHandle Handle for a buffer of DEFAULT opcodes. This + @param[in] OpCodeHandle The handle to the buffer of opcodes. + @param[in] QuestionId The question ID. + @param[in] VarStoreId The storage ID. + @param[in] VarOffset Offset in Storage or String ID of the name (VarName) + for this name/value pair. + @param[in] Prompt The string ID for Prompt. + @param[in] Help The string ID for Help. + @param[in] QuestionFlags The flags in Question Header. + @param[in] OneOfFlags The flags for a oneof opcode. + @param[in] OptionsOpCodeHandle The handle for a buffer of ONE_OF_OPTION opcodes. + @param[in] DefaultsOpCodeHandle The handle for a buffer of DEFAULT opcodes. This is an optional parameter that may be NULL. @retval NULL There is not enough space left in Buffer to add the opcode. @@ -840,17 +912,18 @@ HiiCreateOneOfOpCode ( If any reserved bits are set in QuestionFlags, then ASSERT(). If any reserved bits are set in OrderedListFlags, then ASSERT(). - @param[in] OpCodeHandle Handle to the buffer of opcodes. - @param[in] QuestionId Question ID - @param[in] VarStoreId Storage ID - @param[in] VarOffset Offset in Storage - @param[in] Prompt String ID for Prompt - @param[in] Help String ID for Help - @param[in] QuestionFlags Flags in Question Header - @param[in] OrderedListFlags Flags for ordered list opcode - @param[in] DataType Type for option value + @param[in] OpCodeHandle The handle to the buffer of opcodes. + @param[in] QuestionId The question ID. + @param[in] VarStoreId The storage ID. + @param[in] VarOffset Offset in Storage or String ID of the name (VarName) + for this name/value pair. + @param[in] Prompt The string ID for Prompt. + @param[in] Help The string ID for Help. + @param[in] QuestionFlags The flags in Question Header. + @param[in] OrderedListFlags The flags for an ordered list opcode. + @param[in] DataType The type for option value. @param[in] MaxContainers Maximum count for options in this ordered list - @param[in] OptionsOpCodeHandle Handle for a buffer of ONE_OF_OPTION opcodes. + @param[in] OptionsOpCodeHandle The handle for a buffer of ONE_OF_OPTION opcodes. @param[in] DefaultsOpCodeHandle Handle for a buffer of DEFAULT opcodes. This is an optional parameter that may be NULL. @@ -875,6 +948,107 @@ HiiCreateOrderedListOpCode ( IN VOID *DefaultsOpCodeHandle OPTIONAL ); +/** + Create EFI_IFR_TEXT_OP opcode. + + If OpCodeHandle is NULL, then ASSERT(). + + @param[in] OpCodeHandle Handle to the buffer of opcodes. + @param[in] Prompt String ID for Prompt. + @param[in] Help String ID for Help. + @param[in] TextTwo String ID for TextTwo. + + @retval NULL There is not enough space left in Buffer to add the opcode. + @retval Other A pointer to the created opcode. + +**/ +UINT8 * +EFIAPI +HiiCreateTextOpCode ( + IN VOID *OpCodeHandle, + IN EFI_STRING_ID Prompt, + IN EFI_STRING_ID Help, + IN EFI_STRING_ID TextTwo + ); + +/** + Create EFI_IFR_DATE_OP opcode. + + If OpCodeHandle is NULL, then ASSERT(). + If any reserved bits are set in QuestionFlags, then ASSERT(). + If any reserved bits are set in DateFlags, then ASSERT(). + + @param[in] OpCodeHandle Handle to the buffer of opcodes. + @param[in] QuestionId Question ID + @param[in] VarStoreId Storage ID, optional. If DateFlags is not + QF_DATE_STORAGE_NORMAL, this parameter is ignored. + @param[in] VarOffset Offset in Storage or String ID of the name (VarName) + for this name/value pair, optional. If DateFlags is not + QF_DATE_STORAGE_NORMAL, this parameter is ignored. + @param[in] Prompt String ID for Prompt + @param[in] Help String ID for Help + @param[in] QuestionFlags Flags in Question Header + @param[in] DateFlags Flags for date opcode + @param[in] DefaultsOpCodeHandle Handle for a buffer of DEFAULT opcodes. This + is an optional parameter that may be NULL. + + @retval NULL There is not enough space left in Buffer to add the opcode. + @retval Other A pointer to the created opcode. + +**/ +UINT8 * +EFIAPI +HiiCreateDateOpCode ( + IN VOID *OpCodeHandle, + IN EFI_QUESTION_ID QuestionId, + IN EFI_VARSTORE_ID VarStoreId, OPTIONAL + IN UINT16 VarOffset, OPTIONAL + IN EFI_STRING_ID Prompt, + IN EFI_STRING_ID Help, + IN UINT8 QuestionFlags, + IN UINT8 DateFlags, + IN VOID *DefaultsOpCodeHandle OPTIONAL + ); + +/** + Create EFI_IFR_TIME_OP opcode. + + If OpCodeHandle is NULL, then ASSERT(). + If any reserved bits are set in QuestionFlags, then ASSERT(). + If any reserved bits are set in TimeFlags, then ASSERT(). + + @param[in] OpCodeHandle Handle to the buffer of opcodes. + @param[in] QuestionId Question ID + @param[in] VarStoreId Storage ID, optional. If TimeFlags is not + QF_TIME_STORAGE_NORMAL, this parameter is ignored. + @param[in] VarOffset Offset in Storage or String ID of the name (VarName) + for this name/value pair, optional. If TimeFlags is not + QF_TIME_STORAGE_NORMAL, this parameter is ignored. + @param[in] Prompt String ID for Prompt + @param[in] Help String ID for Help + @param[in] QuestionFlags Flags in Question Header + @param[in] TimeFlags Flags for time opcode + @param[in] DefaultsOpCodeHandle Handle for a buffer of DEFAULT opcodes. This + is an optional parameter that may be NULL. + + @retval NULL There is not enough space left in Buffer to add the opcode. + @retval Other A pointer to the created opcode. + +**/ +UINT8 * +EFIAPI +HiiCreateTimeOpCode ( + IN VOID *OpCodeHandle, + IN EFI_QUESTION_ID QuestionId, + IN EFI_VARSTORE_ID VarStoreId, OPTIONAL + IN UINT16 VarOffset, OPTIONAL + IN EFI_STRING_ID Prompt, + IN EFI_STRING_ID Help, + IN UINT8 QuestionFlags, + IN UINT8 TimeFlags, + IN VOID *DefaultsOpCodeHandle OPTIONAL + ); + /** This function updates a form that has previously been registered with the HII Database. This function will perform at most one update operation. @@ -882,22 +1056,22 @@ HiiCreateOrderedListOpCode ( 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 - specifed by StartOpCodeHandle. The following rules are used to determine if + 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. 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 - the matching IFR opcode in the form beng updated. + 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 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 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 ths operation will delete all of the IFR + IFR instruction, then the result of this operation will delete all of the IFR opcodes between the start end matches. If HiiHandle is NULL, then ASSERT(). @@ -938,8 +1112,8 @@ HiiUpdateForm ( IN EFI_HII_HANDLE HiiHandle, IN EFI_GUID *FormSetGuid, OPTIONAL IN EFI_FORM_ID FormId, - IN VOID *StartOpcodeHandle, - IN VOID *EndOpcodeHandle OPTIONAL + IN VOID *StartOpCodeHandle, + IN VOID *EndOpCodeHandle OPTIONAL ); #endif