]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Include/Library/HiiLib.h
1. Update the implementation of HII ConfigRouting Protocol in HiiDataBase module...
[mirror_edk2.git] / MdeModulePkg / Include / Library / HiiLib.h
index 80278b2f5a150ab9f5793d4100ea4688dba6602b..3054a9b9c9889aeb8d90adadb30b1d278450cac0 100644 (file)
@@ -223,26 +223,6 @@ HiiGetHiiHandles (
   )\r
 ;\r
 \r
-/**\r
-  Get next language from language code list (with separator ';').\r
-\r
-  If LangCode is NULL, then ASSERT.\r
-  If Lang is NULL, then ASSERT.\r
-\r
-  @param  LangCode    On input: point to first language in the list. On\r
-                                 output: point to next language in the list, or\r
-                                 NULL if no more language in the list.\r
-  @param  Lang           The first language in the list.\r
-\r
-**/\r
-VOID\r
-EFIAPI\r
-HiiLibGetNextLanguage (\r
-  IN OUT CHAR8      **LangCode,\r
-  OUT CHAR8         *Lang\r
-  )\r
-;\r
-\r
 /**\r
   Retrieves a pointer to the a Null-terminated ASCII string containing the list \r
   of languages that an HII handle in the HII Database supports.  The returned \r
@@ -268,73 +248,6 @@ HiiGetSupportedLanguages (
   )\r
 ;\r
 \r
-/**\r
-  Convert language code from RFC3066 to ISO639-2.\r
-\r
-  LanguageRfc3066 contain a single RFC 3066 code such as\r
-  "en-US" or "fr-FR".\r
-\r
-  The LanguageRfc3066 must be a buffer large enough\r
-  for ISO_639_2_ENTRY_SIZE characters.\r
-\r
-  If LanguageRfc3066 is NULL, then ASSERT.\r
-  If LanguageIso639 is NULL, then ASSERT.\r
-\r
-  @param  LanguageRfc3066        RFC3066 language code.\r
-  @param  LanguageIso639         ISO639-2 language code.\r
-\r
-  @retval EFI_SUCCESS            Language code converted.\r
-  @retval EFI_NOT_FOUND          Language code not found.\r
-\r
-**/\r
-EFI_STATUS\r
-EFIAPI\r
-ConvertRfc3066LanguageToIso639Language (\r
-  IN  CHAR8   *LanguageRfc3066,\r
-  OUT CHAR8   *LanguageIso639\r
-  )\r
-;\r
-\r
-/**\r
-  Convert language code from ISO639-2 to RFC3066 and return the converted language.\r
-  Caller is responsible for freeing the allocated buffer.\r
-\r
-  LanguageIso639 contain a single ISO639-2 code such as\r
-  "eng" or "fra".\r
-\r
-  If LanguageIso639 is NULL, then ASSERT.\r
-  If LanguageRfc3066 is NULL, then ASSERT.\r
-\r
-  @param  LanguageIso639         ISO639-2 language code.\r
-\r
-  @return the allocated buffer or NULL, if the language is not found.\r
-\r
-**/\r
-CHAR8*\r
-EFIAPI\r
-ConvertIso639LanguageToRfc3066Language (\r
-  IN  CONST CHAR8   *LanguageIso639\r
-  )\r
-;\r
-\r
-/**\r
-  Convert language code list from RFC3066 to ISO639-2, e.g. "en-US;fr-FR" will\r
-  be converted to "engfra".\r
-\r
-  If SupportedLanguages is NULL, then ASSERT.\r
-\r
-  @param  SupportedLanguages     The RFC3066 language list.\r
-\r
-  @return The ISO639-2 language list.\r
-\r
-**/\r
-CHAR8 *\r
-EFIAPI\r
-Rfc3066ToIso639 (\r
-  CHAR8  *SupportedLanguages\r
-  )\r
-;\r
-\r
 /**\r
   Allocates and returns a Null-terminated Unicode <ConfigHdr> string using routing \r
   information that includes a GUID, an optional Unicode string name, and a device\r
@@ -372,6 +285,51 @@ HiiConstructConfigHdr (
   IN EFI_HANDLE      DriverHandle\r
   );\r
 \r
+/**\r
+  It has the many same logic to HiiValidateSetting API.\r
+\r
+  Reset the default value specified by DefaultId to the driver\r
+  configuration got by Request string. \r
+  NULL request string support depends on the ExtractConfig interface of\r
+  HiiConfigRouting protocol in UEFI specification.\r
+  \r
+  @param EFI_STRING  Request    A null-terminated Unicode string in \r
+                                <MultiConfigRequest> format. It can be NULL.\r
+                                If it is NULL, all configuration for the\r
+                                entirety of the current HII database will be reset.\r
+  @param UINT16      DefaultId  Specifies the type of defaults to retrieve.\r
+  \r
+  @retval TURE    The default value is set successfully.\r
+  @retval FALSE   The default value can't be found and set.\r
+**/\r
+BOOLEAN\r
+EFIAPI                               \r
+HiiSetToDefaults (     \r
+  IN CONST EFI_STRING  Request,  OPTIONAL\r
+  IN UINT16                                DefaultId\r
+  );\r
+\r
+/**\r
+  Validate the current configuration by parsing HII form IFR opcode.\r
+  It can share the most logic with HiiSetToDefaults.\r
+\r
+  NULL request string support depends on the ExtractConfig interface of\r
+  HiiConfigRouting protocol in UEFI specification.\r
+  \r
+  @param EFI_STRING  Request    A null-terminated Unicode string in \r
+                                <MultiConfigRequest> format. It can be NULL.\r
+                                If it is NULL, all current configuration for the\r
+                                entirety of the current HII database will be validated.\r
+  \r
+  @retval TURE    Current configuration is valid.\r
+  @retval FALSE   Current configuration is invalid.\r
+**/\r
+BOOLEAN\r
+EFIAPI                               \r
+HiiValidateSettings (\r
+  IN CONST EFI_STRING  Request  OPTIONAL\r
+  );\r
+\r
 /**\r
   Allocates and returns a Null-terminated Unicode <ConfigAltResp> string.\r
 \r
@@ -444,25 +402,26 @@ HiiIsConfigHdrMatch (
 \r
 /**\r
   Retrieves uncommited data from the Form Browser and converts it to a binary\r
-  buffer.  The returned buffer is allocated using AllocatePool().  The caller\r
-  is responsible for freeing the returned buffer using FreePool().\r
+  buffer.\r
 \r
   @param[in]  VariableName  Pointer to a Null-terminated Unicode string.  This \r
                             is an optional parameter that may be NULL.\r
   @param[in]  VariableGuid  Pointer to an EFI_GUID structure.  This is an optional \r
                             parameter that may be NULL.\r
   @param[in]  BufferSize    Length in bytes of buffer to hold retrived data. \r
+  @param[out] Block         Buffer of data to be updated.\r
 \r
-  @retval NULL   The uncommitted data could not be retrieved.\r
-  @retval Other  A pointer to a buffer containing the uncommitted data.\r
+  @retval FALSE  The uncommitted data could not be retrieved.\r
+  @retval TRUE   The uncommitted data was retrieved.\r
 \r
 **/\r
