]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdePkg/Include/Protocol/HiiConfigRouting.h
UEFI HII: Merge UEFI HII support changes from branch.
[mirror_edk2.git] / MdePkg / Include / Protocol / HiiConfigRouting.h
index 9c592645d04c979b4a262e6e35b2a92580117785..ad7154d60171e78b01a53a7bdb307af44e9c7f94 100644 (file)
@@ -19,8 +19,6 @@
 #ifndef __HII_CONFIG_ROUTING_H__\r
 #define __HII_CONFIG_ROUTING_H__\r
 \r
-#error "UEFI 2.1 HII is not fully implemented for now, Please don't include this file now."\r
-\r
 #define EFI_HII_CONFIG_ROUTING_PROTOCOL_GUID \\r
   { 0x587e72d7, 0xcc50, 0x4f79, { 0x82, 0x09, 0xca, 0x29, 0x1f, 0xc1, 0xa1, 0x0f } }\r
 \r
@@ -112,7 +110,7 @@ typedef
 EFI_STATUS\r
 (EFIAPI * EFI_HII_ROUTING_EXTRACT_CONFIG ) (\r
   IN CONST  EFI_HII_CONFIG_ROUTING_PROTOCOL *This,\r
-  IN CONST  EFI_STRING                      *Request,\r
+  IN CONST  EFI_STRING                      Request,\r
   OUT       EFI_STRING                      *Progress,\r
   OUT       EFI_STRING                      *Results\r
 );\r
@@ -278,7 +276,7 @@ EFI_STATUS
   IN CONST  EFI_STRING                      ConfigRequest,\r
   IN CONST  UINT8                           *Block,\r
   IN CONST  UINTN                           BlockSize,\r
-  OUT       EFI_STRING                      **Config,\r
+  OUT       EFI_STRING                      *Config,\r
   OUT       EFI_STRING                      *Progress\r
 );\r
 \r
@@ -334,12 +332,62 @@ typedef
 EFI_STATUS\r
 (EFIAPI * EFI_HII_ROUTING_CONFIG_TO_BLOCK ) (\r
   IN CONST  EFI_HII_CONFIG_ROUTING_PROTOCOL *This,\r
-  IN CONST  EFI_STRING                      *ConfigResp,\r
-  IN CONST  UINT8                           *Block,\r
+  IN CONST  EFI_STRING                      ConfigResp,\r
+  IN OUT    UINT8                           *Block,\r
   IN OUT    UINTN                           *BlockSize,\r
   OUT       EFI_STRING                      *Progress\r
 );\r
 \r
+typedef\r
+EFI_STATUS \r
+(EFIAPI * EFI_HII_GET_ALT_CFG) (\r
+  IN  CONST EFI_HII_CONFIG_ROUTING_PROTOCOL    *This, \r
+  IN  CONST EFI_STRING                         Configuration, \r
+  IN  CONST EFI_GUID                           *Guid, \r
+  IN  CONST EFI_STRING                         Name, \r
+  IN  CONST EFI_DEVICE_PATH_PROTOCOL           *DevicePath,  \r
+  IN  CONST UINT16                             *AltCfgId,\r
+  OUT EFI_STRING                               *AltCfgResp \r
+  )\r
+/*++\r
+\r
+  Routine Description:\r
+    This helper function is to be called by drivers to extract portions of \r
+    a larger configuration string.\r
+    \r
+  Arguments:          \r
+    This                   - A pointer to the EFI_HII_CONFIG_ROUTING_PROTOCOL instance.    \r
+    Configuration          - A null-terminated Unicode string in <MultiConfigAltResp> format.\r
+    Guid                   - A pointer to the GUID value to search for in the \r
+                             routing portion of the ConfigResp string when retrieving \r
+                             the requested data. If Guid is NULL, then all GUID \r
+                             values will be searched for.\r
+    Name                   - A pointer to the NAME value to search for in the \r
+                             routing portion of the ConfigResp string when retrieving \r
+                             the requested data. If Name is NULL, then all Name \r
+                             values will be searched for.                         \r
+    DevicePath             - A pointer to the PATH value to search for in the \r
+                             routing portion of the ConfigResp string when retrieving \r
+                             the requested data. If DevicePath is NULL, then all \r
+                             DevicePath values will be searched for.             \r
+    AltCfgId               - A pointer to the ALTCFG value to search for in the \r
+                             routing portion of the ConfigResp string when retrieving \r
+                             the requested data.  If this parameter is NULL, \r
+                             then the current setting will be retrieved.\r
+    AltCfgResp             - A pointer to a buffer which will be allocated by the \r
+                             function which contains the retrieved string as requested.  \r
+                             This buffer is only allocated if the call was successful. \r
+    \r
+  Returns:              \r
+    EFI_SUCCESS            - The request succeeded. The requested data was extracted \r
+                             and placed in the newly allocated AltCfgResp buffer.\r
+    EFI_OUT_OF_RESOURCES   - Not enough memory to allocate AltCfgResp.    \r
+    EFI_INVALID_PARAMETER  - Any parameter is invalid.\r
+    EFI_NOT_FOUND          - Target for the specified routing data was not found.\r
+                             \r
+--*/        \r
+;\r
+\r
 \r
 /**\r
    \r
@@ -354,6 +402,7 @@ struct _EFI_HII_CONFIG_ROUTING_PROTOCOL {
   EFI_HII_ROUTING_ROUTE_CONFIG    RouteConfig;\r
   EFI_HII_ROUTING_BLOCK_TO_CONFIG BlockToConfig;\r
   EFI_HII_ROUTING_CONFIG_TO_BLOCK ConfigToBlock;\r
+  EFI_HII_GET_ALT_CFG             GetAltConfig;\r
 };\r
 \r
 extern EFI_GUID gEfiHiiConfigRoutingProtocolGuid;\r