]> git.proxmox.com Git - mirror_edk2.git/blob - MdeModulePkg/Include/Library/ExtendedIfrSupportLib.h
Add function headers & file header for public header files
[mirror_edk2.git] / MdeModulePkg / Include / Library / ExtendedIfrSupportLib.h
1 /** @file
2 Library header file defines APIs that is related to IFR operations but
3 specific to EDK II implementation.
4
5 Copyright (c) 2006 - 2008, Intel Corporation. <BR>
6 All rights reserved. This program and the accompanying materials
7 are licensed and made available under the terms and conditions of the BSD License
8 which accompanies this distribution. The full text of the license may be found at
9 http://opensource.org/licenses/bsd-license.php
10
11 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
12 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
13
14 **/
15
16 #ifndef __EXTENDED_IFR_SUPPORT_LIB_H__
17 #define __EXTENDED_IFR_SUPPORT_LIB_H__
18
19 /**
20 Create GUIDed opcode for banner. Banner opcode
21 EFI_IFR_EXTEND_OP_BANNER is extended opcode specific
22 to Intel's implementation.
23
24 @param Title String ID for title
25 @param LineNumber Line number for this banner
26 @param Alignment Alignment for this banner, left, center or right
27 @param Data Destination for the created opcode binary
28
29 @retval EFI_SUCCESS Opcode create success
30 @retval EFI_BUFFER_TOO_SMALL The space reserved in Data field is too small.
31
32 **/
33 EFI_STATUS
34 CreateBannerOpCode (
35 IN EFI_STRING_ID Title,
36 IN UINT16 LineNumber,
37 IN UINT8 Alignment,
38 IN OUT EFI_HII_UPDATE_DATA *Data
39 )
40 ;
41
42 /**
43 This function allows the caller to update a form that has
44 previously been registered with the EFI HII database.
45 The update make use of a extended opcode EFI_IFR_EXTEND_OP_LABEL
46 specific to Intel's implementation to complete the operation.
47
48
49 @param Handle Hii Handle
50 @param FormSetGuid The formset should be updated.
51 @param FormId The form should be updated.
52 @param Label Update information starting immediately after this
53 label in the IFR
54 @param Insert If TRUE and Data is not NULL, insert data after
55 Label. If FALSE, replace opcodes between two
56 labels with Data.
57 @param Data The adding data; If NULL, remove opcodes between
58 two Label.
59
60 @retval EFI_SUCCESS Update success.
61 @retval Other Update fail.
62
63 **/
64 EFI_STATUS
65 IfrLibUpdateForm (
66 IN EFI_HII_HANDLE Handle,
67 IN EFI_GUID *FormSetGuid, OPTIONAL
68 IN EFI_FORM_ID FormId,
69 IN UINT16 Label,
70 IN BOOLEAN Insert,
71 IN EFI_HII_UPDATE_DATA *Data
72 )
73 ;
74
75 /**
76 Extract formset class for given HII handle.
77
78 If Handle is not a valid EFI_HII_HANDLE in the default HII database, then
79 ASSERT.
80
81 If Class is NULL, then ASSERT.
82 IfFormSetTitle is NULL, then ASSERT.
83 If FormSetHelp is NULL, then ASSERT.
84
85 @param HiiHandle Hii handle
86 @param Class On output, Class of the formset
87 @param FormSetTitle On output, Formset title string
88 @param FormSetHelp On output, Formset help string
89
90 @retval EFI_SUCCESS Successfully extract Class for specified Hii
91 handle.
92
93 **/
94 EFI_STATUS
95 IfrLibExtractClassFromHiiHandle (
96 IN EFI_HII_HANDLE Handle,
97 OUT UINT16 *Class,
98 OUT EFI_STRING_ID *FormSetTitle,
99 OUT EFI_STRING_ID *FormSetHelp
100 )
101 ;
102
103 /**
104 Configure the buffer accrording to ConfigBody strings in the format of
105 <Length:4 bytes>, <Offset: 2 bytes>, <Width:2 bytes>, <Data:n bytes>.
106
107 @param Buffer the start address of buffer.
108 @param BufferSize the size of buffer.
109 @param Number the number of the strings.
110
111 @retval EFI_BUFFER_TOO_SMALL the BufferSize is too small to operate.
112 @retval EFI_INVALID_PARAMETER Buffer is NULL or BufferSize is 0.
113 @retval EFI_SUCCESS Operation successful.
114
115 **/
116 EFI_STATUS
117 EFIAPI
118 IfrLibExtractDefault(
119 IN VOID *Buffer,
120 IN UINTN *BufferSize,
121 UINTN Number,
122 ...
123 )
124 ;
125
126 #endif
127