-UINT8 *\r
+BOOLEAN\r
 EFIAPI\r
 HiiGetBrowserData (\r
   IN CONST EFI_GUID  *VariableGuid,  OPTIONAL\r
   IN CONST CHAR16    *VariableName,  OPTIONAL\r
-  IN UINTN           BlockSize\r
+  IN UINTN           BlockSize,\r
+  OUT UINT8          *Block\r
   );\r
 \r
 /**\r
@@ -562,6 +521,28 @@ HiiFreeOpCodeHandle (
   VOID  *OpCodeHandle\r
   );\r
 \r
+/**\r
+  Append raw opcodes to an OpCodeHandle.\r
+\r
+  If OpCodeHandle is NULL, then ASSERT().\r
+  If RawBuffer is NULL, then ASSERT();\r
+\r
+  @param[in]  OpCodeHandle   Handle to the buffer of opcodes.\r
+  @param[in]  RawBuffer      Buffer of opcodes to append.\r
+  @param[in]  RawBufferSize  The size, in bytes, of Buffer.\r
+\r
+  @retval NULL   There is not enough space left in Buffer to add the opcode.\r
+  @retval Other  A pointer to the appended opcodes.\r
+\r
+**/\r
+UINT8 *\r
+EFIAPI\r
+HiiCreateRawOpCodes (\r
+  IN VOID   *OpCodeHandle,\r
+  IN UINT8  *RawBuffer,\r
+  IN UINTN  RawBufferSize\r
+  );\r
+\r
 /**\r
   Create EFI_IFR_END_OP opcode.\r
 \r