/** @file\r
Public include file for the HII Library\r
\r
-Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2007 - 2013, Intel Corporation. All rights reserved.<BR>\r
This program and the accompanying materials are licensed and made available under \r
the terms and conditions of the BSD License that accompanies this distribution. \r
The full text of the license may be found at\r
to packages terminated by a NULL.\r
\r
@retval NULL An HII Handle has already been registered in the HII Database with\r
- the same PackageListGuid.\r
+ the same PackageListGuid and DeviceHandle.\r
@retval NULL The HII Handle could not be created.\r
@retval NULL An empty list of packages was passed in.\r
@retval NULL All packages are empty.\r
)\r
;\r
\r
+/**\r
+ This function allows a caller to extract the form set opcode form the Hii Handle.\r
+ The returned buffer is allocated using AllocatePool().The caller is responsible \r
+ for freeing the allocated buffer using FreePool().\r
+\r
+ @param Handle The HII handle.\r
+ @param Buffer On return, points to a pointer which point to the buffer that contain the formset opcode.\r
+ @param BufferSize On return, points to the length of the buffer.\r
+\r
+ @retval EFI_OUT_OF_RESOURCES No enough memory resource is allocated.\r
+ @retval EFI_NOT_FOUND Can't find the package data for the input Handle.\r
+ @retval EFI_INVALID_PARAMETER The input parameters are not correct.\r
+ @retval EFI_SUCCESS Get the formset opcode from the hii handle successfully.\r
+\r
+**/\r
+EFI_STATUS\r
+EFIAPI\r
+HiiGetFormSetFromHiiHandle(\r
+ IN EFI_HII_HANDLE Handle,\r
+ OUT EFI_IFR_FORM_SET **Buffer,\r
+ OUT UINTN *BufferSize\r
+ );\r
+\r
/**\r
Retrieves a pointer to a Null-terminated ASCII string containing the list \r
of languages that an HII handle in the HII Database supports. The returned \r
@param[in] HiiHandle A handle that was previously registered in the HII Database.\r
\r
@retval NULL HiiHandle is not registered in the HII database\r
- @retval NULL There are not enough resources available to retrieve the suported \r
+ @retval NULL There are not enough resources available to retrieve the supported\r
languages.\r
- @retval NULL The list of suported languages could not be retrieved.\r
+ @retval NULL The list of supported languages could not be retrieved.\r
@retval Other A pointer to the Null-terminated ASCII string of supported languages.\r
\r
**/\r
\r
@param[in] Guid The pointer to an EFI_GUID that is the routing information\r
GUID. Each of the 16 bytes in Guid is converted to \r
- a 2 Unicode character hexidecimal string. This is \r
+ a 2 Unicode character hexadecimal string. This is\r
an optional parameter that may be NULL.\r
@param[in] Name The pointer to a Null-terminated Unicode string that is \r
the routing information NAME. This is an optional \r
parameter that may be NULL. Each 16-bit Unicode \r
character in Name is converted to a 4 character Unicode \r
- hexidecimal string. \r
+ hexadecimal string.\r
@param[in] DriverHandle The driver handle that supports a Device Path Protocol\r
that is the routing information PATH. Each byte of\r
the Device Path associated with DriverHandle is converted\r
- to a two (Unicode) character hexidecimal string.\r
+ to a two (Unicode) character hexadecimal string.\r
\r
@retval NULL DriverHandle does not support the Device Path Protocol.\r
@retval NULL DriverHandle does not support the Device Path Protocol.\r
entirety of the current HII database will be reset.\r
@param DefaultId Specifies the type of defaults to retrieve.\r
\r
- @retval TURE The default value was set successfully.\r
+ @retval TRUE The default value was set successfully.\r
@retval FALSE The default value was not found.\r
**/\r
BOOLEAN\r
If it is NULL, all current configurations for the\r
entirety of the current HII database will be validated.\r
\r
- @retval TURE The current configuration is valid.\r
+ @retval TRUE The current configuration is valid.\r
@retval FALSE The current configuration is invalid.\r
**/\r
BOOLEAN\r
IN EFI_QUESTION_ID QuestionId\r
);\r
\r
+/**\r
+ Create EFI_IFR_REF_OP, EFI_IFR_REF2_OP, EFI_IFR_REF3_OP and EFI_IFR_REF4_OP opcode.\r
+\r
+ When RefDevicePath is not zero, EFI_IFR_REF4 opcode will be created. \r
+ When RefDevicePath is zero and RefFormSetId is not NULL, EFI_IFR_REF3 opcode will be created.\r
+ When RefDevicePath is zero, RefFormSetId is NULL and RefQuestionId is not zero, EFI_IFR_REF2 opcode will be created.\r
+ When RefDevicePath is zero, RefFormSetId is NULL and RefQuestionId is zero, EFI_IFR_REF opcode will be created.\r
+\r
+ If OpCodeHandle is NULL, then ASSERT().\r
+ If any reserved bits are set in QuestionFlags, then ASSERT().\r
+\r
+ @param[in] OpCodeHandle The handle to the buffer of opcodes.\r
+ @param[in] RefFormId The Destination Form ID.\r
+ @param[in] Prompt The string ID for Prompt.\r
+ @param[in] Help The string ID for Help.\r
+ @param[in] QuestionFlags The flags in Question Header\r
+ @param[in] QuestionId Question ID.\r
+ @param[in] RefQuestionId The question on the form to which this link is referring. \r
+ If its value is zero, then the link refers to the top of the form.\r
+ @param[in] RefFormSetId The form set to which this link is referring. If its value is NULL, and RefDevicePath is \r
+ zero, then the link is to the current form set.\r
+ @param[in] RefDevicePath The string identifier that specifies the string containing the text representation of \r
+ the device path to which the form set containing the form specified by FormId.\r
+ If its value is zero, then the link refers to the current page.\r
+\r
+ @retval NULL There is not enough space left in Buffer to add the opcode.\r
+ @retval Other A pointer to the created opcode.\r
+\r
+**/\r
+UINT8 *\r
+EFIAPI\r
+HiiCreateGotoExOpCode (\r
+ IN VOID *OpCodeHandle,\r
+ IN EFI_FORM_ID RefFormId,\r
+ IN EFI_STRING_ID Prompt,\r
+ IN EFI_STRING_ID Help,\r
+ IN UINT8 QuestionFlags,\r
+ IN EFI_QUESTION_ID QuestionId,\r
+ IN EFI_QUESTION_ID RefQuestionId,\r
+ IN EFI_GUID *RefFormSetId, OPTIONAL\r
+ IN EFI_STRING_ID RefDevicePath\r
+ );\r
+\r
/**\r
Create EFI_IFR_CHECKBOX_OP opcode.\r
\r
@param[in] OpCodeHandle The handle to the buffer of opcodes.\r
@param[in] QuestionId The question ID.\r
@param[in] VarStoreId The storage ID.\r
- @param[in] VarOffset The offset in Storage.\r
+ @param[in] VarOffset Offset in Storage or String ID of the name (VarName)\r
+ for this name/value pair.\r
@param[in] Prompt The string ID for Prompt.\r
@param[in] Help The string ID for Help.\r
@param[in] QuestionFlags The flags in Question Header.\r
@param[in] OpCodeHandle The handle to the buffer of opcodes.\r
@param[in] QuestionId The question ID.\r
@param[in] VarStoreId The storage ID.\r
- @param[in] VarOffset The offset in Storage.\r
+ @param[in] VarOffset Offset in Storage or String ID of the name (VarName)\r
+ for this name/value pair.\r
@param[in] Prompt The string ID for Prompt.\r
@param[in] Help The string ID for Help.\r
@param[in] QuestionFlags The flags in Question Header.\r
@param[in] OpCodeHandle The handle to the buffer of opcodes.\r
@param[in] QuestionId The question ID.\r
@param[in] VarStoreId The storage ID.\r
- @param[in] VarOffset The offset in Storage.\r
+ @param[in] VarOffset Offset in Storage or String ID of the name (VarName)\r
+ for this name/value pair.\r
@param[in] Prompt The string ID for Prompt.\r
@param[in] Help The string ID for Help.\r
@param[in] QuestionFlags The flags in Question Header.\r
@param[in] OpCodeHandle The handle to the buffer of opcodes.\r
@param[in] QuestionId The question ID.\r
@param[in] VarStoreId The storage ID.\r
- @param[in] VarOffset The offset in Storage.\r
+ @param[in] VarOffset Offset in Storage or String ID of the name (VarName)\r
+ for this name/value pair.\r
@param[in] Prompt The string ID for Prompt.\r
@param[in] Help The string ID for Help.\r
@param[in] QuestionFlags The flags in Question Header.\r
@param[in] OpCodeHandle The handle to the buffer of opcodes.\r
@param[in] QuestionId The question ID.\r
@param[in] VarStoreId The storage ID.\r
- @param[in] VarOffset The offset in Storage.\r
+ @param[in] VarOffset Offset in Storage or String ID of the name (VarName)\r
+ for this name/value pair.\r
@param[in] Prompt The string ID for Prompt.\r
@param[in] Help The string ID for Help.\r
@param[in] QuestionFlags The flags in Question Header.\r
@param[in] QuestionId Question ID\r
@param[in] VarStoreId Storage ID, optional. If DateFlags is not\r
QF_DATE_STORAGE_NORMAL, this parameter is ignored.\r
- @param[in] VarOffset Offset in Storage, optional. If DateFlags is not\r
+ @param[in] VarOffset Offset in Storage or String ID of the name (VarName)\r
+ for this name/value pair, optional. If DateFlags is not\r
QF_DATE_STORAGE_NORMAL, this parameter is ignored.\r
@param[in] Prompt String ID for Prompt\r
@param[in] Help String ID for Help\r
@param[in] QuestionId Question ID\r
@param[in] VarStoreId Storage ID, optional. If TimeFlags is not\r
QF_TIME_STORAGE_NORMAL, this parameter is ignored.\r
- @param[in] VarOffset Offset in Storage, optional. If TimeFlags is not\r
+ @param[in] VarOffset Offset in Storage or String ID of the name (VarName)\r
+ for this name/value pair, optional. If TimeFlags is not\r
QF_TIME_STORAGE_NORMAL, this parameter is ignored.\r
@param[in] Prompt String ID for Prompt\r
@param[in] Help String ID for Help\r