X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=blobdiff_plain;f=MdePkg%2FInclude%2FProtocol%2FHiiConfigAccess.h;h=0f89f6380808648e56f7c45efc9fcb70e4e9a083;hp=b253a7b047f39ddd26911b9a05b987183eb8ba33;hb=6a9eeabb657279fe9efe7ef27630b06919bbd556;hpb=5a1fc2219b4ec0e13673cebe3689bc6b895d97aa diff --git a/MdePkg/Include/Protocol/HiiConfigAccess.h b/MdePkg/Include/Protocol/HiiConfigAccess.h index b253a7b047..0f89f63808 100644 --- a/MdePkg/Include/Protocol/HiiConfigAccess.h +++ b/MdePkg/Include/Protocol/HiiConfigAccess.h @@ -1,10 +1,11 @@ /** @file - The file provides services to forward results to PCOL-based - handler if EFI HII results processing protocol invokes this - protocol. + The EFI HII results processing protocol invokes this type of protocol + when it needs to forward results to a driver's configuration handler. + This protocol is published by drivers providing and requesting + configuration data from HII. It may only be invoked by HII. - Copyright (c) 2006 - 2007, Intel Corporation + Copyright (c) 2006 - 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 @@ -19,13 +20,18 @@ #ifndef __EFI_HII_CONFIG_ACCESS_H__ #define __EFI_HII_CONFIG_ACCESS_H__ -#error "UEFI 2.1 HII is not fully implemented for now, Please don't include this file now." +#include #define EFI_HII_CONFIG_ACCESS_PROTOCOL_GUID \ { 0x330d4706, 0xf2a0, 0x4e4f, { 0xa3, 0x69, 0xb6, 0x6f, 0xa8, 0xd5, 0x43, 0x85 } } typedef struct _EFI_HII_CONFIG_ACCESS_PROTOCOL EFI_HII_CONFIG_ACCESS_PROTOCOL; +typedef UINTN EFI_BROWSER_ACTION; + +#define EFI_BROWSER_ACTION_CHANGING 0 +#define EFI_BROWSER_ACTION_CHANGED 1 + /** This function allows the caller to request the current @@ -41,14 +47,14 @@ typedef struct _EFI_HII_CONFIG_ACCESS_PROTOCOL EFI_HII_CONFIG_ACCESS_PROTOCOL; converted from Hex UNICODE to binary) is a reference to a string in the associated string pack. - @param This Points to the EFI_HII_CONFIG_ACCESS_PROTOCOL. + @param This Points to the EFI_HII_CONFIG_ACCESS_PROTOCOL. - @param Request A null-terminated Unicode string in - format. Note that this - includes the routing information as well as - the configurable name / value pairs. It is - invalid for this string to be in - format. + @param Request A null-terminated Unicode string in + format. Note that this + includes the routing information as well as + the configurable name / value pairs. It is + invalid for this string to be in + format. @param Progress On return, points to a character in the Request string. Points to the string's null @@ -59,19 +65,19 @@ typedef struct _EFI_HII_CONFIG_ACCESS_PROTOCOL EFI_HII_CONFIG_ACCESS_PROTOCOL; name / value pair) if the request was not successful - @param Results A null-terminated Unicode string in - format which has all values - filled in for the names in the Request string. - String to be allocated by the called function. + @param Results A null-terminated Unicode string in + format which has all values + filled in for the names in the Request string. + String to be allocated by the called function. - @retval EFI_SUCCESS The Results string is filled with the - values corresponding to all requested - names. + @retval EFI_SUCCESS The Results string is filled with the + values corresponding to all requested + names. - @retval EFI_OUT_OF_MEMORY Not enough memory to store the - parts of the results that must be - stored awaiting possible future - protocols. + @retval EFI_OUT_OF_MEMORY Not enough memory to store the + parts of the results that must be + stored awaiting possible future + protocols. @retval EFI_INVALID_PARAMETER For example, passing in a NULL for the Request parameter @@ -80,13 +86,13 @@ typedef struct _EFI_HII_CONFIG_ACCESS_PROTOCOL EFI_HII_CONFIG_ACCESS_PROTOCOL; Progress parameter would be set to NULL. - @retval EFI_NOT_FOUND Routing data doesn't match any - known driver. Progress set to the - first character in the routing header. - Note: There is no requirement that the - driver validate the routing data. It - must skip the in order to - process the names. + @retval EFI_NOT_FOUND Routing data doesn't match any + known driver. Progress set to the + first character in the routing header. + Note: There is no requirement that the + driver validate the routing data. It + must skip the in order to + process the names. @retval EFI_INVALID_PARAMETER Illegal syntax. Progress set to most recent & before the @@ -100,7 +106,7 @@ typedef struct _EFI_HII_CONFIG_ACCESS_PROTOCOL EFI_HII_CONFIG_ACCESS_PROTOCOL; **/ typedef EFI_STATUS -(EFIAPI * EFI_HII_ACCESS_EXTRACT_CONFIG ) ( +(EFIAPI * EFI_HII_ACCESS_EXTRACT_CONFIG)( IN CONST EFI_HII_CONFIG_ACCESS_PROTOCOL *This, IN CONST EFI_STRING Request, OUT EFI_STRING *Progress, @@ -119,11 +125,12 @@ EFI_STATUS format, it may use the ConfigToBlock helper function (above) to simplify the job. - @param This Points to the EFI_HII_CONFIG_ACCESS_PROTOCOL. + @param This Points to the EFI_HII_CONFIG_ACCESS_PROTOCOL. @param Configuration A null-terminated Unicode string in - format. Progress a - pointer to a string filled in with the + format. + + @param Progress A pointer to a string filled in with the offset of the most recent '&' before the first failing name / value pair (or the beginn ing of the string if the failure @@ -131,25 +138,25 @@ EFI_STATUS the terminating NULL if all was successful. - @retval EFI_SUCCESS The results have been distributed or are - awaiting distribution. + @retval EFI_SUCCESS The results have been distributed or are + awaiting distribution. - @retval EFI_OUT_OF_MEMORY Not enough memory to store the - parts of the results that must be - stored awaiting possible future - protocols. + @retval EFI_OUT_OF_MEMORY Not enough memory to store the + parts of the results that must be + stored awaiting possible future + protocols. @retval EFI_INVALID_PARAMETERS Passing in a NULL for the Results parameter would result in this type of error. - @retval EFI_NOT_FOUND Target for the specified routing data - was not found + @retval EFI_NOT_FOUND Target for the specified routing data + was not found **/ typedef EFI_STATUS -(EFIAPI * EFI_HII_ACCESS_ROUTE_CONFIG ) ( +(EFIAPI * EFI_HII_ACCESS_ROUTE_CONFIG)( IN CONST EFI_HII_CONFIG_ACCESS_PROTOCOL *This, IN CONST EFI_STRING Configuration, OUT EFI_STRING *Progress @@ -161,40 +168,28 @@ EFI_STATUS This data consists of a unique key that is used to identify which data is either being passed back or being asked for. - @param This Points to the EFI_HII_CONFIG_ACCESS_PROTOCOL. - - @param KeyValue A unique value which is sent to the original - exporting driver so that it can identify the - type of data to expect. The format of the - data tends to vary based on the opcode that - generated the callback. - - @param Data A pointer to the data being sent to the original - exporting driver. The format of the data should - be the same as that of the question invoking the - callback and will be known to the recipient. - - @retval EFI_SUCCESS The firmware has successfully stored the - variable and its data as defined by the - Attributes. - - @retval EFI_INVALID_PARAMETER An invalid combination of - Attributes bits was supplied, - or the DataSize exceeds the - maximum allowed. - - @retval EFI_OUT_OF_RESOURCES Not enough storage is available - to hold the variable and its - data. - - @retval EFI_DEVICE_ERROR The variable could not be saved due - to a hardware failure. - - + @param This Points to the EFI_HII_CONFIG_ACCESS_PROTOCOL. + @param Action Specifies the type of action taken by the browser. + @param QuestionId A unique value which is sent to the original + exporting driver so that it can identify the type + of data to expect. The format of the data tends to + vary based on the opcode that enerated the callback. + @param Type The type of value for the question. + @param Value A pointer to the data being sent to the original + exporting driver. + @param ActionRequest On return, points to the action requested by the + callback function. + + @retval EFI_SUCCESS The callback successfully handled the action. + @retval EFI_OUT_OF_RESOURCES Not enough storage is available to hold the + variable and its data. + @retval EFI_DEVICE_ERROR The variable could not be saved. + @retval EFI_UNSUPPORTED The specified Action is not supported by the + callback. **/ typedef EFI_STATUS -(EFIAPI *EFI_HII_ACCESS_FORM_CALLBACK) ( +(EFIAPI *EFI_HII_ACCESS_FORM_CALLBACK)( IN CONST EFI_HII_CONFIG_ACCESS_PROTOCOL *This, IN EFI_BROWSER_ACTION Action, IN EFI_QUESTION_ID QuestionId, @@ -203,28 +198,12 @@ EFI_STATUS OUT EFI_BROWSER_ACTION_REQUEST *ActionRequest ) ; -/** - - This protocol provides a callable interface between the HII and - drivers. Only drivers which provide IFR data to HII are required - to publish this protocol. - - @param ExtractConfig This function breaks apart the UNICODE - request strings routing them to the - appropriate drivers. This function is - analogous to the similarly named - function in the HII Routing Protocol. - - @param RouteConfig This function breaks apart the UNICODE - results strings and returns configuration - information as specified by the request. - @param Callback This function is called from the - configuration browser to communicate certain - activities that were initiated by a user. - - -**/ +/// +/// This protocol provides a callable interface between the HII and +/// drivers. Only drivers which provide IFR data to HII are required +/// to publish this protocol. +/// struct _EFI_HII_CONFIG_ACCESS_PROTOCOL { EFI_HII_ACCESS_EXTRACT_CONFIG ExtractConfig; EFI_HII_ACCESS_ROUTE_CONFIG RouteConfig; @@ -235,3 +214,4 @@ extern EFI_GUID gEfiHiiConfigAccessProtocolGuid; #endif +