]> git.proxmox.com Git - mirror_edk2.git/blame - EdkCompatibilityPkg/Compatibility/FrameworkHiiToUefiHiiThunk/ConfigAccess.h
Remove unrecognized chars in comment for all source C/h files.
[mirror_edk2.git] / EdkCompatibilityPkg / Compatibility / FrameworkHiiToUefiHiiThunk / ConfigAccess.h
CommitLineData
ebbd2793 1/**@file\r
2 This file contains functions related to Config Access Protocols installed by\r
3 by HII Thunk Modules which is used to thunk UEFI Config Access Callback to \r
4 Framework HII Callback.\r
5 \r
6Copyright (c) 2008, Intel Corporation\r
7All rights reserved. This program and the accompanying materials\r
8are licensed and made available under the terms and conditions of the BSD License\r
9which accompanies this distribution. The full text of the license may be found at\r
10http://opensource.org/licenses/bsd-license.php\r
11\r
12THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
13WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
14\r
15**/\r
16\r
17#ifndef _HII_THUNK_CONFIG_ACCESS_H\r
18#define _HII_THUNK_CONFIG_ACCESS_H\r
19\r
bcf79fc8 20/**\r
21 This function installs a EFI_CONFIG_ACCESS_PROTOCOL instance for a form package registered\r
22 by a module using Framework HII Protocol Interfaces.\r
ebbd2793 23\r
bcf79fc8 24 UEFI HII require EFI_HII_CONFIG_ACCESS_PROTOCOL to be installed on a EFI_HANDLE, so\r
25 that Setup Utility can load the Buffer Storage using this protocol.\r
26 \r
27 @param Packages The framework package list.\r
28 @param MapEntry The Thunk Layer Handle Mapping Database Entry.\r
29 \r
30 @retval EFI_SUCCESS The Config Access Protocol is installed successfully.\r
31 @retval EFI_OUT_RESOURCE There is not enough memory.\r
32 \r
33**/\r
ebbd2793 34EFI_STATUS\r
35InstallDefaultUefiConfigAccessProtocol (\r
36 IN CONST EFI_HII_PACKAGES *Packages,\r
ebbd2793 37 IN OUT HII_TRHUNK_HANDLE_MAPPING_DATABASE_ENTRY *MapEntry\r
38 )\r
39;\r
40\r
bcf79fc8 41/**\r
42\r
43 This function implement the EFI_HII_CONFIG_ACCESS_PROTOCOL.ExtractConfig\r
44 so that data can be read from the data storage such as UEFI Variable or module's\r
45 customized storage exposed by EFI_FRAMEWORK_CALLBACK.\r
46\r
47 @param This Points to the EFI_HII_CONFIG_ACCESS_PROTOCOL\r
48 @param Request A null-terminated Unicode string in <ConfigRequest> format. Note that this\r
49 includes the routing information as well as the configurable name / value pairs. It is\r
50 invalid for this string to be in <MultiConfigRequest> format.\r
51\r
fd0d281b 52 @param Progress On return, points to a character in the Request string. Points to the string's null\r
53 terminator if request was successful. Points to the most recent '&' before the first\r
bcf79fc8 54 failing name / value pair (or the beginning of the string if the failure is in the first\r
55 name / value pair) if the request was not successful\r
56 @param Results A null-terminated Unicode string in <ConfigAltResp> format which has all\r
57 values filled in for the names in the Request string. String to be allocated by the called\r
58 function.\r
59 \r
60 @retval EFI_INVALID_PARAMETER If there is no Buffer Storage for this Config Access instance.\r
61 @retval EFI_SUCCESS The setting is retrived successfully.\r
62 @retval !EFI_SUCCESS The error returned by UEFI Get Variable or Framework Form Callback Nvread.\r
63 **/\r
ebbd2793 64EFI_STATUS\r
65EFIAPI\r
66ThunkExtractConfig (\r
67 IN CONST EFI_HII_CONFIG_ACCESS_PROTOCOL *This,\r
68 IN CONST EFI_STRING Request,\r
69 OUT EFI_STRING *Progress,\r
70 OUT EFI_STRING *Results\r
71 )\r
72;\r
73\r
74\r
bcf79fc8 75/**\r
76\r
77 This function implement the EFI_HII_CONFIG_ACCESS_PROTOCOL.RouteConfig\r
78 so that data can be written to the data storage such as UEFI Variable or module's\r
79 customized storage exposed by EFI_FRAMEWORK_CALLBACK.\r
80 \r
81 @param This Points to the EFI_HII_CONFIG_ACCESS_PROTOCOL\r
82 @param Configuration A null-terminated Unicode string in <ConfigResp> format.\r
fd0d281b 83 @param Progress A pointer to a string filled in with the offset of the most recent '&' before the first\r
bcf79fc8 84 failing name / value pair (or the beginning of the string if the failure is in the first\r
85 name / value pair) or the terminating NULL if all was successful.\r
86 \r
87 @retval EFI_INVALID_PARAMETER If there is no Buffer Storage for this Config Access instance.\r
88 @retval EFI_SUCCESS The setting is saved successfully.\r
89 @retval !EFI_SUCCESS The error returned by UEFI Set Variable or Framework Form Callback Nvwrite.\r
90**/ \r
ebbd2793 91EFI_STATUS\r
92EFIAPI\r
93ThunkRouteConfig (\r
94 IN CONST EFI_HII_CONFIG_ACCESS_PROTOCOL *This,\r
95 IN CONST EFI_STRING Configuration,\r
96 OUT EFI_STRING *Progress\r
97 )\r
98;\r
99\r
bcf79fc8 100/**\r
101 Wrap the EFI_HII_CONFIG_ACCESS_PROTOCOL.CallBack to EFI_FORM_CALLBACK_PROTOCOL.Callback. Therefor,\r
102 the framework HII module willl do no porting (except some porting works needed for callback for EFI_ONE_OF_OPTION opcode)\r
103 and still work with a UEFI HII SetupBrowser.\r
104 \r
105 @param This Points to the EFI_HII_CONFIG_ACCESS_PROTOCOL.\r
106 @param Action Specifies the type of action taken by the browser. See EFI_BROWSER_ACTION_x.\r
107 @param QuestionId A unique value which is sent to the original exporting driver so that it can identify the\r
108 type of data to expect. The format of the data tends to vary based on the opcode that\r
109 generated the callback.\r
110 @param Type The type of value for the question. See EFI_IFR_TYPE_x in\r
111 EFI_IFR_ONE_OF_OPTION.\r
112 @param Value A pointer to the data being sent to the original exporting driver. The type is specified\r
113 by Type. Type EFI_IFR_TYPE_VALUE is defined in\r
114 EFI_IFR_ONE_OF_OPTION.\r
115 @param ActionRequest On return, points to the action requested by the callback function. Type\r
116 EFI_BROWSER_ACTION_REQUEST is specified in SendForm() in the Form\r
117 Browser Protocol.\r
118 \r
119 @retval EFI_UNSUPPORTED If the Framework HII module does not register Callback although it specify the opcode under\r
120 focuse to be INTERRACTIVE.\r
121 @retval EFI_SUCCESS The callback complete successfully.\r
122 @retval !EFI_SUCCESS The error code returned by EFI_FORM_CALLBACK_PROTOCOL.Callback.\r
123 \r
124 **/\r
ebbd2793 125EFI_STATUS\r
126EFIAPI\r
127ThunkCallback (\r
128 IN CONST EFI_HII_CONFIG_ACCESS_PROTOCOL *This,\r
129 IN EFI_BROWSER_ACTION Action,\r
130 IN EFI_QUESTION_ID QuestionId,\r
131 IN UINT8 Type,\r
132 IN EFI_IFR_TYPE_VALUE *Value,\r
133 OUT EFI_BROWSER_ACTION_REQUEST *ActionRequest\r
134 )\r
135;\r
136\r
137#endif\r
138\r