]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdePkg/Include/Protocol/HiiConfigAccess.h
MdePkg/PiFirmwareFile: fix undefined behavior in FFS_FILE_SIZE
[mirror_edk2.git] / MdePkg / Include / Protocol / HiiConfigAccess.h
index 46a4362713717928835469f7fc1560c1bb6965ca..53aefd3778b3c46b94dab0933ad9d34a9187af45 100644 (file)
@@ -1,18 +1,15 @@
 /** @file\r
 \r
-  The EFI HII results processing protocol invokes this type of protocol \r
-  when it needs to forward results to a driver's configuration handler. \r
-  This protocol is published by drivers providing and requesting \r
+  The EFI HII results processing protocol invokes this type of protocol\r
+  when it needs to forward results to a driver's configuration handler.\r
+  This protocol is published by drivers providing and requesting\r
   configuration data from HII. It may only be invoked by HII.\r
-  \r
-  Copyright (c) 2006 - 2009, Intel Corporation\r
-  All rights reserved. This program and the accompanying materials                          \r
-  are licensed and made available under the terms and conditions of the BSD License         \r
-  which accompanies this distribution.  The full text of the license may be found at        \r
-  http://opensource.org/licenses/bsd-license.php                                            \r
 \r
-  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,                     \r
-  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.             \r
+Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>\r
+SPDX-License-Identifier: BSD-2-Clause-Patent\r
+\r
+  @par Revision Reference:\r
+  This Protocol was introduced in UEFI Specification 2.1.\r
 \r
 **/\r
 \r
@@ -29,11 +26,21 @@ typedef struct _EFI_HII_CONFIG_ACCESS_PROTOCOL  EFI_HII_CONFIG_ACCESS_PROTOCOL;
 \r
 typedef UINTN EFI_BROWSER_ACTION;\r
 \r
-#define EFI_BROWSER_ACTION_CHANGING 0\r
-#define EFI_BROWSER_ACTION_CHANGED  1\r
+#define EFI_BROWSER_ACTION_CHANGING   0\r
+#define EFI_BROWSER_ACTION_CHANGED    1\r
+#define EFI_BROWSER_ACTION_RETRIEVE   2\r
+#define EFI_BROWSER_ACTION_FORM_OPEN  3\r
+#define EFI_BROWSER_ACTION_FORM_CLOSE 4\r
+#define EFI_BROWSER_ACTION_SUBMITTED  5\r
+#define EFI_BROWSER_ACTION_DEFAULT_STANDARD      0x1000\r
+#define EFI_BROWSER_ACTION_DEFAULT_MANUFACTURING 0x1001\r
+#define EFI_BROWSER_ACTION_DEFAULT_SAFE          0x1002\r
+#define EFI_BROWSER_ACTION_DEFAULT_PLATFORM      0x2000\r
+#define EFI_BROWSER_ACTION_DEFAULT_HARDWARE      0x3000\r
+#define EFI_BROWSER_ACTION_DEFAULT_FIRMWARE      0x4000\r
 \r
 /**\r
-   \r
+\r
   This function allows the caller to request the current\r
   configuration for one or more named elements. The resulting\r
   string is in <ConfigAltResp> format. Any and all alternative\r
@@ -55,6 +62,12 @@ typedef UINTN EFI_BROWSER_ACTION;
                     the configurable name / value pairs. It is\r
                     invalid for this string to be in\r
                     <MultiConfigRequest> format.\r
+                    If a NULL is passed in for the Request field,\r
+                    all of the settings being abstracted by this function\r
+                    will be returned in the Results field.  In addition,\r
+                    if a ConfigHdr is passed in with no request elements,\r
+                    all of the settings being abstracted for that particular\r
+                    ConfigHdr reference will be returned in the Results Field.\r
 \r
   @param Progress   On return, points to a character in the\r
                     Request string. Points to the string's null\r
@@ -63,10 +76,10 @@ typedef UINTN EFI_BROWSER_ACTION;
                     failing name / value pair (or the beginning\r
                     of the string if the failure is in the first\r
                     name / value pair) if the request was not\r
-                    successful\r
+                    successful.\r
 \r
   @param Results    A null-terminated Unicode string in\r
-                    <ConfigAltResp> format which has all values\r
+                    <MultiConfigAltResp> format which has all values\r
                     filled in for the names in the Request string.\r
                     String to be allocated by the called function.\r
 \r
@@ -79,20 +92,10 @@ typedef UINTN EFI_BROWSER_ACTION;
                                   stored awaiting possible future\r
                                   protocols.\r
 \r
-  @retval EFI_INVALID_PARAMETER   For example, passing in a NULL\r
-                                  for the Request parameter\r
-                                  would result in this type of\r
-                                  error. In this case, the\r
-                                  Progress parameter would be\r
-                                  set to NULL. \r
-\r
-  @retval EFI_NOT_FOUND           Routing data doesn't match any\r
-                                  known driver. Progress set to the\r
-                                  first character in the routing header.\r
-                                  Note: There is no requirement that the\r
-                                  driver validate the routing data. It\r
-                                  must skip the <ConfigHdr> in order to\r
-                                  process the names.\r
+  @retval EFI_NOT_FOUND           A configuration element matching\r
+                                  the routing data is not found.\r
+                                  Progress set to the first character\r
+                                  in the routing header.\r
 \r
   @retval EFI_INVALID_PARAMETER   Illegal syntax. Progress set\r
                                   to most recent "&" before the\r
@@ -115,7 +118,7 @@ EFI_STATUS
 \r
 \r
 /**\r
-   \r
+\r
   This function applies changes in a driver's configuration.\r
   Input is a Configuration, which has the routing data for this\r
   driver followed by name / value configuration pairs. The driver\r
@@ -128,8 +131,8 @@ EFI_STATUS
   @param This           Points to the EFI_HII_CONFIG_ACCESS_PROTOCOL.\r
 \r
   @param Configuration  A null-terminated Unicode string in\r
-                        <ConfigString> format. \r
-  \r
+                        <ConfigString> format.\r
+\r
   @param Progress       A pointer to a string filled in with the\r
                         offset of the most recent '&' before the\r
                         first failing name / value pair (or the\r
@@ -140,16 +143,16 @@ EFI_STATUS
 \r
   @retval EFI_SUCCESS             The results have been distributed or are\r
                                   awaiting distribution.\r
-  \r
+\r
   @retval EFI_OUT_OF_RESOURCES    Not enough memory to store the\r
                                   parts of the results that must be\r
                                   stored awaiting possible future\r
                                   protocols.\r
-  \r
+\r
   @retval EFI_INVALID_PARAMETERS  Passing in a NULL for the\r
                                   Results parameter would result\r
                                   in this type of error.\r
-  \r
+\r
   @retval EFI_NOT_FOUND           Target for the specified routing data\r
                                   was not found\r
 \r
@@ -163,7 +166,7 @@ EFI_STATUS
 );\r
 \r
 /**\r
-   \r
+\r
   This function is called to provide results data to the driver.\r
   This data consists of a unique key that is used to identify\r
   which data is either being passed back or being asked for.\r
@@ -172,7 +175,7 @@ EFI_STATUS
   @param  Action                 Specifies the type of action taken by the browser.\r
   @param  QuestionId             A unique value which is sent to the original\r
                                  exporting driver so that it can identify the type\r
-                                 of data to expect. The format of the data tends to \r
+                                 of data to expect. The format of the data tends to\r
                                  vary based on the opcode that generated the callback.\r
   @param  Type                   The type of value for the question.\r
   @param  Value                  A pointer to the data being sent to the original\r
@@ -190,15 +193,15 @@ EFI_STATUS
 typedef\r
 EFI_STATUS\r
 (EFIAPI *EFI_HII_ACCESS_FORM_CALLBACK)(\r
-  IN  CONST EFI_HII_CONFIG_ACCESS_PROTOCOL   *This,\r
-  IN  EFI_BROWSER_ACTION                     Action,\r
-  IN  EFI_QUESTION_ID                        QuestionId,\r
-  IN  UINT8                                  Type,\r
-  IN  EFI_IFR_TYPE_VALUE                     *Value,\r
-  OUT EFI_BROWSER_ACTION_REQUEST             *ActionRequest\r
+  IN     CONST EFI_HII_CONFIG_ACCESS_PROTOCOL   *This,\r
+  IN     EFI_BROWSER_ACTION                     Action,\r
+  IN     EFI_QUESTION_ID                        QuestionId,\r
+  IN     UINT8                                  Type,\r
+  IN OUT EFI_IFR_TYPE_VALUE                     *Value,\r
+  OUT    EFI_BROWSER_ACTION_REQUEST             *ActionRequest\r
   )\r
   ;\r
-  \r
+\r
 ///\r
 /// This protocol provides a callable interface between the HII and\r
 /// drivers. Only drivers which provide IFR data to HII are required\r